/* coldsorecentral.com — theme_04 Warm Paper Field Dossier Spec
   bg #f5efe6 / surface #fffdf9 / ink #292524 / accent #b45309 / muted #57534e */
:root {
  --bg: #f5efe6;
  --surface: #fffdf9;
  --ink: #292524;
  --accent: #b45309;
  --muted: #57534e;
  --line: #ddd3c3;
  --line-soft: #e9e1d3;
  --paper-shadow: 0 1px 2px rgba(41, 37, 36, 0.08), 0 8px 28px rgba(41, 37, 36, 0.10);
  --ok: #3f6212;
  --warn: #a16207;
  --fail: #b91c1c;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 20% -10%, rgba(180, 83, 9, 0.05), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.65;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); margin: 0.2em 0 0.4em; }
h2 { font-size: 1.7rem; margin: 0 0 0.6em; }
h3 { font-size: 1.12rem; margin: 0 0 0.5em; }
a { color: var(--accent); }
a:hover, a:focus-visible { color: var(--ink); }
code { font-family: var(--mono); font-size: 0.86em; background: var(--surface); border: 1px solid var(--line); padding: 0.1em 0.35em; border-radius: 4px; }
.muted { color: var(--muted); font-size: 0.9rem; }

/* header — dossier masthead */
.site-header { border-bottom: 2px solid var(--ink); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: baseline; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 16px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 1.45rem; font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand-dot { color: var(--accent); }
.site-nav { font-family: var(--sans); }
.site-nav a { color: var(--muted); text-decoration: none; margin-left: 20px; font-size: 0.9rem; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--accent); }

/* disclosure banner — above the fold */
.disclosure-banner { background: #292524; color: #f5efe6; border-bottom: 3px double var(--accent); font-size: 0.86rem; }
.disclosure-banner .wrap { padding-top: 10px; padding-bottom: 10px; font-family: var(--sans); }
.disclosure-banner strong { color: var(--accent); }
.disclosure-banner a { color: #fbbf24; }

/* hero */
.hero { padding: 52px 24px 30px; }
.kicker { text-transform: uppercase; letter-spacing: 0.16em; font-family: var(--sans); font-size: 0.74rem; color: var(--accent); font-weight: 700; margin: 0 0 12px; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 54em; margin: 0; }

/* dossier sheet: centered paper surface */
.dossier-sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--paper-shadow);
  margin: 8px auto 0;
  max-width: 1180px;
}
.bench-grid {
  display: grid;
  grid-template-columns: minmax(0, 65fr) minmax(0, 35fr);
  gap: 0;
  align-items: start;
}
.bench-main { min-width: 0; padding: 8px 28px 20px; border-right: 1px solid var(--line-soft); }
.bench-side { padding: 8px 24px 20px; }
.bench-side { position: sticky; top: 84px; }

/* inspector */
.inspector {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
}
.insp-title { font-family: var(--sans); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin: 18px 0 10px; }
.insp-title:first-child { margin-top: 0; }
.insp-list { margin: 0; display: grid; gap: 6px; }
.insp-list > div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 5px; }
.insp-list dt { color: var(--muted); font-size: 0.8rem; font-family: var(--sans); }
.insp-list dd { margin: 0; font-family: var(--mono); font-size: 0.83rem; font-weight: 600; text-align: right; }
.insp-verdict { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }
.insp-rec { margin: 0; font-size: 1.2rem; font-weight: 800; color: var(--accent); }
.insp-sub { margin: 4px 0 0; font-size: 0.83rem; color: var(--muted); font-family: var(--mono); }
.stage-list { list-style: none; margin: 0; padding: 0; font-size: 0.8rem; color: var(--muted); }
.stage-list li { padding: 4px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 8px; }
.stage-list li:last-child { border-bottom: none; }
.stage-list .stage-id { font-family: var(--mono); color: var(--accent); font-weight: 700; min-width: 2.6em; }

/* sections */
.section { padding: 30px 28px 20px; }
.reference-sheet { border-top: 2px solid var(--ink); }

