#tool h3 { font-size: 1.4em; margin: 0 0 4px; }
#tool .label { color: var(--text-light); font-size: 0.9em; margin: 0 0 6px; }
#tool .list::before, #tool .right::before { content: ""; display: block; width: 48px; height: 6px; background: var(--code); margin-bottom: 10px; }
#tool .intro > :first-child { margin-top: 0; }
#filters { display: flex; flex-wrap: wrap; gap: 0.4em 0.8em; align-items: flex-end; margin-top: 1em; padding: 0.5em 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
#filters label, #range label { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15em; color: var(--text-light); font-size: 0.8em; line-height: 1.2; }
#filters select, #range select { margin: 0; border-radius: 0; max-width: 14em; padding-top: 0.2em; padding-bottom: 0.2em; }
#tool .panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2.5em; align-items: start; margin-top: 1em; }
#tool .scroll { max-height: 42em; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
#list button { flex: none; display: block; width: 100%; margin: 0; text-align: left; background: none; color: var(--text); border-color: var(--border); border-radius: 0; padding: 0.3em 0.6em; font-size: 0.9em; }
#list button:enabled:hover { background: none; border-color: var(--accent); color: var(--accent); }
#list button[aria-pressed="true"], #list button[aria-pressed="true"]:enabled:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
#list .name { display: flex; justify-content: space-between; gap: 0.5em; }
#list .sub { display: block; font-size: 0.8em; opacity: 0.8; }
#list .badge { margin-left: 0.4em; font-size: 0.7em; color: var(--text-light); white-space: nowrap; }
#list button[aria-pressed="true"] .badge { color: var(--accent-text); opacity: 0.85; }
#tool .listhead { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5em; margin: 0 0 6px; }
#tool .listhead .label { margin: 0; }
#tool .listhead .textbutton[hidden] { display: none; }
#tool .iconbutton { flex: none; margin: 0; padding: 4px; line-height: 0; background: none; border: 0; border-radius: 0; color: var(--text-light); cursor: pointer; }
#tool .iconbutton:enabled:hover { background: none; color: var(--accent); }
#tool .iconbutton svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#tool .iconbutton .icon-done, #tool .iconbutton.copied .icon-idle { display: none; }
#tool .iconbutton.copied .icon-done { display: block; }
#tool .view { position: relative; margin-top: 0.6em; }
#view { display: block; width: 100%; height: clamp(22em, calc(100vh - 12em), 40em); cursor: crosshair; border: 1px solid var(--border); }
#empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1em; color: var(--text-light); border: 1px solid var(--border); min-height: 16em; }
#empty[hidden] { display: none; }
#tool #photo { position: absolute; top: 6px; right: 6px; background: var(--bg); }
#tip { position: absolute; z-index: 1; pointer-events: none; padding: 0.2em 0.5em; background: var(--bg); border: 1px solid var(--accent); font-size: 0.85em; white-space: nowrap; }
#range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5em 1em; margin-top: 0.6em; }
.textbutton { margin: 0; padding: 0.2em 0.7em; font-size: 0.85em; background: none; color: var(--accent); border: 1px solid var(--accent); border-radius: 0; cursor: pointer; }
.textbutton:enabled:hover { background: var(--accent-bg); }
#status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#tool + .notes { max-width: 60em; margin-top: 3em; font-size: 0.85em; color: var(--text-light); }
#tool + .notes::before { content: ""; display: block; width: 4em; border-top: 1px solid var(--text-light); margin-bottom: 1em; }
@media only screen and (max-width: 720px) {
  #tool .panes { grid-template-columns: minmax(0, 1fr); gap: 1.5em; }
  #tool .right { order: -1; }
  #tool .scroll { max-height: 20em; }
}
#titlebar .titlerow { display: flex; align-items: center; gap: 0.4em; }
#titlebar h3 { flex: 1; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; }
#titlebar .titlerow .iconbutton { margin: 0; }
#titlebar .modes { display: flex; align-items: center; margin: 0.3em 0 0.4em; }
#titlebar .modes button:not(.iconbutton) { margin: 0; padding: 0.1em 0.7em; font-size: 0.9em; background: none; color: var(--accent); border: 1px solid var(--accent); border-radius: 0; cursor: pointer; }
#titlebar .modes button:not(.iconbutton):enabled:hover { background: var(--accent-bg); }
#titlebar .modes button[aria-pressed="true"], #titlebar .modes button[aria-pressed="true"]:enabled:hover { background: var(--accent); color: var(--accent-text); }
#titlebar .modes .iconbutton { margin-left: 0.5em; }
#titlebar .modes .iconbutton[hidden] { display: none; }
#story { position: absolute; inset: 0; overflow-y: auto; padding: 0.6em 1em; border: 1px solid var(--border); background: var(--bg); font-size: 0.95em; }
#story[hidden] { display: none; }
#story p { margin: 0 0 0.7em; }
#filters .rss { margin-left: auto; margin-right: -4px; align-self: flex-end; text-decoration: none; border: 0; }
#filters .rss:hover { color: var(--accent); }
#sources { color: var(--text-light); font-size: 0.8em; margin: 0.4em 0 0; line-height: 1.35; }
#title .beta { font-size: 0.5em; font-weight: normal; color: var(--text-light); }
.notes details { margin-top: 1em; }
.notes summary { cursor: pointer; color: var(--accent); }
.notes table { width: 100%; border-collapse: collapse; margin-top: 0.6em; font-size: 0.9em; line-height: 1.3; }
.notes th, .notes td { text-align: left; vertical-align: top; padding: 0.25em 0.8em 0.25em 0; border-bottom: 1px solid var(--border); }
.notes th { color: var(--text); font-weight: normal; border-bottom-color: var(--text-light); }
@media only screen and (max-width: 720px) { .notes table { font-size: 0.8em; } }
