/* BoroughBrief London — British Architectural Editorial System (The Modern House / Stripe Press) */
:root {
  --ivory: #f6f4ef;
  --paper: #edeae2;
  --sheet: #fbfaf7;
  --ink: #141311;
  --muted: #5a574f;
  --subtle: #78746a;
  --line: rgba(20, 19, 17, 0.14);
  --line-strong: rgba(20, 19, 17, 0.30);

  --forest: #1f3a2e;
  --forest-ink: #f6f4ef;
  --brass: #9a7b2c;
  --brass-bright: #c9a84c;

  --inv-bg: #141311;
  --inv-surface: #1d1c19;
  --inv-ink: #f6f4ef;
  --inv-muted: #a6a298;
  --inv-line: rgba(246, 244, 239, 0.16);

  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Geist", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1280px;
  --gut: clamp(20px, 4.8vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--ivory);
  padding: 10px 14px; font-size: 14px; z-index: 100;
}
.skip-link:focus { left: 16px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
.serif { font-family: var(--font-serif); font-weight: 400; }

/* Founding Beta Edition Strip */
.beta-ribbon {
  background: var(--forest);
  color: var(--forest-ink);
  font-size: 12.5px;
  border-bottom: 1px solid rgba(246, 244, 239, 0.12);
}
.beta-ribbon__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 8px var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.beta-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brass-bright);
  display: inline-block; margin-right: 8px; vertical-align: middle;
}
.beta-ribbon a {
  color: var(--brass-bright); text-decoration: none; font-weight: 500;
  border-bottom: 1px solid rgba(201, 168, 76, 0.45);
}
.beta-ribbon a:hover { border-bottom-color: var(--brass-bright); }

/* Editorial Masthead Navigation */
header.masthead {
  position: sticky; top: 0; z-index: 30;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}
.masthead__inner {
  height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wordmark {
  display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none;
}
.wordmark__name {
  font-family: var(--font-serif); font-size: 27px; letter-spacing: -0.01em; line-height: 1;
}
.wordmark__edition {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.04em;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) {
  text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--ink);
  position: relative; padding: 4px 0;
}
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn)[aria-current="page"]::after { transform: scaleX(1); }

/* Architectural Buttons — crisp 2px corners, no SaaS pillows */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 2px;
  font-family: var(--font-sans); font-size: 14.5px; font-weight: 500;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.99); }
.btn--ink { background: var(--ink); color: var(--ivory); }
.btn--ink:hover { background: var(--forest); }
.btn--line { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--line:hover { border-color: var(--ink); background: rgba(20, 19, 17, 0.04); }
.btn--brass { background: var(--brass-bright); color: var(--ink); font-weight: 600; }
.btn--brass:hover { background: #d6b85e; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.ed-link {
  color: var(--ink); font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--line-strong); padding-bottom: 1px;
}
.ed-link:hover { border-bottom-color: var(--ink); }

/* Entrance animation */
[data-enter] { animation: edFade 0.65s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes edFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  [data-enter] { animation: none; }
  .btn:hover, .photo-frame img { transform: none !important; }
}

/* Monumental Editorial Hero */
.hero-editorial { padding: 54px 0 0; border-bottom: 1px solid var(--line); }
.hero-top {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 40px; align-items: end; padding-bottom: 40px;
}
.kicker {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  letter-spacing: 0.03em; margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 24px; height: 1px; background: var(--brass); display: inline-block; }

h1.display-serif {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(48px, 6.3vw, 88px);
  line-height: 0.96; letter-spacing: -0.025em; margin: 0;
}
h1.display-serif em { font-style: italic; color: var(--forest); }

.hero-aside p {
  margin: 0 0 22px; font-size: 16.5px; color: var(--muted); line-height: 1.55;
}

.photo-frame {
  position: relative; overflow: hidden; background: var(--paper);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.hero-photo { width: 100%; height: auto; max-height: 480px; aspect-ratio: 21 / 9; object-fit: cover; object-position: center 58%; transition: transform 0.6s ease; }
.photo-frame:hover .hero-photo { transform: scale(1.015); }

/* Architectural Telemetry Rule directly below Hero Photo */
.ledger-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--sheet);
}
.ledger-cell {
  padding: 22px 24px; border-right: 1px solid var(--line);
}
.ledger-cell:last-child { border-right: none; }
.ledger-cell__num {
  display: block; font-family: var(--font-serif); font-size: clamp(32px, 3vw, 42px);
  line-height: 1; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 4px;
}
.ledger-cell__label {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}

/* Sections */
section.ed-sec { padding: 96px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 84px; }
section[id], [id="sample"] { scroll-margin-top: 90px; }
section.ed-sec.paper { background: var(--paper); }
section.ed-sec.dark {
  background: var(--inv-bg); color: var(--inv-ink); border-bottom-color: var(--inv-line);
}

