/* =================================================================
   ObviouslyNot Main CSS
   Common styles shared across all public-facing pages
   ================================================================= */

/* Fonts (Inter and Satoshi, self-hosted variable files) are declared in base.html, beside their
   preloads, so both name the same fingerprinted URL. */

/* Inline FontAwesome SVG icons (generated by cmd/iconbuilder).
   Mimics FA's <i>-rendered SVG defaults so existing CSS using font-size/
   color on icon containers continues to work. */
.fa-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
}

/* =================================================================
   Reset & Base Styles
   ================================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Skip to content - accessibility */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-inverse);
  color: var(--on-dark);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 0.5rem 0.5rem;
  z-index: 9999;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-to-content:focus {
  top: 0;
}

/* The sticky header would cover an in-page anchor's heading; this keeps
   the target clear of it. */
html {
  scroll-padding-top: 5rem;
}

/* Motion is for readers who have not asked for less. Page-to-page
   navigation cross-fades where the browser supports cross-document view
   transitions and is unchanged elsewhere; with reduced motion set, nothing
   on the site moves. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @view-transition { navigation: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
}

/* =================================================================
   Design tokens. Every color, type size and corner radius on the site
   is one of these; no other stylesheet and no template states a color
   value (cmd/server/style_test.go enforces it). Each color is written
   once, as light-dark(light, dark), and the reader's system setting
   picks the side. The roles are named for their job, so a page asks
   for "muted text" or "a cyan tint", never for a hex value.
   Contrast is checked per pair in cmd/server/contrast_test.go.
   ================================================================= */
