/* ClearSpeakers — site styles
   Brand: ink #0B1F2E · teal #0E7C86 · teal-strong #0A5F67 · wash #E6F4F5 · caution #A85F0C
   Type: Plus Jakarta Sans (headings) · Inter (text) */

:root {
  --bg: #F6F8F9;
  --surface: #FFFFFF;
  --mist: #EEF3F5;
  --ink: #0B1F2E;
  --text: #2A3E4C;
  --ink-soft: #586D7A;
  --line: #E1E8EB;
  --line-strong: #C9D5DA;
  --teal: #0E7C86;
  --teal-strong: #0A5F67;
  --teal-wash: #E6F4F5;
  --on-brand: #FFFFFF;
  --hero: #0B1F2E;
  --hero-2: #0F3442;
  --glow: #22B8C6;
  --caution: #A85F0C;
  --caution-wash: #FBF1E4;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 46, 0.05), 0 1px 3px rgba(11, 31, 46, 0.05);
  --shadow-md: 0 12px 28px -12px rgba(11, 31, 46, 0.18), 0 2px 6px rgba(11, 31, 46, 0.05);
  --shadow-lg: 0 30px 60px -20px rgba(11, 31, 46, 0.35), 0 8px 20px -8px rgba(11, 31, 46, 0.15);
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07131C;
    --surface: #0D1C27;
    --mist: #112430;
    --ink: #EAF1F4;
    --text: #C3D1D8;
    --ink-soft: #8FA4AE;
    --line: #1B3140;
    --line-strong: #284657;
    --teal: #3FB6C1;
    --teal-strong: #7FD3DA;
    --teal-wash: #0F2D37;
    --on-brand: #04161C;
    --hero: #050E15;
    --hero-2: #0B2733;
    --caution: #E8A55A;
    --caution-wash: #2B2012;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 28px -12px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
::selection { background: var(--teal); color: var(--on-brand); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--teal-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a, button, summary, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0 0 16px; text-wrap: pretty; }
.ico { width: 18px; height: 18px; flex: none; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 60;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

.wrap { width: min(100% - 40px, 1200px); margin-inline: auto; }
@media (max-width: 600px) { .wrap { width: calc(100% - 32px); } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--teal);
  background: var(--teal); color: var(--on-brand);
  font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 6px 14px -6px rgba(14, 124, 134, 0.6);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s var(--ease), box-shadow 0.2s ease;
}
.btn:hover { background: var(--teal-strong); border-color: var(--teal-strong); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn .ico { width: 17px; height: 17px; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn.secondary:hover { border-color: var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 0.9rem; border-radius: 10px; }
.btn-light { background: #FFFFFF; color: #0B1F2E; border-color: #FFFFFF; box-shadow: var(--shadow-md); }
.btn-light:hover { background: #E6F4F5; border-color: #E6F4F5; }
.btn-light .ico { transition: transform 0.2s var(--ease); }
.btn-light:hover .ico { transform: translateX(3px); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); }
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(11, 31, 46, 0.35); }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.brand img { display: block; height: 32px; width: auto; }
@media (max-width: 400px) { .brand img { height: 26px; } }

/* Logo variants: navy wordmark on light backgrounds, white wordmark on dark ones */
.on-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  .on-light { display: none !important; }
  .on-dark { display: block !important; }
}
.site-footer .on-dark, .hero-tool .on-dark { display: block !important; }
.hero-tool .on-light { display: none !important; }

.nav { display: flex; align-items: center; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-list > li { position: relative; margin: 0; }
.menu-btn, .nav-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 12px;
  border: 0; border-radius: 10px; background: transparent; cursor: pointer;
  color: var(--ink); font: inherit; font-size: 0.95rem; font-weight: 500; text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.menu-btn:hover, .nav-link:hover, .has-menu.open > .menu-btn { background: var(--mist); }
.has-menu.is-active > .menu-btn, .nav-link[aria-current="page"] { color: var(--teal-strong); font-weight: 600; }
.chev { width: 16px; height: 16px; transition: transform 0.2s var(--ease); opacity: 0.7; }
.has-menu.open > .menu-btn .chev { transform: rotate(180deg); }
.nav-cta { margin-left: 10px !important; }
.nav-toggle { display: none; }

.menu-panel {
  --tx: -50%;
  position: absolute; top: calc(100% + 12px); left: 50%; z-index: 45;
  min-width: 290px; padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translate(var(--tx), 6px);
  transition: opacity 0.16s ease, transform 0.18s var(--ease), visibility 0s linear 0.18s;
}
.menu-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.has-menu.open > .menu-panel { opacity: 1; visibility: visible; transform: translate(var(--tx), 0); transition-delay: 0s; }
@media (hover: hover) and (min-width: 961px) {
  .has-menu:hover > .menu-panel { opacity: 1; visibility: visible; transform: translate(var(--tx), 0); transition-delay: 0s; }
}
html:not(.js) .has-menu:focus-within > .menu-panel { opacity: 1; visibility: visible; transform: translate(var(--tx), 0); }
.menu-panel:has(.menu-2col) { width: 540px; }
/* The Guides panel is wide and sits near the right edge, so it opens leftwards */
.menu-wide { width: 600px; left: auto; right: 0; --tx: 0; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li { margin: 0; }
.menu-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 6px; }
.menu-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.menu-cols .menu-list + .menu-list { border-left: 1px solid var(--line); padding-left: 6px; }
.menu-list a {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-size: 0.93rem; font-weight: 500; line-height: 1.3;
  transition: background-color 0.15s ease;
}
.menu-list a:hover { background: var(--mist); }
.menu-list a[aria-current="page"] { background: var(--teal-wash); color: var(--teal-strong); }
.menu-hub a { font-weight: 700; }
.mi {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px;
  background: var(--teal-wash); color: var(--teal);
}
.mi .ico { width: 18px; height: 18px; }

@media (max-width: 1080px) and (min-width: 961px) {
  .menu-btn, .nav-link { padding: 8px 9px; }
}

/* Mobile navigation */
@media (max-width: 960px) {
  .js .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; cursor: pointer;
    font: inherit; font-weight: 600; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px;
  }
  .nav-icon, .nav-icon::before, .nav-icon::after {
    display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform 0.2s var(--ease), background-color 0.2s ease;
  }
  .nav-icon { position: relative; }
  .nav-icon::before, .nav-icon::after { content: ""; position: absolute; left: 0; }
  .nav-icon::before { top: -5px; }
  .nav-icon::after { top: 5px; }
  .nav.open .nav-icon { background: transparent; }
  .nav.open .nav-icon::before { transform: translateY(5px) rotate(45deg); }
  .nav.open .nav-icon::after { transform: translateY(-5px) rotate(-45deg); }

  .js .nav-list {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
    padding: 8px 16px 20px; background: var(--surface);
    border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(11, 31, 46, 0.5);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.2s var(--ease), visibility 0s linear 0.2s;
  }
  .js .nav.open .nav-list { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .js .nav-list > li { border-bottom: 1px solid var(--line); }
  .js .nav-list > li.nav-cta { border-bottom: 0; margin: 16px 0 0 !important; }
  .js .nav-cta .btn { width: 100%; min-height: 50px; }
  .js .menu-btn, .js .nav-link { width: 100%; justify-content: space-between; min-height: 54px; padding: 12px 4px; font-size: 1.05rem; border-radius: 0; }
  .js .menu-btn:hover, .js .nav-link:hover, .js .has-menu.open > .menu-btn { background: transparent; }
  .js .menu-panel {
    position: static; width: auto; min-width: 0; padding: 0 0 12px; transform: none;
    border: 0; box-shadow: none; background: transparent;
    display: none; opacity: 1; visibility: visible;
  }
  .js .has-menu.open > .menu-panel { display: block; transform: none; }
  .js .menu-panel::before { display: none; }
  .js .menu-2col, .js .menu-cols { grid-template-columns: 1fr; }
  .js .menu-cols .menu-list + .menu-list { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; }
  .js .menu-list a { padding: 10px 6px; min-height: 48px; }
  html:not(.js) .header-bar { flex-wrap: wrap; padding: 8px 0; }
  html:not(.js) .nav-list { flex-wrap: wrap; }
}

/* ===== Hero ===== */
.hero { position: relative; }
.hero-article, .hero-page {
  padding: 28px 0 44px;
  background:
    radial-gradient(900px 300px at 85% -60px, color-mix(in srgb, var(--teal) 14%, transparent), transparent 70%),
    linear-gradient(180deg, var(--surface), var(--bg));
  border-bottom: 1px solid var(--line);
}
.hero-page { padding-bottom: 36px; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; letter-spacing: -0.025em; margin: 14px 0 18px; max-width: 24ch; }
.hero-page h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }

.crumbs { font-size: 0.875rem; color: var(--ink-soft); margin: 0 0 6px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: 0.45; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--teal-strong); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 500; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0;
  padding: 5px 12px 5px 8px; border-radius: 999px;
  background: var(--teal-wash); color: var(--teal-strong);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.eyebrow .ico { width: 16px; height: 16px; }

.meta {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: center;
  color: var(--ink-soft); font-size: 0.9rem; line-height: 1.45;
}
.meta-avatar {
  grid-row: span 2;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none;
  overflow: hidden; background: var(--mist);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line);
}
.meta-avatar picture, .meta-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.byline { margin: 0; }
.byline a { color: var(--ink); font-weight: 600; text-decoration: none; }
.byline a:hover { text-decoration: underline; }
.meta-read { display: inline-flex; align-items: center; gap: 6px; }
.meta-read .ico { width: 15px; height: 15px; }

/* Tool hero: dark band, title left, tool right */
.hero-tool {
  padding: 36px 0 64px; color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(700px 420px at 82% 40%, rgba(34, 184, 198, 0.28), transparent 65%),
    radial-gradient(600px 400px at 0% 100%, rgba(14, 124, 134, 0.35), transparent 70%),
    linear-gradient(160deg, var(--hero) 30%, var(--hero-2));
  overflow: hidden;
}
.hero-tool::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.hero-tool .hero-grid { position: relative; z-index: 1; }
.hero-tool h1 { color: #FFFFFF; }
.hero-tool .crumbs, .hero-tool .crumbs [aria-current="page"] { color: rgba(255, 255, 255, 0.7); }
.hero-tool .crumbs a:hover { color: #FFFFFF; }
.hero-tool .eyebrow { background: rgba(127, 211, 218, 0.14); color: #8EDDE4; box-shadow: inset 0 0 0 1px rgba(127, 211, 218, 0.25); }
.hero-tool .meta { color: rgba(255, 255, 255, 0.7); }
.hero-tool .meta-avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25); }
.hero-tool .byline a { color: #FFFFFF; }

@media (min-width: 1024px) {
  .hero-tool .hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: 56px; align-items: center; }
  .hero-tool h1 { font-size: clamp(2.3rem, 3.6vw, 3.2rem); }
}
@media (max-width: 1023px) {
  .hero-tool { padding: 24px 0 40px; }
  .hero-tool-slot { margin-top: 8px; }
}

/* ===== Tool panel ===== */
.tool {
  margin: 8px 0 40px;
  background:
    radial-gradient(360px 260px at 20% 50%, color-mix(in srgb, var(--teal) 12%, transparent), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 30px 28px;
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  color: var(--text);
}
.hero-tool .tool { margin: 0; box-shadow: var(--shadow-lg), 0 0 0 6px rgba(255, 255, 255, 0.05); border-color: transparent; }
@media (max-width: 720px) {
  .tool {
    grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 22px 16px 24px; gap: 16px;
    background:
      radial-gradient(300px 220px at 50% 120px, color-mix(in srgb, var(--teal) 12%, transparent), transparent 70%),
      var(--surface);
  }
}

.tool-stage { position: relative; width: 240px; height: 240px; display: grid; place-items: center; }
.tool-rings { position: absolute; inset: 0; pointer-events: none; }
.tool-rings span { position: absolute; inset: 22%; border-radius: 50%; border: 2px solid var(--teal); opacity: 0; }
.tool.is-playing .tool-rings span { animation: ripple 2.4s ease-out infinite; }
.tool.is-playing .tool-rings span:nth-child(2) { animation-delay: 0.8s; }
.tool.is-playing .tool-rings span:nth-child(3) { animation-delay: 1.6s; }
@keyframes ripple { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.95); opacity: 0; } }

.cone {
  position: relative; width: 150px; height: 150px; border-radius: 50%;
  border: 0; cursor: pointer; color: #FFFFFF;
  background: radial-gradient(circle at 50% 50%, #0A5F67 0 22%, #0E7C86 23% 60%, #0A5F67 61% 100%);
  box-shadow: 0 16px 34px -12px rgba(10, 95, 103, 0.7), inset 0 2px 0 rgba(255, 255, 255, 0.2), inset 0 -6px 14px rgba(0, 0, 0, 0.18);
  font: inherit; font-weight: 700; font-size: 1.05rem;
  display: grid; place-items: center;
  transition: transform 0.15s var(--ease), box-shadow 0.2s ease, filter 0.15s ease;
}
button.cone:hover { transform: scale(1.03); filter: brightness(1.07); }
button.cone:active { transform: scale(0.97); }
button.cone:focus-visible { outline-offset: 6px; border-radius: 50%; }
.cone .cone-label { background: #0B1F2E; color: #FFFFFF; padding: 7px 16px; border-radius: 999px; font-size: 0.95rem; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.tool.is-playing .cone { animation: thump 0.32s ease-in-out infinite alternate; }
@keyframes thump { to { transform: scale(1.035); } }

.progress-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.progress-ring circle { fill: none; stroke-width: 6; }
.progress-ring .track { stroke: var(--line); }
.progress-ring .bar { stroke: var(--teal); stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }

.tool-controls { min-width: 0; }
.tool-controls h2, .tool-controls .tool-title { margin: 0 0 4px; font-family: var(--font-head); font-size: 1.3rem; color: var(--ink); }
.tool-status { margin: 0 0 18px; color: var(--ink-soft); min-height: 1.6em; font-size: 0.95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.chips legend { margin-bottom: 8px; padding: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
@media (max-width: 720px) {
  .chips { justify-content: center; }
  .chips legend { width: 100%; text-align: center; }
}
.chip { margin: 0; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 42px; padding: 8px 15px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 0.92rem; font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s var(--ease);
}
.chip span:hover { border-color: var(--teal); }
.chip span:active { transform: scale(0.97); }
.chip input:checked + span { background: var(--teal); color: var(--on-brand); border-color: var(--teal); box-shadow: 0 4px 10px -4px rgba(14, 124, 134, 0.6); }
.chip input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.tool-hint { font-size: 0.88rem; color: var(--ink-soft); margin: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
@media (max-width: 720px) { .btn-row { justify-content: center; } }

.meter { height: 12px; width: 100%; max-width: 360px; border-radius: 999px; background: var(--mist); border: 1px solid var(--line); overflow: hidden; margin: 6px 0 16px; }
@media (max-width: 720px) { .meter { margin-inline: auto; } }
.meter i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--teal), #22B8C6); transition: width 0.08s linear; }

/* ===== Page body: article + sidebar ===== */
.page-body { padding: 48px 0 80px; }
.kind-page .page-body { padding-top: 40px; }
@media (min-width: 1024px) {
  .page-body.has-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 72px; align-items: start; }
  .page-body.has-sidebar > .article { grid-column: 1; grid-row: 1; }
  .page-body.has-sidebar > .sidebar {
    grid-column: 2; grid-row: 1;
    position: sticky; top: calc(var(--header-h) + 28px);
    max-height: calc(100vh - var(--header-h) - 56px); overflow-y: auto; scrollbar-width: thin;
  }
}
.article { min-width: 0; }
.prose { max-width: 740px; font-size: 1.0625rem; line-height: 1.75; color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 700; margin: 60px 0 16px; }
.prose h3 { font-size: 1.22rem; font-weight: 700; margin: 36px 0 10px; letter-spacing: -0.01em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--teal-strong); font-weight: 500; text-decoration-color: color-mix(in srgb, var(--teal) 45%, transparent); }
.prose a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 0; margin: 0 0 20px; list-style: none; }
.prose li { margin-bottom: 10px; }
.prose ul > li { position: relative; padding-left: 26px; }
.prose ul > li::before {
  content: ""; position: absolute; left: 6px; top: 0.72em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 0 3px var(--teal-wash);
}
.prose ol { counter-reset: step; }
.prose ol > li { counter-increment: step; position: relative; padding-left: 46px; min-height: 30px; margin-bottom: 14px; }
.prose ol > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--teal-wash); color: var(--teal-strong);
  font-family: var(--font-head); font-weight: 800; font-size: 0.88rem; line-height: 1;
}

