/* ==========================================================================
   SlabToRoof design system
   Structural clear: blueprint blue, drywall white, caution orange.
   Rokkitt slab display over Asap body. Measured grid, technical annotation.
   ========================================================================== */

:root {
  /* Brief palette */
  --bg: #F3F6F9;
  --surface: #FFFFFF;
  --ink: #14202B;
  --primary: #1D4E76;
  --accent: #E86A22;
  --muted: #5E6E7B;

  /* Derived blueprint shades */
  --primary-950: #0B1C2B;
  --primary-900: #10314A;
  --primary-800: #163C5B;
  --primary-600: #2A6395;
  --primary-400: #6C9BC0;
  --primary-200: #BCD2E4;
  --primary-100: #DEE9F2;
  --primary-050: #EDF3F8;

  /* Derived caution shades */
  --accent-700: #A8451A;
  --accent-600: #C4551A;
  --accent-200: #F6C6A6;
  --accent-100: #FBE6D8;

  /* Drafting neutrals */
  --line: rgba(29, 78, 118, 0.20);
  --line-soft: rgba(29, 78, 118, 0.11);
  --grid-fine: rgba(29, 78, 118, 0.055);
  --grid-major: rgba(29, 78, 118, 0.10);
  --ink-70: rgba(20, 32, 43, 0.72);

  /* Spacing scale, 4px module */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;
  --s9: 5.5rem;
  --s10: 7rem;

  /* Radii, kept tight so panels read as drawing sheets */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
  --r-pill: 999px;

  /* Shadows */
  --sh-1: 0 1px 2px rgba(11, 28, 43, 0.06);
  --sh-2: 0 6px 18px rgba(11, 28, 43, 0.08);
  --sh-3: 0 18px 44px rgba(11, 28, 43, 0.13);

  /* Type scale */
  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-md: 1.1875rem;
  --t-lg: 1.4rem;
  --t-xl: 1.85rem;
  --t-2xl: 2.35rem;
  --t-3xl: 3rem;
  --t-4xl: clamp(2.4rem, 5.2vw, 4rem);

  --display: "Rokkitt", "Rockwell", "Courier New", Georgia, serif;
  --body: "Asap", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, var(--grid-fine) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, var(--grid-fine) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(0deg, var(--grid-major) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, var(--grid-major) 0 1px, transparent 1px 64px);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--primary-950);
  margin: 0 0 var(--s4);
}

h1 { font-size: var(--t-4xl); letter-spacing: -0.022em; }
h2 { font-size: clamp(1.9rem, 3.4vw, var(--t-3xl)); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); }

p { margin: 0 0 var(--s4); }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-600); }

ul, ol { margin: 0 0 var(--s4); padding-left: 1.2rem; }
li { margin-bottom: var(--s2); }

strong { font-weight: 600; color: var(--primary-950); }

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

::selection { background: var(--accent-200); color: var(--primary-950); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s5); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--s4); top: -100px; z-index: 200;
  background: var(--accent); color: #fff; font-weight: 600;
  padding: var(--s3) var(--s5); border-radius: 0 0 var(--r-md) var(--r-md);
  text-decoration: none; transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 0; color: #fff; }

/* --------------------------------------------------------------------------
   Drafting primitives: tags, dimension lines, sheet corners
   -------------------------------------------------------------------------- */

.tag {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-family: var(--display); font-weight: 700; font-size: var(--t-xs);
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-600);
  margin-bottom: var(--s3);
}
.tag::before {
  content: ""; width: 34px; height: 0; border-top: 2px solid var(--accent);
  position: relative;
}
.tag::after {
  content: attr(data-ref); font-family: var(--body); font-weight: 600;
  letter-spacing: 0.08em; color: var(--primary-400);
}

.dim {
  position: relative; height: 1px; background: var(--line);
  margin: var(--s6) 0; width: 100%;
}
.dim::before, .dim::after {
  content: ""; position: absolute; top: -5px; width: 1px; height: 11px; background: var(--primary-400);
}
.dim::before { left: 0; }
.dim::after { right: 0; }

.sheet {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}
.sheet::before, .sheet::after {
  content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none;
}
.sheet::before {
  top: 6px; left: 6px;
  border-top: 2px solid var(--primary-200); border-left: 2px solid var(--primary-200);
}
.sheet::after {
  bottom: 6px; right: 6px;
  border-bottom: 2px solid var(--primary-200); border-right: 2px solid var(--primary-200);
}

.section { padding: var(--s9) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line-soft); }
.section-head { max-width: 46rem; margin-bottom: var(--s7); }
.section-head p { color: var(--muted); font-size: var(--t-md); margin-bottom: 0; }
.section-alt {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.72));
}

