/* =====================================================================
   Lease Accounting — site styles
   Light, professional palette · responsive · widescreen-aware
   ===================================================================== */

:root {
  /* Palette */
  --bg: #f5f8fb;
  --surface: #ffffff;
  --surface-2: #eef4f7;
  --surface-3: #e6eef3;

  --primary: #0e7c86;
  --primary-dark: #0a5a62;
  --primary-soft: #d6ecee;
  --navy: #123f6b;
  --accent: #e0892b;
  --accent-soft: #fbe9d2;
  --green: #2f9e6b;
  --indigo: #4f63c4;

  --ink: #16262f;
  --ink-soft: #34454f;
  --muted: #5d6e79;
  --border: #d9e3ea;
  --border-strong: #c3d2dc;

  --link: #0c6f78;
  --link-hover: #0a565d;

  /* Code */
  --code-bg: #f3f8f9;
  --code-border: #dbe7ea;
  --inline-code-bg: #e7f1f2;
  --inline-code-ink: #0c5961;

  /* Section accents (colorful CTAs) */
  --c1: #0e7c86;
  --c2: #4f63c4;
  --c3: #d98324;

  /* Metrics */
  --maxw: 1440px;
  --header-h: 66px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(18, 63, 107, 0.06), 0 2px 8px rgba(18, 63, 107, 0.05);
  --shadow-md: 0 6px 24px rgba(18, 63, 107, 0.10);
  --shadow-lg: 0 18px 48px rgba(18, 63, 107, 0.16);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---- Reset / base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img, svg { max-width: 100%; }
.icon { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: middle; }

a { color: var(--link); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--link-hover); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1rem, 3vw, 2.25rem); }
.site-main { flex: 1 0 auto; }

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 200;
  background: var(--primary); color: #fff; padding: .6rem 1rem; border-radius: 8px;
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; color: #fff; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* =====================================================================
   Header / navigation
   ===================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s ease, background .2s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); background: rgba(255, 255, 255, 0.94); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--navy); font-weight: 700; }
.brand:hover { color: var(--navy); }
.brand-mark { width: 40px; height: 40px; filter: drop-shadow(0 2px 4px rgba(18,63,107,.18)); transition: transform .2s ease; }
.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 1.12rem; letter-spacing: -.01em; }
.brand-sub { font-size: .72rem; font-weight: 600; color: var(--primary); letter-spacing: .04em; }

.nav-toggle {
  margin-left: auto; display: inline-grid; place-items: center;
  width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--navy); cursor: pointer;
}
.nav-toggle .icon { width: 1.5em; height: 1.5em; }
.nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: inline-block; }

.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem .85rem; border-radius: 10px; font-weight: 600;
  color: var(--ink-soft); transition: background .15s ease, color .15s ease;
}
.nav-link .icon { color: var(--muted); transition: color .15s ease; }
.nav-link:hover { background: var(--surface-2); color: var(--navy); }
.nav-link:hover .icon { color: var(--primary); }
.nav-link.is-active { color: var(--primary-dark); background: var(--primary-soft); }
.nav-link.is-active .icon { color: var(--primary); }

@media (max-width: 860px) {
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; padding: .5rem clamp(1rem, 3vw, 2.25rem) 1rem; gap: .15rem; }
  .nav-link { padding: .8rem .75rem; }
}
@media (min-width: 861px) {
  .nav-toggle { display: none; }
  .primary-nav { margin-left: auto; }
  .primary-nav ul { display: flex; align-items: center; gap: .25rem; }
}

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer {
  flex-shrink: 0;
  margin-top: 4rem;
  background: var(--navy);
  color: #d8e4ef;
}
.footer-inner {
  display: grid; gap: 2rem; padding-block: 2.75rem 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .footer-inner { grid-template-columns: 1.4fr 1fr; } }
