:root {
  --navy: #071827;
  --navy-2: #0c2238;
  --ink: #1b242c;
  --cream: #efeae0;
  --bone: #f5f1e8;
  --mid-blue: #4e89ab;
  --yellow: #ffd400;
  --line: rgba(7, 24, 39, 0.1);
  --line-light: rgba(239, 234, 224, 0.13);
  --grid-unit: 44px;
  --grid-half: 22px;
  --page-pad: clamp(22px, 5vw, 88px);
  --section-pad: clamp(82px, 8.5vw, 124px);
  --max: 1232px;
  --ease: cubic-bezier(0.62, 0, 0.18, 1);
  --font-head: "Geist", Inter, Arial, sans-serif;
  --font-body: "Inter", Arial, sans-serif;
  --muted-on-dark: rgba(239, 234, 224, 0.76);
  --muted-on-dark-strong: rgba(239, 234, 224, 0.84);
  --muted-on-light: rgba(12, 34, 56, 0.74);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--font-body);
}
body.is-locked {
  overflow: hidden;
}
body.is-locked .guide-shell,
body.is-locked .cookie-bar {
  filter: blur(10px);
  pointer-events: none;
  user-select: none;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 5px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: 0; }
h1 { font-size: clamp(3.2rem, 7vw, 6.8rem); line-height: 0.94; font-weight: 800; }
h2 { font-size: clamp(2.35rem, 5vw, 5rem); line-height: 0.98; font-weight: 800; }
h3 { font-size: clamp(1.12rem, 1.55vw, 1.45rem); line-height: 1.14; }
code { font-family: "SFMono-Regular", Consolas, monospace; }

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.guide-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  min-height: 100vh;
}

.guide-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100vh;
  padding: var(--grid-half);
  border-right: 1px solid rgba(7, 24, 39, 0.1);
  background: rgba(239, 234, 224, 0.96);
  color: var(--ink);
  backdrop-filter: blur(14px);
  overflow-y: auto;
}

.guide-brand img { width: min(236px, 100%); }
.guide-kicker {
  margin-top: 18px;
  color: rgba(27, 36, 44, 0.62);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.guide-nav {
  display: grid;
  gap: 2px;
  margin-top: var(--grid-half);
}
.guide-nav a {
  position: relative;
  padding: 11px 12px 11px 18px;
  color: rgba(27, 36, 44, 0.72);
  font-size: 0.88rem;
  font-weight: 800;
}
.guide-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 4px;
  height: 18px;
  background: var(--yellow);
  opacity: 0;
}
.guide-nav a:hover,
.guide-nav a.is-active { color: var(--navy); background: rgba(7, 24, 39, 0.045); }
.guide-nav a.is-active::before { opacity: 1; }