/* Ruler strip used as a section divider */
.ruler {
  height: 16px; width: 100%;
  background-image: repeating-linear-gradient(90deg, var(--primary-200) 0 1px, transparent 1px 16px);
  border-bottom: 1px solid var(--line);
  opacity: 0.9;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--body); font-weight: 600; font-size: var(--t-sm);
  letter-spacing: 0.03em; text-decoration: none; cursor: pointer;
  padding: 0.85rem 1.5rem; border-radius: var(--r-md); border: 1px solid transparent;
  transition: transform 0.16s var(--ease), background-color 0.16s var(--ease),
              box-shadow 0.16s var(--ease), color 0.16s var(--ease);
}
.btn-primary {
  background: var(--accent); color: #fff; border-color: var(--accent-600);
  box-shadow: 0 2px 0 var(--accent-700);
}
.btn-primary:hover { background: var(--accent-600); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 0 var(--accent-700); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--accent-700); }
.btn-ghost {
  background: transparent; color: var(--primary); border-color: var(--primary-200);
}
.btn-ghost:hover { background: var(--primary-050); color: var(--primary-800); border-color: var(--primary-400); }
.btn-solid { background: var(--primary); color: #fff; border-color: var(--primary-800); }
.btn-solid:hover { background: var(--primary-800); color: #fff; }
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(243, 246, 249, 0.86);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}
.site-header.is-stuck { background: rgba(243, 246, 249, 0.97); box-shadow: var(--sh-2); }
.site-header::after {
  content: ""; display: block; height: 5px;
  background-image: repeating-linear-gradient(90deg, var(--primary-200) 0 1px, transparent 1px 12px);
}
/* The top row carries the wordmark, seven nav items and the calls to action,
   so it is held to one line: nothing wraps and the two fixed-width ends do
   not compress. */
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: nowrap; gap: var(--s3);
  min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: var(--s3); text-decoration: none; flex: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name {
  font-family: var(--display); font-weight: 700; font-size: 1.32rem;
  color: var(--primary-950); letter-spacing: -0.015em;
}
.brand-name b { color: var(--accent); font-weight: 700; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 40px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer;
}
.nav-toggle span { display: block; width: 19px; height: 2px; background: var(--primary); position: relative; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 19px; height: 2px; background: var(--primary);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.site-nav ul {
  display: flex; flex-wrap: nowrap; align-items: center;
  gap: clamp(0.5rem, 0.9vw - 0.06rem, 0.75rem);
  list-style: none; margin: 0; padding: 0;
}
/* The global list rule puts a bottom margin on every li, which pushed the
   nav off the header centre line. */
.site-nav li { margin-bottom: 0; }
.site-nav a {
  font-size: clamp(0.75rem, 0.66vw + 0.34rem, 0.8125rem);
  font-weight: 500; color: var(--primary-800); text-decoration: none;
  padding: var(--s2) 0; position: relative; white-space: nowrap;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  background: var(--accent); transition: width 0.2s var(--ease);
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { width: 100%; }
.header-cta { display: inline-flex; gap: var(--s2); align-items: center; flex: none; }
/* Header buttons sit tighter than body buttons because the same row also
   carries the whole nav, and their labels must stay on one line. */
.header-cta .btn { padding: 0.78rem 1.15rem; white-space: nowrap; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero { padding: var(--s8) 0 var(--s9); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 12% 8%, rgba(29, 78, 118, 0.10), transparent 62%);
  pointer-events: none;
}
.hero-grid {
  position: relative; display: grid; gap: var(--s8);
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); align-items: center;
}
.hero h1 { margin-bottom: var(--s5); max-width: 15ch; }
.hero h1 em {
  font-style: normal; color: var(--primary); white-space: nowrap;
  background-image: linear-gradient(180deg, transparent 0 66%, var(--accent-200) 66% 88%, transparent 88%);
  padding-inline: 0.06em;
}
.hero-lede { font-size: var(--t-md); color: var(--ink-70); max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s6) 0 var(--s6); }

.trust-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  background: var(--surface);
}
.trust-strip div { padding: var(--s4); border-right: 1px dashed var(--line); }
.trust-strip div:last-child { border-right: 0; }
.trust-strip b {
  display: block; font-family: var(--display); font-size: 1.5rem; color: var(--primary);
  line-height: 1;
}
.trust-strip span { font-size: var(--t-xs); color: var(--muted); letter-spacing: 0.04em; }

/* Photo plate with pinned annotation callouts */
.plate { position: relative; }
.plate-frame {
  position: relative; border: 1px solid var(--primary-200); border-radius: var(--r-md);
  padding: 10px; background: var(--surface); box-shadow: var(--sh-3);
}
.plate-frame img { border-radius: var(--r-sm); }
.plate-label {
  position: absolute; left: 10px; bottom: 10px; right: 10px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--display); font-size: var(--t-xs); letter-spacing: 0.14em;
  text-transform: uppercase; color: #fff; padding: var(--s2) var(--s3);
  background: linear-gradient(0deg, rgba(11, 28, 43, 0.86), rgba(11, 28, 43, 0.28));
  border-radius: 0 0 var(--r-sm) var(--r-sm);
}

