:root {
  --paper: #ffffff;
  --ink: #111827;
  --muted: #4b5563;
  --rule: #d1d5db;
  --soft: #f3f4f6;
  --soft-2: #e5e7eb;
  --blue: #1f57ff;
  --blue-soft: #e9efff;
  --green: #0f766e;
  --orange: #b45309;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

body.pin-locked {
  overflow: hidden;
  background: #05070a;
}

body.pin-locked header,
body.pin-locked main,
body.pin-locked footer {
  visibility: hidden;
}

.pin-gate {
  display: none;
}

body.pin-locked .pin-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #05070a;
  color: #fff;
}

.pin-box {
  width: min(520px, 100%);
}

.pin-box h1 {
  margin-bottom: 28px;
  color: #fff;
  font-size: 52px;
}

.pin-box label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.pin-row input,
.pin-row button {
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 0;
  font: inherit;
}

.pin-row input {
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.pin-row button {
  padding: 0 22px;
  background: #fff;
  color: #05070a;
  font-weight: 800;
}

.pin-error {
  min-height: 24px;
  color: rgba(255, 255, 255, 0.72);
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--ink);
  font-size: 18px;
  line-height: 1;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--muted);
}

.nav a:hover {
  color: var(--blue);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 28px;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 84px;
}

.intro {
  padding-top: 96px;
}

.concept-break {
  min-height: 50vh;
  display: grid;
  grid-template-columns: minmax(0, 760px) 160px;
  justify-content: center;
  align-items: center;
  gap: 64px;
  padding: 72px 28px;
  background: var(--blue);
  color: #fff;
  scroll-margin-top: 84px;
}

.lifestyle-break {
  background: #06143f;
}

.partnership-break {
  background: #05070a;
}

.concept-break h2 {
  color: #fff;
}

.concept-break p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
}

.break-kicker {
  margin: 0 0 14px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.break-icon {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  color: #fff;
  font-size: 72px;
  font-weight: 850;
  line-height: 1;
}

.full-bleed-image {
  width: 100%;
  margin: 0;
  background: #06143f;
  border-bottom: 1px solid var(--rule);
}

.full-bleed-image img {
  display: block;
  width: 100%;
  height: min(82vh, 760px);
  min-height: 520px;
  object-fit: cover;
  object-position: center;
}

.lifestyle-image img {
  object-position: left center;
}

.concept-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
  background: #05070a;
}

.concept-pair figure {
  min-width: 0;
  margin: 0;
  background: #05070a;
}

.concept-pair img {
  display: block;
  width: 100%;
  height: 72vh;
  min-height: 520px;
  object-fit: cover;
  object-position: center;
}

.concept-pair figcaption {
  padding: 10px 2px 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow,
.label {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.05;
}

h1 {
  max-width: 860px;
  font-size: 64px;
}

h2 {
  max-width: 760px;
  font-size: 42px;
}

h3 {
  font-size: 16px;
}

.lead {
  max-width: 760px;
  margin: 24px 0 0;
  font-size: 22px;
  color: var(--muted);
}

.body,
.section-head p {
  max-width: 720px;
  color: var(--muted);
}

.section-head {
  margin-bottom: 28px;
}

.verdict-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
}

.verdict-card {
  border: 1px solid var(--rule);
  padding: 22px;
  background: var(--paper);
}

.verdict-card h2 {
  font-size: 24px;
}

.verdict-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.memo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}

.memo-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.memo-card {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 20px;
  min-width: 0;
}

.memo-card h3 {
  font-size: 24px;
}

.memo-card p {
  color: var(--muted);
}

.memo-card dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.memo-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.memo-card dd {
  margin: 2px 0 0;
}

.memo-block {
  margin-top: 28px;
}

.evidence-wrap {
  margin-top: 18px;
}

.evidence-table {
  min-width: 860px;
}

.evidence-table td:nth-child(2) {
  color: var(--blue);
  font-weight: 800;
  white-space: nowrap;
}

.evidence-table td:nth-child(4) {
  color: var(--muted);
  font-size: 13px;
}

.chart-panel {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 20px;
}

.population-chart {
  display: grid;
  gap: 18px;
}

.chart-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: start;
}

