/* DipIMC.Ninja — the public pages (/, /dipimc-exam, /faq, ...), rendered by
   the Worker (src/site.ts). Loaded after styles.css, so the tokens, type,
   buttons, the "Where this comes from" block and the feedback panel are the
   app's own; this file only lays out a reading page around them. */

body.site { display: flex; flex-direction: column; min-height: 100vh; }

.site-wrap { width: 100%; max-width: 820px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---- header ---------------------------------------------------------------- */
.site-head { background: var(--surface); border-bottom: 1px solid var(--hair); }
.site-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--topbar); }
.site-head .btn.sm { min-height: 36px; padding: 7px 14px; }
.site-nav { display: flex; gap: 18px; overflow-x: auto; padding-top: 2px; padding-bottom: 10px; scrollbar-width: none; font-size: 14.5px; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { color: var(--ink-2); text-decoration: none; white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---- reading column ----------------------------------------------------------- */
.site-main { flex: 1; padding-top: 28px; padding-bottom: 48px; font-size: 16.5px; line-height: 1.6; }
.site-main:focus { outline: none; }
.site-main h1 { font-size: 32px; line-height: 1.15; margin: 0 0 10px; }
.site-main h2 { font-size: 23px; margin: 34px 0 10px; scroll-margin-top: 16px; }
.site-main h3 { font-size: 18px; margin: 24px 0 8px; scroll-margin-top: 16px; }
.site-main p, .site-main ul, .site-main ol, .site-main blockquote { margin: 0 0 14px; }
.site-main ul, .site-main ol { padding-left: 22px; }
.site-main li + li { margin-top: 5px; }
.site-main li > ul { margin-top: 6px; margin-bottom: 0; }
.site-main blockquote { border-left: 3px solid var(--hair); padding: 4px 0 4px 14px; color: var(--ink-2); }
.site-main small { color: var(--muted); font-size: 14px; }
.site-main .byline { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; }
.site-main mark.placeholder { background: var(--warn-bg); color: var(--warn); font-family: var(--f-mono); font-size: .9em; padding: 0 4px; border-radius: 3px; }

.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--hair); border-radius: var(--r-lg); background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table-wrap th, .table-wrap td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--hair-soft); vertical-align: top; }
.table-wrap th { font-family: var(--f-body); font-weight: 600; font-size: 13px; color: var(--muted); background: var(--surface-2); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap .num { text-align: right; }
.units td:first-child { white-space: nowrap; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 22px; }
.btn-row .btn { text-decoration: none; }

/* ---- landing -------------------------------------------------------------------- */
.landing .hero-eyebrow { margin-bottom: 8px; }
.landing h1 { font-size: 34px; max-width: 18em; }
@media (min-width: 720px) { .landing h1 { font-size: 40px; } }
ul.proof { list-style: none; padding: 0; display: grid; gap: 10px; margin: 22px 0 8px; }
@media (min-width: 720px) { ul.proof { grid-template-columns: repeat(3, 1fr); } }
ul.proof li { margin: 0; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 14px; font-size: 15px; line-height: 1.45; }
ul.proof li strong { font-size: 17px; }
.support-line { color: var(--muted); font-size: 15px; margin-top: 28px; }
.links-row { font-size: 15px; line-height: 1.9; padding-top: 14px; border-top: 1px solid var(--hair); }

.answer-panel { margin: 18px 0 8px; padding: 16px; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); }
.answer-panel figcaption { margin-bottom: 8px; }
.answer-panel .scene { font-size: 16.5px; }

/* ---- sample questions -------------------------------------------------------------- */
.samples { display: grid; gap: 14px; margin: 16px 0 8px; }
.sample-q { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 16px; }
.sample-q .scene { font-size: 17px; font-weight: 500; }
.sample-opts { list-style: none; padding: 0 !important; display: grid; gap: 6px; margin: 12px 0 !important; }
.sample-opts li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; margin: 0 !important; font-size: 15.5px; line-height: 1.45; }
.sample-opts .key { font-family: var(--f-mono); font-size: 13px; color: var(--muted); border: 1px solid var(--hair); border-radius: 999px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; }
.sample-answer > summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 6px 0; }
.sample-answer .feedback p { font-size: 15.5px; }

/* ---- reading list --------------------------------------------------------------------- */
.all-sources { margin: 22px 0; border: 1px solid var(--hair); border-radius: var(--r-lg); background: var(--surface); padding: 0 14px; }
.all-sources > summary { cursor: pointer; padding: 12px 0; font-weight: 700; }
.all-sources h3 { margin-top: 12px; }
.source-list { font-size: 15px; }

/* ---- footer ------------------------------------------------------------------------------ */
.site-foot { border-top: 1px solid var(--hair); background: var(--surface); padding: 18px 0 calc(18px + env(safe-area-inset-bottom, 0)); font-size: 14.5px; }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; margin-bottom: 10px; }
.foot-links a { color: var(--ink-2); }
.site-foot p { margin: 0; max-width: 60em; }

@media print {
  .site-head, .site-foot, .btn-row, .skip { display: none !important; }
  .sample-answer { display: block; }
}
