/* Evidential Ceiling Calculator. Page styles only: colours, type and figure marks come from the site's
   tokens in /assets/style.css, which this file reads and never redefines. */

.ec-head .statement { font-size: clamp(1.125rem, 1.8vw, 1.3rem); line-height: 1.45; max-width: 36em; margin-bottom: 14px; }
.ec-private { color: var(--muted); margin: 0 0 12px; }
.ec-private::before { content: "■ "; color: var(--pink-hot); }

/* ---------- tabs ---------- */
.ec-tabs { display: flex; flex-wrap: wrap; gap: 0 4px; border-bottom: 1px solid var(--rule); margin: 0 0 28px; }
.ec-tabs [role="tab"] { font-family: var(--mono); font-size: 15px; letter-spacing: .03em; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; padding: 10px 14px 9px 0; min-height: 44px; cursor: pointer; text-align: left; }
.ec-tabs [role="tab"] + [role="tab"] { padding-left: 14px; }
.ec-tabs [role="tab"] span { display: block; font-family: var(--serif); font-size: .9375rem; letter-spacing: 0; color: var(--muted); margin-top: 2px; }
.ec-tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--pink-hot); }
.ec-tabs [role="tab"]:hover { color: var(--ink); }

/* ---------- layout ---------- */
.ec-panel { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 32px 72px; align-items: start; }
@media (max-width: 900px) { .ec-panel { grid-template-columns: minmax(0, 1fr); } }