:root {
  color-scheme: light dark;

  /* Text, strongest to faintest. --fg-faint is for rules, separators and
     placeholder lines, never for words a reader must read. */
  --fg:        light-dark(#111111, #f5f5f7);
  --fg-2:      light-dark(#333333, #d2d2d7);
  --fg-muted:  light-dark(#555555, #a1a1a6);
  --fg-subtle: light-dark(#6e6e73, #98989d);
  --fg-faint:  light-dark(#b0b0b5, #48484a);

  /* Surfaces. --bg is the page; --bg-raised is a card that sits on it;
     --bg-subtle is a quiet panel; --bg-inverse is a dark band in light
     mode that stays a distinct dark band in dark mode. */
  --bg:         light-dark(#ffffff, #111111);
  --bg-raised:  light-dark(#ffffff, #1c1c1e);
  --bg-subtle:  light-dark(#f7f8fa, #1c1c1e);
  --bg-inverse: light-dark(#111111, #000000);
  --bg-deep:    light-dark(#2a2450, #1e1a36);
  --track:      light-dark(#ececec, #2c2c2e);

  /* Text on a colored fill. Bright fills (cyan, lavender, rose, amber,
     green) take dark text; purple and the dark bands take white. */
  --on-dark:       #ffffff;
  --on-dark-muted: rgba(255, 255, 255, 0.72);
  --on-bright:     #111111;

  /* Lines */
  --border:        light-dark(#e5e5e7, #2c2c2e);
  --border-strong: light-dark(#d1d1d6, #3a3a3c);

  /* Brand. A fill or a line uses the brand color itself; text uses the
     -text variant, which is the brand hue darkened (light) or lifted
     (dark) until it reads at WCAG AA. */
  --purple:      light-dark(#4A3F78, #BFA8FF);
  --purple-fill: light-dark(#4A3F78, #5b4e94);
  --lavender:    #BFA8FF;
  --cyan:        #2DC5E8;
  --cyan-text:   light-dark(#08718b, #2DC5E8);
  --cyan-on-dark: #67e8f9;
  --cyan-hover:  light-dark(#1aaccf, #6ad8f0);
  --rose:        #D4637A;
  --rose-text:   light-dark(#b8475f, #ec8a9d);

  /* Status */
  --green:      #16a34a;
  --green-text: light-dark(#15803d, #4ade80);
  --red:        #e03131;
  --red-text:   light-dark(#c92a2a, #ff8787);
  --amber:      #fcc419;
  --amber-text: light-dark(#92400e, #fcd34d);

  /* Tints: a quiet colored panel, and its matching border. */
  --tint-cyan:          light-dark(#eef8fc, #0f2329);
  --tint-cyan-border:   light-dark(#bae6fd, #1d4a57);
  --tint-purple:        light-dark(#f6f3fd, #1c1830);
  --tint-purple-border: light-dark(#e0d6f5, #3a3157);
  --tint-rose:          light-dark(#fdf1f3, #2a1519);
  --tint-rose-border:   light-dark(#fecaca, #5a2a33);
  --tint-green:         light-dark(#f0fdf4, #11231a);
  --tint-green-border:  light-dark(#bbf7d0, #1f4a30);
  --tint-amber:         light-dark(#fff8eb, #2a2010);
  --tint-amber-border:  light-dark(#fde68a, #5a4510);

  /* Chart series that are not brand colors */
  --series-neutral: light-dark(#cfcfd6, #636366);
  --series-slate:   #9aa6b2;

  /* Type scale. Seven steps; the two display steps are fluid. */
  --text-xs:      0.75rem;
  --text-body:    1.0625rem;
  --text-sm:      0.875rem;
  --text-base:    1rem;
  --text-md:      1.2rem;
  --text-lg:      1.5rem;
  --text-xl:      1.875rem;
  --text-2xl:     clamp(2rem, 1.5rem + 2vw, 2.75rem);
  --text-display: clamp(2.5rem, 1.6rem + 4vw, 4rem);
  --leading-tight: 1.15;
  --leading-body:  1.65;
  --tracking-display: -0.025em;
  --measure: 68ch;

  /* Spacing, on an 8px base. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;

  /* Corners. A box nested inside a padded box takes the outer radius
     minus that padding, so the two corners share a center, floored at
     --radius-min so a deep inset never goes square:
       border-radius: max(calc(var(--radius-lg) - <padding>), var(--radius-min)); */
  --radius-min:  4px;
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   18px;
  --radius-pill: 999px;

  /* The sticky header's glass, and the solid color it produces over the
     content most unlike it that it can sit on (the dark code block in light mode, a white image in dark). The contrast
     test checks the header's text against this worst case. */
  --header-glass:      light-dark(rgba(255, 255, 255, 0.78), rgba(17, 17, 17, 0.72));
  --header-worst-case: light-dark(#c6c6c6, #545454);
}

/* =================================================================
   Typography
   ================================================================= */
h1 {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: var(--leading-tight);
  margin-bottom: 1rem;
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

h2 {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--fg);
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h3 {
  font-size: var(--text-md);
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--fg);
}

p {
  margin-bottom: 1rem;
  color: var(--fg);
  line-height: 1.7;
}

/* Emphasis keeps its surroundings' color: forcing --fg made a <strong>
   on a dark band or a colored banner the one unreadable phrase in it. */
strong {
  font-weight: 600;
  color: inherit;
}

/* =================================================================
   Layout Components
   ================================================================= */
.container { 
  max-width: 800px; 
  margin: 0 auto; 
  padding: 0 20px; 
}

.container-wide {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  margin-bottom: 3rem;
}

.content {
  padding: 4rem 0 6rem;
}

/* =================================================================
   Header & Logo
   ================================================================= */
/* The one piece of material on the site: the header stays in reach and
   the page scrolls under it, seen through tinted glass. The glass is on
   ::before, not on the header itself, because a backdrop-filter makes its
   element the containing block for position:fixed descendants, and the
   mobile menu panel and its overlay are fixed descendants of the header.
   Readers who ask for less transparency or more contrast get a solid bar.
   The tint is strong enough that text scrolling beneath reads as texture;
   --header-worst-case is the color it produces over the content least like
   it, and the contrast test checks the header's text against that. */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  isolation: isolate;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--header-glass);
  backdrop-filter: saturate(180%) blur(20px);
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  header::before {
    background: var(--bg);
    backdrop-filter: none;
  }
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-weight: 900;
  font-size: var(--text-md);
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--fg);
}

/* Logo "≠" glyph. The icon is an inline <svg class="fa-icon fa-not-equal">
   expanded from <i class="fad fa-not-equal"></i> at template-parse time.
   The purple→cyan gradient lives inside the SVG file
   (internal/icons/svgs/duotone/not-equal.svg) as <linearGradient> defs,
   replacing the older FA Pro Duotone CSS pseudo-element trick that no
   longer applies once the element is a <svg> instead of an <i>. */
.logo .fa-icon.fa-not-equal {
  width: 1.1em;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.18em;
}

.back-link {
  font-size: var(--text-base);
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--rose-text);
}

/* Breadcrumb trail, resource pages. Replaces the back link there: the
   site grew a two-level hierarchy in August 2026 and a single "Back to"
   showed one level of it. Rendered from the same slice as the
   BreadcrumbList JSON-LD (partials/header-public.html). */
.crumb-trail {
  min-width: 0;
  flex: 1;
  margin-left: 1.5rem;
}
.crumb-trail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  min-width: 0;
  font-size: var(--text-base);
}
.crumb-trail li {
  white-space: nowrap;
}
.crumb-trail li + li::before {
  content: "/";
  color: var(--fg-subtle);
  margin: 0 0.5rem;
}
.crumb-trail a {
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s ease;
}
.crumb-trail a:hover {
  color: var(--rose-text);
}
.crumb-trail-current {
  color: var(--fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28ch;
}

/* =================================================================
   Navigation (Public Pages)
   ================================================================= */
.nav-main {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--fg-2);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan-text);
  opacity: 1;
}

.nav-cta {
  background: var(--cyan);
  color: var(--on-bright);
  padding: 0.625rem 1.5rem;
  font-size: var(--text-base);
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-cta:hover {
  background: var(--cyan-hover);
  color: var(--on-bright);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(45, 197, 232, 0.3);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  position: relative;
  width: 30px;
  height: 30px;
  z-index: 1001;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.overlay-visible {
  display: block;
  opacity: 1;
}

.hamburger-line {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--fg);
  margin: 5px 0;
  transition: all 0.3s ease;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.hamburger-line:nth-child(1) {
  top: 5px;
}

.hamburger-line:nth-child(2) {
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
}

.hamburger-line:nth-child(3) {
  bottom: 5px;
}

/* Animate hamburger to X when open. Both outer lines move to the same
   center point and rotate there; until 2026-11-16 they were offset 8px
   in opposite directions from different anchors, so they drew a "<". */
.mobile-menu-toggle.menu-open .hamburger-line:nth-child(1),
.mobile-menu-toggle.menu-open .hamburger-line:nth-child(3) {
  top: 50%;
  bottom: auto;
  margin: 0;
}
.mobile-menu-toggle.menu-open .hamburger-line:nth-child(1) {
  transform: translateX(-50%) translateY(-50%) rotate(45deg);
}

.mobile-menu-toggle.menu-open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.menu-open .hamburger-line:nth-child(3) {
  transform: translateX(-50%) translateY(-50%) rotate(-45deg);
}

/* =================================================================
   Buttons. The site had two definitions of each of these, the second
   silently overriding the first; this is the one, with the values that
   were actually rendering. A primary button is the page's color turned
   inside out, so it stays the strongest element in both appearances.
   ================================================================= */
.btn {
  display: inline-block;
  align-items: center;
  gap: var(--space-2);
  padding: 1rem 2rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--cyan);
  color: var(--on-bright);
}

.btn-primary:hover {
  background: var(--cyan-hover);
  color: var(--on-bright);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(45, 197, 232, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 2px solid var(--fg);
}

.btn-secondary:hover {
  background: var(--purple-fill);
  color: var(--on-dark);
  border-color: var(--purple-fill);
}

/* A button inside article content is still a button: .content a would
   otherwise give it link color, which on the primary button's fill was
   2:1 or worse. */
.content a.btn-primary { color: var(--bg); border-bottom: none; }
.content a.btn-primary:hover { color: var(--on-bright); }

/* =================================================================
   Footer
   ================================================================= */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  text-align: center;
}

/* Footer text is colored, not faded: opacity stacks (a 0.4 line inside a
   0.6 block was 0.24, far below a readable contrast), a color does not. */
.footer-text {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  line-height: 1.8;
}

.footer-text a,
.footer-link {
  color: var(--fg-muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-tagline {
  font-style: italic;
  color: var(--fg-subtle);
}

/* The legal notice: present on every page, quiet on every page. */
.footer-disclaimer {
  display: block;
  max-width: 780px;
  margin: 0.75rem auto 0;
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--fg-subtle);
}

.footer-text a:hover,
.footer-link:hover {
  color: var(--rose-text);
  opacity: 1;
}

/* =================================================================
   Common Components
   ================================================================= */

/* .content a (cyan) outranks .btn-secondary, which left secondary buttons in
   page content as cyan text on white at about 2:1. Keep them dark. */
.content a.btn-secondary { color: var(--fg); }
.content a.btn-secondary:hover { color: var(--on-dark); }

/* Cards */
.card {
  background: var(--bg-raised);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all 0.2s ease;
}

.card:hover {
  border-color: var(--lavender);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Content Boxes */
.content-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.content-box:hover {
  border-color: var(--lavender);
}

/* Lists */
ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  color: var(--fg);
}

/* Links in Content */
.content a {
  color: var(--cyan-text);
  text-decoration: none;
  border-bottom: 1px solid var(--cyan);
  transition: all 0.2s ease;
}

.content a:hover {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

/* =================================================================
   Utility Classes
   ================================================================= */
.text-center { text-align: center; }
.text-muted { color: var(--fg-muted); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-0 { margin-top: 0; }
.m-0 { margin: 0; }
.text-right { text-align: right; }
.text-subtle { color: var(--fg-subtle); }
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }
.text-purple { color: var(--purple); }
.text-cyan { color: var(--cyan-text); }
.text-rose { color: var(--rose-text); }
.text-green { color: var(--green-text); }

/* A numeric table cell: right-aligned, with figures that line up. */
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* A table or wide block that scrolls inside its own box rather than
   widening the page. .is-tall also caps the height and keeps the header
   row in view while the body scrolls. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll.is-tall {
  max-height: 700px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.table-scroll.is-tall .data-table { margin: 0; }
.table-scroll.is-tall thead { position: sticky; top: 0; z-index: 1; }
.table-scroll.is-tall thead th { background: var(--bg-subtle); }

/* Data values. An element whose size or position IS a figure carries it
   as a custom property (style="--value: 74.7%"), the only thing an inline
   style may set (cmd/server/style_test.go). Its color comes from a class. */
.is-purple   { --series: var(--purple-fill); }
.is-cyan     { --series: var(--cyan); }
.is-rose     { --series: var(--rose); }
.is-lavender { --series: var(--lavender); }
.is-green    { --series: var(--green); }
.is-neutral  { --series: var(--series-neutral); }
.is-slate    { --series: var(--series-slate); }

/* A trend or a change: an arrow or a signed figure, colored by direction. */
.trend { font-weight: 600; }
.trend.is-up { color: var(--green-text); }
.trend.is-down { color: var(--rose-text); }
.trend.is-flat { color: var(--fg-subtle); font-weight: 400; }

/* A score shown as a small filled label, its fill set by tier. */
.score-badge {
  display: inline-block;
  min-width: 45px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--series);
  color: var(--on-bright);
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.score-badge.is-purple { color: var(--on-dark); }

/* The closing call to action on a resource page: a deep purple band, a
   headline, one sentence and the page's one primary action. */
.cta-band {
  margin: var(--space-6) 0;
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--purple-fill), var(--bg-deep));
  color: var(--on-dark);
  text-align: center;
}
.cta-band h2 { color: var(--on-dark); margin-bottom: var(--space-3); }
.cta-band p { color: var(--on-dark-muted); max-width: 52ch; margin: 0 auto var(--space-4); }
.cta-band .btn,
.content .cta-band a.btn { background: var(--cyan); color: var(--on-bright); border-bottom: none; }
.cta-band .btn:hover,
.content .cta-band a.btn:hover { background: var(--bg-raised); color: var(--fg); }

/* A card that is a link to further reading. Neutral on purpose: the
   accent belongs to one primary action per screen, so a row of these
   reads as one quiet group rather than three competing colors. */
.link-card {
  display: block;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-decoration: none;
  color: var(--fg);
  transition: background 0.2s ease, transform 0.2s ease;
}
.link-card:hover { background: var(--tint-purple); transform: translateY(-2px); }
.link-card h3 { font-size: var(--text-base); margin: 0 0 0.4rem; color: var(--fg); }
.link-card p { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.5; margin: 0; }
.content a.link-card { color: var(--fg); border-bottom: none; }

/* =================================================================
   Responsive Design
   ================================================================= */

/* Tablet */
@media (max-width: 768px) {
  .content {
    padding: 3rem 0 4rem;
  }
  
  .section {
    margin-bottom: 2.5rem;
  }

  h2 {
    font-size: var(--text-lg);
  }

  .content-box {
    padding: 1.5rem;
  }

  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: block;
  }

  /* Style mobile navigation */
  .nav-main {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-raised);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
    z-index: 1000;
  }

  .nav-main.nav-open {
    right: 0;
  }

  .nav-link {
    font-size: var(--text-md);
    width: 100%;
    padding: 0.5rem 0;
    opacity: 1;
  }

  .nav-link:hover {
    color: var(--cyan-text);
  }

  .nav-link.active {
    color: var(--cyan-text);
    font-weight: 600;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .container,
  .container-wide {
    padding: 0 1.25rem;
  }

  h1 {
    font-size: var(--text-xl);
  }

  .header-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container,
  .container-wide {
    padding: 0 1rem;
  }

  header {
    padding: 1.5rem 0;
  }

  .back-link {
    font-size: var(--text-sm);
  }

  /* Phones: one level of trail, as the back link showed. The current
     page's crumb goes (the H1 is directly below), and where there is a hub
     crumb the Resources crumb goes too, so the hub label gets the room and
     truncates rather than running under the logo. */
  .crumb-trail ol {
    font-size: var(--text-sm);
    overflow: hidden;
  }
  .crumb-trail li {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .crumb-trail-current {
    display: none;
  }
  .crumb-trail li:first-child:nth-last-child(3) {
    display: none;
  }
  .crumb-trail li:first-child:nth-last-child(3) + li::before {
    content: none;
    margin: 0;
  }

  h1 {
    font-size: var(--text-xl);
  }

  h2 {
    font-size: var(--text-md);
  }

  h3 {
    font-size: var(--text-md);
  }

  p, li {
    font-size: var(--text-base);
    line-height: var(--leading-body);
  }

  .content {
    padding: 2rem 0 3rem;
  }

  .footer-text {
    font-size: var(--text-xs);
  }

  .footer-text a,
  .footer-link {
    display: inline-block;
    padding: 0.25rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    width: 100%;
    max-width: 300px;
  }

  .nav-cta {
    padding: 0.5rem 1rem;
    font-size: var(--text-sm);
  }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
  a, button {
    -webkit-tap-highlight-color: rgba(45, 197, 232, 0.2);
    min-height: 44px;
    min-width: 44px;
  }
}

/* =================================================================
   Resource Page Components
   Shared styles for stat cards, info cards, step grids, takeaways,
   tables, and other components used across resource pages.
   ================================================================= */

/* Article prose: a little larger than UI text, and held to a reading
   measure so a line is about 68 characters at any width. :where() keeps
   both at zero specificity, so every component's own sizing still wins,
   and only paragraphs and lists that are direct children of the article
   column are held to the measure; tables, charts and cards keep the full
   width. */
:where(.content .container, .content .section) > :where(p, ul, ol, blockquote):not(.text-center) {
  max-width: var(--measure);
}
:where(.content) :where(p, li) {
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

/* Article Layout */
.content .container {
  max-width: 800px;
}

.section {
  margin-bottom: 3rem;
}

.article-intro {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.disclaimer {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin-top: 1.5rem;
}

/* Stat Grid */
/* As many columns as the figures fit, so three or four stats sit on one
   row on a wide screen; pages used to override this to repeat(3) or
   repeat(4) by hand. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 1.5rem 0;
}

.stat-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
}

.stat-number {
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.1;
}


.stat-label {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin-top: 8px;
  line-height: 1.4;
}

.stat-source {
  font-size: var(--text-xs);
  color: var(--fg-subtle);
  margin-top: 8px;
}

/* Card Grid & Info Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 1.5rem 0;
}

.info-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.info-card h3 {
  font-size: var(--text-base);
  margin-top: 0;
  margin-bottom: 10px;
}

.info-card h3 i {
  margin-right: 8px;
  color: var(--purple);
}

.info-card p {
  font-size: var(--text-sm);
  color: var(--fg-2);
  line-height: 1.6;
  margin-bottom: 8px;
}

.info-card p:last-child {
  margin-bottom: 0;
}

/* Step Grid */
.step-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 1.5rem 0;
}

.step-box {
  border-radius: var(--radius-lg);
  padding: 24px;
}

.step-1 {
  background: var(--tint-cyan);
  border: 1px solid var(--tint-cyan-border);
}

.step-2 {
  background: var(--tint-purple);
  border: 1px solid var(--tint-purple-border);
}

.step-number {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  text-align: center;
  line-height: 32px;
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: 12px;
}

.step-1 .step-number {
  background: var(--cyan);
  color: var(--on-bright);
}

.step-2 .step-number {
  background: var(--purple-fill);
  color: var(--on-dark);
}

.step-label {
  font-weight: 700;
  font-size: var(--text-base);
  margin-bottom: 10px;
}

.step-box p {
  font-size: var(--text-sm);
  color: var(--fg-2);
  line-height: 1.6;
  margin-bottom: 8px;
}

/* Takeaway */
.takeaway {
  background: var(--tint-cyan);
  border-left: 4px solid var(--cyan);
  padding: 16px 20px;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  line-height: 1.6;
}

/* Oral-argument audio clips (public-domain court recordings) */
.oral-args {
  margin: 2rem 0 1rem;
  padding: 20px 22px;
  background: var(--tint-purple);
  border: 1px solid var(--tint-purple-border);
  border-radius: var(--radius-md);
}
.oral-args-title {
  margin: 0 0 4px;
  font-size: var(--text-md);
  color: var(--purple);
}
.oral-args-title i { color: var(--purple); margin-right: 8px; }
.oral-args-intro { margin: 0 0 1rem; color: var(--fg-muted); font-size: var(--text-base); }
.oral-clip {
  margin: 0 0 1rem;
  padding: 14px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--tint-purple-border);
  border-left: 4px solid var(--purple);
  border-radius: 0 max(calc(var(--radius-md) - 20px), var(--radius-min)) max(calc(var(--radius-md) - 20px), var(--radius-min)) 0;
}
.oral-clip:last-of-type { margin-bottom: 0.5rem; }
.oral-clip-cap { font-size: var(--text-base); line-height: 1.55; color: var(--fg-2); margin-bottom: 8px; }
.oral-clip-step {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-dark);
  background: var(--purple-fill);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-right: 8px;
  vertical-align: middle;
}
.oral-clip-quote {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  font-style: italic;
  color: var(--fg);
  line-height: 1.5;
}
.oral-clip-quote cite {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--fg-muted);
}
.oral-clip audio { width: 100%; height: 38px; }
.oral-args-src { margin: 0.75rem 0 0; font-size: var(--text-sm); color: var(--fg-subtle); }
.oral-args-src a { color: var(--rose-text); }

/* Data Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: var(--text-base);
}

.data-table caption {
  caption-side: top;
  text-align: left;
  font-size: var(--text-sm);
  color: var(--fg-muted);
  padding: 0 0 0.5rem;
}

.data-table thead th {
  background: var(--bg-subtle);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--fg-2);
  border-bottom: 2px solid var(--border);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table tbody td,
.data-table tbody th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-2);
  vertical-align: top;
}

/* Row headers (th scope="row"), used by the case-facts table: a label
   column, so left-aligned and no heavier than the thead style. */
.data-table tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--fg-2);
}

.data-table tbody tr:last-child td,
.data-table tbody tr:last-child th {
  border-bottom: none;
}

/* Risk Badges */
/* A status: a small colored dot beside the word. The word carries the
   meaning, so color is never the only signal, and one dot reads in both
   appearances where three pastel fills each needed a dark twin. */
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-weight: 600;
  color: var(--fg-2);
  white-space: nowrap;
}
.risk-badge::before {
  content: "";
  flex: none;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--series);
}
.risk-badge.high { --series: var(--rose); }
.risk-badge.medium { --series: var(--amber); }
.risk-badge.low { --series: var(--green); }

/* Callout Box */
.callout-box {
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 1.5rem 0;
}

.callout-box.warning {
  background: var(--tint-amber);
  border: 1px solid var(--tint-amber-border);
}

.callout-box h3 {
  font-size: var(--text-base);
  margin-top: 0;
  margin-bottom: 12px;
}

.callout-box p {
  font-size: var(--text-sm);
  color: var(--fg-2);
  line-height: 1.6;
  margin-bottom: 0;
}

/* FAQ Section */
/* Full-bleed card: the negative margin cancels the container gutter so the
   grey panel reaches the text edge. It MUST equal .container's padding at
   every breakpoint, or the panel is wider than its parent and pushes the
   whole page sideways. It was a fixed -24px against a 20px gutter (16px
   below 480px), so every page with a FAQ block scrolled horizontally: 8px
   on a phone, 4px at most other widths. Fixed 2026-10-06. If you change
   .container's padding, change this with it. */
.faq-section {
  background: var(--bg-subtle);
  padding: 2rem 20px;
  margin: 0 -20px;
  border-radius: var(--radius-lg);
}

@media (max-width: 480px) {
  .faq-section {
    padding: 2rem 1rem;
    margin: 0 -1rem;
  }
}

.faq-item {
  margin-bottom: 1.5rem;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-item h3 {
  color: var(--purple);
  margin-bottom: 0.5rem;
  margin-top: 0;
  font-size: var(--text-base);
}

.faq-item p {
  font-size: var(--text-base);
  color: var(--fg-muted);
  line-height: 1.7;
}

/* Component Grid */
.component-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 1rem 0 1.5rem;
}

/* Claim Grid */
.claim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 1.5rem 0;
}

/* Snapshot grid (donut chart + top movers side-by-side) */
.snapshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Composite Score Leaderboard
   Used on Patent Representation Index v2 page. Each row shows a rank,
   company name, composite score, and a horizontal bar showing the score
   on a 0-100 scale. */
.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.leaderboard-row {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.leaderboard-rank {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-inverse);
  color: var(--on-dark);
  border-radius: 50%;
  font-weight: 700;
  font-size: var(--text-base);
  align-self: center;
}

.leaderboard-rank.rank-bottom {
  background: var(--rose);
  color: var(--on-bright);
  width: auto;
  min-width: 38px;
  border-radius: var(--radius-xl);
  padding: 0 12px;
  font-size: var(--text-sm);
}

.leaderboard-body {
  flex: 1;
  min-width: 0;
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  gap: 1rem;
}

.leaderboard-company {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--fg);
}

.leaderboard-score {
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.leaderboard-bar-track {
  height: 10px;
  background: var(--track);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.leaderboard-bar-fill {
  width: var(--value);
  background: var(--series);
  height: 100%;
  border-radius: var(--radius-sm);
  transition: width 0.3s ease;
}

.leaderboard-meta {
  font-size: var(--text-xs);
  color: var(--fg-muted);
  line-height: 1.4;
}

.leaderboard-meta strong {
  color: var(--fg);
  font-weight: 600;
}

@media (max-width: 640px) {
  .leaderboard-row {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  .leaderboard-rank {
    width: 32px;
    height: 32px;
    font-size: var(--text-sm);
  }
  .leaderboard-company {
    font-size: var(--text-sm);
  }
  .leaderboard-score {
    font-size: var(--text-md);
  }
  .leaderboard-meta {
    font-size: var(--text-xs);
  }
}

/* Generic inline bar charts, used in the patent gender gap series for
   stat comparisons. Pure CSS, no JS, no chart library. Mirrors the
   .leaderboard-* pattern above but with generic class names so any
   page can use it. Single bar group per chart-section, color-coded
   per row via inline style on .chart-bar-fill. */
.chart-section {
  margin: 1.75rem 0;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--cyan);
}
.chart-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--purple);
  margin: 0 0 0.4rem;
  line-height: 1.4;
}
.chart-subtitle {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.chart-row {
  display: grid;
  grid-template-columns: 200px 1fr 60px;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.55rem;
  font-size: var(--text-sm);
  line-height: 1.4;
}
.chart-row:last-of-type {
  margin-bottom: 0;
}
.chart-label {
  color: var(--fg-2);
  font-weight: 500;
}
.chart-bar-track {
  height: 16px;
  background: var(--track);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.chart-bar-fill {
  width: var(--value);
  background: var(--series);
  height: 100%;
  border-radius: var(--radius-md);
  transition: width 0.4s ease;
}
.chart-value {
  font-weight: 700;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.chart-annotation {
  background: var(--bg-raised);
  border-left: 4px solid var(--rose);
  padding: 0.7rem 1rem;
  font-size: var(--text-sm);
  color: var(--fg-2);
  line-height: 1.55;
  margin-top: 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.chart-source {
  font-size: var(--text-xs);
  color: var(--fg-subtle);
  margin-top: 0.75rem;
  text-align: right;
  font-style: italic;
}
.chart-section + .chart-section {
  margin-top: 1.25rem;
}
@media (max-width: 600px) {
  .chart-section {
    padding: 1rem 1.1rem;
  }
  .chart-row {
    grid-template-columns: 130px 1fr 50px;
    font-size: var(--text-sm);
    gap: 0.5rem;
  }
  /* A row whose bar is a stacked whole earns a wider track on a phone.
     Its label is a year or a short category, so 130px is 85px the
     segments could have used: at a 108px track, the solo page's
     smallest band (1.3% of a year's filings) renders about one pixel
     and cannot be seen at all. The legend and the table still carry
     the figures, but the picture is the point of the chart. */
  .chart-row.is-stacked-row {
    grid-template-columns: 46px 1fr 62px;
  }
  .chart-bar-track {
    height: 14px;
  }
  .chart-title {
    font-size: var(--text-base);
  }
}

/* Resource Page Mobile Responsive */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .step-grid {
    grid-template-columns: 1fr;
  }

  .claim-grid {
    grid-template-columns: 1fr;
  }

  .component-grid {
    grid-template-columns: 1fr;
  }

  .data-table {
    font-size: var(--text-sm);
    /* A table with three or more prose columns cannot fit a phone width
       without breaking words, and an overflowing table widens the whole
       page. Let the table scroll inside its own box instead. */
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table thead th,
  .data-table tbody td,
  .data-table tbody th {
    padding: 8px 10px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .snapshot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .article-intro {
    font-size: var(--text-md);
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  /* Hide intermediate year labels on bar chart to prevent overlap */
  .chart-label-mid {
    display: none;
  }
}

/* =================================================================
   Page-Specific Overrides
   Add specific page styles using data attributes or classes
   ================================================================= */

/* Print styles for legal documents */
@media print {
  html {
    color-scheme: light;
  }

  header, footer {
    display: none;
  }
  
  body {
    font-size: 11pt;
  }
  
  .container {
    max-width: 100%;
  }
}
/* ── Downloadable template pages (Idea Disclosure, worksheets, …) ── */
.tpl-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1.5rem 0; }
.tpl-actions .btn { display: inline-flex; align-items: center; gap: 0.5rem; }
.template-doc { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem 2rem; margin: 1.5rem 0; background: var(--bg-raised); position: relative; }
.template-doc__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.template-doc__head h2 { margin: 0; }
.tpl-copy { border: 1px solid var(--cyan); background: var(--bg-raised); color: var(--cyan-text); border-radius: var(--radius-md); padding: 0.4rem 0.9rem; font-size: var(--text-sm); font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.15s ease; }
.tpl-copy:hover { background: var(--cyan); color: var(--on-bright); }
.tpl-group { margin: 1.5rem 0 0.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.tpl-group:first-of-type { border-top: none; padding-top: 0; }
.tpl-group h3 { margin-bottom: 0.25rem; color: var(--fg); }
.tpl-group > .tpl-group-note { color: var(--fg-subtle); font-size: var(--text-sm); font-style: italic; margin-bottom: 0.75rem; }
.tpl-field { margin: 0.9rem 0; }
.tpl-field h4 { margin: 0 0 0.15rem; font-size: var(--text-base); color: var(--fg); }
.tpl-field p { margin: 0; color: var(--fg-muted); font-size: var(--text-sm); line-height: 1.55; }
.tpl-field .tpl-answer { display: block; margin-top: 0.4rem; color: var(--fg-faint); font-size: var(--text-sm); border-bottom: 1px dashed var(--border-strong); padding-bottom: 0.3rem; }
.tpl-disclaimer { font-size: var(--text-xs); color: var(--fg-subtle); line-height: 1.6; margin-top: 1.5rem; }

/* ── Inventor "paper trail" workflow strip (template pages) ── */
.tpl-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-top: 0.5rem; }
.tpl-trail a { color: var(--cyan-text); text-decoration: none; font-size: var(--text-base); }
.tpl-trail a:hover { text-decoration: underline; }
.tpl-trail .current { color: var(--fg); font-weight: 700; font-size: var(--text-base); }
.tpl-trail .sep { color: var(--fg-subtle); font-size: var(--text-sm); }
.tpl-trail-label { font-size: var(--text-sm); color: var(--fg-subtle); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.35rem; }

/* ── Framework-step pill on practitioner worksheet fields ── */
.tpl-step { display: inline-block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--purple); background: var(--tint-purple); border-radius: var(--radius-pill); padding: 0.14rem 0.55rem; margin-left: 0.45rem; vertical-align: middle; white-space: nowrap; }

/* ── Comparison table (disclosure vs filings) ── */
.tpl-compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0.5rem 0 0.25rem; }
.tpl-compare { border-collapse: collapse; width: 100%; min-width: 720px; font-size: var(--text-sm); }
.tpl-compare th, .tpl-compare td { text-align: left; vertical-align: top; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--border); line-height: 1.5; }
.tpl-compare thead th { background: var(--tint-cyan); color: var(--fg); font-weight: 700; border-bottom: 2px solid var(--cyan); }
.tpl-compare thead th:first-child { background: transparent; border-bottom-color: var(--border); }
.tpl-compare tbody th { font-weight: 600; color: var(--purple); white-space: nowrap; width: 1%; }
.tpl-compare tbody tr:last-child th, .tpl-compare tbody tr:last-child td { border-bottom: none; }
.tpl-compare .col-highlight { background: var(--tint-cyan); }

/* ============================================================
   Case studies (CategoryCaseStudy). Shared by the PX4 scan page
   and its concept-profile children. Namespaced cs-* so nothing
   here can collide with page-local styles elsewhere.
   ============================================================ */

.cs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: var(--text-sm);
}
.cs-table th {
  background: var(--bg-subtle);
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 700;
  color: var(--fg);
  border-bottom: 2px solid var(--border);
}
.cs-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg-2);
  line-height: 1.5;
}
.cs-table td:last-child { text-align: right; white-space: nowrap; }
.cs-table th:last-child { text-align: right; }

.cs-code {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: var(--text-sm);
  line-height: 1.6;
  margin: 1.25rem 0;
}
.cs-code code { background: none; padding: 0; font-size: inherit; }

.cs-note {
  background: var(--bg-subtle);
  border-left: 4px solid var(--lavender);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 0.9rem 1.25rem;
  margin: 1.25rem 0;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--fg-muted);
}

.cs-list { padding-left: 1.25rem; margin: 1rem 0; }
.cs-list li { font-size: var(--text-base); line-height: 1.65; color: var(--fg-2); margin-bottom: 0.6rem; }

.cs-evidence {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin: -0.5rem 0 1.25rem 0;
  /* Breaks a long unbroken token (the PX4 case study puts source paths here)
     without breaking ordinary prose. word-break: break-all did the first job
     and also split three-letter words mid-character on the 40 pages that
     later reused this class for an authority line. */
  overflow-wrap: anywhere;
}
.cs-evidence code { font-size: var(--text-sm); }

.cs-back {
  display: inline-block;
  margin: 2rem 0 1rem 0;
  color: var(--cyan-text);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
}
.cs-back:hover { color: var(--rose-text); }

.cs-cta {
  display: inline-block;
  background: var(--cyan);
  color: var(--on-bright);
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  margin-top: 0.5rem;
}
.cs-cta:hover { background: var(--purple-fill); color: var(--on-dark); }
.content a.cs-cta { color: var(--on-bright); border-bottom: none; }
.content a.cs-cta:hover { color: var(--on-dark); }

/* Summary panel, shared with the case-study layout */
.tldr {
  background: var(--tint-cyan);
  border-left: 4px solid var(--cyan);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 1.75rem 2rem;
  margin: 0 0 2.5rem 0;
}
.tldr-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan-text);
  margin-bottom: 0.85rem;
}
.tldr-lead { font-size: var(--text-base); line-height: 1.7; color: var(--fg-2); margin: 0 0 1.25rem 0; }
.tldr-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--tint-cyan-border);
  border-bottom: 1px solid var(--tint-cyan-border);
}
.tldr-num {
  display: block;
  font-family: 'Satoshi', sans-serif;
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--purple);
  line-height: 1.1;
}
.tldr-stat-accent .tldr-num { color: var(--cyan-text); }
.tldr-model {
  display: block;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.4rem;
}
.tldr-cap { display: block; font-size: var(--text-sm); line-height: 1.5; color: var(--fg-muted); }
.tldr-foot { font-size: var(--text-sm); line-height: 1.65; color: var(--fg-muted); margin: 1.25rem 0 0 0; }

.summary-section {
  background: var(--tint-cyan);
  border: 1px solid var(--tint-cyan-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin: 2rem 0;
}

.resources-section h3 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--purple);
  margin: 2rem 0 0.75rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.resources-section h3:first-of-type { margin-top: 0; }
.resources-list { list-style: none; padding: 0; margin: 0 0 1.5rem 0; }
.resources-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.resources-list li:last-child { border-bottom: none; }
.resources-list a { color: var(--cyan-text); text-decoration: none; font-size: var(--text-sm); }
.resources-list a:hover { color: var(--rose-text); }

@media (max-width: 768px) {
  .tldr-stats { grid-template-columns: 1fr; gap: 1.25rem; }
  .tldr, .summary-section { padding: 1.5rem 1.25rem; }
  .cs-table { font-size: var(--text-sm); }
  .cs-table th, .cs-table td { padding: 0.5rem 0.6rem; }
}

.cs-hint { font-weight: 400; color: var(--fg-subtle); font-size: 0.82em; }

/* ============================================================
   child-index: a hub's sub-pages, rendered from the catalog by
   partials/child-index.html. Replaces hand-written child links.
   ============================================================ */

.child-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.child-index-item {
  display: flex;
  flex-direction: column;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.child-index-item:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.child-index-title {
  font-family: 'Satoshi', sans-serif;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.child-index-summary {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--fg-muted);
  flex-grow: 1;
  margin-bottom: 1rem;
}

.child-index-cta {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--cyan-text);
}
.child-index-item:hover .child-index-cta { color: var(--rose-text); }

@media (max-width: 640px) {
  .child-index { grid-template-columns: 1fr; }
  .child-index-item { padding: 1.25rem; }
}

/* resource-links: the Related and Siblings blocks base.html appends after
   every resource page's content (partials/child-index.html). The page's own
   .content already carries 6rem of bottom padding, so this pulls itself up
   into that space rather than stacking a second .content on top of it. */
.resource-links {
  margin-top: -5rem;
  padding-bottom: 4rem;
}
.resource-links h2 {
  margin-top: 1rem;
}

/* ============================================================
   case-pair: the companion block for decisions that must not be
   read alone. Deliberately loud and placed above the holding,
   because the failure mode is a reader acting on one half.
   ============================================================ */

.case-pair {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--tint-amber);
  border: 2px solid var(--amber);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem 0;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--fg-2);
}
.case-pair i {
  color: var(--amber-text);
  font-size: var(--text-md);
  margin-top: 0.15rem;
  flex-shrink: 0;
}
.case-pair strong { display: block; margin-bottom: 0.35rem; color: var(--fg); }
.case-pair a { color: var(--purple); font-weight: 600; }
.case-pair a:hover { color: var(--rose-text); }

/* ============================================================
   Mobile overflow, fixed by cause (measured 2026-11-07)
   All 170 pages were rendered at 375px and 34 exceeded the
   viewport, from 7px to 455px. Three causes accounted for 29 of
   them, and each rule below is the fix for one cause. Re-measure
   after touching any of this: the method is a 375px iframe and
   documentElement.scrollWidth, and an element inside a scroll
   container does not count.
   ============================================================ */

/* Cause 1, a three-up row of related-reading cards (15 pages).
   The templates carried the grid inline, as
   style="display: grid; grid-template-columns: repeat(3, 1fr)",
   and an inline style outranks any media query, so the row stayed
   three columns at 375px. The class exists so the collapse has
   somewhere to live. */
.link-cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 760px) {
  .link-cards-3 { grid-template-columns: 1fr; }
}

/* Cause 2, a table wider than the phone (11 pages). Seventeen
   pages already wrap their tables in a scrolling div by hand;
   this does the same thing for the rest without asking every
   template to remember. display:block is what lets overflow-x
   apply to a table at all. */
@media (max-width: 760px) {
  /* `main table[class]` as well as `main table`, because the bare element
     selector loses to any page's own `.data-table { overflow: hidden }`,
     and seven table classes across twelve files set exactly that, to clip
     their own rounded corners. On a `display: table` box that overflow is
     inert. The `display: block` above makes it bite, and a table that
     clips its last column silently is worse than one that overflows
     visibly: measured on /agentic-ai-inventorship, where 50px of the
     second table had no way to be reached. Raising specificity to 0,1,1
     puts the scroll back. */
  main table,
  main table[class] {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Cause 3, a long unbroken token in inline code: an install
   command, a source path (3 pages, one of them 455px over).
   There is no break opportunity in it, so it pushes the page.
   `anywhere` rather than `break-word` because only `anywhere`
   affects min-content sizing, which is what makes it work inside
   a grid or a table cell. A pre block scrolls instead, so it
   keeps its own behaviour. */
code { overflow-wrap: anywhere; }
pre code, pre.cs-code code { overflow-wrap: normal; }

/* ============================================================
   100% stacked bar: one track whose fills together are the
   whole. Proposed in the visualization proposal's section 8 and
   gated by its section 4.5: the form ASSERTS that the parts sum
   to the whole, so it is only for a set that actually partitions.
   An overlapping set (S9's next steps, S19's grounds) must use
   separate bars instead, or the picture makes a claim the data
   does not.

   The legend rows below the bar are real .chart-row elements, so
   datatable.Extract still lifts every figure into the page CSV
   and nothing is maintained twice.
   ============================================================ */

.chart-bar-track.is-stacked { display: flex; }
.chart-bar-track.is-stacked .chart-bar-fill { border-radius: 0; }
.chart-bar-track.is-stacked .chart-bar-fill:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.chart-bar-track.is-stacked .chart-bar-fill:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

.chart-row.is-legend { grid-template-columns: 1fr auto; column-gap: 0.75rem; }
.chart-swatch {
  background: var(--series);
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-sm);
  margin-right: 0.5rem;
}

/* =================================================================
   Resource page parts. Each of these was copied into the <style> block
   of two or more pages, often in several versions; this is the most
   common version, now the only one.
   ================================================================= */
.action-content h4 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.action-content p {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  line-height: 1.6;
  margin: 0;
}
.action-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.action-item:last-child {
  border-bottom: none;
}
.action-list {
  margin-top: 1.5rem;
}
.action-number {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--purple-fill);
  color: var(--on-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-base);
}
.analogy-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: var(--text-sm);
}
.analogy-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg-2);
  line-height: 1.5;
}
.analogy-table th {
  background: var(--bg-subtle);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  color: var(--fg);
  border-bottom: 2px solid var(--border);
}
.arrow-icon {
  font-size: var(--text-sm);
  transition: transform 0.2s ease;
}
.audience-note {
  color: var(--fg-subtle);
  font-size: var(--text-sm);
  margin-top: -0.5rem;
}
.best-practice {
  background: var(--tint-amber);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  border-left: 3px solid var(--amber);
}
.callout {
  background: var(--bg-raised);
  border-left: 4px solid var(--lavender);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: var(--text-base);
  color: var(--fg-2);
  line-height: 1.6;
}
.callout-box h3 i {
  margin-right: 8px;
}
.callout-box li {
  color: var(--fg-2);
  line-height: 1.7;
  margin-bottom: 8px;
  font-size: var(--text-base);
}
.callout-box ul {
  margin: 0;
  padding-left: 20px;
}
.callout-source {
  font-size: var(--text-xs);
  color: var(--fg-subtle);
  margin-top: 12px;
}
.card-arrow {
  padding: 2rem;
  padding-right: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  opacity: 0.4;
  transition: all 0.3s ease;
}
.card-arrow i {
  font-size: var(--text-lg);
}
.card-content {
  padding: 2.5rem;
  padding-left: 3rem;
  flex-grow: 1;
}
.checklist-item:last-child {
  border-bottom: none;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: var(--text-sm);
}
.comparison-table tbody tr {
  border-bottom: 1px solid var(--border);
}
.comparison-table tbody tr:nth-child(even) {
  background: var(--bg-subtle);
}
.comparison-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.comparison-table th {
  background: var(--bg-subtle);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}
.comparison-table tr:last-child td {
  border-bottom: none;
}
.comparison-table tr:nth-child(even) td {
  background: var(--bg-subtle);
}
.conception-note {
  background: var(--bg-inverse);
  color: var(--on-dark-muted);
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-md);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: var(--text-sm);
  line-height: 1.55;
  overflow-x: auto;
  margin: 1rem 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.content .note-box {
  background: var(--bg-subtle);
  border-left: 3px solid var(--cyan);
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  font-size: var(--text-sm);
}
.content .note-box-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--fg-2);
  line-height: 1.55;
}
.content .note-box-title {
  margin: 0 0 0.4rem 0;
  font-weight: 600;
  color: var(--purple);
}
.content .recent-developments-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--fg-2);
  line-height: 1.55;
}
.content .recent-developments-list a {
  color: var(--cyan-text);
}
.content .recent-developments-list a:hover {
  color: var(--cyan-text);
}
.content .recent-developments-title {
  margin: 0 0 0.4rem 0;
  font-weight: 600;
  color: var(--purple);
}
.content .related-heading {
  color: var(--purple);
  margin-bottom: 1.5rem;
}
.content h2.related-heading {
  color: var(--purple);
  margin-bottom: 1.5rem;
}
/* Inside article content, .content a would give the button link color. */
/* A call-to-action link. Pages with a design of their own restyle it in
   their page sheet, which loads after this one. */
.cta-button {
  display: inline-block;
  background: var(--cyan);
  color: var(--on-bright);
  font-weight: 700;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: opacity 0.2s;
}
.cta-button:hover { background: var(--cyan-hover); }
.content a.cta-button { color: var(--on-bright); border-bottom: none; }
.cta-privacy {
  font-size: var(--text-sm) !important;
  color: rgba(255,255,255,0.6) !important;
  margin-bottom: 1.5rem !important;
}
.cta-section {
  background: linear-gradient(135deg, var(--purple-fill) 0%, var(--bg-deep) 100%);
  color: var(--on-dark);
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 2.5rem;
}
.data-table tbody td:first-child {
  font-weight: 500;
  color: var(--fg-2);
}
.data-table thead {
  background: var(--purple-fill);
  color: var(--on-dark);
}
.disclaimer i {
  color: var(--purple);
  margin-right: 0.4rem;
}
.download-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(74, 63, 120, 0.05) 0%, rgba(45, 197, 232, 0.05) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}
.download-banner > div {
  flex-grow: 1;
}
.download-banner > i {
  font-size: var(--text-2xl);
  color: var(--purple);
}
.download-banner p {
  color: var(--fg-muted);
  font-size: var(--text-sm);
  margin: 0;
}
.download-banner strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--fg);
}
.effective-date {
  color: var(--fg-subtle);
  font-style: italic;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.ev {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  margin-right: 0.5rem;
  vertical-align: middle;
}
.ev-agency {
  background: var(--bg-inverse);
  color: var(--on-dark);
}
.ev-causal {
  background: var(--cyan);
  color: var(--on-bright);
}
.ev-desc {
  background: var(--purple-fill);
  color: var(--on-dark);
}
.ev-wp {
  background: var(--lavender);
  color: var(--on-bright);
}
.faq-item p:last-child {
  margin-bottom: 0;
}
.faq-section h2 {
  margin-bottom: 1.5rem;
}
.fine-print {
  font-size: var(--text-sm);
  color: var(--fg-subtle);
}
.framework-card {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.framework-card h4 {
  font-family: 'Satoshi', sans-serif;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 0.25rem 0;
}
.framework-card p:last-child {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  line-height: 1.5;
  margin: 0;
}
.framework-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}
.framework-icon {
  font-size: var(--text-lg);
  color: var(--purple);
  margin-bottom: 0.75rem;
}
.framework-statute {
  font-size: var(--text-sm);
  color: var(--purple);
  font-weight: 600;
  margin: 0 0 0.75rem 0;
}
.grant-column {
  flex: 1;
  position: relative;
  height: var(--value);
  background: var(--series);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.grant-column-value {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -1.15rem;
  font-size: 0.58rem;
  font-weight: 700;
}
.grant-column-year {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -1.4rem;
  font-size: 0.6rem;
  color: var(--fg-subtle);
}
.grant-columns {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 170px;
  margin: 1.6rem 0 2.1rem;
  padding-top: 1.2rem;
}
.inventorship-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: var(--text-sm);
}
.inventorship-table tbody td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-2);
  vertical-align: top;
  line-height: 1.5;
}
.inventorship-table tbody td strong {
  color: var(--purple);
  font-weight: 600;
}
.inventorship-table tbody tr:last-child td {
  border-bottom: none;
}
.inventorship-table thead {
  background: var(--purple-fill);
  color: var(--on-dark);
}
.inventorship-table thead th {
  padding: 11px 13px;
  text-align: left;
  font-weight: 600;
  font-size: var(--text-sm);
}
.limit-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.1rem;
}
.limit-list li {
  color: var(--fg-2);
  font-size: var(--text-base);
  line-height: 1.6;
  margin-bottom: 0.6rem;
}
.link-arrow {
  color: var(--purple);
  font-weight: 600;
  font-size: var(--text-base);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.mechanism-card h3 {
  font-size: var(--text-base);
  margin: 0 0 0.4rem;
}
.mechanism-card p {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  line-height: 1.5;
  margin: 0;
}
.mechanism-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}
.numbered-risks {
  margin-top: 1.5rem;
}
.page-title {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--bg-inverse) 0%, var(--purple-fill) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}
.platform-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.practical-rule {
  background: var(--tint-purple);
  border-left: 3px solid var(--purple);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  border-radius: var(--radius-sm);
}
.practical-rule p:last-child {
  margin-bottom: 0;
}
.practical-rule-label {
  margin: 0 0 0.5rem 0 !important;
  font-weight: 600;
  color: var(--purple);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.practical-rule-label i {
  color: var(--cyan-text);
  margin-right: 0.4rem;
}
.process-steps {
  margin: 1.5rem 0;
}
.quote-attribution {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin: 0;
  line-height: 1.5;
}
.quote-card {
  background: var(--bg-raised);
  border-left: 4px solid var(--purple);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  margin: 1.5rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.quote-card blockquote {
  font-size: var(--text-base);
  font-style: italic;
  color: var(--fg);
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
  padding: 0;
  border: none;
}
.quote-card blockquote::after {
  content: "\201D";
}
.quote-card blockquote::before {
  content: "\201C";
}
.recent-developments {
  background: var(--bg-subtle);
  border-left: 3px solid var(--cyan);
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  font-size: 0.92rem;
}
.related-card {
  display: block;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-decoration: none;
  border-top: 3px solid var(--cyan);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.related-card h3 {
  font-size: var(--text-base);
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.related-card p {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  line-height: 1.4;
  margin: 0;
}
.related-card.has-series {
  border-top-color: var(--series);
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(17,17,17,0.08);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}
.related-heading {
  color: var(--purple);
  margin-bottom: 1.5rem;
}
.related-link {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--purple) !important;
  text-decoration: none !important;
  border-bottom: none !important;
}
.resource-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--purple);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
.resource-link i {
  font-size: var(--text-md);
}
.resource-link:hover {
  color: var(--cyan-text);
}
.resources-list em {
  color: var(--fg-muted);
}
.resources-list h3 {
  font-size: var(--text-base);
  color: var(--purple);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.resources-section {
  margin: 4rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.risk-content h4 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.risk-content p {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  line-height: 1.6;
  margin: 0;
}
.risk-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.risk-item > div:last-child {
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--fg-2);
}
.risk-item:last-child {
  border-bottom: none;
}
.risk-number {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--red);
  color: var(--on-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-base);
}
.scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.scope-note {
  font-size: var(--text-sm);
  color: var(--fg-subtle);
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}
.section.platform-preview {
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.signature-block {
  text-align: left;
}
.signature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  margin-top: 2rem;
}
.signature-line {
  width: 100%;
  height: 1px;
  background: var(--bg-inverse);
  margin: 2rem 0 0.5rem;
}
.smed-source {
  font-size: var(--text-sm);
  color: var(--fg-subtle);
  margin-top: 0.5rem;
  font-style: italic;
}
.stat-card p {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin: 0;
}
/* The line under a page's h1: one step up from body text, muted, so the
   title and its one-sentence premise read as a pair. */
.subhead {
  color: var(--fg-muted);
  font-size: var(--text-md);
  line-height: 1.5;
  margin-top: 0;
  margin-bottom: 2rem;
}
.table-source {
  font-size: var(--text-sm);
  color: var(--fg-subtle);
  margin-top: 0.4rem;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: var(--text-sm);
  color: var(--fg-muted);
  font-weight: 500;
  transition: all 0.2s ease;
}
.tag-icon {
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.tag:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.term-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.term-box h3 {
  font-size: var(--text-base);
  color: var(--purple);
  margin: 0 0 0.6rem;
}
.tpl-platform-panel {
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.tpl-scope {
  font-size: var(--text-sm);
  color: var(--fg-subtle);
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}
.tpl-trail-section {
  padding-top: 0;
}
.warning-box i {
  color: var(--amber-text);
  font-size: var(--text-lg);
  flex-shrink: 0;
}
.worksheet-trail {
  padding-top: 0;
}
@media (max-width: 480px) {
  .card-content {
    padding: 1.25rem;
  }
  .checklist-item {
    flex-direction: column;
    gap: 0.5rem;
  }
  .intro {
    font-size: var(--text-base);
  }
  .page-title {
    font-size: var(--text-xl);
  }
  .quote-card {
    padding: 1.25rem;
  }
  .tag {
    font-size: var(--text-sm);
    padding: 0.4rem 0.7rem;
  }
  .tags {
    gap: 0.5rem;
  }
}
@media (max-width: 640px) {
  .card-content {
    padding: 1.5rem;
  }
  .download-banner .btn {
    width: 100%;
    justify-content: center;
  }
  .intro {
    font-size: var(--text-base);
  }
  .page-title {
    font-size: var(--text-xl);
  }
  .subhead {
    font-size: var(--text-md);
  }
}
@media (max-width: 768px) {
  .analogy-table {
    font-size: var(--text-sm);
  }
  .analogy-table td {
    padding: 0.5rem 0.6rem;
  }
  .analogy-table th {
    padding: 0.5rem 0.6rem;
  }
  .card-arrow {
    display: none;
  }
  .card-content {
    padding: 2rem;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .comparison-table {
    font-size: var(--text-sm);
  }
  .comparison-table td {
    padding: 0.6rem 0.75rem;
  }
  .comparison-table th {
    padding: 0.6rem 0.75rem;
  }
  .cta-section {
    padding: 2rem 1.5rem;
  }
  .cta-section h2 {
    font-size: var(--text-lg);
  }
  .download-banner {
    flex-direction: column;
    text-align: center;
  }
  .framework-grid {
    grid-template-columns: 1fr;
  }
  .intro {
    font-size: var(--text-md);
    margin-bottom: 2rem;
  }
  .page-title {
    font-size: var(--text-2xl);
  }
  .ps-results-grid {
    grid-template-columns: 1fr;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .risk-grid {
    grid-template-columns: 1fr;
  }
  .scenario-grid {
    grid-template-columns: 1fr;
  }
  .signature-grid {
    grid-template-columns: 1fr;
  }
}