.chart-city {
  display: grid;
  gap: 2px;
}

.chart-city span {
  color: var(--muted);
  font-size: 12px;
}

.bars {
  display: grid;
  gap: 6px;
}

.bar-line {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 24px;
  background: var(--soft);
}

.bar-line .bar {
  display: block;
  height: 24px;
  min-width: 2px;
}

.bar-line b {
  position: absolute;
  right: 8px;
  font-size: 12px;
  color: var(--ink);
}

.bar.pop,
.swatch.pop {
  background: var(--soft-2);
}

.bar.kids,
.swatch.kids {
  background: var(--blue);
}

.bar.addr,
.swatch.addr {
  background: var(--green);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
  border: 1px solid var(--rule);
}

.table-wrap {
  margin-top: 22px;
  overflow-x: auto;
  border: 1px solid var(--rule);
  max-width: 100%;
  min-width: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: var(--paper);
}

.data-table caption {
  padding: 12px 14px;
  text-align: left;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--soft);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.comparison th:not(:first-child),
.comparison td:not(:first-child) {
  width: 28%;
}

.two-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.compact-table {
  min-width: 520px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 36px;
}

.wide {
  grid-column: 1 / -1;
  min-width: 0;
}

.metric-stack,
.metric-grid {
  display: grid;
  gap: 12px;
}

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

.metric {
  border: 1px solid var(--rule);
  padding: 18px;
  background: var(--paper);
}

.metric p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.metric-value {
  display: block;
  color: var(--blue);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.metric-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.callout {
  margin: 0 0 24px;
  padding: 16px 18px;
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
}

.license-note {
  margin: 24px 0 0;
  padding: 16px 18px;
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
}

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

.uw-block {
  border: 1px solid var(--rule);
  background: var(--paper);
}

.uw-block > h3 {
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  font-size: 18px;
}

.uw-block > p {
  margin: 0;
  padding: 12px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
}

.uw-list {
  display: grid;
}

.uw-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(120px, 0.6fr) minmax(260px, 1.5fr);
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
}

.uw-row:last-child {
  border-bottom: 0;
}

.uw-row strong,
.uw-row span {
  display: block;
}

.uw-row span {
  color: var(--blue);
  font-weight: 800;
}

.uw-row p {
  margin: 0;
  color: var(--muted);
}

.appendix {
  background: linear-gradient(#fff, #fff) padding-box;
}

.model-story {
  margin-top: 28px;
  scroll-margin-top: 84px;
}

.story-head {
  margin-bottom: 16px;
}

.story-head h3 {
  font-size: 24px;
}

.story-head p:last-child {
  max-width: 760px;
  color: var(--muted);
}

.story-grid {
  display: grid;
  gap: 16px;
}

.story-card {
  border: 1px solid var(--rule);
  background: var(--paper);
  min-width: 0;
  overflow-x: auto;
}

.story-card h3 {
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
}

.story-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 860px;
}

.story-card th,
.story-card td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.story-card th {
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.story-card tr:last-child td {
  border-bottom: 0;
}

.map-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 18px;
}

#mapview {
  height: 620px;
  border: 1px solid var(--rule);
  background: var(--soft);
}

.map-section-primary {
  max-width: none;
  padding-left: max(28px, calc((100vw - var(--max)) / 2 + 28px));
  padding-right: max(28px, calc((100vw - var(--max)) / 2 + 28px));
}

.map-section-primary #mapview {
  height: 90vh;
  min-height: 620px;
}

.map-controls {
  border: 1px solid var(--rule);
  padding: 16px;
  align-self: start;
  background: var(--paper);
}

.map-controls h3 {
  margin-bottom: 12px;
}

.check-row,
.mode-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 14px;
}

.check-row span,
.mode-row span {
  flex: 1;
}