/* ---------- inputs ---------- */
.ec-inputs fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ec-legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ec-field { margin: 0 0 26px; }
.ec-field label, .ec-label { display: block; font-size: 1.0625rem; line-height: 1.3; margin: 0 0 8px; }
.ec-control { display: flex; align-items: center; gap: 12px; }
.ec-inputs input[type="text"], .ec-inputs select { font-family: var(--mono); font-size: 15px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 0; padding: 0 10px; min-height: 44px; width: 9.5em; flex: none; }
.ec-inputs select { width: 100%; }
.ec-inputs input[aria-invalid="true"] { border-color: var(--pink-hot); border-width: 2px; }
.ec-inputs input:focus-visible, .ec-inputs select:focus-visible, .ec-slider:focus-visible, .ec-radio input:focus-visible { outline: 2px solid var(--pink-hot); outline-offset: 2px; }
.ec-slider { flex: 1; min-width: 0; height: 44px; margin: 0; accent-color: var(--pink-hot); background: none; }
.ec-hint { font-size: .9375rem; line-height: 1.45; color: var(--muted); margin: 6px 0 0; }
.ec-hint a { color: var(--ink); }
.ec-err { font-size: .9375rem; line-height: 1.4; color: var(--pink); margin: 6px 0 0; }
.ec-err:empty { display: none; }
.ec-url-err { margin: 0 0 16px; }
.ec-radio label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 1rem; line-height: 1.3; }
.ec-radio input { width: 18px; height: 18px; accent-color: var(--pink-hot); flex: none; }
.ec-more { margin: 4px 0 16px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ec-more summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.ec-more summary::marker { color: var(--pink); }
.ec-more[open] { padding-bottom: 6px; }
.ec-pair { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin: 8px 0 0; }
.ec-field-sm label { display: block; font-size: .9375rem; color: var(--muted); margin-bottom: 4px; }
.ec-field-sm input[type="text"] { width: 6.5em; }
.ec-nojs { color: var(--pink); margin: 0 0 14px; }

/* ---------- outputs ---------- */
.ec-params { color: var(--muted); line-height: 1.7; margin: 0 0 22px; }
.ec-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 40px; margin: 0 0 32px; max-width: 620px; }
.ec-key dt { font-size: .9375rem; line-height: 1.3; color: var(--muted); margin: 0 0 6px; }
.ec-key dd { margin: 0; }
.ec-num { display: block; font-family: var(--mono); font-size: 1.5rem; line-height: 1.15; color: var(--ink); }
.ec-key.lead { grid-column: 1 / -1; }
.ec-key.lead .ec-num { font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--pink); }
.ec-sub:empty { display: none; }
.ec-sub { display: block; font-size: .9375rem; line-height: 1.35; color: var(--muted); margin-top: 6px; }
.ec-verdict { font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.45; border-left: 3px solid var(--pink-hot); padding: 2px 0 2px 18px; margin: 0 0 36px; max-width: 32em; }
.ec-meter-wrap { max-width: 560px; margin: 0 0 8px; }
.ec-meter { display: block; width: 100%; height: auto; overflow: visible; }
.ec-meter .ec-track { fill: var(--rule); }
.ec-meter .ec-mtick { stroke: var(--muted); stroke-width: 1; }
.ec-meter .pink { fill: var(--pink-hot); }
.ec-meter .out { fill: none; stroke: var(--muted); stroke-width: 1; }
.ec-meter .tick { stroke: var(--pink-hot); stroke-width: 2; }
.ec-meter .hatch-line { stroke: var(--pink-hot); stroke-width: 1.2; }
.ec-meter .lbl { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.ec-meter .lbl-ink { font-family: var(--mono); font-size: 11px; fill: var(--ink); }
.ec-meter .lbl-pink { font-family: var(--mono); font-size: 11px; fill: var(--pink); }
.ec-meter-key { margin: 6px 0 28px; }
.ec-meter-val { display: block; color: var(--ink); }
.ec-meter-note { display: block; font-size: .9375rem; color: var(--muted); margin-top: 2px; }
.ec-notes p { font-size: .9375rem; line-height: 1.45; color: var(--muted); margin: 0 0 10px; max-width: 36em; }
.ec-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 28px 0 6px; padding-top: 24px; border-top: 1px solid var(--rule); }
.ec-btn { font-family: var(--mono); font-size: var(--meta); letter-spacing: .03em; color: var(--ink); background: none; border: 1px solid var(--ink); padding: 0 14px; min-height: 44px; cursor: pointer; }
.ec-btn:hover { color: var(--pink); border-color: var(--pink); }
.ec-btn:focus-visible { outline: 2px solid var(--pink-hot); outline-offset: 2px; }
.ec-share { flex-basis: 100%; font-size: var(--meta); color: var(--muted); }
.ec-share a { display: inline-block; color: var(--ink); padding: 12px 4px; }
.ec-status { color: var(--pink); }
.ec-report summary { font-family: var(--mono); font-size: var(--meta); cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.ec-report summary::marker { color: var(--pink); }
.ec-report pre { border-left: 3px solid var(--pink-hot); padding: 4px 0 4px 14px; margin: 4px 0 0; max-width: 46em; }
.ec-stale .ec-out, .ec-stale .ec-fig, .ec-stale .ec-bench { opacity: .4; }

/* ---------- figures ---------- */
.ec-fig { max-width: 640px; margin-top: 48px; }
.ec-fig .ec-curve { fill: none; stroke: var(--ink); stroke-width: 1.8; }
.ec-fig .ec-feas { fill: var(--ink); opacity: .1; }
.ec-fig .ec-infeas { opacity: .6; }
.ec-fig .ec-budget { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 5 3; }
.ec-fig .ec-grid { stroke: var(--rule); stroke-width: .6; }
.ec-fig .ec-cross { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.ec-fig .ec-you { fill: var(--pink-hot); stroke: var(--paper); stroke-width: 2; }
.ec-fig .ec-gap { stroke: var(--pink-hot); stroke-width: 1.4; stroke-dasharray: 2 3; }
.ec-fig2 { max-width: 560px; }
.ec-fig2 .ec-out-pink { fill: none; stroke: var(--pink-hot); stroke-width: 1.2; }
.ec-bench { margin-top: 56px; }
.ec-frame { max-width: 40em; }
.ec-ladder { max-width: 820px; margin: 6px 0 22px; }
.ec-ladder caption { caption-side: top; text-align: left; padding: 0 0 12px; font-size: .9375rem; line-height: 1.4; color: var(--muted); }
.ec-ladder .ec-yes { color: var(--ink); }
.ec-caveat { margin-top: 14px; max-width: 36em; font-size: .9375rem; color: var(--muted); }
.ec-suites { max-width: 900px; }
.ec-suites td a { color: var(--ink); }

@media (max-width: 640px) {
  .ec-tabs [role="tab"] { padding-right: 10px; }
  .ec-tabs [role="tab"] + [role="tab"] { padding-left: 10px; }
  .ec-tabs [role="tab"] span { display: none; }
  .ec-inputs input[type="text"] { width: 8em; }
  .ec-keys { gap: 20px 18px; }
  .ec-num { font-size: 1.25rem; }
  .ec-panel { gap: 8px; }
  .ec-fig { padding: 10px 8px 8px; }
  .ec-page svg.ec-meter text, .ec-page svg.ec-fig1 text { font-size: 16px; }
  .ec-page svg.ec-grid2 text { font-size: 14px; }
  .ec-ladder caption { display: block; }
  .ec-ladder td[data-label]::before { content: attr(data-label) " · "; color: var(--muted); }
}

/* ---------- embed card ---------- */
.ec-embed { margin: 0; padding: 14px 16px; }
.ec-embed body::before { display: none; }
.ec-card { max-width: 640px; }
.ec-card .kicker { margin-bottom: 8px; }
.ec-card .ec-keys { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-bottom: 12px; }
.ec-card .ec-key:nth-child(n + 4) { display: none; }
.ec-card .ec-verdict { font-size: 1.05rem; margin-bottom: 12px; }
.ec-card .ec-meter-key { display: none; }
.ec-embed-foot { margin: 6px 0 0; }

/* ---------- print: one sheet for an audit file ---------- */
@media print {
  .ec-page .ec-fig:not([hidden]) { display: block !important; }
  .ec-page .ec-fig { break-inside: avoid; max-width: 80mm; border: 0; background: none; padding: 0; margin: 2mm 0; }
  .ec-page .ec-fig figcaption { font-size: 7.5pt; line-height: 1.3; margin-top: 1mm; }
  .ec-head .statement, .ec-assume .dymo { display: none !important; }
  .ec-head .title { font-size: 18pt; margin-bottom: 1mm; }
  .ec-head .kicker { margin-bottom: 1mm; }
  .ec-permalink::before { content: "Permalink: "; }
  .ec-tabs, .ec-inputs, .ec-actions, .ec-report, .ec-how, .ec-not, .ec-bench, .ec-cite .bib-box, .ec-cite .prose, .ec-head .links-inline, .ec-private, .ec-meter-key { display: none !important; }
  .ec-panel { display: block; }
  .ec-keys { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2mm 4mm; margin-bottom: 3mm; }
  .ec-key.lead { grid-column: auto; }
  .ec-key.lead .ec-num, .ec-num { font-size: 12pt; color: #000; }
  .ec-sub, .ec-key dt { font-size: 7pt; }
  .ec-verdict { font-size: 10.5pt; line-height: 1.35; border-left-color: #000; margin-bottom: 2mm; }
  .ec-params { margin-bottom: 2mm; }
  .ec-meter-wrap { max-width: 120mm; }
  .ec-notes p { font-size: 7.5pt; margin-bottom: 1mm; }
  .ec-assume .plain { font-size: 8pt; line-height: 1.3; margin: 0; }
  .ec-assume .plain li { margin-bottom: .5mm; }
  .ec-permalink, .ec-print-cite { font-size: 7.5pt; overflow-wrap: anywhere; margin: 2mm 0 0; }
  .ec-calc .dymo, .ec-assume .note, .ec-cite .dymo { display: none !important; }
  .ec-calc, .ec-assume, .ec-cite { padding-bottom: 2mm; }
  .ec-head { padding-bottom: 2mm; }
  .ec-meter-wrap { max-width: 100mm; margin-bottom: 1mm; }
  .ec-keys .ec-sub { line-height: 1.25; }
}
.ec-card h1.kicker { font-weight: 400; }
