/* Scribe-X giveaway-asset styles, Q2 2026 brand system.
 *
 * Light theme. Navy panels are the contrast tool. Ocean is the action colour on
 * light ground. Amber appears at most ONCE per view, always as a fill with navy
 * text. Sky (#6CC4E9) never carries text on white: it fails AA there, so it is
 * a fill and a navy-panel colour only.
 *
 * No gradient blobs, no glows, no decorative stripes, no stock photography.
 */

:root {
  --navy: #093443;
  --navy-deep: #062430;
  --ocean: #147599;
  --sky: #6cc4e9;
  --green: #80bc00;
  --amber: #ffb600;
  --pale-gold: #fae3a2;
  --slate: #54565b;
  --pale-blue: #ebf5fc;
  --surface: #f8fafc;
  --off-white: #fdfaf3;
  --white: #ffffff;

  --hairline: #d8e4ec;
  --ink: #0a2733; /* near-navy body text */

  --sans: "Ubuntu", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(9, 52, 67, 0.04), 0 8px 24px rgba(9, 52, 67, 0.06);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 4.6vw, 46px); }
h2 { font-size: clamp(24px, 3.2vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0; }

a { color: var(--ocean); text-decoration: none; border-bottom: 1px solid rgba(20, 117, 153, 0.35); }
a:hover { border-bottom-color: var(--ocean); }

/* every figure on these pages uses tabular numerals */
.num, input[type="number"], .stat-value, .tile-value, .row-value,
.total-value, .subtotal-value { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- layout */
.wrap { width: min(1080px, 100% - 48px); margin-inline: auto; }
.wrap-narrow { width: min(820px, 100% - 48px); margin-inline: auto; }

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--hairline);
  padding: 18px 0;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar img { height: 34px; width: auto; display: block; }
.topbar .topbar-note { font-size: 13.5px; color: var(--slate); }

.kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--ocean);
  margin: 0 0 14px;
}

.hero { background: var(--white); padding: 52px 0 44px; border-bottom: 1px solid var(--hairline); }
.hero .lede { margin-top: 16px; font-size: 20px; color: var(--slate); max-width: 60ch; }

section { padding: 44px 0; }
.section-head { margin-bottom: 24px; }
.section-head p { margin-top: 10px; color: var(--slate); max-width: 68ch; }

/* two columns on desktop, inputs then results; one column on phones */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.calc-results { position: sticky; top: 24px; }

.linklike {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 13.5px; font-weight: 500; color: var(--ocean);
  border-bottom: 1px solid rgba(20, 117, 153, 0.35);
}
.linklike:focus-visible { outline: 3px solid rgba(20, 117, 153, 0.4); outline-offset: 2px; }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* ---------------------------------------------------------------- inputs */
.field { margin-bottom: 26px; }
.field:last-child { margin-bottom: 0; }

.field-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.field-head .icon { color: var(--ocean); flex: none; align-self: center; }
.field label, .field .field-label {
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
.helper { font-size: 13.5px; color: var(--slate); margin-top: 6px; line-height: 1.45; }
.helper cite { font-style: normal; color: var(--slate); }

.control { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.control input[type="range"] { flex: 1 1 auto; min-width: 0; }

.numbox {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--hairline); border-radius: 10px;
  background: var(--white); padding: 0 10px;
  flex: 0 0 auto;
}
.numbox:focus-within { border-color: var(--ocean); box-shadow: 0 0 0 3px rgba(20, 117, 153, 0.18); }
.numbox .affix { color: var(--slate); font-size: 15px; font-weight: 500; }
.numbox input {
  border: 0; outline: none; background: transparent;
  font-family: var(--sans); font-size: 17px; font-weight: 700; color: var(--ink);
  width: 7.5ch; padding: 9px 0; text-align: right;
  -moz-appearance: textfield;
}
.numbox input::-webkit-outer-spin-button,
.numbox input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.numbox.narrow input { width: 4.5ch; }

/* range track, drawn rather than default-chrome */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 26px; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px; background: var(--pale-blue);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  height: 22px; width: 22px; margin-top: -8px;
  border-radius: 50%; background: var(--ocean);
  border: 3px solid var(--white); box-shadow: 0 1px 4px rgba(9, 52, 67, 0.3);
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--pale-blue); }
input[type="range"]::-moz-range-thumb {
  height: 16px; width: 16px; border-radius: 50%;
  background: var(--ocean); border: 3px solid var(--white);
}
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(20, 117, 153, 0.35); }