/* modules — tabbed field worksheets */
.module {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  margin: 20px 0 0;
  position: relative;
}
.module h3 {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 12px 18px 10px;
  margin: 0;
  border-radius: 7px 7px 0 0;
  font-size: 1rem;
}
.module h3 .mod-num {
  display: inline-block;
  min-width: 2.6em;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.module > *:not(h3) { margin-left: 18px; margin-right: 18px; }
.module > :last-child { margin-bottom: 18px; }
.preset-row { display: flex; gap: 12px; align-items: center; margin: 16px 0; flex-wrap: wrap; }
.preset-row label { font-weight: 600; font-size: 0.88rem; color: var(--muted); font-family: var(--sans); }
select, input {
  font: inherit;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}
select { min-width: 24em; max-width: 100%; }
select:focus-visible, input:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.config-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 18px; }
.config-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; color: var(--muted); font-weight: 600; font-family: var(--sans); }
.config-grid input, .config-grid select { width: 100%; }
.error-line { min-height: 1.4em; color: var(--fail); font-weight: 600; margin: 14px 0 0; font-family: var(--mono); font-size: 0.83rem; }

/* health note */
.health-note {
  background: #f3e8d8;
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--ink);
  margin: 14px 0 0;
}

/* metrics strip */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin: 20px 18px;
}
.metric { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.metric-k { font-family: var(--sans); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.metric-v { font-family: var(--mono); font-size: 1.25rem; font-weight: 700; color: var(--ink); }

/* charts */
.chart { width: 100%; height: auto; display: block; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.chart .legend { font-size: 11px; font-family: var(--mono); }
.series-s { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.series-e { fill: none; stroke: var(--ok); stroke-width: 2.5; }
.series-p { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 6 4; }
.series-s2 { fill: none; stroke: #2563eb; stroke-width: 2; stroke-dasharray: 3 3; }
.series-s3 { fill: none; stroke: #db2777; stroke-width: 2; stroke-dasharray: 1 3; }
.series-s4 { fill: none; stroke: #4d7c0f; stroke-width: 2; stroke-dasharray: 8 2; }
.series-s5 { fill: none; stroke: #7c3aed; stroke-width: 2; stroke-dasharray: 4 4; }
.legend-s { fill: var(--accent); } .legend-e { fill: var(--ok); } .legend-p { fill: var(--muted); }
.legend-s2 { fill: #2563eb; } .legend-s3 { fill: #db2777; } .legend-s4 { fill: #4d7c0f; } .legend-s5 { fill: #7c3aed; }

/* tables */
.table-scroll { overflow-x: auto; }
.edge-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; margin-top: 10px; min-width: 640px; }
.edge-table th, .edge-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.edge-table th { font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.edge-table td.num, .edge-table th.num { font-family: var(--mono); text-align: right; }
.opt-eligible td { background: rgba(180, 83, 9, 0.07); }
.opt-ineligible { opacity: 0.45; }
.verdict-supported { color: var(--ok); font-weight: 700; }
.verdict-partial { color: var(--warn); font-weight: 700; }
.verdict-unsupported { color: var(--fail); font-weight: 700; }
.edge-pass td:last-child { color: var(--ok); font-weight: 700; }
.edge-fail td:last-child { color: var(--fail); font-weight: 700; }

/* export — printable summary card */
.export-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
button {
  font-family: var(--sans); font-weight: 700; font-size: 0.88rem;
  background: var(--accent); color: #fffdf9;
  border: none; border-radius: 6px; padding: 10px 18px; cursor: pointer;
}
button:hover { background: var(--ink); }
.receipt {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  padding: 16px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.76rem; line-height: 1.5; overflow-x: auto;
  max-height: 320px; overflow-y: auto;
}
.receipt code, p code { background: transparent; padding: 0; }

/* faq */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details summary { cursor: pointer; font-size: 1.02rem; font-weight: 700; }
details p { color: var(--muted); max-width: 54em; }

/* footer */
.site-footer { border-top: 2px solid var(--ink); margin-top: 40px; padding: 26px 0 38px; background: var(--surface); }
.site-footer .wrap p { margin: 6px 0; font-size: 0.86rem; color: var(--muted); }
.site-footer nav { font-family: var(--sans); }
.site-footer nav a { margin-right: 18px; font-size: 0.88rem; }

/* print — dossier summary card only */
@media print {
  body { background: #fff; }
  .site-header, .site-nav, .disclosure-banner, .bench-side, .module:not(#module-4),
  .metrics, .export-row button, .preset-row, .config-grid, .hero .lede { display: none; }
  .dossier-sheet { border: none; box-shadow: none; }
  .bench-grid { display: block; }
  .bench-main { border-right: none; }
}

@media (max-width: 900px) {
  .bench-grid { grid-template-columns: 1fr; }
  .bench-main { border-right: none; padding: 8px 18px 16px; }
  .bench-side { position: static; padding: 0 18px 20px; }
  select { min-width: 0; width: 100%; }
  .site-nav a { margin-left: 12px; }
  .metrics { margin-left: 0; margin-right: 0; }
}