/* The one-line answer that opens each section */
.prose h2 + p:has(> strong:first-child) {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 12px 0 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; line-height: 1.55; }
th, td { text-align: left; padding: 13px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--mist); color: var(--ink); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.02em; white-space: nowrap; }
tbody tr:hover td { background: color-mix(in srgb, var(--teal-wash) 60%, transparent); }
tr:last-child td { border-bottom: 0; }

/* Figures */
figure { margin: 32px 0 36px; }
figure img { display: block; width: 100%; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--mist); box-shadow: var(--shadow-sm); }
.banner { margin: 36px 0 8px; }
.banner a { display: block; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); transition: transform 0.2s var(--ease), box-shadow 0.2s ease; }
.banner a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.banner img { border: 0; border-radius: 0; box-shadow: none; }
figcaption { font-size: 0.88rem; color: var(--ink-soft); margin-top: 12px; text-align: center; line-height: 1.5; }

/* Author profile (About page) */
.author-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start;
  margin: 8px 0 24px; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.author-avatar {
  display: block; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--mist);
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px color-mix(in srgb, var(--teal) 55%, var(--line));
}
.author-avatar picture { display: block; width: 100%; height: 100%; }
.prose .author-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.prose .author-name { margin: 2px 0 0; font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; color: var(--ink); line-height: 1.3; }
.prose .author-role { margin: 0 0 14px; font-size: 0.9rem; font-weight: 600; color: var(--teal-strong); }
.author-body p:last-child { margin-bottom: 0; }
.prose ul.author-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.prose ul.author-links li { padding: 0; margin: 0; }
.prose ul.author-links li::before { display: none; }
.prose .author-links a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  color: var(--ink); font-size: 0.9rem; font-weight: 600; text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.prose .author-links a:hover { border-color: var(--teal); color: var(--teal-strong); background: var(--teal-wash); }
.author-links svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 560px) {
  .author-card { grid-template-columns: 1fr; padding: 20px; gap: 14px; }
  .author-avatar { width: 80px; height: 80px; }
}