.subfields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin-top: 14px; }
.subfield .sublabel { font-size: 14.5px; font-weight: 500; color: var(--ink); margin-bottom: 8px; display: block; }

/* ---------------------------------------------------------------- drawer */
details.assumptions {
  border: 1px solid var(--hairline); border-radius: 12px;
  background: var(--white); margin-top: 26px;
}
details.assumptions > summary {
  cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--ocean);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
details.assumptions > summary::-webkit-details-marker { display: none; }
details.assumptions > summary::after { content: "+"; margin-left: auto; font-size: 20px; line-height: 1; }
details.assumptions[open] > summary::after { content: "\2212"; }
details.assumptions > summary:focus-visible { outline: 3px solid rgba(20, 117, 153, 0.4); outline-offset: -3px; }
.assumptions-body { padding: 4px 18px 20px; border-top: 1px solid var(--hairline); }

/* ---------------------------------------------------------------- results */
.results { background: var(--navy); color: #d6e6ee; border-radius: 20px; padding: 28px; }
.results .kicker { color: var(--sky); }
.results h2 { color: var(--white); }

.total-tile {
  background: var(--amber); color: var(--navy);
  border-radius: 14px; padding: 20px 24px; margin: 18px 0 6px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px;
}
.total-value { font-size: clamp(40px, 7vw, 62px); font-weight: 700; line-height: 1; }
.total-label { font-weight: 700; font-size: 16px; }

.payer-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.payer-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px; padding: 14px 16px;
}
.payer-card .payer-name { font-size: 12.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--sky); font-weight: 700; }
.payer-card .subtotal-value { font-size: 27px; font-weight: 700; color: var(--white); margin-top: 4px; }
.payer-card .payer-note { font-size: 13px; color: #b9d3de; margin-top: 6px; }

.bar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; margin-top: 22px; background: rgba(255,255,255,0.1); }
.bar span { display: block; height: 100%; }
.bar .seg-a { background: var(--ocean); }
.bar .seg-b { background: var(--sky); }
.bar .seg-c { background: var(--green); }

.legend { list-style: none; margin: 16px 0 0; padding: 0; }
.legend li {
  display: grid; grid-template-columns: 14px 1fr auto; gap: 12px;
  align-items: center; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.legend .dot { width: 12px; height: 12px; border-radius: 3px; }
.legend .row-name { color: var(--white); font-weight: 500; }
.legend .row-sub { display: block; font-size: 13px; color: #a9c6d3; font-weight: 400; }
.legend .row-value { font-weight: 700; color: var(--white); }

.disclaimer { font-size: 13.5px; color: #a9c6d3; margin-top: 20px; line-height: 1.5; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn {
  font-family: var(--sans); font-size: 15.5px; font-weight: 700;
  border-radius: 999px; padding: 12px 22px; cursor: pointer;
  border: 1px solid transparent; text-decoration: none; display: inline-block;
}
.btn-amber { background: var(--amber); color: var(--navy); border-color: var(--amber); }
.btn-ocean { background: var(--ocean); color: var(--white); border-color: var(--ocean); }
.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.45); }
.btn-outline { background: var(--white); color: var(--ocean); border-color: var(--ocean); }
.btn:focus-visible { outline: 3px solid rgba(255, 182, 0, 0.75); outline-offset: 2px; }
.btn-amber:focus-visible, .btn-outline:focus-visible { outline-color: rgba(20, 117, 153, 0.6); }

