/* ==========================================================================
   পিজ্জা–হ্যাম তথ্য রেফারেন্স — global stylesheet
   Mobile-first, no external font/image dependencies.
   Breakpoints: 320px base, 768px, 1024px, 1280px
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg: #fdf7ee;
  --bg-tint: #f7ead6;
  --surface: #fffdf8;
  --surface-alt: #f8ecd8;
  --ink: #33241a;
  --ink-soft: #57412f;
  --muted: #7b6551;
  --line: #e4d2b5;
  --line-strong: #cbb189;
  --accent: #a93a2b;          /* low-saturation tomato */
  --accent-ink: #7d2a1f;
  --accent-soft: #f6dfd8;
  --wheat: #a8721d;
  --wheat-soft: #f8e8c6;
  --crust: #6d4a2a;
  --crust-soft: #efe0cd;
  --pro: #7a4a10;
  --pro-soft: #fbeed6;
  --warn: #993619;
  --warn-soft: #fbe2d6;
  --advice: #1c6350;
  --advice-soft: #dcefe7;
  --info: #2b5b7a;
  --info-soft: #ddedf6;
  --focus: #9a5b12;
  --radius: 14px;
  --radius-sm: 10px;
  --tap: 44px;
  --shadow-sm: 0 1px 2px rgba(51, 36, 26, .08);
  --shadow: 0 2px 4px rgba(51, 36, 26, .07), 0 12px 28px rgba(51, 36, 26, .07);
  --container: 1140px;
  --font-body: "Noto Sans Bengali", "Noto Sans Bengali UI", "Hind Siliguri",
    "Kalpurush", "SolaimanLipi", "Shonar Bangla", "Vrinda", "Bangla MN",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1611;
    --bg-tint: #221a13;
    --surface: #251d16;
    --surface-alt: #2e2419;
    --ink: #f4e9dc;
    --ink-soft: #ddcfbe;
    --muted: #bcab98;
    --line: #4a3a2a;
    --line-strong: #614c37;
    --accent: #ec9078;
    --accent-ink: #f5b6a4;
    --accent-soft: #3a231d;
    --wheat: #e2b566;
    --wheat-soft: #34281a;
    --crust: #d3ae86;
    --crust-soft: #2f251a;
    --pro: #f0c479;
    --pro-soft: #302515;
    --warn: #f2a98a;
    --warn-soft: #33211a;
    --advice: #86d3b8;
    --advice-soft: #1a2c26;
    --info: #92c6e6;
    --info-soft: #1a2730;
    --focus: #f0c479;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow: 0 2px 4px rgba(0, 0, 0, .45), 0 12px 28px rgba(0, 0, 0, .4);
  }
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.9;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  line-height: 1.5;
  margin: 0 0 .5em;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.5rem); line-height: 1.4; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.3vw, 1.9rem); }