.callout {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: var(--s2);
  background: var(--surface); border: 1px solid var(--primary);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-sm); padding: 6px 10px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; color: var(--primary-950);
  box-shadow: var(--sh-2); white-space: nowrap;
  opacity: 0; transform: scale(0.86) translateY(6px);
  animation: pin 0.55s var(--ease) forwards;
}
.callout i {
  font-style: normal; font-family: var(--display); color: var(--accent-600);
  font-size: 0.72rem; letter-spacing: 0.08em;
}
.callout::after {
  content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface);
}
.callout-1 { top: 13%; left: -6%; animation-delay: 0.35s; }
.callout-1::after { right: -22px; top: 50%; margin-top: -4px; }
.callout-2 { top: 46%; right: -5%; animation-delay: 0.7s; }
.callout-2::after { left: -22px; top: 50%; margin-top: -4px; }
.callout-3 { bottom: 20%; left: 4%; animation-delay: 1.05s; }
.callout-3::after { right: -22px; top: 50%; margin-top: -4px; }

@keyframes pin {
  0% { opacity: 0; transform: scale(0.82) translateY(8px); }
  60% { opacity: 1; transform: scale(1.04) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* --------------------------------------------------------------------------
   Problem punch list
   -------------------------------------------------------------------------- */

.punch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); }
.punch {
  padding: var(--s5); position: relative; overflow: hidden;
}
.punch h3 { margin-bottom: var(--s3); font-size: var(--t-md); }
.punch p { font-size: var(--t-sm); color: var(--muted); margin-bottom: var(--s4); }
.punch .cost {
  display: block; font-family: var(--display); font-weight: 700; font-size: 1.5rem;
  color: var(--accent-600); line-height: 1.1;
}
.punch .cost small { display: block; font-family: var(--body); font-size: var(--t-xs); color: var(--muted); font-weight: 500; letter-spacing: 0.04em; }
.punch-mark {
  width: 30px; height: 30px; border: 2px solid var(--primary-400); border-radius: var(--r-sm);
  display: grid; place-items: center; margin-bottom: var(--s4);
  font-family: var(--display); font-weight: 700; color: var(--primary); font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   How it works, elevation column
   -------------------------------------------------------------------------- */

.steps-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); gap: var(--s8); align-items: start; }
.steps { position: relative; padding-left: var(--s7); }
.steps::before {
  content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px;
  background-image: linear-gradient(180deg, var(--primary-400) 0 60%, transparent 0);
  background-size: 2px 12px; background-repeat: repeat-y;
}
.step { position: relative; margin-bottom: var(--s6); }
.step:last-child { margin-bottom: 0; }
.step-no {
  position: absolute; left: calc(-1 * var(--s7)); top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--primary);
  display: grid; place-items: center; font-family: var(--display); font-weight: 700;
  color: var(--primary); font-size: 1rem;
}
.step h3 { margin-bottom: var(--s2); }
.step p { color: var(--muted); margin-bottom: 0; }
.step-note {
  display: inline-block; margin-top: var(--s3); font-size: var(--t-xs);
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
  color: var(--primary-800); background: var(--primary-050);
  border: 1px dashed var(--primary-200); padding: 4px 9px; border-radius: var(--r-sm);
}

.iso-panel { position: relative; }
.iso-panel .plate-frame { padding: 8px; }
.iso-svg { display: block; width: 100%; height: auto; margin-top: var(--s5); }
.draw path, .draw line, .draw polyline, .draw circle, .draw rect { stroke-dasharray: 1200; stroke-dashoffset: 1200; }
.draw.is-visible path, .draw.is-visible line, .draw.is-visible polyline,
.draw.is-visible circle, .draw.is-visible rect {
  animation: draw-line 2.1s var(--ease) forwards;
}
.draw.is-visible :nth-child(2) { animation-delay: 0.18s; }
.draw.is-visible :nth-child(3) { animation-delay: 0.34s; }
.draw.is-visible :nth-child(4) { animation-delay: 0.5s; }
.draw.is-visible :nth-child(5) { animation-delay: 0.66s; }
.draw.is-visible :nth-child(6) { animation-delay: 0.82s; }
@keyframes draw-line { to { stroke-dashoffset: 0; } }

