/* Terminal style: monospace, black on white, one soft green. */
:root { --green: #d4ecd8; --red: #f6cfcf; --ink: #000; --paper: #fff; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/22px 'Courier New', Courier, monospace; min-height: 100vh; display: flex; flex-direction: column; }
h2 { font-size: 14px; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px dashed var(--ink); }
h3 { font-size: 14px; margin: 0 0 6px; }
button { font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); padding: 2px 10px; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
button[disabled], button[aria-disabled="true"] { cursor: not-allowed; border-style: dashed; }
.btn { font-weight: 700; background: var(--green); padding: 10px 20px; }
.bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding: 12px 24px; border-bottom: 2px solid var(--ink); }
.brand { font-weight: 700; font-size: 18px; letter-spacing: 2px; }
.badge { border: 1px dashed var(--ink); padding: 0 8px; }
#speed button { padding: 0 8px; margin-left: 4px; font-size: 12px; }
#speed button[aria-pressed="true"] { background: var(--green); font-weight: 700; }
.small { font-size: 12px; line-height: 18px; margin: 6px 0 0; }
input[type="text"] { display: block; width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); padding: 6px 10px; }
input[disabled] { border-style: dashed; }
.err { font-weight: 700; margin-top: 6px; }
/* dropdown */
.ddl { font-size: 12px; line-height: 18px; position: relative; }
.ddl-head { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; padding: 8px 10px; }
.ddl-list { border: 2px solid var(--ink); border-top: 0; margin: 0; padding: 0; list-style: none; background: var(--paper); }
.ddl-list li + li { border-top: 1px dashed var(--ink); }
.ddl-opt { display: block; width: 100%; text-align: left; border: 0; padding: 8px 10px; }
.ddl-opt[aria-selected="true"] { background: var(--green); }
.ddl-opt b, .ddl-head b { display: block; }
.ddl-opt span, .ddl-head span.l { display: block; }
.runbox { border: 1px solid var(--ink); padding: 12px 16px; font-size: 12px; line-height: 18px; white-space: pre-wrap; }
/* log */
#log { display: flex; flex-direction: column; }
.ln { display: flex; gap: 16px; }
.ln .ts { flex: none; width: 104px; }
.ln .tag { flex: none; width: 72px; font-weight: 700; }
.ln .msg { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.progress { font-weight: 700; border-top: 2px solid var(--ink); padding-top: 12px; white-space: pre; }
.block { border-top: 2px solid var(--ink); padding-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.block > .head { font-weight: 700; }
.item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; border: 1px solid var(--ink); padding: 8px 12px; }
.item .t { flex: 1 1 380px; min-width: 0; }
.item .acts { display: flex; gap: 8px; }
.item .acts button { border-width: 1px; }
.item .acts button[aria-pressed="true"] { background: var(--green); font-weight: 700; }
.plain { padding: 0 12px; }
.notice { background: var(--green); border: 2px solid var(--ink); padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions .btn { background: var(--green); }
.actions .btn.alt { background: var(--paper); }
.sec { border: 1px dashed var(--ink); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.sec .head { font-weight: 700; }
pre.raw { margin: 0; white-space: pre-wrap; border: 1px dashed var(--ink); padding: 8px 12px; }

/* page: steps stacked down the page; inside [1], picker left and preview right */
.page { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 20px 24px 48px; display: flex; flex-direction: column; gap: 24px; }
.step[hidden], #review:empty, #stage:empty { display: none; }
.sechead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; border-bottom: 1px dashed var(--ink); padding-bottom: 6px; margin-bottom: 12px; }
.sechead h2 { border: 0; padding: 0; margin: 0; }
.sechead button { border-width: 1px; padding: 0 8px; font-size: 12px; }
.sechead .sum { flex: 1; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.pick { flex: 0 1 440px; min-width: 300px; display: flex; flex-direction: column; gap: 16px; }
.preview { flex: 1 1 420px; min-height: 260px; border: 2px solid var(--ink); padding: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.preview.empty { border-style: dashed; text-align: center; }
.paper { width: 100%; max-width: 380px; border: 2px solid var(--ink); background: var(--paper); box-shadow: 5px 5px 0 var(--ink); padding: 18px 22px; display: flex; flex-direction: column; gap: 10px; }
.paper .file { font-size: 12px; line-height: 18px; word-break: break-all; }
.bar-fill { height: 10px; background: var(--green); border: 1px solid var(--ink); }
.rule { height: 8px; border-top: 1px solid var(--ink); }
.ddl-head[disabled] { border-style: dashed; cursor: not-allowed; background: var(--green); }
/* review is the prominent part */
.review { border: 3px solid var(--ink); padding: 20px 24px; gap: 14px; }
.rhead { font-size: 20px; line-height: 30px; background: var(--green); border: 2px solid var(--ink); padding: 10px 16px; font-weight: 700; }
@media (max-width: 860px) { .pick { flex-basis: 100%; } .sechead .sum { text-align: left; } }
.linkbtn { display: inline-block; color: var(--ink); text-decoration: none; border: 2px solid var(--ink); padding: 2px 10px; font-weight: 700; }
.preview .actions { justify-content: center; }
.about p { margin: 0 0 8px; max-width: 900px; }
.brandbox { display: flex; flex-direction: column; }
.credit { font-size: 12px; line-height: 18px; }
ul.how { margin: 0 0 8px; padding-left: 20px; max-width: 900px; }
ul.how li { margin-bottom: 4px; }
.preview .pg { width: 100%; max-width: 420px; border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); background: var(--paper); display: block; }
.preview .fname { font-size: 12px; line-height: 18px; word-break: break-all; text-align: center; }
.sheet { width: 100%; max-height: 360px; overflow: auto; border: 2px solid var(--ink); background: var(--paper); }
.sheet table { border-collapse: collapse; font-size: 11px; line-height: 16px; white-space: nowrap; }
.sheet td { border: 1px solid #bbb; padding: 1px 6px; }
.sheet tr.hdr td { background: var(--green); font-weight: 700; }
.viewer { border: 3px solid var(--ink); padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.viewer[hidden] { display: none; }
.viewer img { width: 100%; max-width: 1000px; border: 1px solid var(--ink); align-self: center; }
.viewer .sheet { max-height: none; }
.preview { min-width: 0; }
/* Disabled buttons: muted, so they don't look clickable. Covers both the disabled attribute and aria-disabled
   (the page uses aria-disabled on [ read this IO ] and the push button). The locked IO picker keeps its own look. */
button:disabled:not(.ddl-head), .btn:disabled, .actions .btn:disabled,
button[aria-disabled="true"], .btn[aria-disabled="true"], .actions .btn[aria-disabled="true"] {
  background: var(--paper); color: #666; border-color: #999; cursor: not-allowed; }

/* Step 3: approve/exclude are shaded so they read as actions to take. Approve green, exclude red.
   Once a flag is decided, the chosen button goes bold and the other one mutes. */
.stepnote { font-weight: 700; }
.item .acts button[data-act="approve"] { background: var(--green); }
.item .acts button[data-act="exclude"] { background: var(--red); }
.item .acts button[aria-pressed="true"] { border-width: 2px; font-weight: 700; }
.item.decided .acts button[aria-pressed="false"] { background: var(--paper); color: #666; border-color: #999; }