/* Photos inside numbered steps */
.prose ol > li > p:has(> .step-photo) { margin: 12px 0 20px; }
.prose .step-photo {
  display: block; width: 100%; max-width: 440px; height: auto;
  border-radius: 14px; border: 1px solid var(--line); background: var(--mist); box-shadow: var(--shadow-sm);
}
.prose .step-photo-tall { max-width: 240px; }

/* HTML sitemap */
.prose .sitemap-list ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 4px 24px; }
.prose .sitemap-list li { margin: 0; }
.prose .sitemap-list a { display: inline-block; padding: 6px 0; line-height: 1.45; }
.kind-page .prose:has(.sitemap-list) { max-width: none; }

/* Callouts */
.note { border-left: 4px solid var(--teal); background: var(--teal-wash); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 20px 0 24px; }
.caution { border-left: 4px solid var(--caution); background: var(--caution-wash); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 20px 0 24px; }
.note p:last-child, .caution p:last-child { margin: 0; }

/* ===== Sidebar ===== */
.toc { font-size: 0.92rem; }
.toc summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
  padding: 0 0 12px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after {
  content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg); transition: transform 0.2s var(--ease);
}
.toc[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li { margin: 0; }
.toc a {
  display: block; margin-left: -2px; padding: 7px 10px 7px 16px; border-left: 2px solid transparent;
  color: var(--ink-soft); text-decoration: none; line-height: 1.4;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.toc a:hover { color: var(--ink); border-left-color: var(--line-strong); }
.toc a[aria-current="true"] { color: var(--teal-strong); border-left-color: var(--teal); font-weight: 600; }
@media (min-width: 1024px) {
  .js .toc summary { pointer-events: none; }
  .js .toc summary::after { display: none; }
}

.side-card { margin-top: 28px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.side-title { margin: 0 0 10px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.side-card ul { list-style: none; margin: 0; padding: 0; }
.side-card li { margin: 0; }
.side-card a {
  display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 10px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.93rem;
  transition: background-color 0.15s ease;
}
.side-card a:hover { background: var(--mist); }
.side-card .ico { color: var(--teal); }

@media (max-width: 1023px) {
  .sidebar { margin-bottom: 28px; }
  .side-card { display: none; }
  .toc { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
  .toc summary { min-height: 52px; padding: 0 18px; font-size: 0.8rem; }
  .toc nav { padding: 0 18px 14px; }
}

/* ===== End-of-article CTA ===== */
.cta {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px;
  max-width: 740px; margin-top: 56px; padding: 24px 26px; border-radius: var(--radius-lg);
  color: rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(34, 184, 198, 0.35), transparent 70%),
    linear-gradient(150deg, var(--hero), var(--hero-2));
  box-shadow: var(--shadow-md);
}
.cta p { margin: 0; font-size: 0.95rem; }
.cta .cta-title { color: #FFFFFF; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; margin-bottom: 4px; }
.cta-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: rgba(127, 211, 218, 0.16); color: #8EDDE4; }
.cta-icon .ico { width: 26px; height: 26px; }
@media (max-width: 640px) { .cta { grid-template-columns: 1fr; text-align: left; } .cta .btn { width: 100%; } }

/* ===== Related cards ===== */
.related-band { padding: 64px 0 80px; background: var(--surface); border-top: 1px solid var(--line); }
.related-band h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 800; margin: 0 0 24px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.cards li { margin: 0; display: flex; }
.card {
  display: flex; flex-direction: column; width: 100%; padding: 22px;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg);
  color: var(--text); text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--teal) 45%, var(--line)); background: var(--surface); }
.card-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--teal-wash); color: var(--teal); }
.card-icon .ico { width: 22px; height: 22px; }
.card-kicker { margin-top: 16px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-strong); }
.card-title { margin: 6px 0 8px; font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; line-height: 1.35; color: var(--ink); letter-spacing: -0.01em; }
.card-text { font-size: 0.9rem; line-height: 1.55; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-go { margin-top: auto; padding-top: 16px; color: var(--teal); }
.card-go .ico { transition: transform 0.2s var(--ease); }
.card:hover .card-go .ico { transform: translateX(4px); }

/* ===== Back to top ===== */
.to-top {
  position: fixed; z-index: 35;
  right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom));
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s var(--ease), visibility 0s linear 0.2s, background-color 0.15s ease;
}
.to-top .ico.up { width: 22px; height: 22px; transform: rotate(-90deg); }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { background: var(--teal); color: var(--on-brand); }

/* ===== Footer ===== */
.site-footer {
  padding: 64px 0 28px; font-size: 0.93rem; color: rgba(255, 255, 255, 0.66);
  background: linear-gradient(180deg, #0B1F2E, #08171F);
}
@media (prefers-color-scheme: dark) { .site-footer { background: #040B11; border-top: 1px solid var(--line); } }
.footer-top { display: grid; gap: 40px; }
@media (min-width: 900px) { .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 64px; } }
.site-footer .brand img { height: 34px; }
.footer-brand p { margin: 14px 0 0; max-width: 38ch; line-height: 1.65; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 700px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.site-footer h2 { margin: 0 0 12px; font-family: var(--font); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0; }
.site-footer a:not(.brand) { display: inline-flex; align-items: center; min-height: 36px; color: rgba(255, 255, 255, 0.8); text-decoration: none; transition: color 0.15s ease; }
.site-footer a:not(.brand):hover { color: #FFFFFF; text-decoration: underline; }
.fineprint { margin: 48px 0 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); }

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