/* certmonk.app study guides: article typography, tables and sample questions. The header,
   footer, buttons, store badges and fonts come from chrome.css (shared with the landing page).
   No scripts, no external fonts. CSP: style-src 'self' (no inline styles anywhere). */

:root {
  --deep: #0b2a26;
  --deep-2: #123c36;
  --teal: #1f7a5e;
  --teal-dark: #17654d;
  --mint: #c4ead3;
  --mint-soft: #e7f6ee;
  --ember-1: #ffd36e;
  --ember-2: #ff9a3c;
  --ember-3: #e8561b;

  --bg: #f7fbf8;
  --surface: #ffffff;
  --text: #16292c;
  --muted: #4a5d5f;
  --border: #d5e6dc;
  --link: #17654d;
  --link-hover: #0b2a26;
  --note-bg: #eef8f2;
  --focus: #e8561b;
  --ok: #17654d;
  --ok-bg: #e7f6ee;

  --measure: 46rem;
  --wide: 72rem;
  --radius: 14px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b2a26;
    --surface: #10352f;
    --text: #e6f4ec;
    --muted: #a9c7b8;
    --border: #255247;
    --link: #c4ead3;
    --link-hover: #ffd36e;
    --note-bg: #123a33;
    --focus: #ffd36e;
    --mint-soft: #123a33;
    --ok: #9be3bd;
    --ok-bg: #123a33;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--link-hover); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif; letter-spacing: -0.02em; }
.button.ghost { background: transparent; color: var(--link); border-color: var(--border); }
.button.ghost:hover { background: var(--surface); color: var(--link-hover); border-color: var(--teal); box-shadow: none; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--mint-soft), var(--bg)); border-bottom: 1px solid var(--border); }
.hero .wrap { padding-top: 1.25rem; padding-bottom: 2rem; }
.hero-inner { max-width: var(--measure); }
.crumbs ol { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 0.4rem 0 0.15rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--text); font-weight: 600; }
.eyebrow { margin: 0 0 0.5rem; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--mint); } }
h1 { font-size: clamp(1.8rem, 5.2vw, 2.6rem); line-height: 1.15; font-weight: 800; margin: 0 0 0.75rem; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 1rem; }
.meta { font-size: 0.93rem; color: var(--muted); margin: 0 0 1.25rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }

/* Layout: article + table of contents */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: 1.75rem; padding-bottom: 2.5rem; }
@media (min-width: 64rem) {
  .layout { grid-template-columns: minmax(0, var(--measure)) 15rem; justify-content: space-between; }
  .toc-side { position: sticky; top: 1rem; align-self: start; }
  .toc-inline { display: none; }
}
@media (max-width: 63.99rem) { .toc-side { display: none; } }
.toc-side p { margin: 0 0 0.5rem; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.toc-side ol, .toc-inline ol { margin: 0; padding-left: 1.2rem; font-size: 0.93rem; }
.toc-side li + li, .toc-inline li + li { margin-top: 0.3rem; }
.toc-side a { text-decoration: none; }
.toc-side a:hover { text-decoration: underline; }

details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 0 1rem; margin: 0 0 1rem; }
summary { cursor: pointer; font-weight: 700; padding: 0.8rem 0; }
details[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: 0.75rem; }
details > :last-child { margin-bottom: 1rem; }

