/* BatteryPassReady — Agilex+ brand theme */

:root {
  --bg: #0D1F3C;          /* navy background */
  --bg-mid: #132A4F;      /* midground surface */
  --bg-raise: #1A3560;    /* raised surface */
  --line: rgba(234, 240, 248, 0.12);
  --amber: #E8A020;       /* primary accent */
  --amber-soft: rgba(232, 160, 32, 0.16);
  --blue: #1A5FB4;        /* secondary (buttons/surfaces) */
  --blue-light: #7FA8E0;  /* blue for marks/text on navy */
  --text: #EAF0F8;
  --text-2: #B9C7DC;
  --text-3: #8296B4;
  --ok: #2eb85c;
  --warn: #fab219;
  --serious: #ec835a;
  --danger: #e05252;
  --radius: 14px;
  --font-head: "DM Sans", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5rem; }
p { margin: 0 0 .8rem; }
a { color: var(--amber); }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 720px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap;
}

.cite { color: var(--text-3); font-size: .85em; font-weight: 400; white-space: nowrap; }

/* ---------- header / footer ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(13, 31, 60, 0.9);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; letter-spacing: .01em; }
.brand-accent { color: var(--amber); }
.header-chip {
  font-size: .78rem; color: var(--text-2); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}

.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 36px; }
.disclaimer { color: var(--text-3); font-size: .82rem; max-width: 860px; }
.credit { color: var(--text-2); font-size: .9rem; margin: 0; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  border-radius: 10px; padding: 10px 18px; cursor: pointer;
  border: 1px solid transparent; transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.btn-primary { background: var(--amber); color: #14213b; }
.btn-primary:hover { background: #f0b13f; }
.btn-primary:disabled { background: #6b5a35; color: #2a3350; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--text-2); border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--blue-light); color: var(--text); }
.btn-big { font-size: 1.05rem; padding: 14px 26px; }

/* ---------- landing ---------- */
.hero { padding: 64px 0 8px; max-width: 780px; }
.eyebrow {
  color: var(--amber); font-family: var(--font-head); font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; margin-bottom: .8rem;
}
h1 { font-size: clamp(1.7rem, 4.5vw, 2.7rem); font-weight: 700; }
h1 em { color: var(--amber); font-style: normal; }
.lede { color: var(--text-2); font-size: 1.08rem; max-width: 640px; }

.tile-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px; margin: 26px 0;
}
.tile {
  background: var(--bg-mid); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 2px;
}
.tile-value { font-family: var(--font-head); font-weight: 700; font-size: 2rem; }
.tile-label { color: var(--text-2); font-size: .84rem; }
.tile.warn .tile-value { color: var(--warn); }
.tile.alert .tile-value { color: var(--serious); }

.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 10px 0 18px; }
.privacy-note { color: var(--text-3); font-size: .86rem; }

.resume-box {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--amber-soft); border: 1px solid rgba(232,160,32,.4);
  border-radius: var(--radius); padding: 12px 16px; margin-top: 6px; font-size: .95rem;
}

.how {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px; margin: 40px 0 20px;
}
.how-step {
  background: var(--bg-mid); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
.how-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--blue); color: #fff; font-family: var(--font-head); font-weight: 700;
  margin-bottom: 10px;
}
.how-step h3 { font-size: 1.02rem; }
.how-step p { color: var(--text-2); font-size: .9rem; margin: 0; }

/* ---------- wizard ---------- */
#screen-wizard { padding: 48px 0; }
.wiz-progress { margin-bottom: 26px; }
#wiz-count { color: var(--amber); font-family: var(--font-head); font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.wiz-bar { height: 6px; border-radius: 3px; background: var(--bg-raise); margin-top: 8px; overflow: hidden; }
.wiz-bar-fill { height: 100%; background: var(--amber); border-radius: 3px; width: 0; transition: width .3s ease; }
.wiz-question { font-size: clamp(1.3rem, 3vw, 1.7rem); outline: none; }
.wiz-hint { color: var(--text-2); margin-bottom: 22px; }

.wiz-options { display: grid; gap: 10px; }
.opt-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-mid); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; cursor: pointer; transition: border-color .12s ease, background .12s ease;
}
.opt-card:hover { border-color: var(--blue-light); }
.opt-card input {
  width: 20px; height: 20px; accent-color: var(--amber); flex: 0 0 auto; margin: 0;
}
.opt-body { display: flex; flex-direction: column; gap: 2px; }
.opt-title { font-family: var(--font-head); font-weight: 600; }
.opt-sub { color: var(--text-2); font-size: .87rem; }
.opt-check { margin-left: auto; color: var(--amber); font-weight: 700; opacity: 0; transition: opacity .12s; }
.opt-card:has(input:checked) { border-color: var(--amber); background: var(--amber-soft); }
.opt-card:has(input:checked) .opt-check { opacity: 1; }
.opt-card:has(input:focus-visible) { outline: 2px solid var(--amber); outline-offset: 2px; }