.guide-hero {
  position: relative;
  min-height: 94vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(66px, 6vw, 88px) var(--page-pad);
  background:
    radial-gradient(circle at 70% 38%, rgba(78, 137, 171, 0.34), transparent 32%),
    radial-gradient(circle at 22% 20%, rgba(78, 137, 171, 0.22), transparent 36%),
    linear-gradient(135deg, #123a5a 0%, #1f648e 48%, var(--navy-2) 100%);
}
.guide-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(7, 24, 39, 0.62), rgba(12, 34, 56, 0.18), transparent);
  pointer-events: none;
}
.guide-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(90deg, transparent, rgba(255, 212, 0, 0.18), transparent);
  opacity: 0;
  transform: translateX(-100%);
  animation: heroScan 9400ms var(--ease) infinite;
}
.hero-copy {
  position: relative;
  z-index: 5;
  width: min(760px, 58vw);
}
.hero-copy > p:not(.eyebrow) {
  max-width: 620px;
  margin-top: 26px;
  color: var(--muted-on-dark);
  font-size: clamp(1rem, 1.2vw, 1.16rem);
  line-height: 1.65;
}
.hero-system {
  position: absolute;
  z-index: 1;
  right: clamp(-40px, 4vw, 86px);
  top: 50%;
  width: min(62vw, 820px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  opacity: 0.9;
}
#motionSystem { width: 100%; height: 100%; display: block; }
.system-guides { stroke: rgba(169, 190, 205, 0.16); stroke-width: 1.2; fill: none; }
.guide-blue { stroke: rgba(104, 141, 166, 0.23); }
.focus-echo { fill: none; stroke: rgba(255, 212, 0, 0.38); vector-effect: non-scaling-stroke; }
.cornerstone { fill: var(--yellow); filter: url("#yellowDepth"); shape-rendering: crispEdges; }
.cornerstone-shadow { fill: rgba(255, 212, 0, 0.09); shape-rendering: crispEdges; }

.guide-section {
  padding: var(--section-pad) var(--page-pad);
}
.guide-section > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}
.is-dark {
  background:
    radial-gradient(circle at 82% 16%, rgba(78, 137, 171, 0.22), transparent 32%),
    radial-gradient(circle at 16% 78%, rgba(255, 212, 0, 0.045), transparent 28%),
    linear-gradient(135deg, var(--navy-2), var(--navy));
  color: var(--cream);
}
.is-light {
  background:
    linear-gradient(rgba(7, 24, 39, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 24, 39, 0.055) 1px, transparent 1px),
    var(--cream);
  background-size: var(--grid-unit) var(--grid-unit);
  color: var(--navy-2);
}
.section-heading {
  display: grid;
  gap: 16px;
  margin-bottom: calc(var(--grid-unit) * 0.85);
}
.section-heading > p:not(.eyebrow) {
  max-width: 720px;
  color: currentColor;
  opacity: 0.74;
  font-size: clamp(0.98rem, 1.08vw, 1.12rem);
  line-height: 1.62;
}
.eyebrow {
  color: var(--yellow);
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.is-light .eyebrow { color: rgba(12, 34, 56, 0.64); }

.principle-grid,
.swatch-grid,
.template-grid,
.snippet-grid,
.copy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--grid-half);
}
.principle-grid article,
.template-grid article,
.snippet-grid article {
  position: relative;
  min-height: 220px;
  padding: 32px;
  border: 1px solid rgba(78, 137, 171, 0.22);
  background: linear-gradient(90deg, rgba(78, 137, 171, 0.1), rgba(12, 34, 56, 0.2)), rgba(12, 34, 56, 0.24);
  overflow: hidden;
}
.principle-grid article::before,
.template-grid article::before {
  content: "";
  position: absolute;
  left: 32px;
  top: 0;
  width: 32px;
  height: 3px;
  background: var(--yellow);
  opacity: 0.7;
}
.principle-grid p,
.template-grid strong {
  display: block;
  margin-top: 16px;
  color: var(--muted-on-dark);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.58;
}

.logo-system-grid,
.logo-grid,
.usage-grid,
.do-dont-grid,
.cornerstone-examples,
.button-row,
.map-example {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-half);
}
.logo-system-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: var(--grid-half);
}
.logo-family-card,
.usage-grid article {
  position: relative;
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 230px;
  padding: 28px;
  border: 1px solid rgba(7, 24, 39, 0.1);
  background: rgba(245, 241, 232, 0.68);
}
.logo-family-card::before,
.usage-grid article::before {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 30px;
  aspect-ratio: 1;
  border-top: 5px solid rgba(255, 212, 0, 0.8);
  border-right: 5px solid rgba(255, 212, 0, 0.8);
}
.logo-family-card span {
  color: rgba(12, 34, 56, 0.58);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.logo-family-card img {
  width: 100%;
  max-height: 86px;
  object-fit: contain;
  object-position: left center;
}
.logo-family-card p,
.usage-grid p {
  color: var(--muted-on-light);
  font-size: 0.92rem;
  line-height: 1.55;
}
.logo-tile {
  min-height: 240px;
  display: grid;
  place-items: center;
  padding: var(--grid-unit);
  border: 1px solid rgba(7, 24, 39, 0.1);
}
.light-tile { background: rgba(245, 241, 232, 0.78); }
.dark-tile { background: var(--navy); }
.logo-plate {
  width: min(100%, 420px);
  padding: 28px;
  background: var(--cream);
}
.usage-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: var(--grid-half);
}
.do-dont-grid { margin-top: var(--grid-half); }
.do-card,
.dont-card {
  padding: 28px;
  border: 1px solid rgba(7, 24, 39, 0.12);
  background: rgba(245, 241, 232, 0.64);
}
.is-dark .do-card,
.is-dark .dont-card {
  border-color: rgba(78, 137, 171, 0.22);
  background: rgba(12, 34, 56, 0.34);
}
.do-card span,
.dont-card span {
  display: block;
  color: var(--yellow);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
}
.is-light .do-card span,
.is-light .dont-card span { color: var(--navy); }
.do-card p,
.dont-card p {
  margin-top: 12px;
  color: currentColor;
  opacity: 0.76;
  line-height: 1.55;
}

