/* RecordStrata.ai — shared styles. Palette and type per Developer Brief v1.0 §9. */
:root {
  --navy: #12263A;
  --deep: #17365D;
  --slate: #445566;
  --steel: #6A8293;
  --paper: #F3F0E8;
  --brass: #A9844F;
  --ink: #20272D;
  --warn: #8A4A3C;
  --white: #FFFFFF;
  --rule: #D9D4C8;
  --sans: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
  --measure: 42rem;
  --wide: 72rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; }
a { color: var(--deep); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--white); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }
.measure { max-width: var(--measure); }

/* ---------- Header ---------- */
.site-head { background: var(--navy); color: var(--white); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.25rem; flex-wrap: wrap; }
.mark { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; color: var(--white); text-decoration: none; letter-spacing: 0.005em; }
.mark span { color: #B9C7D3; font-weight: 400; }
.mark:hover { color: var(--white); }
.nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.nav a { color: #DCE3EA; text-decoration: none; font-size: 0.975rem; padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--brass); }
.nav a.btn-nav { border: 1px solid var(--brass); padding: 0.4rem 0.9rem; border-radius: 2px; color: var(--white); }
.nav a.btn-nav:hover { background: var(--brass); color: var(--navy); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1rem; padding: 0.75rem 1.25rem; border-radius: 2px; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--brass); color: var(--navy); }
.btn-primary:hover { background: #BE9A63; color: var(--navy); }
.btn-ghost { border-color: #8FA3B4; color: var(--white); }
.btn-ghost:hover { border-color: var(--white); color: var(--white); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--deep); color: var(--white); }

/* ---------- Hero ---------- */
.hero { background: var(--navy); color: var(--white); padding: 3.5rem 0 4.5rem; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.12; margin: 0 0 1.25rem; letter-spacing: -0.01em; }
.hero p.lede { font-size: 1.2rem; line-height: 1.55; color: #D6DEE6; margin: 0 0 1.75rem; max-width: 36rem; }
.hero .actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero .tagline { margin-top: 2rem; font-size: 0.95rem; color: #9FB1C1; }

/* The strata: the one memorable element. Each layer is a record type. */
.strata { position: relative; height: 23rem; }
.layer { position: absolute; left: 0; right: 2.5rem; height: 12.5rem; border-radius: 2px; }
.layer .edge { position: absolute; left: 0; right: 0; bottom: 0; height: 2.1rem; display: flex; align-items: center; padding: 0 0.9rem; font-size: 0.85rem; letter-spacing: 0.01em; border-top: 1px solid rgba(169,132,79,0.55); }
.layer.l5 { top: 10.5rem; left: 2.5rem; right: 0; background: #1B3550; color: #A9BACB; }
.layer.l4 { top: 8.4rem;  left: 2rem;   right: 0.5rem; background: #203D5B; color: #B4C4D3; }
.layer.l3 { top: 6.3rem;  left: 1.5rem; right: 1rem; background: #254567; color: #C0CEDB; }
.layer.l2 { top: 4.2rem;  left: 1rem;   right: 1.5rem; background: #2B4E73; color: #CCD8E3; }
.layer.l1 { top: 0;       left: 0.5rem; right: 2rem; height: 14.2rem; background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 rgba(0,0,0,0.25); }
.layer.l1 .doc { padding: 1.1rem 1.25rem; font-size: 0.82rem; line-height: 1.45; }
.layer.l1 .doc .id { font-family: var(--mono); font-size: 0.78rem; color: var(--slate); }
.layer.l1 .doc .title { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; margin: 0.45rem 0 0.2rem; color: var(--navy); }
.layer.l1 .doc .line { height: 0.42rem; background: #DDD6C7; margin: 0.45rem 0; border-radius: 1px; }
.layer.l1 .doc .line.short { width: 62%; }
.layer.l1 .doc .line.mark-line { background: rgba(169,132,79,0.45); width: 78%; }
.layer.l1 .doc .cite { font-family: var(--mono); font-size: 0.75rem; color: var(--brass); margin-top: 0.6rem; }
.layer.l1 .edge { color: var(--slate); border-top-color: var(--rule); background: #ECE7DC; }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section.paper { background: var(--paper); }
.section.tight { padding: 3rem 0; }
.section h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem, 2.6vw, 2.05rem); line-height: 1.2; color: var(--navy); margin: 0 0 1rem; }
.section h3 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--navy); margin: 0 0 0.5rem; }
.section p { margin: 0 0 1rem; }
.kicker { color: var(--slate); font-size: 1.05rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: start; }

/* Evidence chain — a real sequence, so it is ordered */
.chain { list-style: none; margin: 1.5rem 0 0; padding: 0; counter-reset: link; }
.chain li { counter-increment: link; display: grid; grid-template-columns: 2.25rem 1fr; gap: 0.75rem; padding: 0.7rem 0; border-top: 1px solid var(--rule); }
.chain li::before { content: counter(link); font-family: var(--mono); font-size: 0.85rem; color: var(--brass); padding-top: 0.15rem; }
.chain strong { color: var(--navy); }

/* Coverage statement */
.coverage-lead { font-family: var(--serif); font-size: clamp(1.35rem, 2.3vw, 1.7rem); line-height: 1.35; color: var(--navy); margin: 0 0 1.25rem; max-width: 46rem; }
.gaps { width: 100%; border-collapse: collapse; margin: 1.25rem 0 1rem; font-size: 1rem; }
.gaps th, .gaps td { text-align: left; padding: 0.75rem 0.9rem 0.75rem 0; border-top: 1px solid var(--rule); vertical-align: top; }
.gaps thead th { font-size: 0.9rem; color: var(--slate); font-weight: 600; border-top: 0; padding-bottom: 0.4rem; }
.gaps td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.status { display: inline-block; font-size: 0.85rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 2px; }
.status.complete { background: #E3EAF1; color: var(--deep); }
.status.partial { background: #EFE6D6; color: #6E5530; }
.status.pending { background: #ECEBE7; color: var(--slate); }
.as-of { font-size: 0.92rem; color: var(--slate); }

/* Deep-Read cases */
.cases { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 2.5rem; margin-top: 1.75rem; }
.case { border-top: 3px solid var(--navy); padding-top: 1.1rem; }
.case .meta { font-size: 0.92rem; color: var(--slate); margin-bottom: 0.4rem; }
.case .meta code { font-family: var(--mono); font-size: 0.85rem; color: var(--slate); }
.case h3 { font-size: 1.35rem; line-height: 1.25; }
.case .links { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 0.9rem; font-weight: 600; }

/* Ask the Record example */
.ask { background: var(--white); border: 1px solid var(--rule); border-radius: 2px; }
.ask .q { padding: 1rem 1.25rem; border-bottom: 1px solid var(--rule); font-weight: 600; color: var(--navy); }
.ask .q small { display: block; font-weight: 400; color: var(--slate); font-size: 0.88rem; margin-bottom: 0.2rem; }
.ask .a { padding: 1.1rem 1.25rem 1.25rem; }
.ask .label { display: inline-block; font-size: 0.85rem; font-weight: 600; color: var(--warn); border: 1px solid rgba(138,74,60,0.4); padding: 0.1rem 0.5rem; border-radius: 2px; margin-bottom: 0.7rem; }
.cite { font-family: var(--mono); font-size: 0.86rem; color: #7E6238; white-space: nowrap; }
.ask .searched { font-size: 0.88rem; color: var(--slate); border-top: 1px solid var(--rule); margin-top: 0.9rem; padding-top: 0.7rem; }

/* Services list */
.services { margin: 1.5rem 0 0; }
.services div { display: grid; grid-template-columns: minmax(12rem, 18rem) 1fr; gap: 1.5rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.services dt { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; color: var(--navy); }
.services dd { margin: 0; }

/* Method list */
.notes { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.notes li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.notes a { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; text-decoration: none; }
.notes a:hover { text-decoration: underline; }
.notes p { margin: 0.25rem 0 0; color: var(--slate); }
.notes .num { font-family: var(--mono); font-size: 0.82rem; color: var(--brass); display: block; margin-bottom: 0.15rem; }
.in-prep { color: var(--slate); font-size: 0.95rem; margin-top: 1rem; }

/* CTA band */
.cta { background: var(--deep); color: var(--white); padding: 3.5rem 0; }
.cta h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin: 0 0 0.9rem; color: var(--white); }
.cta p { color: #D6DEE6; max-width: 44rem; margin: 0 0 1.5rem; }

/* ---------- Article (method notes, record page) ---------- */
.page-head { background: var(--navy); color: var(--white); padding: 3rem 0 2.75rem; }
.page-head .crumb { font-size: 0.92rem; color: #9FB1C1; margin-bottom: 0.9rem; }
.page-head .crumb a { color: #C9D5E0; }
.page-head h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.15; margin: 0 0 0.9rem; max-width: 48rem; }
.page-head .dek { font-size: 1.18rem; color: #D6DEE6; max-width: 44rem; margin: 0; }

.article { padding: 3rem 0 4rem; }
.article .body { max-width: var(--measure); }
.article h2 { font-family: var(--serif); font-weight: 600; font-size: 1.6rem; line-height: 1.25; color: var(--navy); margin: 2.75rem 0 0.9rem; }
.article h3 { font-family: var(--serif); font-weight: 600; font-size: 1.22rem; color: var(--navy); margin: 2rem 0 0.6rem; }
.article p, .article li { font-size: 1.0625rem; }
.article ul, .article ol { padding-left: 1.3rem; }
.article li { margin-bottom: 0.4rem; }

.callout { background: var(--paper); border-left: 3px solid var(--brass); padding: 1.1rem 1.25rem; margin: 1.75rem 0; }
.callout .callout-label { font-weight: 600; color: var(--slate); font-size: 0.92rem; margin: 0 0 0.35rem; }
.callout p { margin: 0 0 0.6rem; }
.callout p:last-child { margin-bottom: 0; }
.callout .callout-title { font-family: var(--serif); font-weight: 600; color: var(--navy); font-size: 1.1rem; }
.pull { font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height: 1.45; color: var(--navy); border-top: 1px solid var(--brass); border-bottom: 1px solid var(--brass); padding: 1.1rem 0; margin: 2rem 0; }

.glance { list-style: none; padding: 0; margin: 0.75rem 0 1.5rem; }
.glance li { padding: 0.55rem 0 0.55rem 1.4rem; border-top: 1px solid var(--rule); position: relative; }
.glance li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: 0.55rem; height: 1px; background: var(--brass); }

.steps { list-style: none; padding: 0; margin: 1rem 0 1.5rem; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.6rem; padding: 0.9rem 0; border-top: 1px solid var(--rule); }
.steps li::before { content: counter(step); font-family: var(--mono); color: var(--brass); font-size: 0.95rem; padding-top: 0.1rem; }
.steps .step-title { font-weight: 600; color: var(--navy); display: block; }
.steps p { margin: 0.2rem 0 0; }

.table-scroll { overflow-x: auto; margin: 1.25rem 0 1.75rem; }
.article table { width: 100%; border-collapse: collapse; font-size: 0.98rem; min-width: 34rem; }
.article th, .article td { text-align: left; vertical-align: top; padding: 0.65rem 0.9rem 0.65rem 0; border-top: 1px solid var(--rule); }
.article thead th { color: var(--slate); font-size: 0.9rem; border-top: 0; }
.article td:first-child { font-weight: 600; color: var(--navy); }

.related { margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--navy); }
.related h2 { margin-top: 0; font-size: 1.25rem; }
.related ul { list-style: none; padding: 0; }
.related li { padding: 0.35rem 0; }

.aside-note { font-size: 0.95rem; color: var(--slate); border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 2.5rem; }

/* ---------- Footer ---------- */
.site-foot { background: var(--navy); color: #B9C7D3; padding: 2.75rem 0 2.25rem; font-size: 0.95rem; }
.site-foot .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.site-foot a { color: #DCE3EA; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { padding: 0.2rem 0; }
.site-foot .indep { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #2B4058; font-size: 0.88rem; color: #92A5B6; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap, .two-col, .cases { grid-template-columns: 1fr; }
  .strata { height: 21rem; max-width: 30rem; }
  .services div { grid-template-columns: 1fr; gap: 0.25rem; }
  .site-foot .cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 1.1rem; }
  .hero { padding: 2.5rem 0 3rem; }
  .strata { height: 19.5rem; }
  .layer.l1 { height: 13rem; }
  .nav { gap: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.article .glance, .article .steps { padding-left: 0; }
.article p.coverage-lead { font-size: clamp(1.35rem, 2.3vw, 1.7rem); }
.article .body.wide { max-width: 50rem; }
.article .body.wide > p, .article .body.wide > ul { max-width: var(--measure); }
.layer.l1 .doc .cite { white-space: normal; }
@media (max-width: 560px) { .cite { white-space: normal; } .hero .strata { margin-right: 0.5rem; } }
