/* AI Quality Count demo (/ai-quality-counter), inside the v2-editorial layout. A light, warm conveyor
   stage with three editorial boards under it (tally, item file, line log). Everything uses the v2 tokens;
   the class colours come from the v2 accent tokens via the counter cards, so there is no colour of its own here. */

.aqc-hero-grid { grid-template-columns: minmax(0, 1fr); max-width: 880px; }

.aqc { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; box-sizing: border-box; }

/* Stage */
.aqc-stage-wrap { position: relative; border-radius: 1rem; overflow: hidden; background: #ddd7c9; border: 1px solid var(--rule-strong); box-shadow: 0 18px 44px -28px rgba(10, 10, 10, .5); }
.aqc-stage { display: block; width: 100%; aspect-ratio: 2 / 1; background: #ddd7c9; }
.aqc-sim-tag { padding: .3rem .7rem; border-radius: 999px; border: 1.5px solid var(--ink); color: var(--ink); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.aqc-status { position: absolute; inset: auto 0 .75rem 0; margin: 0; text-align: center; color: #3a362e; font-size: .9rem; z-index: 2; }
.aqc-status[hidden] { display: none; }

.aqc-controls { display: flex; align-items: center; gap: .6rem; margin: .9rem 0 1.4rem; flex-wrap: wrap; }
.aqc-btn { border: 1.5px solid var(--rule-strong); background: transparent; color: var(--ink); border-radius: .7rem; padding: .6rem 1.2rem; font: 700 .9rem Inter, system-ui, sans-serif; cursor: pointer; }
.aqc-btn:hover:not(:disabled) { border-color: var(--ink); }
/* Same look as the page's other primary buttons (ink on cream): white on brand blue would be too faint. */
.aqc-btn-primary { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.aqc-btn-primary:hover:not(:disabled) { background: var(--accent-deep); border-color: var(--accent-deep); }
.aqc-btn:disabled { opacity: .45; cursor: not-allowed; }
.aqc-btn:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; }
.aqc-key { flex: 1 1 320px; margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }

/* Boards */
.aqc-board { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr) minmax(0, .95fr); gap: 1rem; align-items: start; }
.aqc-card { background: var(--cream); border: 1px solid var(--rule); border-radius: 1rem; padding: 1.1rem 1.2rem 1.25rem; }
.aqc-h { margin: 0 0 .8rem; font: 800 .72rem Inter, system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* The tally: counter cards, in the spirit of the app's own counters */
.aqc-counters { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.aqc-counter { display: flex; flex-direction: column; gap: .15rem; padding: .6rem .8rem; border-radius: .8rem; background: var(--paper); border: 1px solid var(--rule); }
.aqc-counter-main { grid-column: 1 / -1; background: var(--ink); color: var(--cream); border-color: var(--ink); }
.aqc-counter-main .aqc-counter-label { color: var(--cream); opacity: .8; }   /* --cream is the dark colour in dark theme, where --ink is the light card */
.aqc-counter.v2 { background: var(--paper); border-left: 4px solid var(--accent-deep); }
.aqc-counter-flag { border: 1.5px dashed var(--rule-strong); }
.aqc-counter-num { font-size: 2.1rem; line-height: 1.05; font-weight: 800; font-variant-numeric: tabular-nums; }
.aqc-counter-main .aqc-counter-num { font-size: 3.2rem; }
.aqc-counter-label { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* The item file: a crop and one ballot slip per check, then the verdict stamp */
.aqc-file-body { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: .9rem; align-items: start; }
.aqc-see-canvas { display: block; width: 112px; height: 112px; border-radius: .6rem; border: 2px solid var(--ink); background: #f1ece1; }
.aqc-ballots { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; align-content: start; min-height: 11.7rem; }   /* three slips, so the card never grows when they appear */
.aqc-slip { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; align-items: baseline; padding: .4rem .6rem; min-height: 3.6rem; box-sizing: border-box; min-width: 0; border: 1px solid var(--rule); border-left: 4px solid var(--rule-strong); border-radius: .5rem; background: var(--paper); font-size: .85rem; }
.aqc-slip-head { color: var(--muted); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.aqc-slip-body { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.aqc-slip-mark { grid-column: 1 / -1; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.aqc-slip[data-state="agree"] .aqc-slip-mark { color: var(--ink); font-weight: 700; }
.aqc-slip[data-state="dissent"] { background: transparent; border-style: dashed; }
.aqc-slip[data-state="waiting"] { background: transparent; border: 1px dashed var(--rule-strong); border-left-width: 4px; color: var(--muted); }
.aqc-slip[data-state="waiting"] .aqc-slip-body { font-weight: 500; }
.aqc-file-item { margin: -.3rem 0 .7rem; font-weight: 700; font-size: 1.05rem; }
.aqc-stamp { margin: .9rem 0 0; padding: .6rem .8rem; border: 2px solid var(--ink); border-radius: .6rem; font-weight: 700; font-size: .92rem; line-height: 1.4; background: var(--paper); min-height: 4.7em; }
.aqc-stamp[data-status="unverified"] { border-style: dashed; }
.aqc-stamp[data-status="disputed"] { border-style: dotted; }

/* The line log: the last few items decided */
.aqc-log-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; min-height: 23.5rem; align-content: start; }   /* room for six two-line rows, so nothing below it moves */
.aqc-log-row { display: grid; grid-template-columns: 2.6rem 1fr; gap: 0 .5rem; align-items: baseline; padding: .35rem .6rem; border-left: 4px solid var(--rule-strong); background: var(--paper); border-radius: .4rem; font-size: .88rem; }
.aqc-log-id { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; }
.aqc-log-what { font-weight: 700; }
.aqc-log-how { grid-column: 2; color: var(--muted); font-size: .78rem; }
.aqc-log-row[data-status="unverified"] { border-left-style: dashed; background: transparent; }
.aqc-log-empty { color: var(--muted); font-size: .88rem; padding: .35rem 0; }

/* Steps, uses, note, CTA */
.aqc-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; max-width: 1100px; margin: 0 auto; }
.aqc-step { border: 1px solid var(--rule); border-radius: 1rem; padding: 1.4rem; background: var(--cream); }
.aqc-step-num { font-size: 2.2rem; color: var(--accent-deep); }
.aqc-step h3 { margin: .3rem 0 .4rem; font-size: 1.2rem; }
.aqc-step p { margin: 0; color: var(--muted); line-height: 1.65; }
.aqc-uses { list-style: none; max-width: 1000px; margin: 0 auto 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.aqc-uses li { border-left: 3px solid var(--accent); padding: .2rem 0 .2rem 1rem; color: var(--muted); line-height: 1.6; }
.aqc-uses strong { display: block; color: var(--ink); }
.aqc-note { max-width: 1000px; margin: 0 auto; padding: 1rem 1.25rem; border: 1px dashed var(--rule-strong); border-radius: .8rem; color: var(--muted); line-height: 1.6; }
.aqc-cta { text-align: center; }
.aqc-cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .5rem; }
.aqc-cta p { color: var(--muted); margin: 0 0 1.25rem; }
.aqc-cta .v2-hero-cta { justify-content: center; }

/* Screen-reader-only live summary */
.aqc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1000px) {
    .aqc-board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .aqc-tally { grid-column: 1 / -1; }
    .aqc-counters { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
    .aqc-counter-main { grid-column: auto; }
    .aqc-counter-main .aqc-counter-num { font-size: 2.1rem; }
}
@media (max-width: 680px) {
    .aqc { padding: 0 1rem; }
    .aqc-board { grid-template-columns: minmax(0, 1fr); }
    .aqc-counters { grid-template-columns: 1fr 1fr; }
    .aqc-counter-main { grid-column: 1 / -1; }
    .aqc-counter-main .aqc-counter-num { font-size: 3rem; }
}