.sec-header {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 36px; align-items: end; margin-bottom: 52px;
  padding-bottom: 24px; border-bottom: 1px solid var(--line);
}
section.ed-sec.dark .sec-header { border-bottom-color: var(--inv-line); }
h2.sec-serif {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(34px, 4.2vw, 56px); line-height: 1.02; letter-spacing: -0.02em; margin: 0;
}
h2.sec-serif em { font-style: italic; color: var(--forest); }
section.ed-sec.dark h2.sec-serif em { color: var(--brass-bright); }
.sec-intro { margin: 0; font-size: 16.5px; color: var(--muted); max-width: 48ch; }
section.ed-sec.dark .sec-intro { color: var(--inv-muted); }

/* Interactive 33-Borough Greater London Map */
.map-filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.pack-pill {
  background: transparent; border: 1px solid var(--line-strong); color: var(--ink);
  font-family: var(--font-mono); font-size: 12px; padding: 7px 13px; border-radius: 2px;
  cursor: pointer; transition: all 0.15s ease;
}
.pack-pill:hover { border-color: var(--ink); }
.pack-pill.active { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

.map-grid {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 36px; align-items: stretch;
}
.map-canvas {
  background: var(--sheet); border: 1px solid var(--line-strong); padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.map-svg { width: 100%; height: auto; display: block; }
.b-tile { cursor: pointer; transition: fill 0.14s ease, opacity 0.14s ease; }
.b-tile rect {
  fill: var(--paper); stroke: rgba(20, 19, 17, 0.34); stroke-width: 1;
  transition: fill 0.14s ease, stroke 0.14s ease;
}
.b-tile.dimmed { opacity: 0.25; }
.b-tile.high rect { fill: #dfd9c7; }
.b-tile.very-high rect { fill: #d0c6a6; }
.b-tile:hover rect, .b-tile.selected rect {
  fill: var(--forest) !important; stroke: var(--ink) !important; stroke-width: 1.5;
}
.b-tile text {
  font-family: var(--font-mono); fill: var(--ink); pointer-events: none;
}
.b-tile:hover text, .b-tile.selected text { fill: var(--ivory) !important; }
.map-legend {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
}

.dossier {
  background: var(--sheet); border: 1px solid var(--line-strong); padding: 28px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
}
.dossier__tag {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--brass); font-weight: 600;
  margin-bottom: 6px;
}
.dossier__title {
  font-family: var(--font-serif); font-size: 38px; line-height: 1.02; margin: 0 0 12px;
}
.dossier__big {
  font-family: var(--font-mono); font-size: 34px; font-weight: 500; line-height: 1;
  margin: 14px 0 4px; color: var(--forest);
}
.dossier__meta { list-style: none; padding: 0; margin: 16px 0 0; font-size: 14px; }
.dossier__meta li {
  padding: 9px 0; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px;
}
.dossier__meta span:first-child { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.dossier__meta strong { text-align: right; font-weight: 500; }

/* Asymmetric Editorial Monograph Section (Loft photo + hairline rows — NO SaaS boxes) */
.monograph-split {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 56px; align-items: start;
}
.editorial-photo-tall {
  width: 100%; height: auto; max-height: 420px; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 35%; border: 1px solid var(--line);
}
.photo-triptych {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.triptych-frame {
  overflow: hidden; background: var(--paper); border: 1px solid var(--line);
}
.triptych-frame img {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  transition: transform 0.5s ease;
}
.triptych-frame:hover img { transform: scale(1.025); }
.subhero-photo {
  width: 100%; height: auto; max-height: 400px; aspect-ratio: 21 / 9;
  object-fit: cover; border: 1px solid var(--line); margin-top: 36px;
}
.brief-sheet {
  margin-top: 20px; background: var(--sheet); border: 1px solid var(--line-strong);
}
.brief-sheet__head {
  background: var(--ink); color: var(--ivory); padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.sheet-tabs { display: inline-flex; gap: 4px; }
.sheet-tab {
  background: transparent; border: 1px solid rgba(246, 244, 239, 0.25); color: var(--inv-muted);
  font-family: var(--font-mono); font-size: 11px; padding: 4px 10px; cursor: pointer; border-radius: 2px;
}
.sheet-tab.active { background: var(--brass-bright); border-color: var(--brass-bright); color: var(--ink); font-weight: 600; }
.brief-sheet__body { padding: 14px 16px; }
.brief-item { padding: 11px 0; border-bottom: 1px solid var(--line); }
.brief-item:last-child { border-bottom: none; padding-bottom: 2px; }
.brief-item__top {
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); margin-bottom: 4px;
}
.brief-item h4 { margin: 0 0 3px; font-size: 15px; font-weight: 600; }
.brief-item p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }

.ed-rows { border-top: 1px solid var(--line-strong); }
.ed-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr);
  gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--line);
}
.ed-row__num {
  font-family: var(--font-serif); font-size: 30px; line-height: 1; color: var(--brass);
}
.ed-row h3 {
  font-family: var(--font-serif); font-weight: 400; font-size: 28px; line-height: 1.12;
  margin: 0 0 8px; letter-spacing: -0.01em;
}
.ed-row p { margin: 0; font-size: 15.5px; color: var(--muted); max-width: 54ch; }

/* Editorial Print Comparison Ledger (zero gray SaaS borders) */
.print-table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.print-table { width: 100%; border-collapse: collapse; min-width: 660px; font-size: 15px; }
.print-table th, .print-table td {
  padding: 18px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top;
}
.print-table tr:last-child td { border-bottom: none; }
.print-table thead th {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
}
.print-table th.ours { color: var(--forest); font-weight: 600; }
.print-table td.ours {
  background: rgba(31, 58, 46, 0.06); color: var(--ink); font-weight: 500;
}
.print-table td.crit { font-weight: 600; width: 24%; }
.print-table td.legacy { color: var(--muted); width: 36%; }

/* Dark Founding Beta Band + Editorial Form */
.dark-split {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px; align-items: start;
}
.beta-price {
  font-family: var(--font-serif); font-size: clamp(54px, 5vw, 76px); line-height: 0.95;
  margin: 14px 0 18px; color: var(--ivory);
}
.beta-price span { font-family: var(--font-mono); font-size: 14px; color: var(--inv-muted); }
.dark-list { list-style: none; padding: 0; margin: 28px 0 0; }
.dark-list li {
  padding: 10px 0; border-top: 1px solid var(--inv-line);
  font-size: 15px; color: var(--inv-ink); display: flex; gap: 12px;
}
.dark-list li::before { content: "—"; color: var(--brass-bright); font-family: var(--font-mono); }

.ed-form-card {
  background: var(--ivory); color: var(--ink); padding: 32px; border: 1px solid var(--inv-line);
}
.ed-form-card h3 { font-family: var(--font-serif); font-size: 32px; font-weight: 400; margin: 0 0 6px; line-height: 1.05; }
.ed-form-card > p { margin: 0 0 22px; font-size: 14.5px; color: var(--muted); }
.field { margin-bottom: 16px; }
.field label {
  display: block; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  color: var(--muted); margin-bottom: 5px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; background: var(--sheet); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 2px;
  font-size: 15px; font-family: var(--font-sans);
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--forest); outline-offset: 1px; border-color: var(--forest);
}
.form-feedback {
  display: none; margin-top: 14px; padding: 11px 14px; font-size: 14px; font-weight: 500;
  border-left: 3px solid var(--forest); background: rgba(31, 58, 46, 0.10); color: var(--forest);
}