/* --------------------------------------------------------------------------
   Feature cards, technical drawing icons
   -------------------------------------------------------------------------- */

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.feature { padding: var(--s6) var(--s5); transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.feature:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.feature h3 { font-size: var(--t-md); margin-bottom: var(--s3); }
.feature p { color: var(--muted); font-size: var(--t-sm); margin-bottom: 0; }
.icon-box {
  width: 54px; height: 54px; margin-bottom: var(--s4);
  border: 1px solid var(--primary-200); border-radius: var(--r-sm);
  display: grid; place-items: center; background: var(--primary-050);
  background-image: repeating-linear-gradient(90deg, rgba(29,78,118,0.07) 0 1px, transparent 1px 9px),
                    repeating-linear-gradient(0deg, rgba(29,78,118,0.07) 0 1px, transparent 1px 9px);
}
.icon-box svg { width: 28px; height: 28px; }
.icon-box svg [stroke] { stroke: var(--primary); }
.icon-box svg .hot { stroke: var(--accent); }

/* --------------------------------------------------------------------------
   Outcome blocks, measured numerals
   -------------------------------------------------------------------------- */

.outcome-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); }
.outcome { padding: var(--s5) 0; border-top: 3px solid var(--primary-950); position: relative; }
.outcome::after {
  content: ""; position: absolute; top: -3px; left: 0; width: 34%; height: 3px; background: var(--accent);
}
.outcome .figure {
  font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 5vw, 3.4rem);
  line-height: 1; color: var(--primary-950); letter-spacing: -0.03em; display: block;
  margin-bottom: var(--s2);
}
.outcome .figure sup { font-size: 0.42em; color: var(--accent); top: -1.1em; }
.outcome h3 { font-size: var(--t-base); margin-bottom: var(--s2); font-family: var(--body); font-weight: 700; letter-spacing: 0; }
.outcome p { font-size: var(--t-sm); color: var(--muted); margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Testimonials, field notes clipped to a board
   -------------------------------------------------------------------------- */

.proof-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.testimonial {
  position: relative; padding: var(--s7) var(--s5) var(--s5);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}
.testimonial::before {
  content: ""; position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 18px; border-radius: 3px;
  background: linear-gradient(180deg, var(--accent) 0 55%, var(--accent-600) 55% 100%);
  box-shadow: var(--sh-1);
}
.testimonial blockquote { margin: 0 0 var(--s5); font-size: var(--t-base); color: var(--ink); }
.testimonial blockquote p:last-child { margin-bottom: 0; }
.testimonial figcaption { border-top: 1px dashed var(--line); padding-top: var(--s3); font-size: var(--t-sm); }
.testimonial cite { font-style: normal; font-weight: 700; color: var(--primary-950); display: block; }
.testimonial span { color: var(--muted); font-size: var(--t-xs); letter-spacing: 0.02em; }

.results-strip {
  margin-top: var(--s7); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--primary-950); color: #fff; border-radius: var(--r-md); overflow: hidden;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 32px);
}
.results-strip div { padding: var(--s6) var(--s5); border-right: 1px solid rgba(255,255,255,0.14); }
.results-strip div:last-child { border-right: 0; }
.results-strip b { display: block; font-family: var(--display); font-size: 2.3rem; line-height: 1; color: #fff; }
.results-strip b em { font-style: normal; color: var(--accent); }
.results-strip p { margin: var(--s2) 0 0; font-size: var(--t-sm); color: var(--primary-200); }

/* --------------------------------------------------------------------------
   Pricing, spec columns
   -------------------------------------------------------------------------- */

.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); align-items: start; }
.tier { padding: var(--s6) var(--s5); display: flex; flex-direction: column; height: 100%; }
.tier-top { border-top: 4px solid var(--primary-200); margin: calc(-1 * var(--s6)) calc(-1 * var(--s5)) var(--s5); }
.tier h3 { font-size: var(--t-lg); margin-bottom: var(--s1); }
.tier .who { font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s4); }
.tier .price { font-family: var(--display); font-weight: 700; font-size: 3rem; line-height: 1; color: var(--primary-950); }
.tier .price span { font-family: var(--body); font-size: var(--t-sm); font-weight: 500; color: var(--muted); letter-spacing: 0.02em; }
.tier ul { list-style: none; padding: 0; margin: var(--s5) 0 var(--s6); }
.tier li { position: relative; padding-left: 26px; font-size: var(--t-sm); color: var(--ink-70); }
.tier li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 13px; height: 8px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.tier .btn { margin-top: auto; }
.tier-featured {
  border-color: var(--primary); box-shadow: var(--sh-3); position: relative;
}
.tier-featured .tier-top { border-top-color: var(--accent); }
.badge-rec {
  position: absolute; top: -13px; right: var(--s5);
  background: var(--accent); color: #fff; font-family: var(--display); font-weight: 700;
  font-size: var(--t-xs); letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 12px; border-radius: var(--r-sm); box-shadow: var(--sh-1);
}
.billing-note {
  margin-top: var(--s6); text-align: center; font-size: var(--t-sm); color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--r-md); padding: var(--s4);
  background: var(--surface);
}

/* --------------------------------------------------------------------------
   FAQ accordion
   -------------------------------------------------------------------------- */

.faq-list { max-width: 54rem; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4);
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: var(--s5) 0; font-family: var(--display); font-weight: 700; font-size: var(--t-md);
  color: var(--primary-950);
}
.faq-q:hover { color: var(--primary); }
.faq-sign {
  flex: none; width: 26px; height: 26px; border: 1px solid var(--primary-200); border-radius: var(--r-sm);
  position: relative; margin-top: 2px; background: var(--surface);
}
.faq-sign::before, .faq-sign::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: var(--accent);
  transform: translate(-50%, -50%); transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}
.faq-sign::before { width: 12px; height: 2px; }
.faq-sign::after { width: 2px; height: 12px; }
.faq-q[aria-expanded="true"] .faq-sign::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-a { padding: 0 0 var(--s5); max-width: 46rem; color: var(--muted); font-size: var(--t-sm); }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Contact form
   -------------------------------------------------------------------------- */