/* ---------------------------------------------------------------- formulas */
.formula-list { list-style: none; margin: 0; padding: 0; }
.formula-list li { padding: 16px 0; border-top: 1px solid var(--hairline); }
.formula-list li:first-child { border-top: 0; padding-top: 0; }
.formula-name { font-weight: 700; }
.formula { font-size: 15px; color: var(--ocean); margin-top: 6px; line-height: 1.5; }
.formula-note { font-size: 14px; color: var(--slate); margin-top: 6px; }

/* ---------------------------------------------------------------- benchmarks */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile { background: var(--pale-blue); border-radius: var(--radius); padding: 22px; }
.tile-value { font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.tile-label { margin-top: 8px; font-size: 15px; color: var(--ink); }
.tile-source { margin-top: 10px; font-size: 12.5px; color: var(--slate); line-height: 1.4; }

/* ---------------------------------------------------------------- checklist */
.stage { margin-top: 30px; }
.stage-name {
  font-size: 12.5px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--ocean); padding-bottom: 8px; border-bottom: 1px solid var(--hairline);
}
.items { list-style: none; margin: 0; padding: 0; }
.items li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--hairline); }
.items li:last-child { border-bottom: 0; }
.box { width: 17px; height: 17px; border: 2px solid var(--ocean); border-radius: 4px; margin-top: 4px; }
/* name over "where to look", matching the print sheet */
.item-name { font-weight: 700; display: block; }
.item-look { font-size: 14.5px; color: var(--slate); margin-top: 3px; display: block; }
.item-num { color: var(--ocean); font-weight: 700; }

/* ---------------------------------------------------------------- close band */
.band { background: var(--navy-deep); color: #d6e6ee; }
.band h2 { color: var(--white); }
.band p { color: #b9d3de; margin-top: 12px; max-width: 60ch; }
.band .kicker { color: var(--sky); }
.band-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 26px; }
.band-actions a.secondary { color: var(--sky); border-bottom-color: rgba(108, 196, 233, 0.4); font-weight: 500; }

footer.site {
  background: var(--navy-deep); color: #9fc0cd;
  padding: 26px 0; font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
footer.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; }
footer.site img { height: 28px; width: auto; }
footer.site a { color: #cfe4ee; border-bottom-color: rgba(207, 228, 238, 0.4); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--white); color: var(--ocean); padding: 10px 16px; z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-results { position: static; }
}

@media (max-width: 860px) {
  .tiles { grid-template-columns: 1fr; }
  .payer-split { grid-template-columns: 1fr; }
  .subfields { grid-template-columns: 1fr; }
  .wrap, .wrap-narrow { width: min(100% - 32px, 1080px); }
  body { font-size: 16.5px; }
  .results { padding: 20px; border-radius: 16px; }
  .legend li { grid-template-columns: 14px 1fr; }
  .legend .row-value { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- print */
@media print {
  body { background: var(--white); font-size: 11pt; }
  .topbar, .band, footer.site, .actions, .skip, details.assumptions > summary::after { display: none !important; }
  .no-print { display: none !important; }
  .results { background: var(--white); color: var(--ink); border: 1px solid var(--hairline); border-radius: 0; padding: 0; }
  .results h2, .legend .row-name, .legend .row-value, .payer-card .subtotal-value { color: var(--ink); }
  .results .kicker, .payer-card .payer-name { color: var(--ocean); }
  .legend li { border-top-color: var(--hairline); }
  .legend .row-sub, .payer-card .payer-note, .disclaimer { color: var(--slate); }
  .payer-card { border-color: var(--hairline); background: var(--surface); }
  .total-tile { background: var(--pale-gold); }
  section { padding: 14px 0; break-inside: avoid; }
  .card, .tile { box-shadow: none; break-inside: avoid; }
  a { border-bottom: 0; }
  details.assumptions { border: 0; }
  details.assumptions .assumptions-body { border-top: 0; padding-left: 0; }
}
