/* Quality Artwork Detection Engine in the Gemini Partner Portal look (AFC-029, Product Management, 2026-10-20). Values come from the
   Portal's own styles (PartnerPortal/krutsch_webapp: _variables.scss, _buttons.scss, fonts.scss, upload-file,
   artwork-check-result, dashboard tiles, colored and striped tables, confirmation modal, sign-in), reproduced here in
   one plain stylesheet: no Bootstrap, no framework. Two deliberate departures, both for WCAG AA: small grey text uses
   the Portal's dark grey #525252 instead of #848484, and every control keeps a visible focus ring. */

@font-face { font-family: "Frutiger LT Std"; src: url("fonts/FrutigerLTStd-55Roman.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Frutiger LT Std"; src: url("fonts/FrutigerLTStd-65Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "DDC Hardware Condensed"; src: url("fonts/DDCHardware-Condensed.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  /* Portal palette (_variables.scss) */
  --red: #E3173E;            /* --gemini-red */
  --red-dark: #BE1939;       /* --gemini-button-hovered */
  --red-faded: rgba(227, 23, 62, .4);
  --red-soft: #FAD2D0;       /* --gemini-error-alert-background-color */
  --black: #000;
  --ink: #000;
  --text: #212529;           /* body text: the Portal sets none, so Bootstrap's default renders */
  --muted: #525252;          /* --gemini-dark-gray; the Portal's #848484 is under AA for small text */
  --grey: #848484;           /* --gemini-grey: borders, icons, large text only */
  --light-grey: #BABABA;     /* --gemini-light-grey */
  --panel: #F6F5F5;          /* --gemini-main-color: panels, tiles, table heads */
  --card-line: #E8E6E6;
  --surface: #FFFFFF;
  --line: #F6F5F5;
  --line-2: #BABABA;
  --green: #31D641;          /* --gemini-green */
  --yellow: #FFD467;         /* --gemini-yellow / warning */
  --yellow-ink: #8A6400;     /* the artwork check's amber for text on white */
  --yellow-soft: #FDF1CE;    /* --gemini-warning-light-yellow */
  --focus: rgba(13, 110, 253, .25);
  --focus-border: #86B7FE;
  --font: "Frutiger LT Std", Arial, "Helvetica Neue", Helvetica, sans-serif;
  --font-title: "DDC Hardware Condensed", "Arial Narrow", "Frutiger LT Std", Arial, sans-serif;
  --fs-1: .75rem; --fs-2: .875rem; --fs-3: 1rem; --fs-4: 1.125rem; --fs-5: 1.25rem; --fs-6: 1.5rem; --fs-7: 2rem; --fs-xl: 2.625rem;
  --radius: .5rem;
  --radius-lg: 1rem;
  --shadow: .125rem .1875rem .375rem rgba(0, 0, 0, .08);
  --page: 1728px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-weight: 400; font-size: var(--fs-3); line-height: 1.5; color: var(--text);
  background: var(--surface); font-synthesis: none; min-height: 100vh; display: flex; flex-direction: column; }
b, strong, th { font-weight: 700; }
a { color: var(--red); text-underline-offset: 2px; }
a:hover { color: var(--red-dark); }
img { max-width: 100%; }
code { font-size: .9em; }
:focus-visible { outline: none; box-shadow: 0 0 0 .25rem var(--focus); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-2); }
[hidden] { display: none !important; }
/* Out of sight, still read by screen readers (AFC-038: the upload status line) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Shell: white navbar (5rem) over the grey breadcrumb bar (3rem), as the Portal's header ---- */
.shell { position: sticky; top: 0; z-index: 5; background: var(--surface); }
.shell-in { max-width: var(--page); margin: 0 auto; padding: 0 3rem; width: 100%; display: flex; align-items: center; gap: 2rem; }
.navbar { height: 5rem; display: flex; align-items: center; background: var(--surface); }
.navbar .shell-in { height: 100%; }
.navbar.centred .shell-in { justify-content: center; }
.brand { display: inline-flex; align-items: center; gap: .875rem; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand .logo { width: 150px; height: auto; display: block; }
/* AFC-039/040: the brand never shrinks below its longest word, so the name wraps onto two lines; the greeting gives way first */
.brand .app { font-weight: 700; font-size: var(--fs-5); color: var(--ink); padding-left: .875rem; border-left: 2px solid var(--black); line-height: 1.1; white-space: normal; }
.nav { flex: none; list-style: none; display: flex; align-items: center; gap: 0; margin: 0; padding: 0; height: 100%; }
.nav li { padding: 1rem 1.8rem 1rem 0; }
.nav-link { position: relative; color: var(--ink); text-decoration: none; font-weight: 700; font-size: var(--fs-5); white-space: nowrap; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.6rem; height: .25rem; border-radius: .25rem; background: transparent; }
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { background: var(--panel); }
.nav-link.active::after { background: var(--red); }
.user { margin-left: auto; display: inline-flex; align-items: center; gap: 1rem; white-space: nowrap; font-size: var(--fs-3); }
.user form { display: inline; margin: 0; }
.user, .user .hello { min-width: 0; }
.user .hello { overflow: hidden; text-overflow: ellipsis; }
.crumbs { height: 3rem; background: var(--panel); box-shadow: 0 4px 4px 0 rgba(0, 0, 0, .25); display: flex; align-items: center; }
.crumbs .shell-in { justify-content: space-between; }
.trail { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; font-weight: 700; font-size: var(--fs-3); color: var(--ink); }
.trail li + li::before { content: "/"; padding: 0 .5rem; color: var(--muted); font-weight: 400; }
.trail [aria-current] { color: var(--muted); }
.local { font-weight: 700; font-size: var(--fs-2); color: var(--ink); white-space: nowrap; }
.local::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--green); margin-right: .5rem; vertical-align: 1px; }
.page { flex: 1; max-width: var(--page); margin: 0 auto; padding: 2rem 3rem 3rem; width: 100%; }
.foot { border-top: .1875rem solid var(--panel); }
.foot-in { max-width: var(--page); margin: 0 auto; padding: 1rem 3rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  flex-wrap: wrap; font-size: var(--fs-1); color: var(--muted); }
.foot .tagline { height: 12px; width: auto; }