.count-pill {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  padding: 2px 7px;
  border: 1px solid var(--rule);
  color: var(--muted);
  background: var(--soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.check-row input,
.mode-row input {
  accent-color: var(--blue);
}

.map-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.map-source-aside {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  color: #6b7280;
  font-size: 11px;
  line-height: 1.35;
}

.map-source-aside strong {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.map-source-aside p {
  margin: 0 0 7px;
}

.map-source-aside span {
  font-weight: 800;
}

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.conclusion {
  border-top: 1px solid var(--rule);
}

.strategy-block {
  margin-top: 28px;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 22px;
  min-width: 0;
}

.wardley-map {
  position: relative;
  min-height: 560px;
  border: 1px solid var(--rule);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(31, 87, 255, 0.04) 0 25%, transparent 25% 50%, rgba(31, 87, 255, 0.04) 50% 75%, transparent 75%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.04), rgba(17, 24, 39, 0.01));
}

.wardley-map::before,
.wardley-map::after {
  content: "";
  position: absolute;
  background: var(--rule);
  pointer-events: none;
}

.wardley-map::before {
  left: 56px;
  right: 24px;
  bottom: 52px;
  height: 1px;
}

.wardley-map::after {
  left: 56px;
  top: 28px;
  bottom: 52px;
  width: 1px;
}

.wardley-y-label,
.wardley-x-label {
  position: absolute;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  z-index: 3;
}

.wardley-y-label {
  left: 14px;
  top: 28px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.wardley-x-label {
  left: 58px;
  bottom: 18px;
}

.wardley-stage {
  position: absolute;
  top: 18px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  z-index: 3;
}

.stage-a { left: 8%; }
.stage-b { left: 31%; }
.stage-c { left: 57%; }
.stage-d { left: 81%; }

.wardley-lines {
  position: absolute;
  inset: 28px 24px 52px 56px;
  width: calc(100% - 80px);
  height: calc(100% - 80px);
  z-index: 1;
}

.wardley-lines line {
  stroke: #94a3b8;
  stroke-width: 0.35;
  vector-effect: non-scaling-stroke;
}

.wardley-node {
  position: absolute;
  z-index: 2;
  max-width: 142px;
  transform: translate(-50%, -50%);
  padding: 7px 9px;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.wardley-node.need {
  border-color: var(--blue);
}

.wardley-node.custom {
  background: #f8fafc;
}

.wardley-node.product {
  background: #eef2ff;
}

.wardley-node.industrial {
  background: #ecfdf5;
}

.wardley-read {
  margin: 14px 0 0;
  color: var(--muted);
}

.mermaid {
  margin: 0;
  overflow: visible;
  background: #fff;
}

.diagram-tools {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 8px;
}

.diagram-tools button {
  min-width: 38px;
  height: 32px;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.diagram-tools button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.diagram-viewport {
  overflow: auto;
  border: 1px solid var(--rule);
  background: #fff;
  padding: 16px;
  max-height: 620px;
}

.diagram-viewport svg {
  display: block;
  max-width: none;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.case-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--rule);
  padding: 16px;
  background: #fff;
}

.case-card:hover {
  border-color: var(--blue);
}

.case-card span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.case-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .topbar,
  .verdict-grid,
  .memo-grid,
  .memo-grid.compact,
  .concept-break,
  .split,
  .two-tables,
  .story-grid,
  .map-layout,
  .uw-row,
  .case-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    display: grid;
  }

  .chart-row {
    grid-template-columns: 1fr;
  }

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

  #mapview {
    height: 520px;
  }

  .map-section-primary #mapview {
    min-height: 520px;
    height: 72vh;
  }

  .full-bleed-image img {
    height: 58vh;
    min-height: 360px;
  }

  .concept-pair {
    grid-template-columns: 1fr;
  }

  .concept-pair img {
    height: 58vh;
    min-height: 360px;
  }

  .break-icon {
    width: 96px;
    height: 96px;
    font-size: 52px;
  }

  .wardley-map {
    min-height: 720px;
  }

  .wardley-node {
    max-width: 112px;
    font-size: 10px;
    padding: 6px 7px;
  }

  .stage-a { left: 7%; }
  .stage-b { left: 29%; }
  .stage-c { left: 54%; }
  .stage-d { left: 76%; }

  .diagram-viewport {
    max-height: 520px;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 32px;
  }
}

@media print {
  .topbar,
  #mapview,
  .map-controls {
    display: none;
  }

  .section {
    padding: 32px 0;
  }

  .table-wrap {
    overflow: visible;
  }
}