.wiz-nav { display: flex; justify-content: space-between; margin-top: 26px; gap: 12px; }

/* ---------- results ---------- */
#screen-results { padding: 40px 0 0; }

.verdict {
  background: linear-gradient(135deg, var(--bg-mid), var(--bg-raise));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 20px;
}
.verdict-profile { color: var(--amber); font-family: var(--font-head); font-weight: 600; font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 6px; }
.verdict-headline { font-family: var(--font-head); font-size: clamp(1.15rem, 2.6vw, 1.5rem); font-weight: 600; line-height: 1.35; }
.verdict-days { color: var(--warn); font-family: var(--font-head); font-weight: 600; }
.verdict-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.role-note {
  background: var(--bg-mid); border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 20px; margin: 22px 0;
}
.role-note h3 { font-size: 1.05rem; color: var(--blue-light); }
.role-note p { color: var(--text-2); margin: 0; }

.section-title { font-size: clamp(1.25rem, 3vw, 1.6rem); margin-top: 44px; }
.section-sub { color: var(--text-2); max-width: 820px; }

/* milestones */
.ms-list { list-style: none; margin: 20px 0 0; padding: 0; position: relative; }
.ms { display: flex; gap: 16px; padding: 0 0 22px; position: relative; }
.ms::before {
  content: ""; position: absolute; left: 7px; top: 18px; bottom: 0;
  width: 2px; background: var(--line);
}
.ms:last-child::before { display: none; }
.ms-dot {
  flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
  margin-top: 4px; border: 3px solid var(--bg); position: relative; z-index: 1;
}
.st-inforce .ms-dot { background: var(--serious); }
.st-soon .ms-dot { background: var(--warn); }
.st-future .ms-dot { background: var(--blue-light); }
.ms-body { flex: 1; min-width: 0; }
.ms-top { display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; margin-bottom: 2px; }
.ms-status { font-family: var(--font-head); font-weight: 600; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.st-inforce .ms-status { color: var(--serious); }
.st-soon .ms-status { color: var(--warn); }
.st-future .ms-status { color: var(--blue-light); }
.ms-when { color: var(--text-3); font-size: .85rem; }
.ms h4 { font-size: 1.02rem; margin-bottom: .25rem; }
.ms p { color: var(--text-2); font-size: .9rem; margin: 0; max-width: 760px; }
.ms-caveat { color: var(--text-3) !important; font-size: .8rem !important; margin-top: 6px !important; }
.ms-big {
  background: var(--amber-soft); border: 1px solid rgba(232,160,32,.4);
  border-radius: var(--radius); padding: 16px;
}
.ms-big::before { left: 23px; top: 34px; }
.ms-big h4 { color: var(--amber); }

/* context notes */
.context-notes {
  background: var(--bg-mid); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin: 16px 0;
}
.context-notes p { color: var(--text-2); font-size: .9rem; margin: 6px 0; }

/* readiness score */
.score-layout {
  display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center;
  background: var(--bg-mid); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin: 20px 0;
}
.score-card { position: relative; width: 180px; height: 180px; margin: 0 auto; }
.ring { width: 180px; height: 180px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--bg-raise); stroke-width: 12; }
.ring-fg {
  fill: none; stroke: var(--amber); stroke-width: 12; stroke-linecap: round;
  transition: stroke-dashoffset .5s ease, stroke .5s ease;
}
.ring-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 0 24px;
}
.ring-pct { font-family: var(--font-head); font-weight: 700; font-size: 2.1rem; }
.ring-sub { color: var(--text-2); font-size: .78rem; }