/* Logged out (login, errors before sign-in): the Portal's black page with the logo centred */
body.outside { background: var(--black); }
body.outside .crumbs { display: none; }
body.outside .foot { border-top-color: #222; }
body.outside .foot-in { color: var(--light-grey); }
body.outside .foot .tagline { filter: invert(1); }
body.outside .page { display: flex; justify-content: center; align-items: flex-start; padding-top: 4rem; }

/* ---- Type: the Portal's gemini-text-* scale ---- */
.page-title, .job-title, .login-title { font-family: var(--font-title); font-weight: 400; font-size: var(--fs-xl); line-height: 1.19; color: var(--ink); margin: 0; letter-spacing: 0; }
.sec-title { font-weight: 700; font-size: var(--fs-6); line-height: 1.25; color: var(--ink); margin: 0 0 1rem; }
.hint { margin: 0; font-size: var(--fs-2); color: var(--text); }
.hint.ok { color: var(--ink); font-weight: 700; }

/* ---- Cards and panels: the Portal's info-card (white, .1875rem #f6f5f5 border, 1rem radius) ---- */
.card { background: var(--surface); border: .1875rem solid var(--panel); border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 1.5rem; }
.card > p:last-child { margin-bottom: 0; }

/* ---- Buttons: .btn-red and .outline-button ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 700; font-size: var(--fs-3); line-height: normal;
  border: .125rem solid var(--red); border-radius: .4rem; padding: 8px 1.5rem; cursor: pointer; text-decoration: none; white-space: nowrap; letter-spacing: 0; text-transform: none; }
.btn.primary { background: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); color: #fff; }
.btn.primary:disabled { background: var(--red-faded); border-color: transparent; cursor: not-allowed; opacity: .6; }
.btn.ghost { background: #fff; color: var(--red); }
.btn.ghost:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn.ghost:disabled { color: var(--red-faded); border-color: var(--red-faded); background: #fff; cursor: not-allowed; }
.btn.small-btn { padding: 4px .875rem; font-size: var(--fs-2); }
.btn.logout { padding: 4px .875rem; font-size: var(--fs-2); background: #fff; color: var(--red); }
.btn.logout:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* ---- Upload area: the Portal's upload-file drop zone ---- */
/* AFC-037: the drop box beside the list of this visit's files */
.intake-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 2rem; align-items: stretch; }
.intake .drop { min-height: 0; padding: 1.5rem 1rem; background: var(--surface); }
.intake .drop-title { font-size: var(--fs-4); }
.drop-art { position: relative; display: flex; align-items: center; justify-content: center; width: 5.5rem; height: 5.5rem; margin: 1rem 0 .75rem;
  background: var(--panel); border: 2px dashed var(--light-grey); border-radius: var(--radius); }