.swatch {
  min-height: 186px;
  display: grid;
  align-content: end;
  gap: 6px;
  padding: 22px;
  border: 1px solid rgba(239, 234, 224, 0.14);
  background: var(--swatch);
  color: var(--cream);
  text-align: left;
  cursor: pointer;
}
.swatch.is-pale,
.swatch.is-yellow { color: var(--navy); }
.swatch span { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.swatch strong { font-family: var(--font-head); font-size: 1.35rem; }
.swatch.is-copied { outline: 2px solid var(--yellow); outline-offset: 5px; }

.type-specimen {
  display: grid;
  gap: var(--grid-half);
}
.type-specimen > div {
  padding: 32px;
  border: 1px solid rgba(7, 24, 39, 0.1);
  background: rgba(245, 241, 232, 0.68);
}
.type-specimen span {
  display: block;
  margin-bottom: 14px;
  color: rgba(12, 34, 56, 0.58);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.type-specimen h3 {
  color: var(--navy);
  font-size: clamp(2.2rem, 5vw, 5.2rem);
  line-height: 0.98;
}
.type-specimen p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted-on-light);
  font-size: clamp(1rem, 1.2vw, 1.16rem);
  line-height: 1.65;
}

.grid-board {
  min-height: 360px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-half);
  padding: var(--grid-half);
  border: 1px solid rgba(7, 24, 39, 0.12);
  background:
    linear-gradient(rgba(7, 24, 39, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 24, 39, 0.08) 1px, transparent 1px);
  background-size: var(--grid-unit) var(--grid-unit);
}
.grid-board span {
  display: grid;
  place-items: center;
  border: 1px solid rgba(7, 24, 39, 0.16);
  background: rgba(245, 241, 232, 0.72);
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
}
.responsive-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--grid-half);
}
.responsive-tabs button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(7, 24, 39, 0.14);
  background: rgba(245, 241, 232, 0.72);
  color: var(--navy);
  font-weight: 800;
  cursor: pointer;
}
.responsive-tabs button.is-active { background: var(--yellow); }
.responsive-panel {
  margin-top: 12px;
  padding: 22px;
  border-left: 3px solid var(--yellow);
  background: rgba(245, 241, 232, 0.72);
}
.responsive-panel p {
  margin-top: 8px;
  color: var(--muted-on-light);
  line-height: 1.55;
}

.corner-frame {
  position: relative;
  min-height: 420px;
  display: grid;
  align-content: center;
  padding: calc(var(--grid-unit) * 2);
  border: 1px solid rgba(239, 234, 224, 0.12);
  background: rgba(7, 24, 39, 0.12);
}
.corner-frame span {
  position: absolute;
  width: var(--grid-unit);
  height: var(--grid-unit);
  background: var(--yellow);
  box-shadow: var(--grid-unit) 0 0 var(--yellow), 0 var(--grid-unit) 0 var(--yellow);
}
.corner-frame span:first-child { left: 0; top: 0; }
.corner-frame span:nth-child(2) {
  right: 0;
  bottom: 0;
  box-shadow: calc(var(--grid-unit) * -1) 0 0 var(--yellow), 0 calc(var(--grid-unit) * -1) 0 var(--yellow);
}
.corner-frame h3 { max-width: 16ch; font-size: clamp(2rem, 4vw, 4.2rem); }
.corner-mini-grid {
  position: relative;
  min-height: 420px;
  border: 1px solid rgba(239, 234, 224, 0.12);
  background:
    linear-gradient(rgba(239, 234, 224, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 234, 224, 0.045) 1px, transparent 1px),
    rgba(12, 34, 56, 0.42);
  background-size: var(--grid-unit) var(--grid-unit);
}
.corner-mark {
  position: absolute;
  width: 72px;
  aspect-ratio: 1;
  border-color: var(--yellow);
  border-style: solid;
}
.corner-mark.tl { left: 44px; top: 44px; border-width: 8px 0 0 8px; }
.corner-mark.br { right: 44px; bottom: 44px; border-width: 0 8px 8px 0; }
.thin-focus-line {
  position: absolute;
  left: 44px;
  right: 44px;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 212, 0, 0.72), transparent);
}