/* Article typography */
.prose { min-width: 0; }
.prose h2 { font-size: clamp(1.35rem, 3.4vw, 1.6rem); line-height: 1.25; margin: 2.5rem 0 0.75rem; padding-top: 0.5rem; scroll-margin-top: 1rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin: 1.6rem 0 0.4rem; scroll-margin-top: 1rem; }
.prose h4 { font-size: 1rem; margin: 1.2rem 0 0.3rem; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre { margin: 0 0 1rem; }
.prose li + li { margin-top: 0.35rem; }
.prose li > ul, .prose li > ol { margin: 0.35rem 0 0; }
.prose blockquote { border-left: 4px solid var(--teal); background: var(--note-bg); padding: 0.75rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
code, pre { font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; font-size: 0.92em; }
.prose code { background: var(--note-bg); border: 1px solid var(--border); border-radius: 4px; padding: 0.05em 0.35em; }
.prose pre { overflow-x: auto; background: var(--note-bg); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 1rem; }
.prose pre code { border: 0; padding: 0; background: none; }

.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: 0; }
thead th { background: var(--note-bg); font-weight: 700; }
.align-center { text-align: center; }
.align-right { text-align: right; }

/* Free practice questions */
.samples { display: grid; gap: 1rem; margin: 1.25rem 0 1.5rem; }
.sample { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.1rem 0.25rem; box-shadow: 0 12px 28px -24px rgba(11, 42, 38, 0.6); }
.sample-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; align-items: center; margin: 0 0 0.6rem; font-size: 0.85rem; color: var(--muted); }
.pill { display: inline-block; padding: 0.1rem 0.6rem; border-radius: 999px; background: var(--note-bg); border: 1px solid var(--border); font-weight: 700; color: var(--text); }
.sample-prompt { font-weight: 600; margin: 0 0 0.75rem; }
.sample-choose { font-size: 0.92rem; font-weight: 700; color: var(--teal); margin: -0.25rem 0 0.75rem; }
@media (prefers-color-scheme: dark) { .sample-choose { color: var(--mint); } }
.choices { list-style: none; margin: 0 0 0.9rem; padding: 0; display: grid; gap: 0.5rem; }
.choices li { display: flex; gap: 0.7rem; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 0.75rem; margin: 0; }
.letter { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; background: var(--note-bg); border: 1px solid var(--border); }
.sample details { margin: 0 0 0.85rem; background: var(--bg); }
.answer { background: var(--ok-bg); border-left: 4px solid var(--teal); padding: 0.55rem 0.8rem; border-radius: 0 10px 10px 0; }
.others { padding-left: 1.1rem; }
.takeaway { font-size: 0.97rem; }
.source { font-size: 0.88rem; color: var(--muted); }
.more { margin: 0 0 1.5rem; }

/* Call to action band */
.cta-band { background: var(--deep); color: #e6f4ec; border-top: 3px solid transparent; border-image: linear-gradient(90deg, var(--ember-1), var(--ember-2), var(--ember-3)) 1; }
.cta-band .wrap { padding-top: 2.25rem; padding-bottom: 2.25rem; }
.cta-band h2 { color: #ffffff; margin: 0 0 0.5rem; font-size: clamp(1.4rem, 3.6vw, 1.8rem); }
.cta-band p { color: #cfe6da; max-width: var(--measure); margin: 0 0 1.25rem; }

/* Sources */
.sources { font-size: 0.93rem; color: var(--muted); }
.sources h2 { font-size: 1.1rem; margin: 0 0 0.5rem; color: var(--text); }
.sources ul { padding-left: 1.2rem; margin: 0; }
.sources .wrap { padding-top: 1.75rem; padding-bottom: 1.75rem; }

/* Guides index */
.layout-index { padding-top: 1.75rem; padding-bottom: 2.5rem; }
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 44rem) { .guide-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 68rem) { .guide-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.guide-card { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.guide-card h2 { font-size: 1.12rem; line-height: 1.3; margin: 0; }
.guide-card h2 a { text-decoration: none; color: var(--text); }
.guide-card h2 a:hover { color: var(--link); text-decoration: underline; }
.guide-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.guide-card .code { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }
@media (prefers-color-scheme: dark) { .guide-card .code { color: var(--mint); } }
.empty { max-width: var(--measure); }

/* Guide CTA band: ember button and store badges on the dark band */
.cta-band .button.primary { background: var(--ember-2); color: #16292c; }
.cta-band .button.primary:hover { background: var(--ember-1); color: #16292c; }
.cta-band .badges { margin-top: 1.25rem; }

.path-heading { margin: 2.5rem 0 1rem; }

/* Long source URLs wrap on phones (2026-11-07) */
.sources a, .prose a { overflow-wrap: anywhere; word-break: break-word; }
.sample, .sample * { overflow-wrap: anywhere; min-width: 0; }
.sample code, .sample pre { white-space: pre-wrap; word-break: break-word; }