.drop-art::before { content: "\2193"; position: absolute; top: -1.15rem; left: 0; right: 0; text-align: center; font-size: var(--fs-6); font-weight: 700; line-height: 1; color: var(--red); }
.drop-art .drop-icon { margin: 0; width: 2.25rem; height: 2.75rem; }
.files { padding-left: 2rem; border-left: 1px solid var(--card-line); }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; min-height: 300px;
  padding: 2rem 4rem; text-align: center; cursor: pointer; background: var(--panel); border: 3px dotted transparent; border-radius: var(--radius-lg); }
.drop:hover { border-color: var(--light-grey); }
.drop:focus-visible { border-color: var(--focus-border); }
.drop.over { border-color: var(--grey); }
.drop.over .drop-btn, .drop.over .drop-or { visibility: hidden; }
.drop.busy { opacity: .6; pointer-events: none; }
.drop-icon { width: 3rem; height: 3.75rem; margin-bottom: .75rem; position: relative; border: 3px solid var(--grey); border-radius: 4px; }
.drop-icon::after { content: ""; position: absolute; top: -3px; right: -3px; width: 1rem; height: 1rem; background: var(--panel); border-left: 3px solid var(--grey); border-bottom: 3px solid var(--grey); border-bottom-left-radius: 3px; }
.drop-title { font-weight: 700; font-size: var(--fs-6); line-height: 1.25; color: var(--ink); }
.drop-or { font-size: var(--fs-4); line-height: 1.56; color: var(--text); }
.drop-btn { display: inline-block; margin-top: .5rem; background: var(--red); color: #fff; font-weight: 700; padding: .5rem 2rem; border-radius: var(--radius); }
.drop:hover .drop-btn { background: rgba(227, 23, 60, .8); }
.drop-sub { margin-top: 1rem; font-weight: 700; font-size: var(--fs-2); color: var(--muted); }
.files-title { font-weight: 700; font-size: var(--fs-5); color: var(--ink); margin: 0 0 .5rem; }
.file-list { list-style: none; margin: 0; padding: 0; }
#hint:not(.visually-hidden) { margin-top: 1rem; font-weight: 700; color: var(--red-dark); }
.file-row, .files-empty { display: flex; align-items: center; gap: .75rem; padding: .875rem 0; border-bottom: 1px solid var(--card-line); }
.files-empty { color: var(--muted); }
.file-icon { flex: none; position: relative; width: 1rem; height: 1.25rem; border: 2px solid var(--grey); border-radius: 2px; }
.file-icon::after { content: ""; position: absolute; top: -2px; right: -2px; width: .4rem; height: .4rem; background: var(--surface); border-left: 2px solid var(--grey); border-bottom: 2px solid var(--grey); }
.file-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--ink); }
.file-size { flex: none; font-size: var(--fs-2); color: var(--muted); }
.file-row .badge.small-badge { margin-right: 0; }
.file-failed { flex: none; display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: var(--fs-2); color: var(--red-dark); }
.warn-icon { position: relative; width: 1rem; height: .875rem; background: var(--red-dark); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.warn-icon::after { content: "!"; position: absolute; left: 0; right: 0; bottom: -.1rem; text-align: center; font-size: .6rem; font-weight: 700; color: #fff; }
.file-open { flex: none; font-size: var(--fs-5); line-height: 1; font-weight: 700; color: var(--red-dark); text-decoration: none; padding: .25rem .375rem; border-radius: .25rem; }
.file-open:hover { background: var(--panel); }
.file-row.busy .file-name { font-weight: 400; color: var(--muted); }
.file-progress { flex: 1 1 35%; position: relative; height: .375rem; overflow: hidden; background: var(--panel); border-radius: 1rem; }
.file-progress::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: var(--red); border-radius: 1rem; animation: file-progress 1.2s ease-in-out infinite; }
@keyframes file-progress { to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .file-progress::after { animation: none; left: 0; width: 100%; opacity: .4; } }
.replaces { margin-top: 1.5rem; }
.replaces .hint { margin: 0; flex: 1 1 100%; font-size: var(--fs-2); color: var(--muted); }
.replaces select { width: 100%; }

/* ---- Fields: app-input and app-select-box ---- */
.field, .decide-row label, .new-user label { display: grid; gap: 2px; margin: 0 0 1.5rem; font-weight: 700; font-size: var(--fs-1); color: var(--ink); text-transform: none; letter-spacing: 0; }
.field input, .decide-row input[type=text], .decide-row select, .new-user input, .new-user select, .row-actions input[type=password], .feedback-select, #report-text {
  font: inherit; font-weight: 700; font-size: var(--fs-2); color: var(--ink); background: #fff; border: 1px solid var(--black); border-radius: .4rem; padding: .5rem 1rem; width: 100%; }
.field input:focus, .decide-row select:focus, .new-user input:focus, .new-user select:focus, .row-actions input:focus, .feedback-select:focus, #report-text:focus {
  outline: none; border-color: var(--focus-border); box-shadow: 0 0 0 .25rem var(--focus); }