.contact-shell {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: var(--s8);
  align-items: start;
}
.contact-aside .tag { color: var(--accent); }
.contact-aside ul { list-style: none; padding: 0; margin-top: var(--s5); }
.contact-aside li { position: relative; padding-left: 24px; color: var(--muted); font-size: var(--t-sm); }
.contact-aside li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 10px; height: 10px;
  border: 2px solid var(--accent); border-radius: 1px;
}
.form-card { padding: var(--s6); }
.field { margin-bottom: var(--s4); }
.field label, .consent span { display: block; font-size: var(--t-sm); font-weight: 600; color: var(--primary-950); margin-bottom: var(--s2); }
.field .hint { display: block; font-weight: 400; font-size: var(--t-xs); color: var(--muted); margin-top: -2px; margin-bottom: var(--s2); }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; font-family: var(--body); font-size: var(--t-sm); color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0.7rem 0.8rem; transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
textarea { min-height: 128px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--primary) 50%), linear-gradient(135deg, var(--primary) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 2.2rem; }
input:hover, select:hover, textarea:hover { border-color: var(--primary-400); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--accent-600); background: var(--accent-100); }
.field-error { display: block; font-size: var(--t-xs); color: var(--accent-700); font-weight: 600; margin-top: var(--s2); }
.field-error[hidden] { display: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.consent { display: flex; gap: var(--s3); align-items: flex-start; margin: var(--s5) 0; }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.consent span { font-weight: 400; font-size: var(--t-xs); color: var(--muted); margin: 0; }
.form-foot { margin-top: var(--s4); font-size: var(--t-xs); color: var(--muted); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--primary-950); color: var(--primary-200); margin-top: var(--s8);
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 40px),
                    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 40px);
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--s7);
  padding: var(--s8) 0 var(--s7);
}
.site-footer h2, .site-footer h3 {
  color: #fff; font-size: var(--t-xs); letter-spacing: 0.16em; text-transform: uppercase;
  font-family: var(--body); font-weight: 700; margin-bottom: var(--s4);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--s3); }
.site-footer a { color: var(--primary-200); text-decoration: none; font-size: var(--t-sm); }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { font-size: var(--t-sm); color: var(--primary-200); max-width: 30ch; margin-top: var(--s4); }
.social { display: flex; gap: var(--s2); margin-top: var(--s5); }
.social a {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.2); border-radius: var(--r-sm);
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.social a:hover { background: var(--accent); border-color: var(--accent); }
.social svg { width: 17px; height: 17px; fill: currentColor; }
.footer-base {
  border-top: 1px solid rgba(255,255,255,0.14); padding: var(--s5) 0;
  display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: space-between;
  font-size: var(--t-xs); color: var(--primary-200);
}
.author-byline {
  margin-top: var(--s8); padding: var(--s5); display: flex; gap: var(--s4); align-items: center;
  border-left: 4px solid var(--accent); background: var(--surface);
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  border-radius: var(--r-sm); font-size: var(--t-sm); color: var(--muted);
}
.author-byline strong { display: block; color: var(--primary-950); }

/* --------------------------------------------------------------------------
   Prose pages
   -------------------------------------------------------------------------- */

.page-head { padding: var(--s8) 0 var(--s6); border-bottom: 1px solid var(--line-soft); }
.page-head p { color: var(--muted); max-width: 46rem; margin-bottom: 0; }
.prose { max-width: 48rem; padding: var(--s7) 0 var(--s8); }
.prose h2 { font-size: var(--t-xl); margin-top: var(--s7); }
.prose h3 { font-size: var(--t-md); margin-top: var(--s5); }
.prose h2:first-of-type { margin-top: 0; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: var(--s5); font-size: var(--t-sm); }
.prose th, .prose td { border: 1px solid var(--line); padding: var(--s3); text-align: left; vertical-align: top; }
.prose th { background: var(--primary-050); font-weight: 700; }
.fact-list { list-style: none; padding: 0; }
.fact-list li { display: grid; grid-template-columns: 200px 1fr; gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px dashed var(--line); font-size: var(--t-sm); }
.fact-list b { color: var(--primary-950); }
.author-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--s7); align-items: start; padding-top: var(--s7); }
.author-card { padding: var(--s4); position: sticky; top: 96px; }
.author-card img { border-radius: var(--r-sm); width: 100%; }
.author-card .role { font-size: var(--t-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-600); margin: var(--s4) 0 var(--s2); font-weight: 700; }
.author-card ul { list-style: none; padding: 0; margin: var(--s4) 0 0; }
.author-card li { margin-bottom: var(--s2); font-size: var(--t-sm); }
.map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); padding: var(--s7) 0 var(--s8); }
.map-card { padding: var(--s5); }
.map-card ul { list-style: none; padding: 0; margin: 0; }
.map-card li { padding: var(--s3) 0; border-bottom: 1px dashed var(--line); font-size: var(--t-sm); }
.map-card li:last-child { border-bottom: 0; }
.map-card a { font-weight: 600; display: block; }
.map-card small { color: var(--muted); }
.mini-hero { text-align: center; padding: var(--s9) 0; max-width: 42rem; margin-inline: auto; }
.mini-hero p { color: var(--muted); }
.mini-hero .tag { justify-content: center; }
.mini-hero .code { display: block; font-family: var(--display); font-size: clamp(4rem, 14vw, 7rem); line-height: 1; color: var(--primary); letter-spacing: -0.04em; }
.mini-hero .actions { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; margin-top: var(--s6); }

