/* Shared styles for research write-ups. Loaded after /style.css. */
.article { max-width: 1080px; }
.article .prose { max-width: 720px; }
.article h1 { max-width: 18em; text-wrap: balance; }
.article h2 { margin-top: 0; text-wrap: balance; }
.article section { margin-top: 72px; }
.article p { max-width: 68ch; }
.crumb { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumb a { color: var(--muted); }
.byline { margin-top: 18px; font-size: 15px; color: var(--muted); }

/* citations */
sup.cite { font-size: 0.68em; line-height: 0; margin-left: 1px; }
sup.cite a { text-decoration: none; color: var(--accent); font-weight: 600; padding: 0 1px; }
sup.cite a:hover { text-decoration: underline; }
.sources { counter-reset: none; padding-left: 1.6em; font-size: 15px; color: var(--muted); }
.sources li { margin: 8px 0; padding-left: 4px; }
.sources li:target { color: var(--text); background: var(--accent-soft); border-radius: 4px; }
.sources a { color: var(--text); }
.assume { list-style: none; font-size: 15px; color: var(--muted); }
.assume li { margin: 10px 0; }
.assume strong { color: var(--text); }
html { scroll-padding-top: 24px; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.hero .lede { font-size: 21px; }
.stat-line { display: flex; gap: 16px; align-items: baseline; margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.stat-line b { font-family: var(--serif); font-size: 38px; line-height: 1; color: var(--accent); white-space: nowrap; }
.stat-line span { color: var(--muted); font-size: 15px; }
.question { margin-top: 28px; font-family: var(--serif); font-size: 26px; line-height: 1.3; border-left: 3px solid var(--accent); padding-left: 18px; }
.kit-card {
  --text: #eef3fa; --muted: #9fb1c9; --sun: #f5b52e; --surface-2: #1d3150; --teal: #43c6ac;
  background: #0f1b2d; border-radius: 16px; padding: 24px; height: 100%; max-height: 520px; display: grid; place-items: center;
}
.kit { width: 100%; height: 100%; max-height: 470px; display: block; }
.kit text { font-family: var(--sans); }
.kit-label { fill: var(--text); font-size: 24px; font-weight: 700; }
.kit-sub { fill: var(--muted); font-size: 16px; }
.kit-tag { fill: var(--sun); font-size: 15px; font-weight: 700; letter-spacing: .08em; }
.kit .wire { fill: none; stroke: #5b7aa3; stroke-width: 5; stroke-linecap: round; }
.kit .flow { fill: none; stroke: var(--sun); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 6 14; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -20; } }
@media (prefers-reduced-motion: reduce) { .kit .flow { animation: none; } }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .kit-card { max-height: 380px; }
  .kit { max-height: 330px; }
}

/* tables */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 16px; margin-top: 24px; }
.data th { text-align: right; font-weight: 600; color: var(--muted); font-size: 13px; padding: 0 12px 10px; border-bottom: 2px solid var(--line); vertical-align: bottom; line-height: 1.35; }
.data td { text-align: right; padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data th:first-child, .data td:first-child { text-align: left; padding-left: 0; }
.data td:first-child { font-weight: 600; }
.data .care { background: var(--accent-soft); }
.data .big { color: var(--accent); font-weight: 700; font-size: 18px; }
.data caption { caption-side: bottom; text-align: left; font-size: 14px; color: var(--muted); padding-top: 10px; }
.payback { min-width: 640px; }
.scale { min-width: 600px; }
.scale .kit-row th { border-bottom: 0; padding-bottom: 6px; }
.scale .kit-row th:first-child { border-bottom: 2px solid var(--line); }
.scale td { padding-top: 8px; padding-bottom: 8px; }

/* buttons that drive the model */
.pick {
  width: 100%; min-height: 44px; font: inherit; text-align: left; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; cursor: pointer;
}
.pick:hover { border-color: var(--accent); }
.pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick.on { border-color: var(--accent); background: var(--accent-soft); }
.pick b { display: block; font-weight: 600; font-size: 15px; white-space: normal; }
.pick small { display: block; font-size: 13px; color: var(--muted); white-space: normal; }
.pick.kitb { text-align: center; }
.pick.kitb small { color: var(--accent); font-weight: 600; }
.hint { font-weight: 400; color: var(--muted); }

/* callout */
.callout { margin-top: 24px; padding: 18px 22px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; max-width: 720px; }
.callout h3 { font-size: 17px; margin-bottom: 4px; }
.callout p { font-size: 16px; }

/* embedded visuals */
.vis { margin-top: 28px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); }
.vis iframe { display: block; width: 100%; height: 640px; border: 0; }
.vis-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.note { font-size: 14px; color: var(--muted); margin-top: 12px; }

details.more { margin-top: 20px; max-width: 720px; border-top: 1px solid var(--line); padding-top: 14px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 16px; min-height: 32px; }
details.more ul { margin: 10px 0 0 1.2em; font-size: 15px; color: var(--muted); }
details.more li { margin: 8px 0; }

.chips { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 18px; }
.chip b { display: block; font-family: var(--serif); font-size: 30px; color: var(--accent); line-height: 1.1; }
.chip span { font-size: 14px; color: var(--muted); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 28px; }
@media (max-width: 700px) { .two { grid-template-columns: 1fr; } }
.related { margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line); }

/* header and footer line up with the wider article column */
body:has(.article) .site-header .wrap,
body:has(.article) .site-footer .wrap { max-width: 1080px; }