h3 { font-size: clamp(1.12rem, 1rem + .6vw, 1.35rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; overflow-wrap: anywhere; }
ul, ol { margin: 0 0 1em; padding-left: 1.35em; }
li { margin: 0 0 .5em; }
b, strong { font-weight: 700; }

a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--accent); text-decoration-thickness: 2px; }
a:active { color: var(--accent); }
a:visited { color: #7d3f6d; }
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

code, kbd { font-family: var(--font-mono); font-size: .92em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

img, svg { max-width: 100%; height: auto; }

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -100px;
  z-index: 200;
  background: var(--surface);
  color: var(--accent-ink);
  border: 2px solid var(--accent);
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  transition: top .15s ease-in-out;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-block;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--crust);
  background: var(--crust-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: .9rem;
}
.lede { font-size: 1.1rem; color: var(--ink-soft); }
.small { font-size: .9rem; color: var(--muted); line-height: 1.75; }
.stack > * + * { margin-top: 1rem; }

/* ---------- Buttons (ad-linked actions) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: var(--tap);
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #fff8f2;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .05s;
}
.btn:visited { color: #fff8f2; }
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff8f2; }
.btn:active { transform: translateY(1px); }
.btn--ghost {
  background: transparent;
  color: var(--accent-ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--surface-alt); color: var(--accent-ink); }
.btn--quiet {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn[aria-disabled="true"], .btn:disabled, button:disabled {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn .icon { width: 20px; height: 20px; flex: 0 0 auto; }

.icon { display: inline-block; vertical-align: middle; }

/* ---------- Site header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding-block: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-height: var(--tap);
  flex: 1 1 auto;
  min-width: 0;
}
.brand:visited { color: var(--ink); }
.brand:hover .brand__name { color: var(--accent); }
.brand__mark {
  width: 40px; height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--wheat-soft);
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
}
.brand__mark svg { width: 30px; height: 30px; display: block; }
.brand__text { min-width: 0; }
.brand__name {
  display: block;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.brand__tag {
  display: none;
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.4;
}

.nav-toggle {
  order: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-alt); }
.nav-toggle__bars { display: inline-grid; gap: 4px; width: 20px; }
.nav-toggle__bars i {
  display: block; height: 2px; width: 100%;
  background: currentColor; border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.primary-nav {
  order: 4;
  flex: 1 1 100%;
}
.primary-nav__list {
  list-style: none;
  margin: 0;
  padding: 8px 0 14px;
  display: grid;
  gap: 2px;
}
.primary-nav a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 8px 14px;
  border-radius: 10px;
  border-inline-start: 4px solid transparent;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.5;
}
.primary-nav a:hover { background: var(--surface-alt); color: var(--accent-ink); }
.primary-nav a[aria-current="page"] {
  border-inline-start-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
}
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(28, 18, 10, .45);
  border: 0;
  padding: 0;
}

/* No-JS + wide screens: nav is always visible, toggle hidden */
.primary-nav { display: none; }
.has-js .primary-nav.is-open {
  display: block;
  position: fixed;
  inset-inline: 0;
  top: 0;
  bottom: 0;
  z-index: 95;
  overflow-y: auto;
  padding: 84px clamp(16px, 5vw, 28px) 40px;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.has-js .primary-nav.is-open .primary-nav__list { gap: 4px; }
.no-js .primary-nav { display: block; position: static; padding: 0 clamp(16px, 4vw, 32px) 8px; }
.no-js .nav-toggle { display: none; }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .primary-nav,
  .no-js .primary-nav {
    display: block;
    order: 2;
    flex: 1 1 auto;
    position: static;
    padding: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
  }
  .primary-nav__list {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: flex-end;
    gap: 2px;
    padding: 0;
  }
  .primary-nav a {
    border-inline-start-width: 0;
    border-bottom: 3px solid transparent;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: .95rem;
  }
  .primary-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
  .brand__tag { display: block; }
  .brand { flex: 0 1 auto; }
  .nav-scrim { display: none; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: var(--bg-tint);
  border-bottom: 1px solid var(--line);
}
.breadcrumb__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 10px 0;
  font-size: .92rem;
  line-height: 1.6;
}
.breadcrumb li { margin: 0; display: flex; align-items: center; }
.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--accent-ink);
}
.breadcrumb a:hover { background: var(--surface); }
.breadcrumb [aria-current="page"] {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 4px 8px;
  color: var(--ink-soft);
}
.breadcrumb__sep { color: var(--muted); padding-inline: 2px; }

/* ---------- Main / sections ---------- */
main { display: block; }
.section {
  padding-block: clamp(28px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}
.section--tight { padding-block: clamp(22px, 3.5vw, 36px); }
.section--alt { background: var(--surface-alt); }
.section__head { max-width: 62ch; margin-bottom: 1.3rem; }
.section__head p:last-child { margin-bottom: 0; }
.section__kicker {
  display: block;
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--wheat);
  margin-bottom: .35rem;
}
.grid-2 { display: grid; gap: clamp(18px, 3vw, 32px); }
@media (min-width: 1024px) {
  .layout-with-toc {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 48px);
    align-items: start;
  }
  .layout-with-toc .toc { position: sticky; top: 96px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 88% 8%, var(--wheat-soft) 0, transparent 46%),
    radial-gradient(circle at 4% 92%, var(--accent-soft) 0, transparent 40%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg-tint) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  gap: clamp(20px, 4vw, 40px);
  padding-block: clamp(30px, 6vw, 68px);
  align-items: center;
}
.hero__copy { max-width: 62ch; }
.hero h1 { margin-bottom: .45em; }
.hero__art { display: none; }
@media (min-width: 768px) {
  .hero__inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .hero__art { display: block; }
}
.pizza-graphic {
  width: min(100%, 320px);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--wheat-soft) 0 58%, transparent 59%),
    conic-gradient(from 10deg, var(--accent-soft) 0 12.5%, transparent 12.5% 25%,
      var(--accent-soft) 25% 37.5%, transparent 37.5% 50%,
      var(--accent-soft) 50% 62.5%, transparent 62.5% 75%,
      var(--accent-soft) 75% 87.5%, transparent 87.5% 100%),
    radial-gradient(circle at 50% 50%, var(--surface-alt) 60%, var(--crust) 61% 74%, var(--wheat-soft) 75%);
  border: 3px dashed var(--line-strong);
  position: relative;
}
.pizza-graphic::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  border: 2px dotted var(--accent);
  opacity: .5;
}
.hero__note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  min-height: 40px;
}