/* --------------------------------------------------------------------------
   Reveal motion
   -------------------------------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* At and below the wrap width the header row has no slack left, so the
   secondary header link stands down and the primary one carries the CTA.
   Every navigation item stays. */
@media (max-width: 1180px) {
  .header-cta .btn-ghost { display: none; }
}

@media (max-width: 1080px) {
  .punch-grid, .outcome-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s6); }
}

/* Also the drawer breakpoint: below this the seven nav items cannot hold a
   single row at a readable size. Kept in step with the 900px check in
   main.js. */
@media (max-width: 900px) {
  .hero-grid, .steps-layout, .contact-shell { grid-template-columns: 1fr; gap: var(--s7); }
  .price-grid, .proof-grid { grid-template-columns: 1fr; }
  .map-grid { grid-template-columns: 1fr; }
  .author-layout { grid-template-columns: 1fr; }
  .author-card { position: static; max-width: 320px; }
  .callout-1 { left: 2%; }
  .callout-3 { left: 6%; }
  .callout-2 { right: 2%; }

  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--sh-2); padding: var(--s4) var(--s5); display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: var(--s4); }
  /* Stacked in the drawer there is room for the full size again. */
  .site-nav a { font-size: var(--t-sm); white-space: normal; }
}

@media (max-width: 760px) {
  .section { padding: var(--s8) 0; }
  .form-row { grid-template-columns: 1fr; }
  .results-strip { grid-template-columns: 1fr; }
  .results-strip div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.14); }
  .fact-list li { grid-template-columns: 1fr; gap: var(--s1); }
}

@media (max-width: 560px) {
  .punch-grid, .outcome-grid, .feature-grid { grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: 1fr; }
  .trust-strip div { border-right: 0; border-bottom: 1px dashed var(--line); }
  .trust-strip div:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .callout { font-size: 0.62rem; padding: 4px 8px; }
  .hero { padding-top: var(--s6); }
  .wrap { padding-inline: var(--s4); }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .callout { opacity: 1; transform: none; animation: none; }
  .draw path, .draw line, .draw polyline, .draw circle, .draw rect { stroke-dashoffset: 0; }
}

@media print {
  .site-header, .site-footer, .hero-actions, .nav-toggle { display: none; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   The Defect Log: magazine
   Same sheet metaphor as the rest of the site. Drawing borders, measured
   grid, Rokkitt headlines over Asap body, caution orange for the annotation.
   ========================================================================== */

/* Breadcrumb ---------------------------------------------------------------- */
.mag-crumb { padding: var(--s5) 0 0; }
.mag-crumb ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2);
  list-style: none; margin: 0; padding: 0;
  font-size: var(--t-xs); letter-spacing: 0.04em; color: var(--muted);
}
.mag-crumb li { margin: 0; display: inline-flex; align-items: center; gap: var(--s2); }
.mag-crumb li + li::before {
  content: ""; width: 14px; height: 0; border-top: 1px solid var(--primary-400);
}
.mag-crumb a { color: var(--primary-800); text-decoration: none; }
.mag-crumb a:hover { color: var(--accent-600); text-decoration: underline; }
.mag-crumb [aria-current="page"] {
  color: var(--primary-950); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}

/* Magazine index masthead --------------------------------------------------- */
.mag-masthead { padding: var(--s6) 0 var(--s2); max-width: 52rem; }
.mag-masthead h1 { margin-bottom: var(--s4); }
.mag-masthead-note { font-size: var(--t-sm); color: var(--muted); margin-bottom: 0; }
.mag-masthead .dim { margin-bottom: 0; }

.mag-standfirst {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.15rem, 2.3vw, 1.5rem); line-height: 1.45;
  color: var(--primary-800); max-width: 44rem;
}

/* Index grid and cards ------------------------------------------------------ */
.mag-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s5); padding: var(--s7) 0 var(--s9); align-items: start;
}
.mag-card {
  display: flex; flex-direction: column; overflow: hidden; height: 100%;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.mag-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.mag-card-shot { display: block; border-bottom: 1px solid var(--line); background: var(--primary-050); }
.mag-card-shot img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-card-body { padding: var(--s5); display: flex; flex-direction: column; flex: 1; }
.mag-card-angle {
  font-family: var(--display); font-weight: 700; font-size: var(--t-xs);
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-600);
  margin: 0 0 var(--s3);
}
.mag-card-title { font-size: var(--t-md); line-height: 1.16; margin: 0 0 var(--s3); }
.mag-card-title a { color: var(--primary-950); text-decoration: none; }
.mag-card-title a:hover { color: var(--accent-600); text-decoration: underline; }
.mag-card-dek { font-size: var(--t-sm); color: var(--muted); margin-bottom: var(--s4); }
.mag-card-meta {
  display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
  margin: auto 0 0; padding-top: var(--s3); border-top: 1px dashed var(--line);
  font-size: var(--t-xs); letter-spacing: 0.04em; color: var(--muted);
}
.mag-dot { width: 5px; height: 5px; border-radius: var(--r-pill); background: var(--accent); flex: none; }

