/* Deep Explainers: base copied from the generated explainer page so the series matches the site. */
:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --faint: #64748b;
  --line: rgba(15, 23, 42, 0.10);
  --accent: #2b7a78;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --max: 980px;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background: radial-gradient(1200px 600px at 20% -10%, rgba(43, 122, 120, 0.10), transparent 60%),
              radial-gradient(900px 500px at 80% 0%, rgba(2, 132, 199, 0.06), transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 12px 24px;
  border-radius: 0 0 12px 12px;
  font-weight: 600;
  z-index: 2000;
  transition: top 150ms ease;
}

.skip-link:focus {
  top: 0;
  text-decoration: none;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 18px 64px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0 22px;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.2px;
  flex-shrink: 0;
}

.brand span:last-child {
  white-space: nowrap;
}

.mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(43, 122, 120, 0.95), rgba(2, 132, 199, 0.75));
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.18);
  flex-shrink: 0;
}

.tiny-nav {
  display: inline-flex;
  gap: 14px;
  font-size: 14px;
  color: var(--muted);
}

.tiny-nav a {
  padding: 12px 10px;
  border-radius: 12px;
  white-space: nowrap;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.tiny-nav a:focus-visible {
  outline: 2px solid rgba(43, 122, 120, 0.80);
  outline-offset: 3px;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  transition: all 120ms ease;
}

.menu-toggle:hover {
  background: rgba(43, 122, 120, 0.08);
  color: var(--accent);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

main {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
  padding: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.kicker a {
  color: inherit;
  text-decoration: none;
}

.kicker a:hover {
  text-decoration: underline;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(43, 122, 120, 0.25);
  background: rgba(43, 122, 120, 0.06);
  color: var(--text);
  font-weight: 600;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4.5vw, 44px);
  letter-spacing: -0.8px;
  line-height: 1.05;
}

.bluf {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.bluf strong {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(43, 122, 120, 0.30);
  text-underline-offset: 3px;
}

.subbluf {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.read-time {
  font-weight: 500;
  color: var(--accent);
}

.inline-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.inline-share-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.inline-share-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--muted);
  transition: all 120ms ease;
}

.inline-share-btn:hover {
  background: rgba(43, 122, 120, 0.08);
  border-color: rgba(43, 122, 120, 0.30);
  color: var(--accent);
  transform: translateY(-2px);
}

.stack {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  overflow: clip;
}

details[open] { background: var(--card); }

summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 16px;
  font-weight: 650;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

summary::-webkit-details-marker { display: none; }

summary h2.section-heading {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.25;
  flex: 1;
  min-width: 0;
}

.chev {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  flex: 0 0 auto;
  transition: transform 160ms ease;
}

details[open] .chev { transform: rotate(180deg); }

.content {
  padding: 0 16px 20px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.65;
}

.content p { margin: 10px 0 0; }
.content ul { margin: 10px 0 0; padding-left: 18px; }
.content li { margin: 6px 0; }

.cta {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(43, 122, 120, 0.05);
}

.cta strong { display: block; letter-spacing: -0.2px; }
.cta span { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(43, 122, 120, 0.30);
  background: rgba(43, 122, 120, 0.12);
  font-weight: 650;
  white-space: nowrap;
}

.btn:hover { background: rgba(43, 122, 120, 0.18); text-decoration: none; }

footer {
  margin-top: 16px;
  padding: 14px 4px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.footlinks { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.footlinks a {
  padding: 12px 14px;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  header { position: relative; }
  .tiny-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-width: 200px;
    padding: 10px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    z-index: 40;
  }
  .tiny-nav.is-open { display: flex; }
  .menu-toggle { display: flex; }
  .brand span:last-child { font-size: 15px; }
  .mark { width: 30px; height: 30px; }
}

@media (max-width: 520px) {
  .wrap { padding: 20px 14px 48px; }
  main { padding: 14px; }
  .card { padding: 18px; }
  .cta { flex-direction: column; align-items: flex-start; }
}

/* Long-read layout */
.deep-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.deep-body { max-width: 68ch; font-family: var(--serif); font-size: 18px; line-height: 1.7; }
.deep-body p { margin: 0 0 1em; }
.deep-body ul, .deep-body ol { padding-left: 22px; margin: 0 0 1em; }
.deep-body li { margin: 6px 0; }
.deep-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.deep-body h2 { font-family: var(--sans); font-size: 26px; letter-spacing: -0.4px; margin: 48px 0 14px; line-height: 1.2; scroll-margin-top: 16px; }
.deep-body h2 .num { display: block; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.deep-body h3 { font-family: var(--sans); font-size: 19px; margin: 28px 0 8px; }
.deep-body section:first-child h2 { margin-top: 8px; }
.eq { font-family: var(--sans); font-size: 20px; text-align: center; padding: 14px; margin: 0 0 1em; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.callout { font-family: var(--sans); font-size: 15px; line-height: 1.6; border-left: 3px solid var(--accent); padding: 10px 14px; margin: 0 0 1em; color: var(--muted); }
.callout strong { color: var(--text); }
figure { margin: 8px 0 24px; overflow-x: auto; }
/* min-width keeps labels ~12px on phones; the figure scrolls, the page does not */
figure svg { width: 100%; min-width: 540px; height: auto; display: block; color: var(--text); }
figcaption { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 8px; }
.fig-ink { stroke: currentColor; fill: none; stroke-width: 2; }
.fig-acc { fill: var(--accent); }
.fig-acc-stroke { stroke: var(--accent); fill: none; stroke-width: 3; }
.fig-soft { fill: currentColor; opacity: 0.08; }
.fig-text { fill: currentColor; font-family: var(--sans); font-size: 14px; }
.fig-faint { stroke: currentColor; opacity: 0.25; stroke-width: 1; fill: none; }

.toc { font-family: var(--sans); font-size: 14px; }
.toc details { border: 1px solid var(--line); border-radius: 12px; }
.toc summary { padding: 12px 14px; font-weight: 650; cursor: pointer; }
.toc ol { margin: 0; padding: 0 14px 14px 34px; }
.toc li { margin: 6px 0; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--accent); }

.deep-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.deep-list a { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.deep-list a:hover { text-decoration: none; border-color: var(--accent); }
.deep-list h2 { font-size: 22px; margin: 0 0 6px; letter-spacing: -0.3px; }
.deep-list p { margin: 0; color: var(--muted); }
.deep-list .meta { font-size: 13px; color: var(--faint); margin-top: 8px; }

@media (min-width: 1024px) {
  .deep-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
  .toc { position: sticky; top: 16px; align-self: start; }
  .toc details { border: 0; }
  .toc summary { padding-left: 0; }
  .toc ol { padding-left: 20px; }
}