/* ---------- Cards / nav-grid ---------- */
.nav-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.card {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--wheat);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card__index {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--muted);
}
.card h3, .card__title { margin: 0; font-size: 1.1rem; line-height: 1.45; }
.card p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.card__link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  font-weight: 700;
  text-decoration: underline;
}
.card__link:hover { text-decoration-thickness: 2px; }
.card--accent { border-top-color: var(--accent); }
.card--crust { border-top-color: var(--crust); }
.card--info { border-top-color: var(--info); }

/* ---------- Notices ---------- */
.notice {
  border: 2px solid var(--line-strong);
  border-inline-start-width: 8px;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px clamp(16px, 3vw, 24px);
  box-shadow: var(--shadow-sm);
}
.notice + .notice { margin-top: 16px; }
.notice__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: .6rem;
}
.notice__icon {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
}
.notice__icon svg { width: 18px; height: 18px; }
.notice__title { margin: 0; font-size: 1.06rem; line-height: 1.5; }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.notice ul { margin-bottom: 0; }
.notice--pro { border-color: var(--pro); background: var(--pro-soft); }
.notice--pro .notice__icon { background: var(--pro); color: var(--pro-soft); }
.notice--pro .notice__title { color: var(--pro); }
.notice--warn { border-color: var(--warn); background: var(--warn-soft); }
.notice--warn .notice__icon { background: var(--warn); color: var(--warn-soft); }
.notice--warn .notice__title { color: var(--warn); }
.notice--advice { border-color: var(--advice); background: var(--advice-soft); }
.notice--advice .notice__icon { background: var(--advice); color: var(--advice-soft); }
.notice--advice .notice__title { color: var(--advice); }
.notice--info { border-color: var(--info); background: var(--info-soft); }
.notice--info .notice__icon { background: var(--info); color: var(--info-soft); }
.notice--info .notice__title { color: var(--info); }
.notice--evidence { border-color: var(--wheat); background: var(--wheat-soft); }
.notice--evidence .notice__icon { background: var(--wheat); color: #2b1d08; }
.notice--evidence .notice__title { color: var(--wheat); }

/* ---------- Details / collapsibles ---------- */
details.disclosure {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}
details.disclosure > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.55;
  list-style: none;
}
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before {
  content: "+";
  flex: 0 0 auto;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  color: var(--accent-ink);
  font-weight: 700;
  line-height: 1;
}
details.disclosure[open] > summary::before { content: "–"; }
details.disclosure > summary:hover { background: var(--surface-alt); }
details.disclosure .disclosure__body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}
details.disclosure[open] .disclosure__body { padding-top: 14px; }

/* ---------- Evidence status list ---------- */
.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  counter-reset: fact;
}
.fact-list li {
  position: relative;
  margin: 0;
  padding: 12px 14px 12px 54px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .98rem;
  line-height: 1.8;
}
.fact-list li::before {
  counter-increment: fact;
  content: counter(fact);
  position: absolute;
  inset-inline-start: 12px;
  top: 14px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--wheat-soft);
  border: 1.5px solid var(--wheat);
  color: var(--wheat);
  font-size: .86rem;
  font-weight: 700;
  font-family: var(--font-mono);
}
.fact-list li[data-kind="naming"]::before {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.fact-tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  padding: 1px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-tint);
  color: var(--ink-soft);
  margin-inline-end: 6px;
}

