/* proofback app. Uses only the tokens defined in ../styles.css. */

.app .top { max-width: 1400px; }
.app main { max-width: 1400px; margin: 0 auto; padding: 0 24px 48px; }
.local-note { font-size: var(--fs-s); color: var(--muted); }

/* setup */
.setup { max-width: 760px; padding-top: 24px; }
.setup h1 { font-size: var(--fs-h2); max-width: none; margin-bottom: 8px; }
.setup .lead { margin-bottom: 24px; }
.steps-form { list-style: none; counter-reset: s; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.steps-form li { counter-increment: s; padding: 16px 0 16px 36px; border-bottom: 1px solid var(--line); position: relative; }
.steps-form li::before { content: counter(s); position: absolute; left: 0; top: 16px; font-weight: var(--w-display); color: var(--muted); font-variant-numeric: tabular-nums; }
.steps-form label { font-weight: var(--w-strong); display: block; }
.opt { font-weight: var(--w-regular); color: var(--muted); font-size: var(--fs-s); margin-left: 6px; }
.hint { margin: 2px 0 10px; color: var(--muted); font-size: var(--fs-s); }
.pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: var(--fs-s); color: var(--muted); }
input[type=file] { font: inherit; font-size: var(--fs-s); color: var(--ink); max-width: 100%; }
.setup-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.check { font-size: var(--fs-s); display: flex; gap: 8px; align-items: center; }
.status-line { margin: 0; font-size: var(--fs-s); color: var(--muted); min-height: 1.4em; }
.status-line.error { color: var(--red); }

/* review */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 0 12px; }
.toolbar strong { font-size: var(--fs-l); }
.toolbar .muted { font-size: var(--fs-s); margin-left: 8px; }
.exports { display: flex; gap: 6px; flex-wrap: wrap; }

.panes { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1.1fr); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; height: calc(100vh - 190px); min-height: 520px; }
.panes .pane { display: flex; flex-direction: column; min-height: 0; border: 0; border-right: 1px solid var(--line); border-radius: 0; }
.panes .pane:last-child { border-right: 0; }
.pane-page { background: var(--well); }
.page-wrap { overflow: auto; flex: 1; padding: 14px; }
.page-stage { position: relative; margin: 0 auto; width: max-content; box-shadow: var(--shadow); background: #fff; }
.page-stage canvas { display: block; }
.mark { position: absolute; border: 2px solid transparent; border-radius: 2px; padding: 0; background: transparent; }
.mark span { position: absolute; top: -9px; left: -9px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--blue); color: #fff; font: var(--w-strong) var(--fs-xs)/18px var(--ui); text-align: center; }
.mark.on { border-color: var(--blue); background: var(--blue-soft); }

.pane-list { background: var(--bg); }
.item-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; outline: none; }
.item-list li { padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: var(--fs-s); display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; }
.item-list li .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.item-list li .k { font-weight: var(--w-strong); }
.item-list li .loc { grid-column: 2; font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-list li .note { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-list li.on { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.tag { font-size: var(--fs-xs); font-weight: var(--w-strong); padding: 0 5px; border-radius: 3px; margin-left: 6px; }
.tag.exact { color: var(--green); } .tag.line { color: var(--amber); } .tag.region { color: var(--blue); } .tag.page { color: var(--red); }
.tag.st { color: var(--muted); border: 1px solid var(--line); }

.pane-src .detail { padding: 12px 16px; border-bottom: 1px solid var(--ed-line); font-size: var(--fs-s); }
.detail .who { color: var(--ed-amber); font-weight: var(--w-strong); }
.detail .body { font: var(--w-strong) var(--fs-m)/1.45 var(--ui); white-space: pre-wrap; margin: 4px 0; }
.detail .meta { color: var(--ed-muted); font-family: var(--mono); font-size: var(--fs-xs); }
.pane-src .code { overflow: auto; flex: 1; }
.decide { border-top: 1px solid var(--ed-line); padding: 10px 12px; display: grid; gap: 8px; }
.decide-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.decide .ctl { background: var(--ed-bar); color: var(--ed-ink); border-color: var(--ed-line); }
.decide .ctl:hover { border-color: var(--ed-blue); }
.decide textarea { font: var(--fs-s) var(--ui); width: 100%; border-radius: var(--radius); border: 1px solid var(--ed-line); background: var(--ed-field); color: var(--ed-ink); padding: 6px 8px; resize: vertical; }
.decide .status-line { color: var(--ed-muted); }

@media (max-width: 980px) {
  .panes { grid-template-columns: 1fr; height: auto; }
  .panes .pane { border-right: 0; border-bottom: 1px solid var(--line); max-height: 70vh; }
  .local-note { display: none; }
}
@media (max-width: 640px) {
  .app main { padding: 0 16px 32px; }
}