.button-row {
  align-items: center;
  justify-items: start;
}
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 66px;
  padding: 0 42px;
  overflow: hidden;
  border: 1px solid rgba(255, 212, 0, 0.34);
  background: linear-gradient(90deg, rgba(255, 212, 0, 0.28), rgba(255, 212, 0, 0.08)), rgba(12, 34, 56, 0.78);
  color: var(--cream);
  font-weight: 800;
  isolation: isolate;
  cursor: pointer;
  transition: border-color 0.26s ease-out, background 0.26s ease-out, color 0.26s ease-out, transform 0.26s ease-out;
}
.button::before,
.button::after {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.72;
  transition: opacity 0.26s ease-out, transform 0.26s ease-out;
}
.button::before {
  background:
    linear-gradient(var(--yellow), var(--yellow)) left top / 30px 5px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) left top / 5px 30px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) right bottom / 30px 5px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) right bottom / 5px 30px no-repeat;
}
.button::after {
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 212, 0, 0.26), transparent);
  opacity: 0;
  transform: translateX(-110%);
}
.button:hover,
.button:focus-visible {
  border-color: rgba(255, 212, 0, 0.92);
  transform: translateY(-4px);
}
.button:hover::after,
.button:focus-visible::after { animation: buttonSweep 720ms var(--ease) 1; }
.button.primary {
  min-width: 218px;
  border-color: rgba(255, 212, 0, 0.96);
  background: linear-gradient(135deg, #ffe15a, var(--yellow) 48%, #e7b900);
  color: var(--navy-2);
  box-shadow: 0 22px 46px rgba(0, 7, 13, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}
.button.corner-cta {
  overflow: visible;
}
.button.corner-cta::after {
  display: none;
}
.button.primary::before {
  background:
    linear-gradient(var(--navy-2), var(--navy-2)) left top / 30px 5px no-repeat,
    linear-gradient(var(--navy-2), var(--navy-2)) left top / 5px 30px no-repeat,
    linear-gradient(var(--navy-2), var(--navy-2)) right bottom / 30px 5px no-repeat,
    linear-gradient(var(--navy-2), var(--navy-2)) right bottom / 5px 30px no-repeat;
}
.button-corner {
  position: absolute;
  right: -20px;
  top: -20px;
  width: 42px;
  aspect-ratio: 1;
  background:
    linear-gradient(var(--yellow), var(--yellow)) right top / 100% 9px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) right top / 9px 100% no-repeat;
  pointer-events: none;
  transition: transform 0.26s var(--ease);
}
.button.corner-cta:hover .button-corner { transform: translate(5px, -5px); }
.button-anatomy {
  position: relative;
  min-height: 176px;
  margin-top: var(--grid-half);
  padding: 34px;
  border: 1px solid rgba(78, 137, 171, 0.22);
  background: rgba(12, 34, 56, 0.34);
}
.button-anatomy-corner {
  position: absolute;
  right: -20px;
  top: -20px;
  width: 42px;
  aspect-ratio: 1;
  background:
    linear-gradient(var(--yellow), var(--yellow)) right top / 100% 9px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) right top / 9px 100% no-repeat;
  filter: drop-shadow(0 10px 16px rgba(255, 212, 0, 0.16));
}
.button-anatomy p {
  max-width: 560px;
  margin-top: 12px;
  color: var(--muted-on-dark);
  line-height: 1.55;
}
.text-link { color: var(--yellow); font-weight: 800; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.figure-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-half);
  padding: var(--grid-half);
  border: 1px solid rgba(239, 234, 224, 0.14);
  background: rgba(7, 24, 39, 0.1);
  box-shadow: 0 28px 82px rgba(7, 24, 39, 0.18);
}
.figure-card {
  position: relative;
  min-height: calc(var(--grid-unit) * 7);
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 34px var(--grid-half);
  background: radial-gradient(circle at 86% 12%, rgba(78, 137, 171, 0.28), transparent 30%), linear-gradient(135deg, rgba(26, 82, 124, 0.92), rgba(15, 58, 92, 0.91));
  border: 1px solid rgba(239, 234, 224, 0.12);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.34s var(--ease), border-color 0.34s var(--ease), box-shadow 0.34s var(--ease);
}
.figure-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 212, 0, 0.09), transparent);
  opacity: 0;
  transform: translateX(-100%);
}
.figure-card::after {
  content: "";
  position: absolute;
  right: var(--grid-half);
  top: var(--grid-half);
  width: var(--grid-unit);
  aspect-ratio: 1;
  background: rgba(255, 212, 0, 0.34);
  box-shadow: var(--grid-unit) 0 0 rgba(255, 212, 0, 0.34), 0 var(--grid-unit) 0 rgba(255, 212, 0, 0.34);
  opacity: 0.28;
  transition: opacity 0.34s var(--ease), transform 0.34s var(--ease), background 0.34s var(--ease), box-shadow 0.34s var(--ease);
}
.figure-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 212, 0, 0.38);
  box-shadow: 0 24px 54px rgba(7, 24, 39, 0.22), 0 0 0 1px rgba(255, 212, 0, 0.08) inset;
}
.figure-card:hover::before { opacity: 1; animation: cardHoverSignal 980ms var(--ease) both; }
.figure-card:hover::after {
  opacity: 0.66;
  background: var(--yellow);
  box-shadow: var(--grid-unit) 0 0 var(--yellow), 0 var(--grid-unit) 0 var(--yellow);
  transform: translate(calc(var(--grid-half) * 0.5), calc(var(--grid-half) * -0.5));
}
.figure-card strong { color: var(--yellow); font-family: var(--font-head); font-size: clamp(2.5rem, 4.4vw, 4.6rem); line-height: 0.94; font-weight: 800; }
.figure-card small { font-size: 0.32em; text-transform: uppercase; }
.figure-card p { color: var(--muted-on-dark); font-size: 0.92rem; line-height: 1.5; }