.footer-brand { display: flex; gap: .9rem; align-items: flex-start; }
.footer-brand .brand-mark { width: 44px; height: 44px; }
.footer-name { margin: 0; font-weight: 700; color: #fff; font-size: 1.1rem; }
.footer-tag { margin: .35rem 0 0; color: #aebfd2; max-width: 46ch; }
.footer-heading { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #8fa6c0; margin: 0 0 .65rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.footer-nav a { display: inline-flex; align-items: center; gap: .55rem; color: #d8e4ef; padding: .35rem .15rem; border-radius: 8px; }
.footer-nav a .icon { color: #7fd0d8; }
.footer-nav a:hover { color: #fff; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  padding-block: 1.1rem; border-top: 1px solid rgba(255,255,255,.12); color: #93a8c1; font-size: .9rem;
}
.footer-bottom p { margin: 0; }

/* =====================================================================
   Hero (home)
   ===================================================================== */
.hero {
  text-align: center;
  background:
    radial-gradient(1100px 480px at 50% -160px, rgba(14,124,134,.16), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  padding-block: clamp(2.5rem, 6vw, 4.75rem) clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--border);
}
.hero-logo {
  display: block; margin: 0 auto 1.6rem; width: clamp(150px, 24vw, 232px); height: auto;
  filter: drop-shadow(0 10px 24px rgba(18,63,107,.22));
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.08; letter-spacing: -.02em;
  margin: 0 auto .9rem; max-width: 18ch; color: var(--navy); font-weight: 800;
}
.hero-title span { color: var(--primary); display: block; }
.hero-lede { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--ink-soft); max-width: 60ch; margin: 0 auto 1rem; }
.hero-sub { color: var(--muted); max-width: 66ch; margin: 0 auto; }

.cta-row {
  display: grid; gap: 1rem; margin: 2.25rem auto 0; max-width: 980px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .cta-row { grid-template-columns: repeat(3, 1fr); } }
.cta {
  display: flex; align-items: center; gap: .85rem; text-align: left;
  padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cta:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.cta-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; color: #fff; flex: none; }
.cta-icon .icon { width: 1.5em; height: 1.5em; }
.cta-1 .cta-icon { background: linear-gradient(135deg, var(--c1), #0a5a62); }
.cta-2 .cta-icon { background: linear-gradient(135deg, var(--c2), #38489c); }
.cta-3 .cta-icon { background: linear-gradient(135deg, var(--c3), #b96712); }
.cta-text { display: flex; flex-direction: column; }
.cta-label { font-weight: 700; color: var(--navy); }
.cta-blurb { font-size: .85rem; color: var(--muted); }
.cta-arrow { margin-left: auto; color: var(--muted); transition: transform .18s ease, color .18s ease; }
.cta:hover .cta-arrow { transform: translateX(4px); color: var(--primary); }

/* =====================================================================
   Sections / cards (home)
   ===================================================================== */
.section { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--navy); letter-spacing: -.01em; margin: 0 0 .5rem; }
.section-intro { color: var(--muted); max-width: 70ch; margin: 0 0 1.75rem; }

.card-grid, .guide-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.card-grid { grid-template-columns: 1fr; }
@media (min-width: 680px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card > a { display: flex; flex-direction: column; gap: .5rem; height: 100%; padding: 1.3rem 1.4rem; color: inherit; }
.card h3 { margin: 0; color: var(--navy); font-size: 1.18rem; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.card-cta { margin-top: auto; display: inline-flex; align-items: center; gap: .35rem; color: var(--primary); font-weight: 600; padding-top: .4rem; }
.card-cta .icon { transition: transform .18s ease; }
.card:hover .card-cta .icon { transform: translateX(4px); }

.card-feature .feature-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; color: #fff; }
.card-feature .feature-icon .icon { width: 1.6em; height: 1.6em; }
.feature-1 .feature-icon { background: linear-gradient(135deg, var(--c1), #0a5a62); }
.feature-2 .feature-icon { background: linear-gradient(135deg, var(--c2), #38489c); }
.feature-3 .feature-icon { background: linear-gradient(135deg, var(--c3), #b96712); }

.guide-grid { grid-template-columns: 1fr; }
@media (min-width: 760px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
.guide { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.guide:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.guide > a { display: block; padding: 1.25rem 1.4rem; color: inherit; }
.guide h3 { margin: 0 0 .4rem; color: var(--navy); font-size: 1.08rem; }
.guide p { margin: 0 0 .6rem; color: var(--muted); font-size: .95rem; }
.guide-cta { display: inline-flex; align-items: center; gap: .35rem; color: var(--primary); font-weight: 600; }

/* =====================================================================
   Document / page layout
   ===================================================================== */
.page-grid { padding-block: 1.5rem 3rem; display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1080px) {
  .page-grid:has(.toc-wrap:not([hidden])) { grid-template-columns: minmax(0, 1fr) 280px; gap: 3.5rem; }
}
.doc { min-width: 0; }

.breadcrumbs { margin-bottom: 1.25rem; font-size: .9rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0; padding: 0; color: var(--muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: .35rem; }
.breadcrumbs li + li::before { content: "/"; color: var(--border-strong); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs [aria-current="page"] { color: var(--ink-soft); font-weight: 600; }

.doc-head { margin-bottom: 1.75rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.eyebrow { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 .65rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--primary); }
.eyebrow a { display: inline-flex; align-items: center; gap: .4rem; color: var(--primary); }
.eyebrow .icon { width: 1.05em; height: 1.05em; }
.doc-title {
  font-size: clamp(1.85rem, 4vw, 2.85rem); line-height: 1.12; letter-spacing: -.02em; margin: 0;
  color: var(--navy);
  background: linear-gradient(120deg, var(--navy), var(--primary) 70%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.doc-lede { font-size: 1.18rem; color: var(--ink-soft); margin: 1rem 0 0; max-width: 70ch; }

/* TOC sidebar (widescreen) */
.toc-wrap { display: none; }
@media (min-width: 1080px) {
  .toc-wrap:not([hidden]) { display: block; }
  .toc { position: sticky; top: calc(var(--header-h) + 1.25rem); }
}
.toc-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 .6rem; }
.toc nav ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.toc a { display: block; padding: .3rem .85rem; color: var(--muted); font-size: .9rem; line-height: 1.35; border-left: 2px solid transparent; margin-left: -2px; }
.toc a:hover { color: var(--primary); }
.toc a.is-active { color: var(--primary-dark); border-left-color: var(--primary); font-weight: 600; }
.toc a.lvl-3 { padding-left: 1.6rem; font-size: .85rem; }

/* Children / related */
.children { margin-top: 2.5rem; }
.children-title { font-size: 1.35rem; color: var(--navy); margin: 0 0 1.1rem; }
.related { margin-top: 2.5rem; padding: 1.4rem 1.5rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.related h2 { margin: 0 0 .8rem; font-size: 1.1rem; color: var(--navy); }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.related a { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .25rem; font-weight: 500; }
.related a .icon { color: var(--primary); width: 1.05em; height: 1.05em; }

/* =====================================================================
   Prose
   ===================================================================== */
.prose { font-size: 1.075rem; color: var(--ink); }
.prose > * { margin-block: 0 1.15rem; }
.prose h2, .prose h3, .prose h4 { color: var(--navy); line-height: 1.25; letter-spacing: -.01em; scroll-margin-top: calc(var(--header-h) + 1.25rem); }
.prose h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); margin-top: 2.4rem; padding-bottom: .4rem; border-bottom: 2px solid var(--primary-soft); }
.prose h3 { font-size: clamp(1.2rem, 2.4vw, 1.4rem); margin-top: 1.9rem; }
.prose h4 { font-size: 1.1rem; margin-top: 1.5rem; color: var(--primary-dark); }
.prose p { margin: 0 0 1.15rem; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-color: rgba(14,124,134,.35); text-underline-offset: 2px; text-decoration-thickness: 1.5px; transition: color .15s ease, text-decoration-color .15s ease, background .15s ease; }
.prose a:hover { color: var(--link-hover); text-decoration-color: var(--primary); }
.prose a[data-external]::after { content: ""; display: inline-block; width: .72em; height: .72em; margin-left: .18em; vertical-align: middle; background: currentColor; -webkit-mask: var(--ext-mask) center / contain no-repeat; mask: var(--ext-mask) center / contain no-repeat; opacity: .65; }
:root { --ext-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 5h5v5M19 5l-8 8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* Lists — custom markers (ul) and colored counters (ol) */
.prose ul, .prose ol { margin: 0 0 1.25rem; padding: 0; list-style: none; }
.prose li { position: relative; margin-bottom: .55rem; padding-left: 1.85rem; }
.prose li::marker { content: ""; }

.prose ul > li::before {
  content: ""; position: absolute; left: .25rem; top: .62em;
  width: .5rem; height: .5rem; border-radius: 2px;
  background: var(--primary); transform: rotate(45deg);
}
.prose ul ul > li::before { background: none; border: 1.5px solid var(--primary); }

.prose ol { counter-reset: prose-counter; }
.prose ol > li { padding-left: 2.25rem; }
.prose ol > li::before {
  counter-increment: prose-counter; content: counter(prose-counter);
  position: absolute; left: 0; top: .1em;
  min-width: 1.5rem; height: 1.5rem; padding: 0 .25rem;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700; line-height: 1;
  color: var(--primary-dark); background: var(--primary-soft);
  border-radius: 999px;
}

.prose li > ul, .prose li > ol { margin: .55rem 0 .25rem; }
.prose li::marker { color: var(--primary); }
.prose blockquote { margin: 0 0 1.15rem; padding: .65rem 1.2rem; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; color: var(--ink-soft); }

.header-anchor { color: var(--border-strong); margin-left: .4rem; text-decoration: none; opacity: 0; transition: opacity .15s ease, color .15s ease; font-weight: 600; }
.prose h2:hover .header-anchor, .prose h3:hover .header-anchor, .prose h4:hover .header-anchor, .header-anchor:focus { opacity: 1; }
.header-anchor:hover { color: var(--primary); }

/* Inline code — soft, borderless, blends in */
.prose :not(pre) > code {
  font-family: var(--mono); font-size: .9em;
  background: var(--inline-code-bg); color: var(--inline-code-ink);
  padding: .12em .4em; border-radius: 6px; white-space: break-spaces;
}

/* =====================================================================
   Code blocks + copy button + light Prism theme
   ===================================================================== */
.code-block { position: relative; margin: 0 0 1.4rem; }
.prose pre[class*="language-"], .prose pre {
  margin: 0; overflow: auto; padding: 1.1rem 1.2rem;
  background: var(--code-bg); border: 1px solid var(--code-border); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: .9rem; line-height: 1.6; color: #243b42;
  tab-size: 4;
}
.prose pre code { font-family: inherit; font-size: inherit; background: none; padding: 0; color: inherit; }

.copy-btn {
  position: absolute; top: .55rem; right: .55rem;
  display: inline-flex; align-items: center; gap: .3rem;
  font: 600 .78rem/1 var(--font); color: var(--muted);
  background: rgba(255,255,255,.9); border: 1px solid var(--border); border-radius: 8px;
  padding: .35rem .55rem; cursor: pointer; opacity: 0; transition: opacity .15s ease, color .15s ease, border-color .15s ease;
}
.code-block:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--primary); border-color: var(--primary); }
.copy-btn .icon { width: 1.05em; height: 1.05em; }
.copy-btn.copied { color: var(--green); border-color: var(--green); }
@media (hover: none) { .copy-btn { opacity: 1; } }

/* Prism token colors — light, scheme-matched */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #7a8a93; font-style: italic; }
.token.punctuation { color: #5a6b78; }
.token.namespace { opacity: .75; }
.token.property, .token.tag, .token.constant, .token.symbol, .token.deleted { color: #c0392b; }
.token.boolean, .token.number { color: #b9531a; }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: #2f8f5b; }
.token.operator, .token.entity, .token.url, .token.variable { color: #4a5a64; }
.token.atrule, .token.attr-value, .token.keyword { color: #0c6f78; font-weight: 600; }
.token.function, .token.class-name { color: #4f63c4; }
.token.regex, .token.important { color: var(--accent); }
.token.decorator, .token.annotation { color: #9b59b6; }
.token.important, .token.bold { font-weight: 700; }
.token.italic { font-style: italic; }

/* =====================================================================
   Tables
   ===================================================================== */
.table-wrap { overflow-x: auto; margin: 0 0 1.4rem; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); -webkit-overflow-scrolling: touch; }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: .96rem; }
.table-wrap th, .table-wrap td { padding: .7rem .95rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-wrap thead th { background: var(--navy); color: #eaf2f8; font-weight: 600; white-space: nowrap; }
.table-wrap thead th:first-child { border-top-left-radius: var(--radius-sm); }
.table-wrap thead th:last-child { border-top-right-radius: var(--radius-sm); }
.table-wrap tbody tr:nth-child(even) { background: var(--surface-2); }
.table-wrap tbody tr:hover { background: var(--primary-soft); }
.table-wrap tbody tr:last-child td { border-bottom: none; }
.table-wrap code { background: rgba(255,255,255,.6); }

/* =====================================================================
   KaTeX
   ===================================================================== */
.katex { font-size: 1.05em; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: .65rem .25rem; margin: 0 0 1.4rem; }
.katex-display > .katex { white-space: nowrap; }
.prose .katex-display { color: var(--ink); }

/* =====================================================================
   Mermaid diagrams
   ===================================================================== */
.prose .mermaid {
  margin: 1.6rem 0;
  padding: 1.4rem 1.2rem;
  background:
    radial-gradient(120% 120% at 50% 0%, #fbfdfe 0%, var(--surface) 60%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* Hide raw diagram source until Mermaid has rendered it */
.prose .mermaid:not([data-processed]) { color: transparent; font-size: 0; min-height: 3.5rem; }
.prose .mermaid svg { max-width: 100%; height: auto; }
.prose .mermaid .edgeLabel, .prose .mermaid .edgeLabel p { background: #fbfdfe !important; color: var(--ink-soft) !important; }
.prose .mermaid .nodeLabel, .prose .mermaid .label { font-weight: 500; }
.prose .figure-caption { margin: -0.9rem 0 1.6rem; text-align: center; font-size: .9rem; color: var(--muted); font-style: italic; }

/* =====================================================================
   Task-list checkboxes (togglable, no bullet, strike-through when done)
   ===================================================================== */
.prose ul:has(.task-list-item) { list-style: none; padding-left: .2rem; }
.prose li.task-list-item { list-style: none; display: flex; align-items: flex-start; gap: .6rem; padding-left: 0; }
.prose li.task-list-item::marker { content: ""; }
.prose li.task-list-item::before { display: none; content: none; }
.task-list-item input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; margin: .35em 0 0; flex: none;
  width: 1.15em; height: 1.15em; border: 2px solid var(--border-strong); border-radius: 5px;
  background: var(--surface); cursor: pointer; display: grid; place-content: center; transition: background .15s ease, border-color .15s ease;
}
.task-list-item input[type="checkbox"]::before { content: ""; width: .62em; height: .62em; transform: scale(0); transform-origin: center; transition: transform .12s ease; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); background: #fff; }
.task-list-item input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
.task-list-item input[type="checkbox"]:checked::before { transform: scale(1); }
.task-list-item.is-checked { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }

/* =====================================================================
   FAQ accordion
   ===================================================================== */
.accordion, .prose details {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); margin: 0 0 .8rem; overflow: hidden; box-shadow: var(--shadow-sm);
}
.prose summary, .accordion > .accordion-q {
  cursor: pointer; list-style: none; padding: 1rem 1.2rem; font-weight: 600; color: var(--navy);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after { content: ""; width: 1.1em; height: 1.1em; flex: none; background: var(--primary); -webkit-mask: var(--chev-mask) center/contain no-repeat; mask: var(--chev-mask) center/contain no-repeat; transition: transform .2s ease; }
.prose details[open] summary::after { transform: rotate(90deg); }
:root { --chev-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.prose details > *:not(summary) { padding: 0 1.2rem 1rem; }
.prose summary:hover { background: var(--surface-2); }

/* =====================================================================
   Misc / motion
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