/* ---------- Tables ---------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding-bottom: 2px;
}
.table-scroll > table { min-width: 680px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .96rem;
  line-height: 1.75;
}
caption {
  caption-side: top;
  text-align: start;
  padding: 14px 16px 4px;
  font-weight: 700;
  color: var(--ink-soft);
}
th, td {
  text-align: start;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
thead th {
  background: var(--bg-tint);
  color: var(--ink);
  font-size: .92rem;
  letter-spacing: .01em;
  border-bottom: 2px solid var(--line-strong);
  position: sticky;
  top: 0;
}
tbody th[scope="row"] { background: var(--surface-alt); font-weight: 700; width: 26%; }
tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-alt) 45%, var(--surface)); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td .pill, .pill {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  background: var(--wheat-soft);
  color: var(--wheat);
  white-space: nowrap;
}
.pill--open { background: var(--crust-soft); color: var(--crust); }

/* ---------- TOC ---------- */
.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.toc__title { margin: 0 0 .5rem; font-size: 1rem; }
.toc__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc__list a {
  display: block;
  min-height: var(--tap);
  padding: 9px 12px;
  border-radius: 8px;
  border-inline-start: 4px solid transparent;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .95rem;
  line-height: 1.55;
  display: flex;
  align-items: center;
}
.toc__list a:hover { background: var(--surface-alt); color: var(--accent-ink); }
.toc__list a.is-current {
  border-inline-start-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
}
.toc__hint { font-size: .84rem; color: var(--muted); margin: .6rem 0 0; }

/* ---------- Process steps ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  counter-reset: step;
}
.steps > li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 18px 18px 18px 68px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  break-inside: avoid;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 16px;
  top: 18px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff8f2;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: .95rem;
}
.steps h3 { margin: 0 0 .35rem; font-size: 1.06rem; }
.steps p { margin: 0 0 .5rem; color: var(--ink-soft); }
.steps > li:last-child::after { display: none; }
.param-list {
  list-style: none;
  margin: .4rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.param-list li {
  margin: 0;
  font-size: .86rem;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  background: var(--bg-tint);
  color: var(--ink-soft);
}

/* ---------- Checklist ---------- */
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.checklist li { margin: 0; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: var(--tap);
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1.7;
  transition: background-color .15s, border-color .15s;
}
.check-item:hover { background: var(--surface-alt); border-color: var(--line-strong); }
.check-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 24px; height: 24px;
  margin: 2px 0 0;
  border: 2px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg);
  display: grid;
  place-content: center;
  cursor: pointer;
}
.check-item input[type="checkbox"]::after {
  content: "";
  width: 12px; height: 7px;
  border: 2.5px solid var(--bg);
  border-top: 0;
  border-inline-end: 0;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform .12s ease-out;
}
.check-item input[type="checkbox"]:checked { background: var(--advice); border-color: var(--advice); }
.check-item input[type="checkbox"]:checked::after { transform: rotate(-45deg) scale(1); }
.check-item input[type="checkbox"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.check-item:has(input:checked) {
  border-color: var(--advice);
  background: var(--advice-soft);
}
.check-item__text { min-width: 0; }
.check-item__text small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: .92rem;
  color: var(--ink-soft);
}
.progress {
  flex: 1 1 160px;
  min-width: 120px;
  height: 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--line-strong);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--advice);
  transition: width .2s ease-out;
}

/* ---------- Definition list / FAQ ---------- */
dl.defs { margin: 0; display: grid; gap: 14px; }
dl.defs dt { font-weight: 700; color: var(--ink); }
dl.defs dd { margin: .2rem 0 0; color: var(--ink-soft); }

/* ---------- Related links ---------- */
.related-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.related-links a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: var(--tap);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
}
.related-links a:hover { border-color: var(--accent); background: var(--surface-alt); }
.related-links a strong { color: var(--accent-ink); text-decoration: underline; }
.related-links a span { font-size: .9rem; color: var(--muted); line-height: 1.65; }
.related-links .arrow { font-size: .85rem; color: var(--muted); }