.motion-toggle { margin-bottom: var(--grid-half); }
.motion-board {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(78, 137, 171, 0.22);
  background:
    linear-gradient(rgba(239, 234, 224, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 234, 224, 0.045) 1px, transparent 1px),
    rgba(12, 34, 56, 0.36);
  background-size: var(--grid-unit) var(--grid-unit);
}
.motion-line {
  position: absolute;
  left: 0;
  top: 50%;
  width: 35%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--yellow));
  animation: motionLine 3600ms var(--ease) infinite;
}
.motion-corner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  aspect-ratio: 1;
  border-top: 8px solid var(--yellow);
  border-left: 8px solid var(--yellow);
  transform: translate(-50%, -50%);
  animation: motionCorner 3600ms var(--ease) infinite;
}
.motion-card {
  position: absolute;
  right: 44px;
  bottom: 44px;
  width: 132px;
  height: 88px;
  border: 1px solid rgba(255, 212, 0, 0.24);
  background: rgba(78, 137, 171, 0.18);
  animation: revealLift 3600ms var(--ease) infinite;
}
body.is-motion-paused *,
body.is-motion-paused *::before,
body.is-motion-paused *::after { animation-play-state: paused !important; }

.template-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.template-grid span {
  color: var(--yellow);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.is-light .template-grid article {
  border-color: rgba(7, 24, 39, 0.1);
  background: rgba(245, 241, 232, 0.7);
}
.is-light .template-grid span { color: var(--navy); }
.is-light .template-grid strong { color: var(--muted-on-light); }

.map-panel {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(239, 234, 224, 0.34);
  background: #f1eee7;
  box-shadow: 0 28px 84px rgba(7, 24, 39, 0.22);
}
.map-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.72) contrast(0.92);
}
.map-focus-device {
  position: absolute;
  left: 43.6%;
  top: 56.8%;
  z-index: 1;
  width: clamp(68px, 6.5vw, 88px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 14px 22px rgba(255, 212, 0, 0.28));
  pointer-events: none;
  animation: mapFocusBreathe 2.8s var(--ease) infinite;
}
.map-focus-device::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 3px solid rgba(255, 212, 0, 0.68);
  opacity: 0;
  transform: scale(0.72);
  animation: mapFocusPulse 2.8s var(--ease) infinite;
}
.map-focus-device::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  aspect-ratio: 1;
  background: var(--yellow);
  transform: translate(-50%, -50%);
  animation: mapFocusDot 2.8s var(--ease) infinite;
}
.map-focus-device span {
  position: absolute;
  width: 28px;
  aspect-ratio: 1;
  border-color: var(--yellow);
  border-style: solid;
  animation: mapFocusCorners 2.8s var(--ease) infinite;
}
.map-focus-device span:nth-child(1) { left: 0; top: 0; border-width: 8px 0 0 8px; }
.map-focus-device span:nth-child(2) { right: 0; top: 0; border-width: 8px 8px 0 0; }
.map-focus-device span:nth-child(3) { right: 0; bottom: 0; border-width: 0 8px 8px 0; }
.map-focus-device span:nth-child(4) { left: 0; bottom: 0; border-width: 0 0 8px 8px; }
.map-details {
  padding: var(--grid-half);
  border: 1px solid rgba(255, 212, 0, 0.16);
  background: rgba(239, 234, 224, 0.08);
}
.map-details span {
  display: block;
  margin-bottom: 8px;
  color: var(--yellow);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.map-details strong { display: block; color: var(--cream); font-family: var(--font-head); font-size: 1.3rem; }
.map-details p,
.map-details a { display: block; margin-top: 6px; color: var(--muted-on-dark); font-size: 0.94rem; line-height: 1.4; }

.copy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.snippet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}
.snippet-grid pre,
.token-block {
  padding: 22px;
  border: 1px solid rgba(78, 137, 171, 0.22);
  background: rgba(7, 24, 39, 0.34);
  color: rgba(239, 234, 224, 0.86);
  font-size: 0.86rem;
  line-height: 1.6;
}
.is-light .token-block {
  border-color: rgba(7, 24, 39, 0.12);
  background: rgba(7, 24, 39, 0.88);
  color: var(--cream);
}
.snippet-grid h3 { margin-bottom: 16px; color: var(--yellow); }