/* The lead card takes the full first row and runs side by side */
.mag-card.lead {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: stretch;
}
.mag-card.lead .mag-card-shot { border-bottom: 0; border-right: 1px solid var(--line); height: 100%; }
.mag-card.lead .mag-card-shot img { height: 100%; aspect-ratio: auto; min-height: 320px; }
.mag-card.lead .mag-card-body { padding: var(--s7) var(--s6); }
.mag-card.lead .mag-card-title { font-size: clamp(1.7rem, 3.2vw, 2.35rem); }
.mag-card.lead .mag-card-dek { font-size: var(--t-md); color: var(--ink-70); }

.mag-index-cta { max-width: 46rem; }
.mag-index-cta p { color: var(--muted); }
.mag-index-cta .btn { margin-top: var(--s3); }

/* Article header ------------------------------------------------------------ */
.mag-article-head { padding: var(--s6) 0 var(--s6); max-width: 52rem; }
.mag-article-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: var(--s4); }

.mag-byline {
  display: flex; align-items: center; gap: var(--s4);
  margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line);
}
.mag-byline-face {
  width: 48px; height: 48px; flex: none; border-radius: var(--r-pill);
  border: 1px solid var(--line); object-fit: cover;
}
.mag-byline-text { margin: 0; font-size: var(--t-sm); font-weight: 600; color: var(--primary-950); }
.mag-byline-text a { color: var(--primary); }
.mag-meta {
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4);
  margin-top: var(--s1); font-weight: 400; font-size: var(--t-xs);
  letter-spacing: 0.04em; color: var(--muted);
}
.mag-meta > span { display: inline-flex; align-items: center; gap: var(--s2); }
.mag-meta > span + span::before {
  content: ""; width: 4px; height: 4px; border-radius: var(--r-pill);
  background: var(--primary-200); margin-right: var(--s2);
}

.mag-figure { margin: 0 0 var(--s7); padding: 8px; overflow: hidden; }
.mag-figure img { width: 100%; border-radius: var(--r-sm); }
.mag-figure figcaption {
  font-size: var(--t-xs); color: var(--muted); letter-spacing: 0.02em;
  padding: var(--s3) var(--s2) var(--s1);
}

/* Article body typography --------------------------------------------------- */
.mag-shell { padding-bottom: var(--s8); }
.mag-body { max-width: 68ch; margin-inline: auto; font-size: var(--t-md); line-height: 1.72; }
.mag-body > h2 {
  font-size: clamp(1.5rem, 2.9vw, 1.95rem); line-height: 1.15;
  margin: var(--s7) 0 var(--s4); padding-top: var(--s4);
  border-top: 2px solid var(--primary-950);
}
.mag-body > h2:first-child { margin-top: 0; }
.mag-body h3 { font-size: var(--t-md); margin: var(--s6) 0 var(--s3); }
.mag-body p { margin-bottom: var(--s5); color: var(--ink); }
.mag-body ul, .mag-body ol { margin: 0 0 var(--s5); padding-left: 1.35rem; }
.mag-body li { margin-bottom: var(--s3); }
.mag-body li::marker { color: var(--accent); }
.mag-body a { color: var(--primary); font-weight: 500; }
.mag-body blockquote {
  margin: var(--s6) 0; padding: var(--s4) var(--s5);
  border-left: 3px solid var(--accent); background: var(--primary-050);
  font-family: var(--display); font-size: 1.28rem; line-height: 1.4; color: var(--primary-900);
}
.mag-body blockquote p:last-child { margin-bottom: 0; }
.mag-body table {
  width: 100%; border-collapse: collapse; margin: 0 0 var(--s6);
  font-family: var(--body); font-size: var(--t-sm); background: var(--surface);
}
.mag-body th, .mag-body td {
  border: 1px solid var(--line); padding: var(--s3); text-align: left; vertical-align: top;
}
.mag-body th { background: var(--primary-050); font-weight: 700; color: var(--primary-950); }

/* Contextual read on links inside the body */
.inline-read {
  margin: var(--s6) 0; padding: var(--s3) var(--s4);
  border: 1px dashed var(--primary-200); border-left: 3px solid var(--accent);
  border-radius: var(--r-sm); background: var(--primary-050);
  font-size: var(--t-sm); font-weight: 600; color: var(--primary-800);
}
.inline-read a { color: var(--primary); }
.inline-read a:hover { color: var(--accent-600); }

/* Call to action block ------------------------------------------------------ */
.mag-cta {
  margin: var(--s8) 0 var(--s7); padding: var(--s6);
  background:
    linear-gradient(180deg, var(--primary-050), var(--surface));
}
.mag-cta h2 { font-size: var(--t-xl); border: 0; margin: 0 0 var(--s3); padding: 0; }
.mag-cta p { font-size: var(--t-base); color: var(--ink-70); margin-bottom: var(--s4); }
.mag-cta p:last-child { margin-bottom: 0; }

