:root {
  color-scheme: dark;
  --black: #080808;
  --panel: #161616;
  --line: #383838;
  /* Ambient page mesh. Must stay quieter than --line: decoration should
     never read louder than the structure it sits behind. */
  --grid: #101010;
  --gray: #d7d7d2;
  --muted: #9a9a96;
  --white: #f4f4f0;
  --mono: "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--black);
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--gray);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--black);
  background-size: 72px 72px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

.shell {
  width: min(1120px, calc(100% - 40px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 56px;
}

header, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand, .eyebrow, .topnav, footer, .fact span, th, .tag, .cc {
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

/* The wordmark replaces the word. Height is set in CSS and the intrinsic
   width/height attributes stay on the <img> so the header does not reflow
   while the SVG loads. It is white artwork, so it needs no filter here, but
   it would be invisible on a light ground. */
.wordmark {
  display: block;
  height: 20px;
  width: auto;
}
.brand--home .wordmark { height: 24px; }   /* the studio's own front door */

@media (max-width: 640px) {
  .wordmark, .brand--home .wordmark { height: 17px; }
}

/* On atlas pages the brand is two links: the studio, then the project.
   The separator is drawn rather than typed so it is not read aloud. */
.brand--sub { color: var(--muted); }
.brand--sub::before {
  content: "/";
  margin: 0 0.5em;
  color: var(--line);
}
.brand--sub:hover { color: var(--white); }

.topnav { display: flex; gap: 20px; font-size: 0.68rem; }
.topnav a { color: var(--muted); text-decoration: none; }
.topnav a:hover { color: var(--white); }

.eyebrow { margin: 0 0 16px; color: var(--muted); font-size: 0.72rem; }

h1 {
  max-width: 900px;
  margin: 0;
  color: var(--white);
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.subtitle:empty { display: none; }
.subtitle { margin: 14px 0 0; color: var(--muted); font-size: 1rem; }
.intro, .lede { max-width: 640px; margin: 28px 0 0; padding: 2px 0; background: var(--black); font-size: 1.05rem; line-height: 1.7; }

h2 {
  margin: 0 0 20px;
  padding: 2px 0;
  background: var(--black);
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.block { margin-top: 56px; }
.block .grid { margin-top: 4px; }

/* fact grid — mirrors the .details treatment on the homepage */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-top: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

/* Dividers are drawn per cell rather than as grid gaps, so a partly filled
   last row reads as panel instead of leaving dark holes. */
.fact { padding: 22px; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.fact span { display: block; margin-bottom: 20px; color: var(--muted); font-size: 0.64rem; }
.fact strong { display: block; color: var(--white); font-size: 1.15rem; font-weight: 500; }
.fact em { display: block; margin-top: 6px; color: var(--muted); font-size: 0.8rem; font-style: normal; }

/* city image: fixed 16:9 box so dropping art in later reflows nothing */
.cityimg { margin: 40px 0 0; }
.cityimg img {
  display: block;
  width: 560px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  object-fit: cover;
}
.cityimg--empty .ph {
  display: flex;
  width: 560px;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  background: var(--panel);
}
/* image provenance — the disclosure line and the collapsed guidance block.
   Both sit under the picture and must stay quieter than the page's own text:
   this is a footnote about the image, not content competing with it. */
.cityimg figcaption {
  width: 560px;
  max-width: 100%;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}
.imgsrc { margin-top: 6px; }
.imgsrc summary {
  cursor: pointer;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.imgsrc summary:hover { color: #c8c8c4; }
.imgsrc dl {
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel);      /* opaque: keep the page mesh off the text */
}
.imgsrc dt {
  margin-top: 8px;
  color: #c8c8c4;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.imgsrc dt:first-child { margin-top: 0; }
.imgsrc dd { margin: 3px 0 0; }

.cityimg--empty span {
  color: #4a4a48;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

/* tables — opaque so the page mesh never crosses a digit */
.grid {
  width: 100%;
  border-collapse: collapse;
  background: var(--black);
  font-size: 0.94rem;
}
.grid th, .grid td { background: var(--black); }
.grid th {
  padding: 0 14px 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 400;
  text-align: left;
}
.grid td { padding: 11px 14px 11px 0; border-bottom: 1px solid #262626; }
.grid tr:last-child td { border-bottom: none; }
.grid .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grid .c { color: var(--muted); font-size: 0.85rem; }
.grid td.empty { padding: 28px 0; color: var(--muted); text-align: center; }

a { color: var(--white); text-decoration: none; border-bottom: 1px solid var(--line); }
a:hover { border-bottom-color: var(--white); }
.unlinked { color: var(--muted); }

.tag {
  margin-left: 10px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.55rem;
}
.tag--role em {
  margin-left: 6px;
  padding-left: 6px;
  border-left: 1px solid var(--line);
  color: var(--gray);
  font-style: normal;
}

.cc { margin-left: 6px; color: var(--muted); font-size: 0.6rem; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 7px 12px; border: 1px solid var(--line); background: var(--panel); font-size: 0.9rem; }
.chips a { border-bottom: none; }

/* Card lists — "Start here" on the atlas home, "Selected work" on the studio
   home. These were unstyled and rendering as bulleted lists. */
.cards { margin: 0; padding: 0; list-style: none; }
.cards li {
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.cards li + li { margin-top: 10px; }
.cards li > a {
  display: block;
  color: var(--white);
  font-size: 1.05rem;
  border-bottom: none;
}
.cards li p { margin: 6px 0 0; color: var(--muted); }
.cards li p.note {
  margin-top: 12px;
  padding: 0;
  background: none;          /* .note paints itself; inside a card that reads
                                as a code block rather than a caption */
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}
.cards--wide li { padding: 24px 24px 26px; }

.axes { display: flex; flex-wrap: wrap; gap: 1px; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); background: var(--line); }
.axes li { flex: 1 1 160px; padding: 18px 20px; background: var(--panel); }
.axes li a { display: block; color: var(--white); font-size: 1.05rem; border-bottom: none; }
.axes li span { display: block; margin-top: 4px; color: var(--muted); font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; }

.chart {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 0 28px;
  background: var(--black);
}

.note { display: block; margin: 18px 0 0; padding: 2px 0; background: var(--black); color: var(--muted); font-size: 0.88rem; }
.note a { color: var(--gray); }

footer { color: var(--muted); font-size: 0.65rem; }

@media (max-width: 680px) {
  .shell { width: calc(100% - 32px); padding: 24px 0; gap: 40px; }
  .block { margin-top: 44px; }
  .facts { grid-template-columns: 1fr; margin-top: 32px; }
  .fact span { margin-bottom: 12px; }
  /* phones are the priority here: image goes full-bleed within the gutter */
  .cityimg img, .cityimg--empty .ph, .cityimg figcaption { width: 100%; }

  .grid { font-size: 0.86rem; }
  .grid td, .grid th { padding-right: 8px; }
  /* drop the least-essential column rather than scrolling the page sideways */
  .grid .opt { display: none; }
  header { flex-direction: column; align-items: flex-start; gap: 14px; }
  footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* consent — a quiet strip at the foot of the viewport, not a modal. It does
   not block reading, so the site works the same whether or not it is answered. */
.consent {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.82rem;
}
.consent[hidden] { display: none; }
.consent p { margin: 0; color: var(--muted); }
.consent__actions { display: flex; gap: 10px; }
.consent button {
  padding: 7px 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--white);
  font: inherit;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.consent button[data-consent="granted"] { background: var(--white); color: var(--black); }
.consent button:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
footer a { color: var(--muted); }