/* ---------- Forms ---------- */
.form {
  display: grid;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
}
.field { display: grid; gap: 6px; }
.field > label { font-weight: 700; line-height: 1.5; }
.field .req { color: var(--accent); font-weight: 700; }
.field .hint { font-size: .87rem; color: var(--muted); line-height: 1.6; }
input[type="text"], input[type="email"], select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 14px;
  min-height: var(--tap);
  width: 100%;
  line-height: 1.7;
}
textarea { min-height: 132px; resize: vertical; }
select { appearance: none; background-image: none; padding-inline-end: 40px; }
input:hover, select:hover, textarea:hover { border-color: var(--wheat); }
.field.is-valid input, .field.is-valid select, .field.is-valid textarea { border-color: var(--advice); }
.field.is-error input, .field.is-error select, .field.is-error textarea {
  border-color: var(--warn);
  background: var(--warn-soft);
}
.field__error {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--warn);
}
.field.is-error .field__error { display: flex; }
.field.is-valid .field__status { display: inline-flex; color: var(--advice); font-size: .86rem; font-weight: 700; }
.field__status { display: none; align-items: center; gap: 4px; }
.form-status {
  border-radius: var(--radius-sm);
  border: 2px dashed var(--line-strong);
  background: var(--bg-tint);
  padding: 14px 16px;
  font-weight: 600;
  line-height: 1.7;
}
.form-status[data-state="demo"] { border-color: var(--info); background: var(--info-soft); color: var(--info); }
.form-status[data-state="error"] { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
button.btn-element {
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: var(--tap);
  padding: 10px 24px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #fff8f2;
  font-weight: 700;
  cursor: pointer;
}
button.btn-element--ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
button.btn-element:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff8f2; }
button.btn-element--ghost:hover { background: var(--surface-alt); color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--crust-soft);
  border-top: 4px solid var(--wheat);
  padding-block: clamp(26px, 5vw, 48px) 28px;
  color: var(--ink-soft);
  font-size: .96rem;
}
.site-footer__grid {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.site-footer h2 { font-size: 1.02rem; margin-bottom: .6rem; }
.site-footer__section { min-width: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--accent-ink);
  text-decoration: underline;
  padding-block: 4px;
}
.site-footer a:hover { color: var(--accent); text-decoration-thickness: 2px; }
.site-footer__note {
  margin-top: clamp(18px, 3vw, 28px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.site-footer__badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--surface);
  color: var(--ink-soft);
  line-height: 1.5;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: .7rem; }
.footer-brand .brand__mark { width: 36px; height: 36px; }
.footer-brand strong { color: var(--ink); font-size: 1.02rem; line-height: 1.4; }

/* ---------- Misc ---------- */
.anchor-target { scroll-margin-top: 104px; }
.divider { height: 1px; background: var(--line); border: 0; margin: clamp(20px, 4vw, 36px) 0; }
.mark {
  background: var(--wheat-soft);
  border-radius: 4px;
  padding: 0 5px;
  color: var(--ink);
}
.external-mark { font-size: .85em; color: var(--muted); }
.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: .9rem;
  color: var(--ink-soft);
}

@media (max-width: 400px) {
  body { font-size: 1.02rem; }
  .btn { width: 100%; }
  .form-actions .btn-element { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .nav-toggle, .site-footer, .toc, .btn-row, .primary-nav { display: none !important; }
  body { background: #fff; color: #000; }
  details.disclosure { border: 1px solid #999; }
  details.disclosure > summary::before { content: ""; }
}

/* ---------- Document layout (TOC + article) ---------- */
.layout-with-toc { display: grid; gap: clamp(18px, 3vw, 28px); align-items: start; }
.layout-with-toc > .toc { order: 2; }
@media (min-width: 1024px) {
  .layout-with-toc { grid-template-columns: minmax(220px, 270px) minmax(0, 1fr); gap: clamp(28px, 4vw, 52px); }
  .layout-with-toc > .toc { order: 0; }
}
.doc { min-width: 0; }
.doc__head { padding-block: clamp(22px, 4vw, 40px) clamp(18px, 3vw, 28px); border-bottom: 1px solid var(--line); }
.doc__head h1 { margin-bottom: .45em; }
.ps { padding-block: clamp(24px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.ps:last-child { border-bottom: 0; }
.ps .section__head { margin-bottom: 1.1rem; }
.ps h2 { margin-bottom: .4em; }
.ps ul, .ps ol { max-width: 74ch; }
.ps > p, .ps .small { max-width: 78ch; }

/* ---------- Plain card variant (list items) ---------- */
.card--plain { border-top-width: 3px; border-top-color: var(--line-strong); background: var(--surface); }
.card--plain h3 { font-size: 1rem; }
.card--plain p { font-size: .95rem; }

/* ---------- Static list rows used as info tables ---------- */
.checklist li.check-item--static { cursor: default; }
.checklist li.check-item--static:hover { background: var(--surface); }

/* ---------- Long words (URLs, paths) never break the layout ---------- */
.small code, .card p code, td code { overflow-wrap: anywhere; word-break: break-word; }

/* ---------- Small additions ---------- */
.checklist--static { gap: 6px; }
.nav-toggle__label { font-size: .95rem; }

/* ---------- Select control chevron (local data URI, no third-party asset) ---------- */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a8471' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px 20px;
}

/* ---------- Very small screens ---------- */
@media (max-width: 380px) {
  .nav-toggle { padding: 8px 12px; }
  .nav-toggle__label { display: none; }
  .brand__name { font-size: .96rem; }
  .steps > li { padding-inline-start: 58px; }
  .fact-list li { padding-inline-start: 48px; }
}
\n.page-article { display: block; min-width: 0; }\n