/* Author box ---------------------------------------------------------------- */
.mag-author { display: flex; gap: var(--s5); padding: var(--s6); align-items: flex-start; }
.mag-author img {
  width: 96px; height: 96px; flex: none; border-radius: var(--r-sm);
  border: 1px solid var(--line); object-fit: cover;
}
.mag-author-role {
  font-family: var(--display); font-weight: 700; font-size: var(--t-xs);
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-600);
  margin: 0 0 var(--s2);
}
.mag-author h2 { font-size: var(--t-lg); border: 0; margin: 0 0 var(--s3); padding: 0; }
.mag-author p { font-size: var(--t-sm); color: var(--muted); margin-bottom: var(--s3); }
.mag-author p:last-child { margin-bottom: 0; }

/* Read also ----------------------------------------------------------------- */
.mag-related-wrap { background: var(--primary-050); }
.mag-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.mag-rel { display: flex; flex-direction: column; overflow: hidden; height: 100%; }
.mag-rel-shot { display: block; border-bottom: 1px solid var(--line); }
.mag-rel-shot img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-rel-body { padding: var(--s5); display: flex; flex-direction: column; flex: 1; }
.mag-rel-title { font-size: var(--t-base); line-height: 1.2; margin: 0 0 var(--s3); }
.mag-rel-title a { color: var(--primary-950); text-decoration: none; }
.mag-rel-title a:hover { color: var(--accent-600); text-decoration: underline; }
.mag-rel-dek { font-size: var(--t-sm); color: var(--muted); margin-bottom: var(--s4); }
.mag-rel-meta {
  margin: auto 0 0; padding-top: var(--s3); border-top: 1px dashed var(--line);
  font-size: var(--t-xs); letter-spacing: 0.04em; color: var(--muted);
}
.mag-related-more { margin: var(--s6) 0 0; }

/* Home page magazine teaser ------------------------------------------------- */
.mag-teaser-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.mag-teaser-more { margin: var(--s6) 0 0; }

/* Author page article list -------------------------------------------------- */
.mag-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.mag-list li {
  margin: 0; padding: var(--s4) 0; border-bottom: 1px dashed var(--line);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4);
  justify-content: space-between;
}
.mag-list a { font-weight: 600; }
.mag-list time { font-size: var(--t-xs); letter-spacing: 0.04em; color: var(--muted); flex: none; }

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 1080px) {
  .mag-grid, .mag-related, .mag-teaser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .mag-card.lead { grid-template-columns: 1fr; }
  .mag-card.lead .mag-card-shot { border-right: 0; border-bottom: 1px solid var(--line); }
  .mag-card.lead .mag-card-shot img { aspect-ratio: 3 / 2; min-height: 0; }
  .mag-card.lead .mag-card-body { padding: var(--s6) var(--s5); }
}
@media (max-width: 700px) {
  .mag-grid, .mag-related, .mag-teaser-grid { grid-template-columns: 1fr; }
  .mag-body { font-size: var(--t-base); }
  .mag-author { flex-direction: column; gap: var(--s4); }
  .mag-list li { justify-content: flex-start; }
}
@media (max-width: 420px) {
  .mag-crumb ol { font-size: 0.7rem; }
  .mag-byline { align-items: flex-start; }
  .mag-card-body, .mag-rel-body { padding: var(--s4); }
  .mag-cta, .mag-author { padding: var(--s5) var(--s4); }
  .mag-figure { padding: 5px; }
  .mag-body blockquote { padding: var(--s3) var(--s4); font-size: 1.14rem; }
}



/* Network strip: five sibling products, rotated so every site is linked the same
   number of times. Spans the full footer grid rather than adding a fifth column,
   because each footer declares a fixed column count and a fifth item would wrap. */
.site-network { grid-column: 1 / -1; flex-basis: 100%; width: 100%;
  margin-top: 1.6rem; padding-top: 1.2rem;
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); }
.site-network h2 { font: inherit; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; margin: 0 0 0.7rem; opacity: 0.72; }
.site-network ul { list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-network li + li { margin-top: 0; }
.site-network a { font-size: 0.86rem; text-decoration: none; opacity: 0.9;
  border-bottom: 1px solid transparent; }
.site-network a:hover, .site-network a:focus-visible { opacity: 1; border-bottom-color: currentColor; }
@media (max-width: 620px) { .site-network ul { gap: 0.45rem 1.1rem; } }


/* Decorative bleed guard. Several sections intentionally hang a rotated or offset
   pseudo element past the viewport edge. overflow-x: clip contains them without
   creating a scroll container, so position: sticky keeps working, unlike overflow
   hidden. Genuine content overflow is still reported by the element level check in
   the browser pass. */
html { overflow-x: clip; }
body { overflow-x: clip; }


/* Wide content on phones. Class names for the prose wrapper differ from site to site,
   so this targets tables and pre blocks directly: they scroll inside their own box
   rather than pushing cells past the right edge, per the build contract. */
@media (max-width: 700px) {
  table { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { overflow-wrap: anywhere; }
  pre { overflow-x: auto; max-width: 100%; }
}