::placeholder { color: var(--grey); font-weight: 400; }
.decide-row { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.decide-row label.grow { flex: 1; min-width: 240px; margin-bottom: .25rem; }
.new-user { margin-top: 1.5rem; padding-top: 1.5rem; border-top: .1875rem solid var(--panel); }
.new-user label { margin: 0; min-width: 180px; }
.new-user .btn { align-self: flex-end; }

/* ---- Messages: alert boxes ---- */
.problem { background: var(--red-soft); color: var(--black); border-radius: .375rem; padding: .5rem .75rem; font-size: var(--fs-2); }
.problem:empty { display: none; }
.problem ul { margin: 0; padding-left: 1.25rem; }
.flash { margin: 0 0 1.5rem; padding: .75rem 1rem; background: var(--panel); border-left: 6px solid var(--green); border-radius: 4px; font-size: var(--fs-2); color: var(--black); }
.flash.problem { background: var(--red-soft); border-left-color: var(--red); font-weight: 700; }
.flash code { font-size: var(--fs-2); user-select: all; }

/* ---- Status: the Portal's status pills and its artwork-check colours ---- */
.badge { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: var(--fs-2); line-height: 1.2; letter-spacing: .04em;
  text-transform: uppercase; border-radius: 1.5rem; padding: .3rem .8rem .2rem; color: var(--black); background: var(--light-grey); white-space: nowrap; }
.badge.READY { background: var(--green); color: var(--black); }
.badge.CHECK { background: var(--yellow); color: var(--black); }
.badge.STOPPED, .badge.ERROR { background: var(--red); color: #fff; }
.badge.small-badge { font-size: var(--fs-1); padding: .2rem .65rem .12rem; margin-right: .5rem; }
.bi { width: 1.5rem; height: 1.5rem; flex: none; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-size: .9rem; font-weight: 700; line-height: 1; margin-top: .1rem; }
.READY .bi { background: var(--green); }
.READY .bi::before { content: "\2713"; }
.CHECK .bi { background: var(--yellow-ink); clip-path: polygon(50% 4%, 98% 94%, 2% 94%); border-radius: 0; padding-top: 5px; font-size: .8rem; }
.CHECK .bi::before { content: "!"; }
.STOPPED .bi, .ERROR .bi { background: var(--red); }
.STOPPED .bi::before, .ERROR .bi::before { content: "\2715"; }

/* ---- The verdict card: the Portal's artwork-check-result card (6px status rail, 1px #bababa, 4px radius) ---- */
.job { border: 1px solid var(--light-grey); border-left-width: 6px; border-radius: 4px; padding: 1.5rem 2rem; }
.job.READY { border-left-color: var(--green); }
.job.CHECK { border-left-color: var(--yellow); }
.job.STOPPED, .job.ERROR { border-left-color: var(--red); }
.job-head { margin-bottom: 1rem; }
.job-meta { margin: .5rem 0 0; font-size: var(--fs-2); color: var(--muted); }
.status { display: flex; align-items: flex-start; gap: .75rem; padding: 1rem 0; border-top: .1875rem solid var(--panel); border-bottom: .1875rem solid var(--panel); flex-wrap: wrap; }
.why { flex: 1; min-width: 240px; font-weight: 700; font-size: var(--fs-4); line-height: 1.35; color: var(--ink); }
.why small { display: block; margin-top: .25rem; font-weight: 400; font-size: var(--fs-1); color: var(--muted); }
.reasons { padding-left: 1.25rem; margin: 1.25rem 0; font-size: var(--fs-3); }
.reasons > li { margin-bottom: 1rem; }
.reasons > li::marker { font-weight: 700; color: var(--red); }
.reasons > li > b { color: var(--ink); }
.reasons p { margin: .25rem 0 0; }
.steps { padding-left: 1.25rem; margin: .5rem 0 0; font-size: var(--fs-2); }
.steps li { margin-bottom: .2rem; }
.job > .hint { padding: .75rem 1rem; background: var(--yellow-soft); border-radius: 4px; color: var(--black); }

/* Evidence counts: the Portal's dashboard tiles */
.counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.25rem; margin: 1.5rem 0; }
.count { background: var(--panel); border-radius: var(--radius); padding: 1.25rem 1rem; display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center; }
.count b { font-size: var(--fs-7); line-height: 1.1; color: var(--ink); }
.count span { font-weight: 700; font-size: var(--fs-2); color: var(--muted); }

/* The marked-up picture: capped so a large-canvas sign does not fill the screen; full size is one click away. */
.preview { margin: 1.5rem 0; text-align: center; }
.preview img { display: block; margin: 0 auto; width: auto; height: auto; max-width: min(100%, 720px); max-height: min(60vh, 520px); border: 1px solid var(--light-grey); border-radius: 4px; background: #fff; }
.preview figcaption { margin-top: .5rem; font-size: var(--fs-2); }
.preview figcaption a { font-weight: 700; }
.json { border-top: .1875rem solid var(--panel); padding-top: 1rem; margin-top: 1.5rem; }
.json summary { cursor: pointer; font-weight: 700; color: var(--red); }
.json pre { overflow: auto; background: var(--panel); border-radius: var(--radius); padding: 1rem; font-size: var(--fs-1); max-height: 420px; }

/* ---- Tables: the Portal's pill-header tables ---- */
.accounts, .history, .failed-list, .feedback-list, .count-moves { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-2); }
.accounts th, .history th, .failed-list th, .feedback-list th, .count-moves th { text-align: left; font-weight: 700; font-size: var(--fs-2); color: var(--ink);
  background: var(--panel); padding: 1rem .75rem; text-transform: none; letter-spacing: 0; }
.accounts th:first-child, .history th:first-child, .failed-list th:first-child, .feedback-list th:first-child, .count-moves th:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.accounts th:last-child, .history th:last-child, .failed-list th:last-child, .feedback-list th:last-child, .count-moves th:last-child { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.accounts td, .history td, .failed-list td, .feedback-list td, .count-moves td { padding: 1rem .75rem; border-bottom: 1px solid var(--card-line); vertical-align: middle; }
.failed-list td, .feedback-list td { vertical-align: top; }
.accounts tr.disabled td { color: var(--muted); }
.history tr.attempt td:first-child { padding-left: 2rem; }
.attempt-no { display: inline-block; font-weight: 700; font-size: var(--fs-1); text-transform: uppercase; letter-spacing: .04em; color: var(--red); margin-right: .4rem; }
.count-moves { width: auto; min-width: 320px; }
.row-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.row-actions form { display: inline-flex; gap: .5rem; align-items: center; margin: 0; }
.row-actions input[type=password] { width: 200px; padding: .3rem .75rem; }
td.row-actions { display: table-cell; white-space: nowrap; }  /* a flex cell breaks the row lines */
td.row-actions form + form { margin-left: .5rem; }

/* ---- Report page extras: crumb, attempts strip, what changed ---- */
.crumb { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: 0 0 1rem; font-size: var(--fs-2); color: var(--muted); }
.crumb a { font-weight: 700; text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.crumb-action { margin: 0 0 0 auto; }
.attempts { display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem; padding: .125rem; background: var(--panel); border-radius: var(--radius); width: fit-content; }
.attempts-title { font-weight: 700; font-size: var(--fs-2); color: var(--ink); padding: 0 .75rem; }
.attempt-link { display: inline-grid; place-items: center; min-width: 2.25rem; height: 2.25rem; padding: 0 .5rem; border-radius: var(--radius); color: var(--ink); font-weight: 700; text-decoration: none; }
.attempt-link:hover { color: var(--red); }
.attempt-link.current { background: #fff; box-shadow: 0 1px 1px 1px rgba(0, 0, 0, .1); }
.verdict-move { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: 0 0 1rem; }
.verdict-move .arrow { font-size: var(--fs-5); color: var(--grey); }
.changes-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.changes-list li { padding: .75rem 1rem; border: 1px solid var(--light-grey); border-left-width: 6px; border-radius: 4px; background: #fff; font-size: var(--fs-3); }
.changes-list li b { display: inline-block; min-width: 6rem; font-size: var(--fs-1); text-transform: uppercase; letter-spacing: .04em; margin-right: .5rem; }
.changes-list li.resolved { border-left-color: var(--green); }
.changes-list li.new { border-left-color: var(--red); } .changes-list li.new b { color: var(--red); }
.changes-list li.remaining { border-left-color: var(--yellow); } .changes-list li.remaining b { color: var(--yellow-ink); }

/* ---- "This verdict is wrong": the panel, the notes, and the Portal's confirmation modal ---- */
.feedback .actions { margin-top: 0; }
.feedback .sec-title { margin-bottom: .25rem; }
.notes { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .75rem; }
.note { border: 1px solid var(--light-grey); border-left: 6px solid var(--red); border-radius: 4px; padding: .875rem 1rem; }
.note-meta { margin: 0 0 .25rem; font-size: var(--fs-2); color: var(--muted); display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.note-meta b { color: var(--ink); }
.note-tag { display: inline-block; font-weight: 700; font-size: var(--fs-1); text-transform: uppercase; letter-spacing: .04em; color: var(--black);
  background: var(--yellow); border-radius: 1.5rem; padding: .15rem .65rem .1rem; }
.note-text { margin: 0; white-space: pre-line; }
.feedback-list .note-text { margin-top: .5rem; }
.rdlg { width: min(650px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; border: 0; border-radius: var(--radius-lg); padding: 32px 32px 20px;
  color: var(--text); background: #fff; }
.rdlg::backdrop { background: rgba(0, 0, 0, .8); }
.rdlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 20px; }
.rdlg-head h2 { margin: 0; font-weight: 700; font-size: var(--fs-7); line-height: 1.19; color: var(--ink); }
.rdlg-x { border: 0; background: transparent; font-size: 1.75rem; line-height: 1; width: 2.25rem; height: 2.25rem; border-radius: 50%; cursor: pointer; color: var(--black); opacity: .6; }
.rdlg-x:hover { opacity: 1; }
.rtext-l { display: block; font-weight: 700; font-size: var(--fs-1); color: var(--ink); margin-bottom: 4px; text-transform: none; letter-spacing: 0; }
.rkinds { border: 0; padding: 0; margin: 0 0 1.25rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.rkinds legend { padding: 0; margin-bottom: .5rem; }
.rkind { position: relative; display: grid; gap: 2px; border: 1px solid var(--black); border-radius: var(--radius); padding: .75rem .75rem .75rem 2.5rem; cursor: pointer; background: #fff; }
.rkind input { position: absolute; left: .875rem; top: 1rem; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--red); }
.rkind:hover { background: var(--panel); }
.rkind:has(input:checked) { border: 2px solid var(--red); padding: calc(.75rem - 1px) calc(.75rem - 1px) calc(.75rem - 1px) calc(2.5rem - 1px); background: var(--panel); }
.rkind:has(input:focus-visible) { box-shadow: 0 0 0 .25rem var(--focus); }
.rk-t { font-weight: 700; color: var(--ink); font-size: var(--fs-3); line-height: 1.25; }
.rk-s { font-size: var(--fs-2); color: var(--muted); line-height: 1.3; }
.feedback-select { margin-bottom: 1.25rem; }
#report-text { min-height: 96px; resize: vertical; border-radius: .375rem; font-weight: 400; font-size: var(--fs-3); }
.rdlg .actions { margin-top: 1.5rem; }
.rdlg .problem { margin: .75rem 0 0; }

/* ---- Login: the Portal's sign-in card on the black page ---- */
.login { width: min(520px, 100%); border: 1px solid rgba(0, 0, 0, .175); border-radius: var(--radius-lg); padding: 2rem 2.5rem; margin: 0; }
.login-title { margin-bottom: .25rem; }
.login .lead { margin: 0 0 1.5rem; font-size: var(--fs-3); }
.login form .btn { width: 100%; }
.login .actions { flex-direction: column-reverse; align-items: stretch; }
.login .btns { width: 100%; }
/* Sign in with SSO (AFC-048): the pill Aziz asked for, in the Gemini red. */
.login .btn.sso { border-radius: 999px; padding: 10px 1.5rem; }
.sso-icon { width: 1.125rem; height: 1.125rem; flex: none; }
.login-foot { margin: 1.5rem 0 0; padding-top: 1rem; border-top: .1875rem solid var(--panel); font-size: var(--fs-2); }

/* ---- The header wraps a little earlier than the rest (AFC-039: the long app name needs the room) ---- */
@media (max-width: 1100px) {
  .navbar { height: auto; min-height: 4rem; background: var(--panel); }
  .navbar .shell-in { flex-wrap: wrap; gap: .5rem 1.25rem; padding-top: .75rem; padding-bottom: .75rem; }
  .brand .app { font-size: var(--fs-4); }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .nav li { padding: .5rem 1.25rem .75rem 0; }
  .nav-link { font-size: var(--fs-4); }
  .user { font-size: var(--fs-2); gap: .5rem; }
}
/* ---- Phones and small tablets ---- */
@media (max-width: 1022px) {
  .shell-in, .page, .foot-in { padding-left: 1rem; padding-right: 1rem; }
  .crumbs { height: auto; min-height: 2.5rem; }
  .crumbs .shell-in { flex-wrap: wrap; gap: .25rem 1rem; padding-top: .5rem; padding-bottom: .5rem; }
  .local { white-space: normal; }
  .page-title, .job-title, .login-title { font-size: var(--fs-7); }
  .card { padding: 1.25rem; }
  .job { padding: 1.25rem; }
  .drop { padding: 1.5rem 1rem; min-height: 240px; }
  .intake-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .files { padding-left: 0; border-left: 0; }
  .file-row { flex-wrap: wrap; }
  .file-name { flex-basis: calc(100% - 2rem); }
  .rkinds { grid-template-columns: 1fr; }
  .accounts, .history, .failed-list, .feedback-list { display: block; overflow-x: auto; }
  body.outside .page { padding-top: 1.5rem; }
  .login { padding: 1.5rem 1.25rem; }
}
@media (max-width: 400px) {
  .brand .logo { width: 110px; }
  .brand .app { font-size: var(--fs-3); padding-left: .5rem; }
  .user .hello { display: none; }
}