/* Accordion FAQ — Editorial Hairlines (NO card grid) */
.faq-list { border-top: 1px solid var(--line-strong); max-width: 900px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 22px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-family: var(--font-serif); font-size: 25px; line-height: 1.15;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; font-family: var(--font-mono); font-size: 20px; color: var(--brass); flex-shrink: 0;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p {
  margin: 0 0 22px; font-size: 15.5px; color: var(--muted); max-width: 68ch;
}

/* Footer */
footer.site-footer {
  background: var(--ivory); padding: 48px 0 68px; font-size: 13.5px; color: var(--muted);
}
.footer-grid {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap;
}
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; font-weight: 500; color: var(--ink); }
.footer-links a:hover { text-decoration: underline; }

/* Subpage Editorial Docs */
.doc-wrap { max-width: 860px; margin: 0 auto; padding: 56px var(--gut) 88px; }
.doc-sheet {
  background: var(--sheet); border: 1px solid var(--line-strong); padding: clamp(28px, 4.5vw, 52px);
}
.doc-sheet h2 { font-family: var(--font-serif); font-weight: 400; font-size: 29px; margin: 34px 0 10px; line-height: 1.1; }
.doc-sheet p, .doc-sheet li { font-size: 15.5px; color: var(--muted); }

@media (max-width: 960px) {
  .hero-top, .sec-header, .map-grid, .monograph-split, .dark-split, .photo-triptych { grid-template-columns: 1fr; }
  .ledger-strip { grid-template-columns: repeat(2, 1fr); }
  .ledger-cell { border-bottom: 1px solid var(--line); }
  .nav-links a:not(.btn) { display: none; }
  section.ed-sec { padding: 64px 0; }
}
@media (max-width: 640px) {
  .wordmark__edition { display: none; }
  .masthead__inner { height: 62px; gap: 12px; }
  .wordmark__name { font-size: 24px; }
  .masthead .btn { height: 38px; padding: 0 13px; font-size: 13px; }
  .beta-ribbon__inner { font-size: 11.5px; gap: 6px; padding: 7px var(--gut); }
}
@media (max-width: 560px) {
  .ledger-strip { grid-template-columns: 1fr; }
  .ledger-cell { border-right: none; }
  .hero-photo { aspect-ratio: 16 / 10; }
  .ed-row { grid-template-columns: 1fr; gap: 8px; }
  .map-canvas { padding: 14px; }
  .dossier { padding: 20px; }
  .ed-form-card { padding: 22px 18px; }
}