.cookie-bar {
  position: fixed;
  left: var(--grid-half);
  right: var(--grid-half);
  bottom: var(--grid-half);
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--grid-half);
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 24px;
  border: 1px solid rgba(78, 137, 171, 0.24);
  background: rgba(7, 24, 39, 0.96);
  color: rgba(239, 234, 224, 0.82);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.34);
}
.cookie-bar::before,
.cookie-bar::after {
  content: "";
  position: absolute;
  width: 18px;
  aspect-ratio: 1;
  opacity: 0.2;
}
.cookie-bar::before {
  left: 10px;
  top: 10px;
  background: linear-gradient(var(--yellow), var(--yellow)) left top / 100% 4px no-repeat, linear-gradient(var(--yellow), var(--yellow)) left top / 4px 100% no-repeat;
}
.cookie-bar::after {
  right: 10px;
  bottom: 10px;
  background: linear-gradient(var(--yellow), var(--yellow)) right bottom / 100% 4px no-repeat, linear-gradient(var(--yellow), var(--yellow)) right bottom / 4px 100% no-repeat;
}
.cookie-bar.is-visible { display: flex; }
.cookie-bar p { flex: 1 1 auto; font-size: 0.9rem; line-height: 1.35; }
.cookie-more { color: rgba(255, 212, 0, 0.86); font-size: 0.86rem; font-weight: 800; white-space: nowrap; }
.cookie-bar .button { flex: 0 0 auto; min-width: 176px; min-height: 54px; padding: 0 34px; }

.password-lock {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: var(--page-pad);
  background:
    radial-gradient(circle at 72% 22%, rgba(78, 137, 171, 0.26), transparent 32%),
    radial-gradient(circle at 18% 78%, rgba(255, 212, 0, 0.055), transparent 26%),
    rgba(7, 24, 39, 0.92);
  backdrop-filter: blur(12px);
}
body:not(.is-locked) .password-lock {
  display: none;
}
.password-card {
  position: relative;
  width: min(100%, 620px);
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid rgba(255, 212, 0, 0.28);
  background:
    linear-gradient(135deg, rgba(12, 34, 56, 0.98), rgba(7, 24, 39, 0.98));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.38);
}
.password-card::before,
.password-card::after {
  content: "";
  position: absolute;
  width: 42px;
  aspect-ratio: 1;
  pointer-events: none;
}
.password-card::before {
  right: -20px;
  top: -20px;
  background:
    linear-gradient(var(--yellow), var(--yellow)) right top / 100% 9px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) right top / 9px 100% no-repeat;
}
.password-card::after {
  left: 18px;
  bottom: 18px;
  opacity: 0.18;
  background:
    linear-gradient(var(--yellow), var(--yellow)) left bottom / 100% 7px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) left bottom / 7px 100% no-repeat;
}
.password-card h2 {
  margin-top: 14px;
  color: var(--cream);
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}
.password-card p:not(.eyebrow):not(.password-error) {
  max-width: 430px;
  margin-top: 18px;
  color: var(--muted-on-dark);
  line-height: 1.6;
}
.password-card label {
  display: block;
  margin-top: var(--grid-half);
  color: rgba(239, 234, 224, 0.74);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
}
.password-field input {
  width: 100%;
  min-height: 66px;
  padding: 0 18px;
  border: 1px solid rgba(239, 234, 224, 0.18);
  background: rgba(7, 24, 39, 0.38);
  color: var(--cream);
  font: 700 1rem var(--font-body);
}
.password-field input:focus {
  border-color: rgba(255, 212, 0, 0.72);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(255, 212, 0, 0.16);
}
.password-error {
  min-height: 1.4em;
  margin-top: 12px;
  color: var(--yellow);
  font-size: 0.9rem;
  font-weight: 800;
}