.group-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.group-bars li { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 46px; gap: 10px; align-items: center; }
.gb-label { font-size: .84rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-track { height: 8px; background: var(--bg-raise); border-radius: 4px; overflow: hidden; display: block; }
.gb-fill { display: block; height: 100%; border-radius: 4px; transition: width .4s ease; }
.gb-num { font-size: .8rem; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; }

/* table controls */
.table-controls {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: end; margin: 18px 0 10px;
}
.ctl { display: flex; flex-direction: column; gap: 4px; }
.ctl-label { font-size: .78rem; color: var(--text-3); font-family: var(--font-head); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.ctl input[type="search"], .ctl select {
  background: var(--bg-mid); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 9px 12px; font: inherit; font-size: .92rem; min-width: 210px;
}
.ctl input:focus-visible, .ctl select:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.ctl-check { flex-direction: row; align-items: center; gap: 8px; color: var(--text-2); font-size: .92rem; padding-bottom: 10px; cursor: pointer; }
.ctl-check input { width: 17px; height: 17px; accent-color: var(--amber); }

/* gap table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.gap-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: .9rem; }
.gap-table thead th {
  text-align: left; font-family: var(--font-head); font-size: .78rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-3); padding: 12px 14px;
  border-bottom: 1px solid var(--line); background: var(--bg-mid);
  position: sticky; top: 0;
}
.gap-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.gap-table tr:last-child td { border-bottom: none; }
.group-row th {
  background: var(--bg-raise); font-family: var(--font-head); font-size: .95rem;
  padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line);
}
.group-count { color: var(--text-3); font-weight: 400; font-size: .8rem; margin-left: 8px; }
.td-have { width: 52px; text-align: center; }
.td-have input { width: 18px; height: 18px; accent-color: var(--ok); cursor: pointer; }
.td-label label { font-weight: 600; cursor: pointer; display: block; }
.td-desc { display: block; color: var(--text-2); font-size: .84rem; margin-top: 2px; max-width: 460px; }
.td-note { display: block; color: var(--warn); font-size: .8rem; margin-top: 4px; }
.td-cite { color: var(--text-3); font-size: .82rem; white-space: nowrap; }
.td-src { display: block; color: var(--text-3); font-size: .8rem; margin-top: 4px; }
.row-have { background: rgba(46, 184, 92, 0.07); }
.row-have .td-label label { text-decoration: line-through; text-decoration-color: rgba(234,240,248,.5); }
.empty-row { text-align: center; color: var(--text-3); padding: 28px !important; }

.chip {
  display: inline-block; font-size: .74rem; font-weight: 600; font-family: var(--font-head);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.ac-public { background: rgba(127,168,224,.15); color: var(--blue-light); }
.ac-restricted { background: rgba(232,160,32,.15); color: var(--amber); }
.ac-auth { background: rgba(234,240,248,.1); color: var(--text-2); }
.k-internal { background: rgba(46,184,92,.15); color: var(--ok); }
.k-supplier { background: rgba(236,131,90,.16); color: var(--serious); }
.k-upstream { background: rgba(224,82,82,.16); color: var(--danger); }

.table-foot { color: var(--text-3); font-size: .8rem; margin-top: 10px; }

/* supplier brief */
.brief-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.brief-pre {
  background: var(--bg-mid); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; overflow: auto; max-height: 480px; font-size: .8rem; line-height: 1.55;
  color: var(--text-2); white-space: pre-wrap; word-wrap: break-word;
}
.brief-pre:focus-visible { outline: 2px solid var(--amber); }

/* out of scope */
.oos-card {
  background: var(--bg-mid); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; max-width: 760px; margin: 10px auto;
}
.oos-card h2 { color: var(--amber); }
.oos-card ul { color: var(--text-2); padding-left: 20px; }
.oos-card li { margin-bottom: 8px; }
.oos-hint { color: var(--text-2); }
.oos-card .btn { margin-top: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .hero { padding-top: 40px; }
  .score-layout { grid-template-columns: 1fr; }
  .group-bars li { grid-template-columns: minmax(90px, 1fr) 1.2fr 42px; }
  .gb-label { white-space: normal; line-height: 1.25; }
  .verdict { padding: 20px 18px; }
  .ms-big::before { display: none; }
}
@media (max-width: 420px) {
  body { font-size: 15px; }
  .header-chip { display: none; }
  .btn-big { width: 100%; }
  .ctl input[type="search"], .ctl select { min-width: 160px; }
}

/* ---------- print ---------- */
@media print {
  body { background: #fff; color: #111; }
  :root { --text: #111; --text-2: #333; --text-3: #555; --bg-mid: #fff; --bg-raise: #eee; --line: #bbb; }
  .site-header, .btn, .table-controls, .brief-actions, .verdict-actions, .cta-row, .resume-box { display: none !important; }
  .verdict, .role-note, .tile, .how-step, .score-layout, .table-scroll, .brief-pre, .context-notes, .oos-card, .ms-big {
    background: #fff !important; border-color: #bbb !important; color: #111;
  }
  .tile-value, .verdict-headline, .ms h4 { color: #111 !important; }
  .gap-table thead th { position: static; background: #f3f3f3; color: #333; }
  .group-row th { background: #f3f3f3; color: #111; }
  .chip { border: 1px solid #999; background: #fff !important; color: #333 !important; }
  .brief-pre { max-height: none; color: #333; }
  .ms p, .section-sub, .td-desc { color: #333 !important; }
  a { color: #111; }
}
