@font-face {
  font-family: "Geist Sans";
  src: url("/static/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #073b5c;
  --navy-deep: #052e49;
  --cyan: #16a6c9;
  --green: #348b58;
  --red: #b8433d;
  --yellow: #ffd229;
  --ink: #142434;
  --muted: #627482;
  --quiet: #8796a1;
  --line: #d6e0e7;
  --line-strong: #a7b9c4;
  --paper: #ffffff;
  --surface: #f5f8f9;
  --cyan-soft: #eff9fb;
  --green-soft: #eff8f2;
  --red-soft: #fff6f5;
  --sans: "Geist Sans", Arial, sans-serif;
  --mono: "Geist Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--surface); font: 15px/1.55 var(--sans); }

.login-shell { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: #edf5f7; }
.login-card { width: min(100%, 460px); margin: 0; padding: clamp(28px, 6vw, 48px); border: 1px solid var(--line); border-top: 4px solid var(--navy); background: var(--paper); box-shadow: 0 18px 45px rgba(7, 59, 92, .13); }
.login-card h1 { margin: 0; color: var(--ink); font-size: clamp(2rem, 7vw, 3rem); font-weight: 650; letter-spacing: -.045em; line-height: 1.04; }
.login-card > p:not(.eyebrow):not(.error) { margin: 14px 0 0; color: var(--muted); }
.login-card form { display: grid; gap: 18px; margin-top: 28px; }
.login-card label { display: grid; gap: 8px; color: var(--ink); font-size: .82rem; font-weight: 700; }
.login-card input { width: 100%; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 10px 12px; color: var(--ink); background: var(--paper); font: inherit; }
.login-card input:focus-visible { outline: 3px solid rgba(22, 166, 201, .35); outline-offset: 2px; border-color: var(--cyan); }
.login-card .primary { width: 100%; }
.login-card .error { margin: 18px 0 0; padding: 10px 12px; border-left: 3px solid var(--red); color: #8b2d29; background: var(--red-soft); font-size: .86rem; }

.app-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; padding: 28px max(28px, calc((100vw - 1120px) / 2)); color: var(--paper); background: var(--navy); }
.app-header h1 { max-width: 680px; margin: 0; color: var(--paper); font-size: clamp(2.15rem, 4.6vw, 3.75rem); font-weight: 650; letter-spacing: -.05em; line-height: .98; }
.eyebrow { margin: 0 0 8px; color: var(--cyan); font: 700 .68rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.app-header .eyebrow { color: var(--yellow); }
.subtitle { max-width: 630px; margin: 12px 0 0; color: #d6e4eb; font-size: 1rem; }
.header-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 14px; }
.brand-rule { height: 3px; background: var(--cyan); }

.badge, .status-chip { display: inline-flex; align-items: center; color: var(--muted); font: 700 .7rem var(--mono); letter-spacing: .015em; }
.badge.safe { color: #d7f1e1; }
.badge.neutral { color: #d9f6fc; }
.badge.warning { color: var(--yellow); }
.header-reset { min-height: 30px; padding: 4px 0; border: 0; color: var(--paper); background: transparent; font: 700 .74rem var(--sans); text-decoration: underline; text-underline-offset: 3px; }
.header-reset:hover { color: var(--yellow); }

.app-shell { width: min(1120px, calc(100% - 48px)); margin: 28px auto 72px; }
.steps { display: grid; grid-template-columns: 1fr auto 1.25fr auto 1fr; align-items: start; gap: 16px; margin: 0 0 32px; padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.steps-five { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.steps-five .step-arrow { display: none; }
.step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; min-width: 0; color: var(--quiet); }
.step-number { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid currentColor; border-radius: 50%; font: 700 .68rem var(--mono); }
.step strong, .step small, .step-status { display: block; }
.step strong { color: var(--ink); font-size: .82rem; font-weight: 700; }
.step small { margin-top: 2px; color: inherit; font-size: .75rem; line-height: 1.35; }
.step-status { margin-top: 5px; color: inherit; font: 700 .6rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.step-status, .status-chip.pass, .header-badges .badge { display: none; }
.step.active { color: var(--cyan); }
.step.active .step-number { color: var(--paper); border-color: var(--cyan); background: var(--cyan); }
.step.complete { color: var(--green); }
.step.complete .step-number { border-color: var(--green); }
.step-arrow { color: var(--line-strong); font-size: 1.15rem; line-height: 25px; }

.panel { width: min(100%, 930px); margin: 0 auto; padding: 42px 0; border-top: 2px solid var(--navy); }
.panel h2 { max-width: 770px; margin: 0; color: var(--ink); font-size: clamp(1.9rem, 3.8vw, 3rem); font-weight: 650; letter-spacing: -.045em; line-height: 1.06; }
.lead { max-width: 690px; margin: 15px 0 30px; color: var(--muted); font-size: 1rem; }
.lead code { color: var(--navy); font: .9em var(--mono); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }

#uploadForm { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 18px; padding-top: 22px; border-top: 1px solid var(--line); }
.field-error { grid-column: 1 / -1; margin: -7px 0 0; color: var(--red); font-size: .82rem; }
.file-drop { min-width: 0; border: 1px dashed var(--line-strong); background: var(--paper); transition: border-color .14s ease, background .14s ease; }
.file-drop:hover, .file-drop:focus-within, .file-drop.drag-active { border-color: var(--cyan); background: var(--cyan-soft); }
.file-drop-target { display: flex; align-items: center; gap: 14px; min-height: 96px; padding: 18px; cursor: pointer; }
.file-prompt { min-width: 0; flex: 1; }
.file-prompt strong, .file-prompt small { display: block; }
.file-prompt strong { font-size: .98rem; }
.file-prompt small { margin-top: 4px; color: var(--muted); font-size: .8rem; }
.choose-file-cue { color: var(--navy); font: 700 .7rem var(--mono); letter-spacing: .03em; text-decoration: underline; text-underline-offset: 3px; text-transform: uppercase; }
.file-selection { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0 16px 16px; padding-top: 13px; border-top: 1px solid #b9d7c5; background: transparent; }
.file-selection strong, .file-selection small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-selection small { color: var(--muted); font-size: .78rem; }
.file-type, .download-file-type { display: grid; place-items: center; min-width: 45px; height: 29px; color: var(--paper); background: var(--navy); font: 700 .64rem var(--mono); letter-spacing: .05em; }
.selection-ready { color: var(--green); font: 700 .66rem var(--mono); text-transform: uppercase; white-space: nowrap; }
.file-drop.has-file .file-drop-target { min-height: 64px; }
.is-busy .file-drop-target { cursor: wait; opacity: .64; }

button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; border: 1px solid transparent; border-radius: 4px; padding: 10px 16px; font: 700 .8rem var(--sans); text-decoration: none; cursor: pointer; transition: color .14s ease, background .14s ease, border-color .14s ease; }
.action-button { gap: 12px; min-width: 188px; }
.primary { color: var(--paper); background: var(--navy); }
.primary:hover:not(:disabled) { background: var(--navy-deep); }
.secondary { color: var(--navy); border-color: var(--line-strong); background: var(--paper); }
.secondary:hover { border-color: var(--navy); }
button:disabled { opacity: .48; cursor: not-allowed; }
button:focus-visible, .download-card:focus-visible, .file-drop-target:focus-visible, .header-reset:focus-visible, .process-details summary:focus-visible, .markdown-page:focus-visible { outline: 3px solid rgba(22, 166, 201, .45); outline-offset: 3px; }
.privacy-note { margin: 14px 0 0; color: var(--muted); font-size: .8rem; }
.process-details { max-width: 690px; margin-top: 18px; border-top: 1px solid var(--line); color: var(--muted); }
.process-details summary { padding: 12px 0; color: var(--navy); cursor: pointer; font-size: .83rem; font-weight: 700; }
.process-details p { max-width: 650px; margin: 0 0 13px; font-size: .83rem; }

.processing-panel { max-width: 700px; padding-block: 74px; text-align: center; }
.processing-panel > p:not(.eyebrow) { max-width: 610px; margin: 16px auto 0; color: var(--muted); }
.processing-panel .processing-percent { margin-top: 10px; color: var(--navy); font-size: .86rem; font-weight: 750; }
.spinner { width: 32px; height: 32px; margin: 0 auto 22px; border: 2px solid #d3e8ee; border-top-color: var(--cyan); border-radius: 50%; animation: spin 1.25s linear infinite; }
.processing-cues { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.processing-cues span:nth-child(odd) { color: var(--navy); font: 700 .68rem var(--mono); }
.processing-cues span:nth-child(even) { color: var(--line-strong); }
.progress-track { overflow: hidden; width: min(520px, 100%); height: 2px; margin: 28px auto 0; background: var(--line); }
.progress-track span { display: block; width: 32%; height: 100%; background: var(--cyan); animation: progress 2.8s ease-in-out infinite; }
.processing-panel .keep-open { font-size: .84rem; }

.blocked-panel { border-top-color: var(--red); }
.blocked-panel .eyebrow { color: var(--red); }
.blocked-mark { display: none; }
.status-chip.blocked { margin: 17px 0 8px; color: var(--red); }
.blocked-panel > p:not(.eyebrow) { max-width: 650px; color: var(--muted); }
.recovery-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #e4c8c5; }
.recovery-card strong, .recovery-card small { display: block; }
.recovery-card small { margin-top: 3px; color: var(--muted); font-size: .8rem; }

.review-panel { width: min(100%, 1050px); }
.review-cue { margin-top: 24px; padding: 13px 0 13px 14px; border-left: 3px solid var(--cyan); color: var(--ink); }
.review-cue strong, .review-cue small { display: block; }
.review-cue strong { font-size: .88rem; }
.review-cue small { margin-top: 2px; color: var(--muted); font-size: .78rem; }
.markdown-page { max-width: 860px; margin: 30px auto 0; padding: clamp(24px, 5vw, 54px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; }
.markdown-page h2 { margin-top: 0; padding-bottom: 17px; border-bottom: 2px solid var(--navy); color: var(--ink); font-size: clamp(1.8rem, 3vw, 2.65rem); letter-spacing: -.04em; }
.markdown-page h3 { margin: 38px 0 12px; color: var(--navy); font-size: 1.22rem; letter-spacing: -.02em; }
.markdown-page h4 { margin: 25px 0 9px; color: var(--ink); font-size: 1rem; letter-spacing: -.01em; }
.markdown-page p { margin: 11px 0; }
.markdown-page code { padding: 1px 3px; color: var(--navy); background: #eaf7fa; font: .87em var(--mono); }
.markdown-page ul, .markdown-page ol { padding-left: 22px; }
.markdown-page li + li { margin-top: 4px; }
.table-wrap { overflow-x: auto; margin: 16px 0 25px; padding-bottom: 4px; scrollbar-color: var(--cyan) var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { border-top: 1px solid var(--navy); color: var(--navy); font-size: .7rem; letter-spacing: .02em; }
thead th { position: sticky; top: 0; background: var(--rivian-paper, #f7f7f4); z-index: 1; }
tbody tr:nth-child(even) { background: rgba(255,255,255,.52); }
.approval-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; max-width: 860px; margin: 28px auto 0; padding-top: 20px; border-top: 2px solid var(--navy); }
.approval-row strong, .approval-row small { display: block; }
.approval-row strong { font-size: 1rem; }
.approval-row small { max-width: 520px; margin-top: 3px; color: var(--muted); font-size: .8rem; }
.review-actions { display: flex; align-items: center; gap: 10px; }
.review-actions .action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 48px;
  padding: 10px 23px;
  border: 1px solid var(--navy);
  border-radius: var(--rivian-pill);
  font: 700 .8rem var(--sans);
  line-height: 1;
  text-decoration: none;
}
.review-actions .action-button:focus-visible {
  outline: 3px solid rgba(255, 210, 41, .95);
  outline-offset: 3px;
}
.qa-page { margin-top: 38px; }

.download-panel { border-top-color: var(--green); }
.pass-mark { display: none; }
.download-panel > p:not(.eyebrow) { max-width: 650px; color: var(--muted); }
.download-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 34px; }
.download-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 76px; padding: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-decoration: none; }
.download-card.primary { color: var(--navy); background: transparent; }
.download-card.secondary { border: 0; border-bottom: 1px solid var(--line); }
.download-card:hover { color: var(--cyan); border-color: var(--cyan); }
.download-file-type { background: var(--navy); }
.download-card.secondary .download-file-type { color: var(--navy); background: #e9f3f6; }
.download-card strong, .download-card small { display: block; }
.download-card small { margin-top: 3px; color: var(--muted); font-size: .78rem; }
.download-arrow { color: var(--cyan); font-size: 1.2rem; }

.toast { position: fixed; right: 24px; bottom: 24px; max-width: min(430px, calc(100% - 48px)); padding: 13px 16px; border-left: 3px solid var(--red); color: var(--ink); background: var(--paper); z-index: 20; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes progress { 0% { transform: translateX(-100%); } 50% { transform: translateX(210%); } 100% { transform: translateX(410%); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } .spinner, .progress-track span { animation-duration: 2.5s; } }

@media (max-width: 900px) {
  .app-header { align-items: flex-start; flex-direction: column; gap: 18px; }
  .header-badges { justify-content: flex-start; }
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .step-arrow { display: none; }
  .step { grid-template-columns: 25px minmax(0, 1fr); }
  .step small { max-width: none; }
  .panel { width: min(100%, 760px); }
}

@media (max-width: 620px) {
  .app-header { padding: 25px 24px; }
  .app-header h1 { font-size: 2.45rem; }
  .app-shell { width: min(100% - 32px, 1120px); margin-top: 22px; }
  .steps { margin-bottom: 22px; padding-bottom: 16px; }
  .panel { padding: 32px 0; }
  .panel h2 { font-size: 2rem; }
  #uploadForm { grid-template-columns: 1fr; }
  .file-drop-target { align-items: flex-start; min-height: 112px; }
  .choose-file-cue { margin-top: 4px; }
  .file-selection { grid-template-columns: auto minmax(0, 1fr); }
  .selection-ready { display: none; }
  .action-button { width: 100%; }
  .panel-heading, .recovery-card, .approval-row, .review-actions { align-items: stretch; flex-direction: column; }
  .download-actions { grid-template-columns: 1fr; gap: 10px; }
  .markdown-page { padding-block: 32px; }
}

.image-review-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.image-review-card { display: grid; gap: 16px; overflow: hidden; padding: 14px; border: 1px solid rgba(7, 59, 92, .14); border-radius: 16px; background: var(--paper); }
.image-review-card img { display: block; width: 100%; max-height: 230px; border-radius: 10px; object-fit: contain; background: #f0f1ed; }
.image-review-card strong { color: var(--navy-deep); }
.image-review-card p { min-height: 42px; margin: 6px 0 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.image-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.image-actions button { min-height: 35px; padding: 7px 14px; border-color: var(--line-strong); border-radius: var(--rivian-pill); color: var(--navy); background: #fff; }
.image-actions button.is-selected { border-color: var(--navy); color: #fff; background: var(--navy); }
@media (max-width: 700px) { .image-review-list { grid-template-columns: 1fr; } }

/* Quiet, practical controls for the review workflow. */
.header-badges .badge.warning { display: inline-flex; }
.steps-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.category-examples { margin-top: 14px; color: var(--muted); font-size: .84rem; }
.category-examples summary { color: var(--navy); cursor: pointer; font-weight: 700; }
.category-examples p { max-width: 760px; margin: 7px 0 0; }
.decision-preview { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.key-search { display: grid; max-width: 330px; gap: 5px; margin: 20px 0 0 auto; color: var(--navy); font-size: .75rem; font-weight: 700; }
.key-search input { min-height: 40px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 10px; color: var(--ink); background: var(--paper); font: inherit; }
.key-search input:focus-visible { outline: 3px solid rgba(22, 166, 201, .35); outline-offset: 2px; }
.markdown-page tbody tr:nth-child(even) { background: transparent; }
.markdown-page th, .markdown-page td { padding: 8px 10px; }

@media (max-width: 900px) {
  .steps-five { grid-template-columns: 1fr; }
}

/* Deck brief: an editorial read inside tactile Rivian-style cards and pills. */
.deck-brief-panel { max-width: 860px; border-top: 0; padding-top: 20px; }
.deck-brief-panel .panel-heading { margin-bottom: 24px; }
.deck-brief-panel .eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 13px;
  padding: 6px 12px;
  border-radius: var(--rivian-pill);
  color: #fff;
  background: var(--navy);
  font-size: .65rem;
  letter-spacing: .09em;
}
.deck-brief-panel .eyebrow::before { display: none; }
.deck-brief-panel .markdown-page {
  max-width: none;
  margin: 0;
  padding: clamp(30px, 6vw, 54px);
  border: 1px solid rgba(0, 56, 101, .12);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 16px 36px rgba(8, 27, 42, .07);
}
.deck-brief-panel .markdown-page > :first-child { margin-top: 0; }
.deck-brief-panel .markdown-page > p:first-child {
  max-width: 650px;
  color: var(--navy-deep);
  font-size: clamp(1.15rem, 2.2vw, 1.48rem);
  font-weight: 520;
  letter-spacing: -.025em;
  line-height: 1.42;
}
.deck-brief-panel .markdown-page h1,
.deck-brief-panel .markdown-page h2 {
  max-width: 660px;
  margin-top: 36px;
  padding-bottom: 0;
  border-bottom: 0;
  color: var(--navy-deep);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 560;
  line-height: 1.08;
}
.deck-brief-panel .markdown-page h3 {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 32px 0 10px;
  padding: 5px 10px;
  border-radius: var(--rivian-pill);
  color: var(--navy);
  background: #edf3f5;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.deck-brief-panel .markdown-page p,
.deck-brief-panel .markdown-page li { max-width: 690px; color: #526675; }
.deck-brief-panel .markdown-page ul { display: grid; gap: 10px; padding-left: 20px; }
.deck-brief-panel .markdown-page li::marker { color: var(--yellow); }
.brief-next-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: 19px 20px 19px 24px;
  border: 1px solid rgba(0, 56, 101, .12);
  border-radius: 16px;
  background: #edf3f5;
}
.brief-next-card strong,
.brief-next-card small { display: block; }
.brief-next-card strong { color: var(--navy-deep); font-size: .92rem; }
.brief-next-card small { margin-top: 2px; color: var(--muted); font-size: .8rem; }
.brief-next-card .action-button { min-width: 220px; border-radius: var(--rivian-pill); }

@media (max-width: 620px) {
  .deck-brief-panel .markdown-page { padding: 27px 22px; border-radius: 15px; }
  .brief-next-card { align-items: stretch; flex-direction: column; padding: 20px; }
  .brief-next-card .action-button { width: 100%; }
}

/* A warmer, more tactile Deck Brief — closer to Rivian's editorial product pages. */
body {
  background:
    radial-gradient(900px 430px at 88% 5%, rgba(255, 210, 41, .10), transparent 65%),
    radial-gradient(760px 420px at 8% 80%, rgba(17, 73, 93, .045), transparent 70%),
    #f6f5f1;
}
.app-header,
.steps {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(10px);
}
.steps {
  padding: 13px 20px;
  border-color: rgba(7, 59, 92, .09);
  box-shadow: 0 8px 24px rgba(15, 31, 42, .045);
}
.step { color: #8a9697; }
.step strong { color: #53636a; font-weight: 620; }
.step.active strong { color: var(--navy-deep); }
.step-number { border-color: #bdc6c4; }
.step.complete .step-number { color: #607b6b; border-color: #96aa9c; }
.deck-brief-panel { max-width: 960px; padding-top: 34px; }
.deck-brief-panel .panel-heading { padding-left: clamp(8px, 3vw, 34px); margin-bottom: 30px; }
.deck-brief-panel .panel-heading h2 {
  max-width: 680px;
  color: #102e40;
  font-size: clamp(2.35rem, 5vw, 4rem);
  font-weight: 480;
  letter-spacing: -.06em;
  line-height: .95;
}
.deck-brief-panel .eyebrow {
  min-height: 27px;
  padding: 5px 11px;
  color: #fff;
  background: #183d4f;
  box-shadow: 0 3px 8px rgba(4, 30, 44, .12);
}
.deck-brief-panel .markdown-page {
  padding: clamp(42px, 7vw, 72px) clamp(30px, 7vw, 86px);
  border-color: rgba(12, 49, 67, .09);
  border-radius: 24px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 24px 60px rgba(13, 34, 45, .075);
}
.deck-brief-panel .markdown-page > p:first-child {
  max-width: 670px;
  color: #173b4d;
  font-size: clamp(1.28rem, 2.5vw, 1.7rem);
  font-weight: 470;
  letter-spacing: -.032em;
  line-height: 1.38;
}
.deck-brief-panel .markdown-page h1,
.deck-brief-panel .markdown-page h2 {
  max-width: 690px;
  margin-top: 48px;
  color: #16394b;
  font-size: clamp(1.6rem, 3.2vw, 2.45rem);
  font-weight: 500;
  letter-spacing: -.045em;
}
.deck-brief-panel .markdown-page h3 {
  margin-top: 42px;
  color: #315467;
  background: #edf0ea;
  font-size: .66rem;
}
.deck-brief-panel .markdown-page p,
.deck-brief-panel .markdown-page li { max-width: 650px; color: #596a70; line-height: 1.7; }
.deck-brief-panel .markdown-page ul {
  gap: 0;
  max-width: 700px;
  margin: 21px 0 0;
  padding: 0;
  list-style: none;
}
.deck-brief-panel .markdown-page li {
  position: relative;
  padding: 16px 0 16px 21px;
  border-top: 1px solid rgba(17, 61, 78, .12);
}
.deck-brief-panel .markdown-page li::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
}
.deck-brief-panel .markdown-page li::marker { content: ""; }
.brief-next-card {
  margin-top: 22px;
  padding: 25px 27px 25px 30px;
  border: 0;
  border-radius: 20px;
  background: #123749;
  box-shadow: 0 17px 38px rgba(10, 38, 52, .14);
}
.brief-next-card strong { color: #fff; font-size: 1rem; font-weight: 580; }
.brief-next-card small { color: rgba(255, 255, 255, .72); }
.brief-next-card .action-button {
  color: #103548;
  background: var(--yellow);
  border-color: var(--yellow);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.brief-next-card .action-button:hover:not(:disabled) {
  background: #ffe166;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .16);
  transform: translateY(-1px);
}
.deck-brief-panel .markdown-page,
.brief-next-card { transition: transform .18s ease, box-shadow .18s ease; }
.deck-brief-panel .markdown-page:hover { transform: translateY(-1px); box-shadow: 0 27px 67px rgba(13, 34, 45, .09); }

@media (prefers-reduced-motion: reduce) {
  .deck-brief-panel .markdown-page,
  .brief-next-card,
  .brief-next-card .action-button { transition: none; }
}

@media (max-width: 620px) {
  .deck-brief-panel { padding-top: 22px; }
  .deck-brief-panel .panel-heading { padding-left: 0; }
  .deck-brief-panel .panel-heading h2 { font-size: 2.55rem; }
  .deck-brief-panel .markdown-page { padding: 35px 25px; border-radius: 18px; }
  .brief-next-card { border-radius: 17px; }
}

/* Structured Deck Brief content: thesis, narrative, then numbered observations. */
.deck-brief-panel .markdown-page > .brief-thesis {
  max-width: 700px;
  margin: 0;
  padding: 0;
  border: 0;
  color: #15394c;
  font-size: clamp(2rem, 4.3vw, 3.45rem);
  font-weight: 480;
  letter-spacing: -.062em;
  line-height: .98;
}
.deck-brief-panel .markdown-page > .brief-thesis + p {
  max-width: 610px;
  margin: 28px 0 0;
  color: #5b6b70;
  font-size: 1.04rem;
  font-weight: 420;
  letter-spacing: -.008em;
  line-height: 1.72;
}
.deck-brief-panel .markdown-page > .brief-section-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 52px 0 0;
  padding: 5px 11px;
  border: 0;
  border-radius: var(--rivian-pill);
  color: #315467;
  background: #edf0ea;
  font-size: .66rem;
  font-weight: 750;
  letter-spacing: .07em;
  line-height: 1;
  text-transform: uppercase;
}
.deck-brief-panel .markdown-page .brief-insight-list {
  display: block;
  max-width: 720px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: deck-insight;
}
.deck-brief-panel .markdown-page .brief-insight-list li {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr);
  gap: 15px;
  padding: 21px 0;
  border-top: 1px solid rgba(17, 61, 78, .12);
  color: #405b67;
  counter-increment: deck-insight;
  font-size: .98rem;
  line-height: 1.58;
}
.deck-brief-panel .markdown-page .brief-insight-list li::before {
  content: counter(deck-insight, decimal-leading-zero);
  position: static;
  width: auto;
  height: auto;
  border-radius: 0;
  color: #82938f;
  background: transparent;
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .06em;
  line-height: 1.65;
}
.deck-brief-panel .markdown-page .brief-insight-list li:last-child { border-bottom: 1px solid rgba(17, 61, 78, .12); }

@media (max-width: 620px) {
  .deck-brief-panel .markdown-page > .brief-thesis { font-size: 2.2rem; }
  .deck-brief-panel .markdown-page .brief-insight-list li { grid-template-columns: 31px minmax(0, 1fr); gap: 10px; }
}

/* Keep the type human and editorial: hierarchy comes from scale, not oversized text. */
.deck-brief-panel .markdown-page {
  font-family: Arial, "Helvetica Neue", sans-serif;
  text-rendering: optimizeLegibility;
}
.deck-brief-panel .markdown-page > p:first-child,
.deck-brief-panel .markdown-page > .brief-narrative {
  max-width: 640px;
  margin: 0;
  color: #4f626a;
  font-size: clamp(1.02rem, 1.8vw, 1.16rem);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.62;
}
.deck-brief-panel .markdown-page > .brief-thesis {
  max-width: 680px;
  color: #15394c;
  font-size: clamp(2rem, 3.5vw, 2.9rem);
  font-weight: 500;
  letter-spacing: -.048em;
  line-height: 1.04;
}
.deck-brief-panel .markdown-page > .brief-thesis + p {
  margin-top: 25px;
  font-size: clamp(1.02rem, 1.8vw, 1.16rem);
  font-weight: 400;
  line-height: 1.62;
}
.deck-brief-panel .markdown-page > .brief-section-label {
  margin-top: 44px;
  font-family: var(--sans);
  font-size: .64rem;
}
.deck-brief-panel .markdown-page .brief-insight-list li {
  color: #4a6069;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.55;
}

/* Editorial system: Rivian restraint with Swiss type and organic warmth. */
:root {
  --paper-warm: #f7f5ef;
  --stone-warm: #e9e6dc;
  --ink-warm: #132d3a;
  --moss: #69766a;
  --clay: #9b7666;
}
body {
  color: var(--ink-warm);
  background:
    radial-gradient(1000px 560px at 90% -10%, rgba(255, 208, 70, .13), transparent 64%),
    radial-gradient(860px 580px at -12% 95%, rgba(105, 118, 106, .08), transparent 70%),
    var(--paper-warm);
}
.app-header,
.steps {
  border-color: rgba(19, 45, 58, .10);
  background: rgba(250, 249, 244, .84);
  box-shadow: 0 12px 34px rgba(20, 35, 38, .055);
}
.app-header { min-height: 64px; }
.app-wordmark img { filter: saturate(.86) contrast(1.03); }
.steps { gap: 18px; padding: 14px 22px; }
.step strong,
.panel h2,
.panel h3,
.markdown-page h2,
.markdown-page h3,
.approval-row strong {
  font-family: Arial, "Helvetica Neue", sans-serif;
}
.step strong { color: #506168; font-size: .76rem; font-weight: 650; letter-spacing: .005em; }
.step.active strong { color: var(--ink-warm); }
.step-number { border-color: #c8ccc4; color: #728078; }
.step.active .step-number { background: var(--navy); border-color: var(--navy); }
.panel { border-top-color: var(--ink-warm); }
.panel h2 { color: var(--ink-warm); font-weight: 520; letter-spacing: -.055em; }
.lead { max-width: 590px; color: #66746f; font-family: Arial, "Helvetica Neue", sans-serif; font-size: .98rem; line-height: 1.58; }
.upload-panel { padding-top: 46px !important; }
.file-drop,
.decision-item,
.image-review-card {
  border-color: rgba(19, 45, 58, .12);
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 12px 28px rgba(27, 40, 39, .035);
}
.file-drop-target { padding: 22px; }
.file-prompt strong { color: var(--ink-warm); font-weight: 600; }
.primary { background: var(--ink-warm); }
.primary:hover:not(:disabled) { background: #0a202a; }
.secondary { border-color: #c2c6bd; color: var(--ink-warm); background: rgba(255,255,255,.7); }
.review-panel { width: min(100%, 1000px); }
.markdown-page {
  max-width: 920px;
  color: #42555b;
  font-family: Arial, "Helvetica Neue", sans-serif;
}
.markdown-page h2 { font-size: clamp(1.75rem, 3vw, 2.55rem); font-weight: 520; }
.markdown-page h3 { color: #26475a; font-weight: 620; }
.markdown-page p { line-height: 1.68; }
.markdown-page table { font-size: .82rem; }
.markdown-page th { padding: 9px 10px; color: #526468; font-size: .64rem; font-weight: 700; letter-spacing: .07em; }
.markdown-page td { padding: 9px 10px; color: #465a60; }
.decision-review { border-color: rgba(19, 45, 58, .13); border-radius: 16px; background: rgba(255,255,255,.42); }
.decision-item { border-radius: 12px; }
.decision-context { border-left-color: var(--yellow); background: #faf7eb; }
.decision-suggestion { border-left-color: #8da59a; background: #f2f5f0; }
.decision-category { border-color: #bfc7bf; border-radius: 5px; }
.decision-redact, .decision-keep { border-color: #bec7be; }
.approval-row { border-top-color: var(--ink-warm); }
.image-review-list { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.image-review-card {
  gap: 17px;
  padding: 12px;
  border-radius: 18px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.image-review-card:hover { transform: translateY(-2px); box-shadow: 0 19px 42px rgba(24, 37, 36, .09); }
.image-review-card img { max-height: 270px; border-radius: 12px; background: #e8e7df; }
.image-review-card img.is-blurred { filter: blur(24px); transform: scale(1.07); }
.image-review-card > div { padding: 2px 7px 8px; }
.image-review-card strong { color: var(--ink-warm); font-family: Arial, "Helvetica Neue", sans-serif; font-size: .92rem; font-weight: 650; }
.image-review-card p { color: #6a756f; }
.image-actions button { border-color: #bec7be; color: #3f5655; background: #f8f7f1; }
.image-actions button.is-selected { border-color: var(--ink-warm); background: var(--ink-warm); }
.download-panel {
  max-width: 970px;
  padding: clamp(42px, 7vw, 80px);
  border: 0;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #102f3d, #0b232e);
  box-shadow: 0 26px 58px rgba(10, 29, 37, .18);
}
.download-panel h2 { color: #fff; }
.download-panel > p:not(.eyebrow) { color: rgba(255,255,255,.72); }
.download-panel .download-card { color: #fff; border-color: rgba(255,255,255,.25); }
.download-panel .download-card small { color: rgba(255,255,255,.67); }
.download-panel .download-card.primary { color: var(--yellow); }
.download-panel .download-file-type { color: var(--ink-warm); background: var(--yellow); }
.download-panel .download-card.secondary .download-file-type { color: #fff; background: rgba(255,255,255,.14); }
@media (prefers-reduced-motion: reduce) { .image-review-card { transition: none; } }

/* One composed, indeterminate progress object instead of dashboard-style loading cues. */
.processing-panel {
  display: grid;
  place-items: start center;
  max-width: 820px;
  min-height: 520px;
  padding-top: clamp(54px, 10vh, 104px);
  text-align: center;
}
.processing-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: min(270px, 76vw);
  aspect-ratio: 1;
}
.processing-orbit .spinner {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  border: 2px solid rgba(19, 45, 58, .11);
  border-top-color: var(--yellow);
  border-right-color: var(--yellow);
  border-radius: 50%;
  animation: processing-orbit 2.4s linear infinite;
}
.processing-copy {
  display: grid;
  justify-items: center;
  gap: 11px;
  width: 72%;
}
.processing-panel .processing-copy h2 {
  margin: 0;
  color: var(--ink-warm);
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 520;
  letter-spacing: -.055em;
  line-height: 1.04;
}
.processing-panel #processingStatus { display: none; }
.processing-panel .processing-percent {
  margin: 0;
  color: #65736e;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: .92rem;
  font-weight: 400;
  line-height: 1.45;
}
@keyframes processing-orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .processing-orbit .spinner { animation: none; border-top-color: var(--yellow); }
}
@media (max-width: 620px) {
  .processing-panel { min-height: 430px; padding-top: 58px; }
  .processing-orbit { width: min(238px, 78vw); }
}

/* Keep the global chrome quiet while the progress object does the visual work. */
.app-header {
  min-height: 54px;
  margin-top: 14px;
  padding: 8px 16px 8px 18px;
  border-radius: 14px;
}
.app-wordmark img { height: 28px; }
.header-reset {
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(19, 45, 58, .16);
  border-radius: var(--rivian-pill);
  color: #39525c;
  background: rgba(255, 255, 255, .62);
  font-size: .72rem;
  font-weight: 650;
  text-decoration: none;
}
.header-reset:hover { border-color: #62736e; color: var(--ink-warm); background: #fff; }

/* Focused refinement pass: reduce visual nesting, clarify decisions, and protect contrast. */
.steps { margin-bottom: 20px; }
.panel { padding-top: 34px; }
.deck-brief-panel .markdown-page > .brief-thesis { font-size: clamp(1.85rem, 3.1vw, 2.6rem); }
.deck-brief-panel .markdown-page > .brief-section-label { margin-top: 32px; }
.deck-brief-panel .markdown-page .brief-insight-list { margin-top: 11px; }
.deck-brief-panel .markdown-page .brief-insight-list li { padding-block: 16px; }
.decision-review { padding: 0; border: 0; border-radius: 0; background: transparent; }
.decision-heading { align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid rgba(19, 45, 58, .13); }
.decision-heading h3 { font-size: 1.42rem; }
.decision-heading > div > p { margin-left: 10px; }
.decision-progress { padding: 5px 9px; border-color: rgba(19, 45, 58, .12); background: rgba(255,255,255,.62); font-size: .76rem; }
.decision-guidance { margin-top: 12px; }
.decision-item { box-shadow: none; }
.decision-context,
.decision-suggestion { border-left-color: #9aa8a0; background: #f4f5f0; }
.decision-context { border-left-color: var(--yellow); }
.decision-reason { color: #56676a; }
#continueToKeyButton { position: sticky; bottom: 16px; z-index: 4; margin-top: 22px; box-shadow: 0 10px 25px rgba(16, 39, 49, .14); }
.keyPanel .panel-heading h2,
#keyPanel .panel-heading h2 { display: none; }
#keyPanel .panel-heading { min-height: 0; }
#keyPanel .lead { margin-top: 0; }
#keyPanel .review-cue { max-width: 285px; margin-top: 16px; padding: 9px 0 9px 11px; }
#keyPanel .key-search { margin-top: -47px; }
.image-review-list { display: grid; gap: 42px; }
.image-slide-group > h3 { margin: 0 0 13px; color: #315467; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.image-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); gap: 18px; }
.image-review-card { min-width: 0; }
.image-meta { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.image-default { display: inline-flex; padding: 4px 7px; border-radius: var(--rivian-pill); color: #66766e; background: #eff1eb; font-size: .66rem; font-weight: 650; text-transform: capitalize; white-space: nowrap; }
.image-actions button[data-action="leave"] { color: #596862; }
.image-actions button[data-action="blur"] { color: #755b19; background: #fff8df; border-color: #ead590; }
.image-actions button[data-action="remove"] { color: #864541; background: #fff2f0; border-color: #e9bfba; }
.image-actions button.is-selected[data-action="leave"] { color: #fff; border-color: var(--ink-warm); background: var(--ink-warm); }
.image-actions button.is-selected[data-action="blur"] { color: #4d3b09; border-color: var(--yellow); background: var(--yellow); }
.image-actions button.is-selected[data-action="remove"] { color: #fff; border-color: #a64b46; background: #a64b46; }
.download-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.download-panel .download-actions { margin-top: 26px; }
.download-panel .download-card.secondary { color: var(--ink-warm); background: #fff; border-radius: 12px; padding: 0 15px; }
.download-panel .download-card.secondary strong { color: var(--ink-warm); }
.download-panel .download-card.secondary small { color: #697873; }
.download-panel .download-card.secondary .download-arrow { color: var(--ink-warm); }
.download-panel .qa-page { max-width: none; margin: 34px -2px -2px; padding: clamp(28px, 5vw, 48px); border: 0; border-radius: 15px; color: #43585f; background: #fbfaf6; }
.download-panel .qa-page h2,
.download-panel .qa-page h3 { color: var(--ink-warm); }
.download-panel .qa-page p,
.download-panel .qa-page li,
.download-panel .qa-page td { color: #52666b; }
.download-panel .qa-page th { color: #385564; }
@media (max-width: 620px) {
  #keyPanel .key-search { margin-top: 18px; }
  .image-card-grid { grid-template-columns: 1fr; }
  #continueToKeyButton { bottom: 10px; }
}

/* TriVista adventure treatment: warm neutral space, an editorial opening, and
   rounded tactile controls adapted from the supplied Rivian-inspired reference. */
:root {
  --rivian-paper: #f7f7f4;
  --rivian-stone: #e8e8e2;
  --rivian-charcoal: #242424;
  --rivian-radius: 14px;
  --rivian-pill: 999px;
}

body {
  background: var(--rivian-paper);
  font-family: var(--sans);
}

.app-header {
  position: relative;
  width: min(1120px, calc(100% - 48px));
  margin: 16px auto -72px;
  padding: 24px 28px;
  border: 1px solid rgba(7, 59, 92, .14);
  border-radius: var(--rivian-radius);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 30px rgba(7, 59, 92, .12);
  color: var(--navy);
  z-index: 1;
}

.app-header h1 {
  max-width: 720px;
  color: var(--navy);
  font-size: clamp(2.55rem, 5.6vw, 4.6rem);
  font-weight: 520;
  letter-spacing: -.06em;
  line-height: .94;
}

.app-header .eyebrow { color: var(--muted); font-family: inherit; font-weight: 700; letter-spacing: .01em; text-transform: none; }
.subtitle { max-width: 570px; color: var(--muted); line-height: 1.5; }
.header-badges { align-self: flex-start; }
.badge, .status-chip { font-family: inherit; font-weight: 700; letter-spacing: -.01em; }
.badge.safe, .badge.neutral { color: var(--navy); }
.badge.warning { color: #8b6500; }
.header-reset { color: var(--navy); font-family: inherit; }
.header-reset:hover { color: var(--cyan); }
.brand-rule { height: 240px; background: var(--navy); }

.app-shell { margin-top: 0; padding: 44px 0 72px; }
.steps { margin-bottom: 46px; padding: 22px 24px; border: 0; border-radius: var(--rivian-radius); background: #fff; box-shadow: 0 1px 0 rgba(20, 36, 52, .06); }
.step strong { font-weight: 700; }
.step-number { border-radius: 50%; font-family: inherit; }
.step.active { color: var(--navy); }
.step.active .step-number { border-color: var(--navy); background: var(--navy); }
.step.complete { color: var(--green); }

.panel { padding: 48px 0; border-top: 0; }
.panel h2 { font-size: clamp(2.15rem, 4.2vw, 3.6rem); font-weight: 520; letter-spacing: -.055em; line-height: .98; }
.lead { max-width: 620px; font-size: 1.04rem; line-height: 1.55; }
.eyebrow { color: var(--muted); font-family: inherit; font-weight: 700; letter-spacing: .01em; text-transform: none; }

#uploadForm { gap: 20px; padding-top: 26px; border-top-color: var(--rivian-stone); }
.data-consent {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-start;
  gap: 10px;
  max-width: 680px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: .79rem;
  line-height: 1.45;
}
.data-consent input { flex: 0 0 auto; width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--navy); }
.data-consent:focus-within { color: var(--ink); }
.data-handling-details { grid-column: 1 / -1; max-width: 680px; margin: -3px 0 0; color: var(--muted); font-size: .78rem; }
.data-handling-details summary { color: var(--navy); cursor: pointer; font-weight: 700; }
.data-handling-details p { margin: 7px 0 0; line-height: 1.5; }
.upload-readiness { grid-column: 1 / -1; margin: -6px 0 0; color: var(--muted); font-size: .8rem; }
.processing-cancel { margin-top: 26px; }
.image-ai-consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.image-ai-consent input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--navy); }
.approval-row small { display: block; margin-top: 4px; }
.image-review-summary { margin: -14px 0 22px; color: var(--muted); font-size: .84rem; }
.retention-notice { display: block; max-width: 180px; margin-top: 8px; color: var(--muted); font-size: .7rem; line-height: 1.35; text-align: right; }
.approved-terms-rules { max-width: 860px; margin: 24px auto 0; border: 1px solid var(--rivian-stone); border-radius: 14px; background: rgba(255,255,255,.64); }
.approved-terms-rules summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; color: var(--navy); cursor: pointer; font-size: .82rem; font-weight: 700; }
.approved-terms-rules summary span { color: var(--muted); font-size: .72rem; font-weight: 500; }
.approved-terms-rules-content { padding: 0 18px 18px; }
.approved-terms-rules-content .key-section-card { margin-top: 14px; }
.delete-job-button { margin: 8px clamp(28px, 7vw, 72px) 34px auto; border-color: rgba(255,255,255,.34); color: #fff; background: transparent; }
.delete-job-button:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.file-drop { border: 1px solid var(--rivian-stone); border-radius: var(--rivian-radius); background: #fff; overflow: hidden; }
.file-drop:hover, .file-drop:focus-within, .file-drop.drag-active { border-color: var(--navy); background: #fff; }
.file-drop-target { min-height: 110px; padding: 22px; }
.file-prompt strong { font-size: 1rem; }
.choose-file-cue { padding: 10px 15px; border: 1px solid var(--navy); border-radius: var(--rivian-pill); color: var(--navy); font-family: inherit; font-size: .76rem; text-decoration: none; text-transform: none; }
.file-selection { border-top-color: var(--rivian-stone); }
.file-type, .download-file-type { border-radius: 6px; font-family: inherit; }

button, .button { min-height: 48px; border-radius: var(--rivian-pill); padding-inline: 23px; font-family: inherit; font-weight: 700; }
.primary { color: var(--navy); background: var(--yellow); }
.primary:hover:not(:disabled) { background: #ffdd4f; }
.secondary { border-color: var(--navy); border-radius: var(--rivian-pill); color: var(--navy); background: #fff; }
.secondary:hover { color: var(--navy); border-color: var(--navy); background: var(--rivian-paper); }
button:focus-visible, .download-card:focus-visible, .file-drop-target:focus-visible, .header-reset:focus-visible, .process-details summary:focus-visible, .markdown-page:focus-visible { outline-color: rgba(255, 210, 41, .95); }

.process-details { border-top-color: var(--rivian-stone); }
.process-details summary { color: var(--navy); }
.processing-panel { padding-block: 88px; }
.spinner { width: 38px; height: 38px; border-color: var(--rivian-stone); border-top-color: var(--yellow); }
.progress-track span { background: var(--yellow); }
.processing-cues span:nth-child(odd) { color: var(--navy); font-family: inherit; }

.review-cue { border-left-color: var(--yellow); }
.markdown-page { border-color: var(--rivian-stone); }
.markdown-page h2 { border-bottom-color: var(--navy); }
.markdown-page h3 { color: var(--navy); }
.approval-row { border-top-color: var(--navy); }
.download-card { border-bottom-color: var(--rivian-stone); }
.download-card:hover { color: var(--navy); border-color: var(--yellow); }
.download-card.primary { color: var(--navy); background: transparent; }
.download-arrow { color: var(--navy); }
.toast { border-radius: 10px; border-left-color: var(--yellow); box-shadow: 0 10px 26px rgba(0, 0, 0, .12); }

@media (max-width: 900px) {
  .app-header { margin-bottom: -64px; }
  .brand-rule { height: 265px; }
}

@media (max-width: 620px) {
  .app-header { width: calc(100% - 24px); margin: 12px auto -52px; padding: 22px 20px; border-radius: 12px; }
  .app-header h1 { font-size: clamp(2.6rem, 13vw, 3.7rem); }
  .brand-rule { height: 235px; }
  .app-shell { width: min(100% - 32px, 1120px); padding-top: 30px; }
  .steps { margin-bottom: 30px; padding: 18px; border-radius: 12px; }
  .panel { padding-block: 38px; }
  .file-drop-target { min-height: 126px; }
  .choose-file-cue { margin-top: 6px; }
}

/* Platform UI system alignment: TriVista's shared typography, color tokens,
   section-label treatment, and accessibility affordances. */
:root {
  --navy: #003865;
  --navy-deep: #061c2e;
  --cyan: #009cde;
  --yellow: #ffcd00;
  --ink: #12263a;
  --muted: #5f6f7d;
  --line: #d9e2e8;
  --surface: #f2f6f8;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  color: var(--navy-deep);
  background: var(--yellow);
  font-weight: 750;
  text-decoration: none;
}

.skip-link:focus { top: 12px; }

.app-header .eyebrow,
.panel > .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.app-header .eyebrow::before,
.panel > .eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: currentColor;
}

.app-header .eyebrow { color: var(--blue-ink); }
.panel > .eyebrow { color: var(--blue-ink); }
.blocked-panel > .eyebrow { color: var(--red); }

.app-header h1,
.panel h2,
.markdown-page h2,
.markdown-page h3 {
  font-family: var(--sans);
}

.steps {
  border: 1px solid rgba(0, 56, 101, .08);
  box-shadow: 0 10px 28px rgba(17, 19, 24, .06);
}

.status-chip {
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface);
}

.status-chip.pass { color: var(--green); background: var(--green-soft); }
.status-chip.blocked { background: var(--red-soft); }
.review-cue { border-left-width: 2px; background: linear-gradient(90deg, rgba(0, 156, 222, .07), transparent 65%); }

.download-actions { gap: 16px; }
.download-card { min-height: 92px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--rivian-radius); }
.download-card.secondary { border: 1px solid var(--line); }
.download-card:hover { box-shadow: 0 10px 28px rgba(17, 19, 24, .06); }

@media (max-width: 620px) {
  .app-header .eyebrow,
  .panel > .eyebrow { font-size: .68rem; }
  .download-card { min-height: 82px; }
}

/* Full Rivian-inspired composition, expressed in the TriVista palette. */
.app-header {
  position: absolute;
  top: 12px;
  left: 50%;
  display: flex;
  width: min(1240px, calc(100% - 32px));
  min-height: 58px;
  margin: 0;
  padding: 10px 18px 10px 22px;
  transform: translateX(-50%);
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .12);
}

.app-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--navy);
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}

.app-wordmark img { display: block; width: auto; height: 34px; }
.app-wordmark span { color: var(--blue-ink); font-size: .7rem; font-weight: 750; letter-spacing: .04em; }
.header-badges { margin-left: auto; align-self: center; }
.header-reset { color: var(--navy); }
.brand-rule { height: 0; background: transparent; }

.app-shell {
  width: 100%;
  margin: 0;
  padding: 0 0 88px;
}

.app-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, .62fr);
  align-items: end;
  gap: 72px;
  min-height: min(760px, 92vh);
  padding: 164px max(28px, calc((100vw - 1120px) / 2)) 76px;
  color: #fff;
  background: var(--navy-deep);
}

.app-hero-copy { max-width: 745px; }
.app-hero .eyebrow { color: #a9d9ee; }
.app-hero .eyebrow::before { background: var(--yellow); }
.app-hero h1 {
  max-width: 700px;
  margin: 0;
  color: #fff;
  font-size: clamp(3.35rem, 7vw, 6.8rem);
  font-weight: 520;
  letter-spacing: -.065em;
  line-height: .9;
}

.app-hero-copy > p:not(.eyebrow) {
  max-width: 590px;
  margin: 25px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 1.08rem;
  line-height: 1.55;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-height: 48px;
  margin-top: 30px;
  padding: 0 23px;
  border-radius: var(--rivian-pill);
  color: var(--navy-deep);
  background: var(--yellow);
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}

.hero-cta:hover { background: #ffdc45; transform: translateY(-1px); }
.hero-cta:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

.hero-process {
  padding: 28px;
  border-top: 3px solid var(--yellow);
  border-radius: var(--rivian-radius);
  background: rgba(255, 255, 255, .08);
}

.hero-process > p { margin: 0 0 12px; color: #fff; font-size: 1.1rem; font-weight: 650; }
.hero-process ol { margin: 0; padding: 0; list-style: none; }
.hero-process li { display: grid; grid-template-columns: 34px 1fr; gap: 13px; padding: 15px 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.hero-process li > span { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid rgba(255, 205, 0, .72); border-radius: 50%; color: var(--yellow); font-size: .68rem; font-weight: 800; }
.hero-process strong, .hero-process small { display: block; }
.hero-process strong { color: #fff; font-size: .88rem; }
.hero-process small { margin-top: 3px; color: rgba(255, 255, 255, .67); font-size: .78rem; line-height: 1.4; }

.steps { width: min(1120px, calc(100% - 48px)); margin: -46px auto 42px; position: relative; z-index: 2; }
.panel { width: min(930px, calc(100% - 48px)); }
.panel.upload-panel { padding-top: 38px; }

@media (max-width: 900px) {
  .app-hero { grid-template-columns: 1fr; gap: 40px; min-height: 0; padding-top: 144px; }
  .hero-process { max-width: 560px; }
  .steps { margin-top: -28px; }
}

@media (max-width: 620px) {
  .app-header { top: 8px; width: calc(100% - 16px); padding-inline: 15px; border-radius: 12px; }
  .app-wordmark { font-size: .82rem; letter-spacing: .08em; }
  .app-wordmark img { height: 27px; }
  .app-wordmark span { display: none; }
  .header-badges { gap: 8px; }
  .header-badges .badge.safe { display: none; }
  .app-hero { gap: 36px; padding: 114px 24px 62px; }
  .app-hero h1 { font-size: clamp(3.1rem, 15vw, 4.7rem); }
  .app-hero-copy > p:not(.eyebrow) { font-size: 1rem; }
  .hero-process { padding: 21px; border-radius: 12px; }
  .steps { width: calc(100% - 32px); margin-top: -22px; }
  .panel { width: calc(100% - 32px); }
}

/* Keep the opening cinematic, while making the actual task path deliberately quiet. */
.app-hero {
  display: block;
  min-height: min(650px, 82vh);
}

.steps {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  padding: 15px 22px;
  box-shadow: 0 8px 20px rgba(17, 19, 24, .06);
}

.step { display: flex; align-items: center; gap: 8px; color: var(--quiet); }
.step > div { display: flex; align-items: baseline; gap: 7px; }
.step-number { width: 22px; height: 22px; font-size: .65rem; }
.step strong { font-size: .78rem; white-space: nowrap; }
.step small, .step-status, .step-arrow { display: none; }
.step.active .step-number { background: var(--navy); border-color: var(--navy); }

@media (max-width: 620px) {
  .app-hero { min-height: 570px; }
  .steps { justify-content: space-between; gap: 8px; padding: 13px 14px; }
  .step { gap: 6px; }
  .step strong { font-size: .7rem; }
}

/* This is a focused workflow, not a marketing landing page. */
.app-header {
  position: relative;
  top: auto;
  left: auto;
  width: min(1120px, calc(100% - 48px));
  margin: 18px auto 0;
  transform: none;
  border-color: rgba(0, 56, 101, .12);
  box-shadow: none;
}

.brand-rule { display: none; }
.app-shell { padding-top: 0; }
.app-hero { display: none; }
.steps { margin: 28px auto 26px; }
.panel.upload-panel { padding-top: 22px; }

.decision-review { margin: 28px 0; padding: clamp(20px, 4vw, 32px); border: 1px solid rgba(0,56,101,.22); border-radius: 14px; background: #f7fafc; }
.decision-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.decision-heading .eyebrow { margin-bottom: 7px; }
.decision-heading h3 { margin: 0; color: var(--navy); font-size: clamp(1.3rem, 2.5vw, 1.7rem); letter-spacing: -.02em; }
.decision-heading p:not(.eyebrow), .decision-guidance { max-width: 680px; margin: 8px 0 0; color: var(--quiet); line-height: 1.55; }
.decision-progress { flex: 0 0 auto; margin: 0 !important; padding: 7px 11px; border: 1px solid rgba(0,56,101,.2); border-radius: var(--rivian-pill); color: var(--navy) !important; background: #fff; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.decision-guidance { margin-top: 18px; }
.decision-list { display: grid; gap: 14px; margin: 22px 0 0; }
.decision-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 330px); gap: 15px 24px; margin: 0; padding: 19px; border: 1px solid rgba(0,56,101,.16); border-radius: 10px; background: #fff; }
.decision-item legend { grid-column: 1 / -1; padding: 0 5px; color: var(--navy); font-size: 1.02rem; font-weight: 750; }
.decision-context { grid-column: 1 / -1; padding: 11px 12px; border-left: 3px solid var(--yellow); background: #fff9e5; }
.decision-context strong { display: block; color: var(--navy); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.decision-context p { margin: 4px 0 0; color: var(--ink); font-size: .9rem; font-style: italic; line-height: 1.45; }
.decision-reason { margin: 0; color: var(--ink); line-height: 1.5; }
.decision-suggestion { padding: 11px 12px; border-left: 3px solid var(--cyan); background: #f2f9fb; color: var(--ink); }
.decision-suggestion strong { display: block; color: var(--navy); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.decision-suggestion p { margin: 4px 0 0; font-size: .84rem; line-height: 1.45; }
.decision-controls { display: grid; gap: 10px; align-content: start; }
.decision-prompt { margin: 0; color: var(--quiet); font-size: .76rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.decision-category { width: 100%; min-height: 44px; border: 1px solid rgba(0,56,101,.32); border-radius: 7px; padding: 9px 11px; background: #fff; color: var(--ink); font: inherit; }
.decision-category:focus-visible, .decision-keep:focus-visible { outline: 3px solid rgba(0,157,220,.28); outline-offset: 2px; }
.decision-keep { min-height: 44px; border: 1px solid rgba(0,56,101,.28); border-radius: var(--rivian-pill); color: var(--navy); background: #fff; font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; }
.decision-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.decision-redact, .decision-keep { min-height: 44px; border: 1px solid rgba(0,56,101,.28); border-radius: var(--rivian-pill); color: var(--navy); background: #fff; font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; }
.decision-redact.is-selected, .decision-keep.is-selected { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); color: #fff; background: var(--navy); }
.key-details { margin-top: 30px; border-top: 1px solid var(--rivian-stone); border-bottom: 1px solid var(--rivian-stone); }
.key-details summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; color: var(--navy); cursor: pointer; font-weight: 750; }
.key-details summary small { color: var(--quiet); font-size: .8rem; font-weight: 500; text-align: right; }
.key-details summary:focus-visible { outline: 3px solid rgba(0,157,220,.28); outline-offset: 4px; }
.key-details .markdown-page { margin-top: 0; }
.redaction-gate-message { width: 100%; margin: 0; color: var(--quiet); font-size: .78rem; line-height: 1.35; text-align: right; }

@media (max-width: 620px) {
  .app-header { width: calc(100% - 32px); margin-top: 16px; }
  .steps { margin-top: 20px; }
  .decision-heading, .decision-item { grid-template-columns: 1fr; align-items: stretch; }
  .decision-heading { flex-direction: column; }
  .decision-progress { align-self: flex-start; }
  .decision-item { gap: 12px; padding: 16px; }
  .key-details summary { align-items: flex-start; flex-direction: column; }
  .key-details summary small { text-align: left; }
  .redaction-gate-message { text-align: left; }
}

/* Create copy: treat the handoff as a composed final state, not another work panel. */
.download-panel {
  overflow: hidden;
  padding: 0;
  border-radius: 22px;
  background: #0d2b37;
}

.completion-intro {
  position: relative;
  padding: clamp(38px, 6vw, 64px) clamp(28px, 7vw, 72px) 30px;
  color: #fff;
}

.completion-intro::after {
  position: absolute;
  right: clamp(28px, 7vw, 72px);
  bottom: 0;
  left: clamp(28px, 7vw, 72px);
  height: 1px;
  background: rgba(255, 255, 255, .17);
  content: "";
}

.completion-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 16px;
  color: #dceae4;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.completion-status span {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  color: #0d2b37;
  background: var(--yellow);
  font-size: .7rem;
  letter-spacing: 0;
}

.completion-intro h2 {
  max-width: 640px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.25rem, 4.8vw, 4.25rem);
  font-weight: 520;
  letter-spacing: -.055em;
  line-height: .96;
}

.completion-intro > p:not(.completion-status) {
  max-width: 510px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, .72);
  font-size: .95rem;
  line-height: 1.55;
}

.download-panel .download-actions {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 12px;
  margin: 0;
  padding: 28px clamp(28px, 7vw, 72px) clamp(36px, 5vw, 52px);
}

.download-panel .download-card {
  min-height: 106px;
  padding: 17px 19px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 13px;
  box-shadow: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.download-panel .download-card.primary {
  border-color: rgba(255, 210, 41, .62);
  color: #fff;
  background: rgba(255, 255, 255, .075);
}

.download-panel .download-card.secondary {
  color: #fff;
  background: rgba(255, 255, 255, .035);
}

.download-panel .download-card:hover {
  border-color: var(--yellow);
  box-shadow: none;
  color: #fff;
  background: rgba(255, 255, 255, .11);
  transform: translateY(-1px);
}

.download-panel .download-file-type {
  min-width: 44px;
  padding: 7px 6px;
  border-radius: 7px;
  color: #0d2b37;
  background: var(--yellow);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-align: center;
}

.download-panel .download-card.secondary .download-file-type {
  color: #e9f2ee;
  background: rgba(255, 255, 255, .14);
}

.download-panel .download-card strong { color: inherit; font-size: .92rem; }
.download-panel .download-card small { color: rgba(255, 255, 255, .62); line-height: 1.4; }
.download-panel .download-card.secondary strong { color: #fff; }
.download-panel .download-card.secondary small { color: rgba(255, 255, 255, .62); }
.download-panel .download-arrow { color: var(--yellow); }
.download-panel .download-card.secondary .download-arrow { color: #dceae4; }

.download-panel .qa-page {
  margin: 0;
  padding: clamp(30px, 6vw, 58px) clamp(28px, 7vw, 72px) clamp(36px, 6vw, 64px);
  border-radius: 0;
  background: #fbfaf6;
}

.qa-toggle-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 36px;
  margin: 0 clamp(28px, 7vw, 72px) 28px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--rivian-pill);
  color: #e7f0eb;
  background: transparent;
  font: 700 .72rem var(--sans);
  cursor: pointer;
}

.qa-toggle-pill:hover { border-color: var(--yellow); color: #fff; }
.qa-toggle-pill:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.download-panel .qa-page::before {
  display: block;
  margin-bottom: 18px;
  color: #63726e;
  content: "Quality assurance";
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.download-panel .qa-page h2:first-child { margin-top: 0; }

@media (max-width: 620px) {
  .completion-intro { padding: 34px 24px 25px; }
  .completion-intro::after { right: 24px; left: 24px; }
  .completion-intro h2 { font-size: 2.35rem; }
  .download-panel .download-actions { grid-template-columns: 1fr; padding: 22px 24px 30px; }
  .download-panel .download-card { min-height: 88px; }
  .qa-toggle-pill { margin: 0 24px 24px; }
  .download-panel .qa-page { padding: 30px 24px 40px; }
}

/* Full detailed key: a calm catalogue of approved treatments. */
#keyPanel { max-width: 1030px; }

.key-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(17, 61, 78, .12);
  border-top: 3px solid var(--yellow);
  border-radius: 16px;
  background: #f7f7f2;
}

.key-overline {
  margin: 0 0 11px;
  color: #62716c;
  font-size: .67rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.key-hero h2 {
  margin: 0;
  color: var(--ink-warm);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 540;
  letter-spacing: -.05em;
  line-height: .98;
}

.key-hero > div > p:not(.key-overline) {
  max-width: 520px;
  margin: 14px 0 0;
  color: #62716c;
  font-size: .93rem;
  line-height: 1.5;
}

.key-hero-meta {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.key-stat, .key-status-pill, .key-rule-count {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 10px;
  border: 1px solid rgba(17, 61, 78, .13);
  border-radius: var(--rivian-pill);
  color: #61706c;
  background: rgba(255, 255, 255, .7);
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
}

.key-stat #keyDetailSectionCount { margin-right: 4px; color: var(--ink-warm); font-weight: 800; }
.key-status-pill { color: #315a4c; border-color: #b7cec2; background: #e7f0e9; }

.key-utilities {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0 18px;
}

#keyPanel .key-search { flex: 0 1 275px; margin: 0; }
#keyPanel .key-search span { color: #62716c; font-size: .67rem; letter-spacing: .06em; text-transform: uppercase; }
#keyPanel .key-search input { min-height: 38px; border-radius: var(--rivian-pill); padding-inline: 14px; }

.key-filter-pills {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.key-filter-pills button {
  min-height: 31px;
  padding: 5px 11px;
  border: 1px solid rgba(17, 61, 78, .13);
  border-radius: var(--rivian-pill);
  color: #51635f;
  background: #fff;
  font: 650 .7rem var(--sans);
  cursor: pointer;
}

.key-filter-pills button:hover { border-color: #8fa69d; }
.key-filter-pills button.is-active { border-color: var(--ink-warm); color: #fff; background: var(--ink-warm); }

#keyPage { display: grid; gap: 15px; max-width: none; margin: 0; padding: 0; border: 0; background: transparent; }
#keyPage > p { margin: 0 0 6px; color: #667772; }

.key-section-card {
  overflow: hidden;
  border: 1px solid rgba(17, 61, 78, .12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(13, 34, 45, .045);
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(17, 61, 78, .13);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(17, 19, 24, .025);
}

.key-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  border-bottom: 1px solid rgba(17, 61, 78, .11);
  background: #fbfbf8;
}

.key-section-heading h3 {
  margin: 0;
  color: var(--ink-warm);
  font-size: 1rem;
  font-weight: 720;
  letter-spacing: -.01em;
}

.key-rule-count { min-height: 26px; padding: 4px 8px; color: #5d7069; background: #edf1eb; font-size: .66rem; }
.key-section-card > p { margin: 16px 20px 0; color: #60716e; font-size: .86rem; line-height: 1.5; }

.key-section-card table { margin: 0; font-size: .83rem; }
.key-section-card > p + table { margin-top: 14px; }
.key-section-card th, .key-section-card td { padding: 11px 20px; border-bottom-color: rgba(17, 61, 78, .1); }
.key-section-card th { border-top: 0; color: #526961; background: #f4f5f0; font-size: .64rem; letter-spacing: .07em; text-transform: uppercase; }
.key-section-card tbody tr:nth-child(even) { background: #fbfbf9; }
.key-section-card tbody tr:last-child td { border-bottom: 0; }
.key-editable-row { cursor: pointer; transition: background .14s ease; }
.key-editable-row:hover, .key-editable-row:focus-visible { outline: 0; background: #f3f7f4; }
.key-editable-row:focus-visible { box-shadow: inset 3px 0 0 var(--yellow); }
.key-section-card .key-replacement { color: #315a4c; font-weight: 650; }
.key-replacement-pill { display: inline-block; padding: 3px 7px; border-radius: var(--rivian-pill); background: #edf3ed; }
.key-edit-input { width: 100%; min-height: 38px; border: 1px solid rgba(17, 61, 78, .24); border-radius: 8px; padding: 7px 9px; color: var(--ink); background: #fff; font: inherit; }
.key-original-value { display: block; color: var(--ink); font-weight: 620; }
.key-edit-input:focus { outline: 3px solid rgba(255, 210, 41, .45); outline-offset: 1px; }
.key-edit-actions { display: flex; gap: 8px; margin-top: 8px; }
.key-edit-actions button { min-height: 32px; padding: 5px 11px; font-size: .72rem; }
.key-edit-save { color: var(--navy); background: var(--yellow); }
.key-edit-cancel { border-color: rgba(17, 61, 78, .24); color: var(--navy); background: #fff; }

#keyPanel .approval-row { margin-top: 34px; padding: 22px 0 0; border-top-width: 1px; }
#keyPanel .approval-row strong { color: var(--ink-warm); font-size: 1rem; }
#keyPanel .approval-row .review-actions { gap: 9px; }
#keyPanel #downloadKey { background: #fff; }

@media (max-width: 760px) {
  .key-hero, .key-utilities { align-items: stretch; flex-direction: column; }
  .key-hero-meta, .key-filter-pills { justify-content: flex-start; }
  #keyPanel .key-search { flex-basis: auto; width: 100%; }
  .key-section-heading { align-items: flex-start; }
  .key-section-card { overflow-x: auto; }
  .key-section-card th, .key-section-card td { min-width: 145px; padding: 10px 14px; }
}

/* The image decision affects only the visual asset, never its surrounding review card. */
.image-preview-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 270px;
  border-radius: 12px;
  background: #e8e7df;
}

.image-preview-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  object-fit: contain;
  transform: none;
  transition: filter .15s ease, transform .15s ease;
}

.image-preview-frame img.is-blurred {
  filter: blur(24px);
  transform: scale(1.07);
}

.image-remove-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  display: none;
  place-items: center;
  width: 66px;
  height: 66px;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 50%;
  z-index: 1;
  color: #fff;
  background: rgba(142, 60, 54, .88);
  box-shadow: 0 5px 18px rgba(31, 25, 23, .28);
  font: 400 4rem/.82 Arial, sans-serif;
}

.image-preview-frame.is-removed::after {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 0;
  background: rgba(96, 28, 24, .14);
  content: "";
}

.image-preview-frame.is-removed .image-remove-indicator { display: grid; }

@media (max-width: 620px) {
  .image-preview-frame { height: 230px; }
}