@keyframes heroScan {
  0%, 62% { opacity: 0; transform: translateX(-100%); }
  72% { opacity: 0.24; }
  100% { opacity: 0; transform: translateX(100%); }
}
@keyframes buttonSweep {
  0% { opacity: 0; transform: translateX(-110%); }
  34% { opacity: 1; }
  100% { opacity: 0; transform: translateX(110%); }
}
@keyframes cardHoverSignal {
  0% { opacity: 0; transform: translateX(-110%); }
  42% { opacity: 1; }
  100% { opacity: 0; transform: translateX(110%); }
}
@keyframes revealLift {
  0% { opacity: 0; transform: translateY(22px) scale(0.985); }
  58% { opacity: 1; transform: translateY(-4px) scale(1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes motionLine {
  0% { opacity: 0; transform: translateX(-100%); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateX(320%); }
}
@keyframes motionCorner {
  0%, 20% { opacity: 0.32; transform: translate(-50%, -50%) scale(0.82); }
  48% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0.38; transform: translate(-50%, -50%) scale(0.94); }
}
@keyframes mapFocusBreathe {
  0%, 100% { filter: drop-shadow(0 14px 22px rgba(255, 212, 0, 0.26)); }
  44% { filter: drop-shadow(0 20px 34px rgba(255, 212, 0, 0.48)); }
}
@keyframes mapFocusPulse {
  0% { opacity: 0; transform: scale(0.68); }
  18% { opacity: 0.72; }
  72%, 100% { opacity: 0; transform: scale(1.52); }
}
@keyframes mapFocusDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 212, 0, 0.62); }
  44% { box-shadow: 0 0 0 14px rgba(255, 212, 0, 0); }
}
@keyframes mapFocusCorners {
  0%, 100% { opacity: 0.94; transform: scale(1); }
  44% { opacity: 1; transform: scale(1.1); }
}

@media (max-width: 1180px) {
  .guide-shell { grid-template-columns: 1fr; }
  .guide-sidebar {
    height: auto;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px 24px;
    padding: 18px var(--page-pad);
    border-right: 0;
    border-bottom: 1px solid rgba(7, 24, 39, 0.1);
  }
  .guide-brand img { width: min(220px, 50vw); }
  .guide-kicker { margin-top: 0; }
  .guide-nav {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .guide-nav a { flex: 0 0 auto; }
  .hero-copy { width: min(100%, 760px); }
  .hero-system { opacity: 0.44; width: min(118vw, 900px); left: 50%; right: auto; transform: translate(-50%, -50%); }
  .principle-grid,
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .guide-section { padding-block: clamp(58px, 10vw, 86px); }
  .swatch-grid,
  .figure-grid,
  .copy-grid,
  .snippet-grid,
  .logo-system-grid,
  .logo-grid,
  .usage-grid,
  .do-dont-grid,
  .cornerstone-examples,
  .button-row,
  .map-example { grid-template-columns: 1fr; }
  .grid-board { grid-template-columns: 1fr; }
  .corner-frame,
  .corner-mini-grid,
  .map-panel { min-height: 300px; }
  .cookie-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .password-field {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  h1 { font-size: clamp(3rem, 14vw, 4.8rem); }
  h2 { font-size: clamp(2.35rem, 11vw, 4rem); }
  .guide-sidebar { padding-block: 16px; }
  .principle-grid,
  .template-grid { grid-template-columns: 1fr; }
  .corner-frame { padding: calc(var(--grid-unit) * 1.35); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
