/* Rentday. Cream paper by day, the same street by night. */

:root {
  --paper: #F3EDE3;
  --paper-2: #EAE2D4;
  --paper-3: #DDD2BF;
  --paper-hi: #FBF7F0;
  --ink: #1B1A17;
  --ink-2: #4A463F;
  --ink-3: #6B645A;
  --rule: #CFC3AE;
  --brick: #C8502D;
  --brick-btn: #B4461F;
  --brick-text: #A8401F;
  --on-brick: #FFF8EE;
  --ochre: #E8B04A;
  --ochre-hot: #F7D48A;
  --ochre-edge: #E3A63C;

  /* The street */
  --facade: #B9502F;
  --facade-cream: #E4D3AF;
  --stucco: #D9CCB5;
  --mortar: rgba(60, 22, 10, .22);
  --mortar-cream: rgba(90, 70, 40, .2);
  --stone: #EDE4D3;
  --trim: #2B2723;
  --glass: #2E2A25;
  --pavement: #E4DACA;
  --shade: rgba(60, 30, 12, .28);
  --strip-bg: #1B1A17;
  --strip-fg: #F3EDE3;

  --r: 4px;
  --max: 1320px;
  --gutter: clamp(16px, 2.2vw, 28px);
  --pad: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --f-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  color-scheme: light;
}

/* Evening: the same street after dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16140F; --paper-2: #1F1C17; --paper-3: #2A2620; --paper-hi: #1B1914;
    --ink: #EFE7DA; --ink-2: #CFC6B6; --ink-3: #A79E8F; --rule: #3A352D;
    --brick: #E0663F; --brick-btn: #D9603A; --brick-text: #EE8058; --on-brick: #16140F;
    --facade: #7E3A24; --facade-cream: #6F6553; --stucco: #4A443A;
    --mortar: rgba(0, 0, 0, .35); --mortar-cream: rgba(0, 0, 0, .3);
    --stone: #8E8472; --trim: #564C40; --glass: #0E0D0B; --pavement: #1F1C17; --shade: rgba(0, 0, 0, .55); --strip-bg: #0B0A08; --strip-fg: #EFE7DA;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #16140F; --paper-2: #1F1C17; --paper-3: #2A2620; --paper-hi: #1B1914;
  --ink: #EFE7DA; --ink-2: #CFC6B6; --ink-3: #A79E8F; --rule: #3A352D;
  --brick: #E0663F; --brick-btn: #D9603A; --brick-text: #EE8058; --on-brick: #16140F;
  --facade: #7E3A24; --facade-cream: #6F6553; --stucco: #4A443A;
  --mortar: rgba(0, 0, 0, .35); --mortar-cream: rgba(0, 0, 0, .3);
  --stone: #8E8472; --trim: #564C40; --glass: #0E0D0B; --pavement: #1F1C17; --shade: rgba(0, 0, 0, .55); --strip-bg: #0B0A08; --strip-fg: #EFE7DA;
  color-scheme: dark;
}

/* Base -------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-body);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brick-text); }
::selection { background: var(--brick-btn); color: var(--on-brick); }
:focus-visible { outline: 2px solid var(--brick-btn); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; }
code, kbd, samp, .mono { font-family: var(--f-mono); font-size: .88em; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
html { scrollbar-color: var(--ink-3) var(--paper-2); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--ink-3); border: 3px solid var(--paper-2); border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: var(--r); }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 560; margin: 0; letter-spacing: -.022em; text-wrap: balance; font-variation-settings: 'opsz' 96, 'SOFT' 30; }
.display { font-size: clamp(2.6rem, 1.2rem + 4.3vw, 5.2rem); line-height: 1.03; letter-spacing: -.034em; font-variation-settings: 'opsz' 144, 'SOFT' 40; }
.display em, h2 em { font-style: italic; font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1; padding-bottom: .06em; }
h2 { font-size: clamp(2rem, 1.2rem + 2.5vw, 3.35rem); line-height: 1.08; }
h3 { font-size: clamp(1.25rem, 1.05rem + .6vw, 1.55rem); line-height: 1.2; letter-spacing: -.015em; }
h4 { font-family: var(--f-body); font-weight: 650; font-size: 1rem; letter-spacing: 0; }
p { margin: 0 0 1em; max-width: 64ch; text-wrap: pretty; }
.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 44ch; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }

/* Announcement strip --------------------------------------------------------- */

.strip { background: var(--strip-bg); color: var(--strip-fg); font-size: .8125rem; }
.strip .wrap { display: flex; gap: 18px; align-items: center; justify-content: center; min-height: 36px; flex-wrap: wrap; }
.strip a { color: var(--strip-fg); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.strip a:hover { text-decoration: underline; }
.strip .ca { font-family: var(--f-mono); font-size: .78rem; opacity: .85; }
.strip .soon { font-weight: 700; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: .25em; }

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

.site-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.site-head.scrolled { border-bottom-color: var(--rule); }
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 600; font-size: 1.42rem; letter-spacing: -.03em; font-variation-settings: 'opsz' 72, 'SOFT' 60; }
.brand:hover { color: var(--ink); }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { text-decoration: none; font-size: .9375rem; font-weight: 500; padding: 8px 12px; border-radius: var(--r); color: var(--ink-2); }
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brick); border-radius: 0; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: var(--r); border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; font-size: 1.15rem; transition: background .2s, border-color .2s; }
.icon-btn:hover { background: var(--paper-2); border-color: var(--ink-3); color: var(--ink); }
.x-link { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--rule); text-decoration: none; font-weight: 600; font-size: .875rem; }
.x-link:hover { border-color: var(--ink); color: var(--ink); background: var(--paper-2); }
.x-link i { font-size: 1.05rem; }
.menu-btn { display: none; }
.ca-pill { display: inline-flex; align-items: stretch; height: 40px; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; font-size: .8125rem; white-space: nowrap; }
.ca-pill .ca-label { display: inline-flex; align-items: center; padding: 0 10px; background: var(--ink); color: var(--paper); font-weight: 700; letter-spacing: .08em; }
.ca-pill .ca-val { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; font-weight: 650; color: var(--ink-2); }
@media (max-width: 640px) { .ca-pill { display: none; } }

@media (max-width: 1040px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .x-link span { display: none; }
  .x-link { padding: 0; width: 40px; justify-content: center; }
  .nav.open { display: flex; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px var(--pad) 16px; margin: 0; }
  .nav.open a { padding: 12px 8px; font-size: 1.05rem; }
}
@media (max-width: 520px) {
  .head-actions .theme-btn { display: none; }
  .site-head .wrap { gap: 12px; }
  .wallet-btn .label-long { display: none; }
}

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

.btn { --bg: var(--brick-btn); --fg: var(--on-brick); display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: var(--r); border: 1px solid var(--bg); background: var(--bg); color: var(--fg); font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .15s var(--ease-out), background .2s; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14); }
.btn:hover { color: var(--fg); background: color-mix(in srgb, var(--bg) 88%, #000); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .55; box-shadow: none; }
.btn.ghost { --bg: transparent; --fg: var(--ink); border-color: var(--ink); box-shadow: none; }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.small { height: 40px; padding: 0 16px; font-size: .9375rem; }
.btn.block { width: 100%; }
.btn i { font-size: 1.1em; }

/* Status vocabulary: the window glyph ------------------------------------------ */

.st { display: inline-flex; align-items: center; gap: 7px; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.st::before { content: ''; width: 11px; height: 13px; border: 1.5px solid var(--ink); border-radius: 1px; background: var(--glass); flex: none; }
.st.paid::before { background: var(--ochre); }
.st.late::before { background: linear-gradient(180deg, var(--ochre) 0 50%, var(--glass) 50%); }
.st.vacant { color: var(--ink-3); }
.st.vacant::before { background: var(--paper); }

.sample { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border: 1px dashed var(--brick-text); border-radius: var(--r); color: var(--brick-text); font: 700 .6875rem/1.6 var(--f-body); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; vertical-align: middle; }
.soon-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: var(--r); background: var(--ink); color: var(--paper); font: 650 .75rem/1.7 var(--f-body); letter-spacing: .01em; white-space: nowrap; }

/* Sections -------------------------------------------------------------------- */

section { position: relative; }
.sec { padding: clamp(72px, 9vw, 140px) 0; }
.sec-tight { padding: clamp(56px, 6vw, 96px) 0; }
.rule-top { border-top: 1px solid var(--rule); }
.sec-head { max-width: 60ch; margin-bottom: clamp(32px, 4vw, 56px); }
.sec-head p { margin-top: 18px; color: var(--ink-2); font-size: 1.125rem; }

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

.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-inner { position: relative; z-index: 1; padding: clamp(24px, 3vw, 44px) 0 clamp(28px, 3vw, 40px); }
.hero-grid { grid-template-rows: auto 1fr; row-gap: clamp(18px, 2.2vw, 28px); }
.hero-title { grid-column: 1 / -1; grid-row: 1; position: relative; z-index: 2; font-size: clamp(2.5rem, 0.9rem + 4.6vw, 5.5rem); max-width: 17ch; pointer-events: none; }
.hero-title em { display: block; }
.hero-left { grid-column: 1 / span 4; grid-row: 2; display: grid; gap: clamp(26px, 3vw, 40px); align-content: start; }
.hero-copy .lead { margin: 0 0 24px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { grid-column: 5 / span 8; grid-row: 1 / span 2; align-self: end; position: relative; }
.hero-art .street-frame { height: min(calc(100dvh - 230px), 680px); min-height: 380px; }
.street-frame { position: relative; height: min(70vh, 600px); min-height: 360px; display: flex; align-items: flex-end; }
.street-frame .street { width: 100%; height: 100%; }
@media (min-width: 901px) { .hero-title { max-width: none; } }
.street-caption { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; border-top: 1.5px solid var(--ink); padding-top: 12px; margin-top: 2px; font-size: .875rem; }
.street-caption .cap-price { font-family: var(--f-mono); font-size: clamp(1.05rem, .9rem + .5vw, 1.45rem); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.up { color: var(--brick-text); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; }

/* Month card: the six months play on their own while the street is on screen. */
.month-card { background: var(--paper-hi); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 14px 16px 12px; }
.mc-head { display: flex; align-items: center; gap: 10px; }
.mc-head h2 { font-size: clamp(1.3rem, 1.1rem + .6vw, 1.7rem); margin-right: auto; }
.mc-play { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper-hi); color: var(--ink); cursor: pointer; font-size: .95rem; }
.mc-play:hover { border-color: var(--ink); }
.month-card .month-tabs { margin: 12px 0 4px; }
.month-tabs button { position: relative; overflow: hidden; }
.month-tabs .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--brick); transform: scaleX(0); transform-origin: left center; }
.month-tabs .prog.run { animation: mc-prog linear forwards; }
.month-card.is-paused .prog.run { animation-play-state: paused; }
@keyframes mc-prog { to { transform: scaleX(1); } }
.mc-lines { margin: 8px 0 0; }
.mc-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--rule); font-size: .9375rem; }
.mc-lines dt { color: var(--ink-2); }
.mc-lines dd { margin: 0; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.mc-lines .total { font-weight: 650; border-bottom: 1.5px solid var(--ink); }
.mc-note { font-size: .875rem; color: var(--ink-2); margin: 10px 0 0; min-height: 4.4em; }

@media (max-width: 900px) {
  .hero-left { display: contents; }
  .hero-copy, .month-card, .hero-art { grid-column: 1 / -1; grid-row: auto; }
  .hero-copy { order: 1; }
  .hero-art { order: 2; }
  .month-card { order: 3; margin-top: 12px; }
  .street-frame, .hero-art .street-frame { height: auto; min-height: 0; aspect-ratio: 938 / 560; }
  .street { --tolet-s: 1.9; }
}

/* The sky ------------------------------------------------------------------- */
/* Dusk behind the street at the top of the page, dawn on the 1st at the end.
   Everything here is flat colour and transform-only motion. */

:root {
  --dusk-1: #F2DDC6; --dusk-2: #EDC09C;
  --sun: #E88A5B; --moon: #EDE3D0;
  --town-far: #E6C9AB; --town-near: #DDB592;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --dusk-1: #1C1511; --dusk-2: #3F2518; --sun: #E07A4E; --moon: #E9DFCC; --town-far: #1E1814; --town-near: #27201A; }
}
:root[data-theme="dark"] { --dusk-1: #1C1511; --dusk-2: #3F2518; --sun: #E07A4E; --moon: #E9DFCC; --town-far: #1E1814; --town-near: #27201A; }

.sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.sky.dusk { background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 28%, var(--dusk-1) 66%, var(--dusk-2) 100%); }
.sky.dawn { background: linear-gradient(180deg, var(--paper) 0%, var(--dusk-1) 58%, var(--dusk-2) 100%); }
.sky-sun { position: absolute; aspect-ratio: 1; border-radius: 50%; background: var(--sun); will-change: transform; }
.sky.dusk .sky-sun { width: clamp(220px, 29vw, 460px); right: 12%; bottom: calc(var(--ground, 92px) + 6px); }
.sky.dusk::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: var(--ground, 92px); background: var(--pavement); box-shadow: inset 0 1.5px 0 var(--ink); }
.sky.dawn .sky-sun { width: clamp(200px, 22vw, 340px); left: 50%; margin-left: calc(clamp(200px, 22vw, 340px) / -2); bottom: calc(clamp(40px, 5vw, 70px) - clamp(100px, 11vw, 170px)); }
.sky-town { position: absolute; left: 0; right: 0; bottom: 0; height: 56%; }
.sky.dusk .sky-town { bottom: var(--ground, 92px); height: min(52%, 400px); }
.sky.dawn .sky-town { height: clamp(150px, 17vw, 240px); }
.sky-city { width: 100%; height: 100%; display: block; }
.sky-far { fill: var(--town-far); }
.sky-near { fill: var(--town-near); }
.sky-win { fill: var(--ochre); opacity: 0; }

/* Evening: the moon replaces the setting sun and the far city lights up. */
:root[data-theme="dark"] .sky.dusk .sky-sun { background: var(--moon); width: clamp(80px, 9vw, 150px); right: 22%; bottom: calc(var(--ground, 92px) + min(46vh, 420px)); }
:root[data-theme="dark"] .sky-win { opacity: .7; }
:root[data-theme="dark"] .sky-win:nth-of-type(7n) { animation: sky-blink 11s var(--t, 0s) infinite; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sky.dusk .sky-sun { background: var(--moon); width: clamp(80px, 9vw, 150px); right: 22%; bottom: calc(var(--ground, 92px) + min(46vh, 420px)); }
  :root:not([data-theme="light"]) .sky-win { opacity: .7; }
  :root:not([data-theme="light"]) .sky-win:nth-of-type(7n) { animation: sky-blink 11s var(--t, 0s) infinite; }
}
@keyframes sky-blink { 0%, 44%, 100% { opacity: .7; } 50%, 90% { opacity: .08; } }

.closing { position: relative; isolation: isolate; overflow: hidden; padding-bottom: clamp(200px, 21vw, 300px); }
.closing > .wrap { position: relative; z-index: 1; }

@media (max-width: 900px) {
  .sky.dusk .sky-town { height: 120px; }
  .sky.dusk .sky-sun { width: 180px; right: 8%; }
  :root[data-theme="dark"] .sky.dusk .sky-sun { width: 54px; right: auto; left: 12%; bottom: calc(var(--ground, 92px) + 96px); }
}
@media (max-width: 900px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sky.dusk .sky-sun { width: 54px; right: auto; left: 12%; bottom: calc(var(--ground, 92px) + 96px); }
}

/* Paper grain over the whole page: one static layer, no blend modes. */
body::after { content: ''; position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: .05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .08 0 0 0 0 .05 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] body::after { opacity: .09; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::after { opacity: .09; } }

/* The receipt sits on ruled ledger paper with a double margin line. */
.receipt-sec { background-color: var(--paper); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='34'%3E%3Crect y='33' width='8' height='1' fill='%23C9B99E' fill-opacity='.55'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] .receipt-sec { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='34'%3E%3Crect y='33' width='8' height='1' fill='%233A352D' fill-opacity='.8'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .receipt-sec { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='34'%3E%3Crect y='33' width='8' height='1' fill='%233A352D' fill-opacity='.8'/%3E%3C/svg%3E"); } }
.receipt-sec::before { content: ''; position: absolute; top: 0; bottom: 0; left: max(8px, calc(50% - 690px)); width: 5px; border-left: 1px solid var(--brick); border-right: 1px solid var(--brick); opacity: .45; }

@media (prefers-reduced-motion: reduce) {
  .sky-win { animation: none !important; }
}


/* The rent-day leaf lives inside the street SVG, nailed to the brick. */
.street .leaf-paper { fill: #FBF7F0; filter: drop-shadow(0 5px 6px var(--shade)); }
.street .leaf-band { fill: var(--brick); }
.street .leaf-cap { font: 700 9px/1 var(--f-body); letter-spacing: .12em; fill: #FFF8EE; text-anchor: middle; }
.street .leaf-day { font: 600 46px/1 var(--f-display); font-variation-settings: 'opsz' 144; fill: #1B1A17; text-anchor: middle; letter-spacing: -.03em; }
.street .leaf-month { font: 650 9.4px/1 var(--f-body); letter-spacing: .08em; fill: #6B645A; text-anchor: middle; }
.street .leaf-nail { fill: var(--trim); stroke: var(--stone); stroke-width: 1; }
.street .leaf-page { transform-box: fill-box; transform-origin: 50% 0; }
.street .leaf-page.turn { animation: leaf-turn .34s var(--ease-io); }
@keyframes leaf-turn { 0% { transform: scaleY(1); } 50% { transform: scaleY(.06); } 100% { transform: scaleY(1); } }

/* The street (SVG) ------------------------------------------------------------ */

.street .pavement { fill: var(--pavement); }
.street .kerb { stroke: var(--ink); stroke-width: 1.5; }
.street .mass { stroke: var(--trim); stroke-width: 1.5; }
.street .skin-brick { fill: var(--facade); }
.street .skin-cream { fill: var(--facade-cream); }
.street .skin-stucco { fill: var(--stucco); }
.street .mortar-brick { stroke: var(--mortar); stroke-width: 1; }
.street .mortar-cream { stroke: var(--mortar-cream); stroke-width: 1; }
.street .cornice, .street .coping, .street .band, .street .dentil, .street .chimney, .street .chimney-cap, .street .plinth { fill: var(--trim); }
.street .tower { fill: var(--trim); }
.street .lintel, .street .sill, .street .stoop { fill: var(--stone); stroke: var(--trim); stroke-width: .75; }
.street .door { fill: var(--trim); }
.street .glass { fill: var(--glass); }
.street .light { fill: url(#rd-lamp); opacity: 0; transition: opacity .5s var(--ease-out) var(--d, 0s); }
.street .lamp-hot { stop-color: var(--ochre-hot); }
.street .lamp-edge { stop-color: var(--ochre-edge); }
.street .frame { fill: none; stroke: var(--trim); stroke-width: 2.2; }
.street .mullion { stroke: var(--trim); stroke-width: 1.6; }
.street .tolet { transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; transform: translateY(-6px) scale(var(--tolet-s, 1)); transition: opacity .35s var(--ease-out) var(--d, 0s), transform .45s var(--ease-out) var(--d, 0s); }
.street .tolet rect { fill: #FBF7F0; stroke: #A8401F; stroke-width: 1.2; }
.street .tolet text { font: 800 10.5px/1 var(--f-body); fill: #A8401F; text-anchor: middle; letter-spacing: .06em; }
.street .win.is-paid .light { opacity: 1; }
.street .win.is-late .light { opacity: 1; animation: flicker 2.8s var(--d, 0s) infinite; }
.street .win.is-vacant .tolet { opacity: 1; transform: scale(var(--tolet-s, 1)); }
.street.no-stagger .light, .street.no-stagger .tolet { transition-delay: 0s; }
.street .plate { font: 600 13px/1 var(--f-body); fill: var(--ink-2); text-anchor: middle; }
.street .bldg { transition: opacity .35s var(--ease-out); outline: none; }
.street .bldg.dim { opacity: .28; }
.street .bldg[role="button"] { cursor: pointer; }
.street .bldg[role="button"]:focus-visible .mass { stroke: var(--brick-btn); stroke-width: 4; }
:root[data-theme="dark"] .street .win.is-paid .light,
:root[data-theme="dark"] .street .win.is-late .light { filter: drop-shadow(0 0 5px rgba(232, 176, 74, .55)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .street .win.is-paid .light,
  :root:not([data-theme="light"]) .street .win.is-late .light { filter: drop-shadow(0 0 5px rgba(232, 176, 74, .55)); }
}
@keyframes flicker {
  0%, 18%, 22%, 62%, 100% { opacity: 1; }
  20% { opacity: .25; }
  64%, 80% { opacity: .35; }
}

/* Month sheet (inside the hero) ------------------------------------------------ */

.month-tabs { display: flex; gap: 4px; margin: 16px 0 6px; flex-wrap: wrap; }
.month-tabs button { height: 34px; min-width: 42px; padding: 0 10px; border: 1px solid var(--rule); background: var(--paper-hi); border-radius: var(--r); font: 650 .8125rem/1 var(--f-body); cursor: pointer; color: var(--ink-2); }
.month-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.close-lines { margin: 10px 0 0; display: grid; gap: 0; border-top: 1.5px solid var(--ink); }
.close-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--rule); font-size: .9375rem; }
.close-lines dt { color: var(--ink-2); }
.close-lines dd { margin: 0; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.close-lines .total { border-bottom: 1.5px solid var(--ink); font-weight: 650; }
.close-note { margin: 14px 0 0; font-size: .9rem; color: var(--ink-2); min-height: 4.6em; }
.flat { color: var(--ink-3); }

/* Receipt ---------------------------------------------------------------------- */

.receipt-sec .grid { align-items: start; row-gap: 40px; }
.receipt-copy { grid-column: 1 / span 5; position: sticky; top: calc(var(--header-h) + 32px); }
.receipt-wrap { grid-column: 7 / span 5; }
.receipt { position: relative; background: var(--paper-hi); color: var(--ink); padding: 30px 28px 34px; font-size: .95rem; border: 1.5px solid var(--ink); border-radius: var(--r); }
.receipt .r-head { text-align: center; border-bottom: 1.5px dashed var(--ink-3); padding-bottom: 14px; margin-bottom: 14px; }
.receipt .r-head strong { display: block; font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; }
.receipt .r-line { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; }
.receipt .r-line span:last-child { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.w { font-family: var(--f-body); font-weight: 500; }
.receipt .r-line span:first-child { color: var(--ink-2); }
.receipt .r-line.minus span:last-child::before { content: '- '; }
.receipt .r-total { border-top: 1.5px solid var(--ink); margin-top: 10px; padding-top: 12px; font-weight: 700; font-size: 1.05rem; }
.receipt .r-foot { margin-top: 16px; text-align: center; color: var(--ink-3); font-size: .78rem; }
@media (max-width: 900px) {
  .receipt-copy { grid-column: 1 / -1; position: static; }
  .receipt-wrap { grid-column: 1 / -1; }
}

/* Compare --------------------------------------------------------------------- */

.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { text-align: left; padding: 18px 16px; vertical-align: top; }
.compare thead th { font-family: var(--f-display); font-weight: 560; font-size: 1.35rem; letter-spacing: -.02em; border-bottom: 1.5px solid var(--ink); }
.compare thead th:first-child { width: 22%; }
.compare tbody th { font-weight: 600; font-size: .9375rem; color: var(--ink-2); }
.compare tbody tr + tr > * { border-top: 1px solid var(--rule); }
.compare td.ours { background: var(--paper-hi); font-weight: 550; }
.compare thead th.ours { background: var(--paper-hi); box-shadow: inset 0 3px 0 var(--brick); }
@media (max-width: 720px) {
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare tr { padding: 16px 0; border-top: 1px solid var(--rule); }
  .compare tbody tr + tr > * { border-top: 0; }
  .compare th, .compare td { padding: 4px 0; }
  .compare td::before { content: attr(data-label); display: block; font: 650 .75rem/1.6 var(--f-body); color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
  .compare td.ours { padding: 8px 10px; border-radius: var(--r); margin-top: 6px; }
}

/* Calculator ------------------------------------------------------------------ */

/* A fixed dark band in both themes. Everything inside reads its colours from
   the section's own tokens, never from the page's paper and ink, which swap
   places in the evening theme. */
.calc { --c-bg: #1B1A17; --c-fg: #F3EDE3; --c-line: rgba(243, 237, 227, .24); --c-soft: rgba(243, 237, 227, .78); background: var(--c-bg); color: var(--c-fg); }
:root[data-theme="dark"] .calc { --c-bg: #0B0A08; --c-fg: #EFE7DA; --c-line: rgba(239, 231, 218, .2); --c-soft: rgba(239, 231, 218, .76); box-shadow: inset 0 1px 0 var(--rule), inset 0 -1px 0 var(--rule); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .calc { --c-bg: #0B0A08; --c-fg: #EFE7DA; --c-line: rgba(239, 231, 218, .2); --c-soft: rgba(239, 231, 218, .76); box-shadow: inset 0 1px 0 var(--rule), inset 0 -1px 0 var(--rule); }
}
.calc a { color: inherit; text-decoration-thickness: 1.5px; }
.calc .grid { row-gap: 40px; align-items: center; }
.calc-in { grid-column: 1 / span 6; min-width: 0; }
.calc-out { grid-column: 8 / span 5; }
.calc h2 { color: var(--c-fg); }
.calc p { color: var(--c-soft); }
.field { display: grid; gap: 8px; margin-top: 28px; min-width: 0; }
.field label { font-size: .875rem; font-weight: 600; }
.amount { display: flex; align-items: baseline; gap: 12px; border-bottom: 2px solid var(--c-fg, var(--ink)); padding-bottom: 6px; }
.amount input { flex: 1 1 0; width: 100%; min-width: 0; background: transparent; border: 0; color: inherit; font: 500 clamp(2.4rem, 1.6rem + 3vw, 4rem)/1.1 var(--f-mono); letter-spacing: -.04em; outline: none; padding: 0; }
.amount .unit { font: 650 1rem var(--f-body); opacity: .75; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.presets button { height: 34px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--c-line); background: transparent; color: var(--c-fg); font: 600 .8125rem var(--f-mono); cursor: pointer; }
.presets button:hover { border-color: var(--c-fg); }
.presets button[aria-pressed="true"] { background: var(--c-fg); color: var(--c-bg); border-color: var(--c-fg); }
.calc-result { border-top: 1px solid var(--c-line); }
.calc-result .row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--c-line); }
.calc-result .row span:first-child { color: var(--c-soft); font-size: .95rem; }
.calc-result .row .num { font-size: 1.15rem; color: var(--c-fg); }
.calc-result .row .big { font-size: clamp(2rem, 1.5rem + 1.8vw, 3rem); color: var(--ochre); letter-spacing: -.03em; }
.calc .sample { color: var(--c-fg); border-color: var(--c-fg); }
.calc .amount:focus-within { outline: 2px solid var(--c-fg); outline-offset: 6px; box-shadow: none; }
@media (max-width: 900px) { .calc-in, .calc-out { grid-column: 1 / -1; } }

/* Two tokens ------------------------------------------------------------------ */

.tokens .grid { row-gap: 20px; align-items: stretch; }
.token { border: 1.5px solid var(--ink); border-radius: var(--r); padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 14px; background: var(--paper-hi); }
.token.vault { grid-column: 1 / span 7; }
.token.coin { grid-column: 8 / span 5; background: var(--paper-2); }
.token .t-name { font-family: var(--f-display); font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.token dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 6px 0 0; font-size: .9375rem; }
.token dt { color: var(--ink-3); }
.token dd { margin: 0; }
.flowline { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin: 8px 0 0; max-width: none; font: 600 .9375rem var(--f-body); color: var(--ink-2); }
.flowline span { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 720px) { .flowline span { white-space: normal; } }
.flowline::before, .flowline::after { content: ''; flex: 1; border-top: 1.5px dashed var(--ink-3); }
.ca-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border: 1px dashed var(--ink-3); border-radius: var(--r); font-size: .9rem; font-weight: 550; margin-top: auto; }
@media (max-width: 900px) { .token.vault, .token.coin { grid-column: 1 / -1; } }

/* Roll excerpt ----------------------------------------------------------------- */

.ledger { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.ledger th { text-align: left; font: 650 .75rem/1.4 var(--f-body); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 10px 12px; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.ledger td { padding: 11px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger td.r, .ledger th.r { text-align: right; }
.ledger tbody tr { transition: background .2s; }
.ledger tbody tr:hover { background: var(--paper-2); }
.ledger .unit-cell { font-family: var(--f-mono); font-weight: 600; white-space: nowrap; }
.ledger .note-cell { color: var(--ink-2); font-size: .875rem; }
.ledger tfoot td { border-bottom: 0; border-top: 1.5px solid var(--ink); font-weight: 650; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.running-head { position: sticky; top: var(--header-h); z-index: 5; display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; background: var(--paper); border-bottom: 1px solid var(--rule); font: 600 .8125rem var(--f-mono); color: var(--ink-2); }
.running-head b { color: var(--ink); }

.excerpt { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
.excerpt-table { grid-column: 1 / span 8; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper-hi); overflow: hidden; }
.excerpt-side { grid-column: 9 / span 4; display: grid; gap: 18px; }
.excerpt-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.hashline { font: 500 .78rem/1.5 var(--f-mono); word-break: break-all; color: var(--ink-2); }
@media (max-width: 900px) { .excerpt-table, .excerpt-side { grid-column: 1 / -1; } }

/* Risks ------------------------------------------------------------------------ */

.risk-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.risk-row { display: grid; grid-template-columns: 28px minmax(0, 4fr) minmax(0, 7fr); gap: 0 var(--gutter); align-items: baseline; padding: 22px 0; border-top: 1px solid var(--rule); }
.risk-row h3 { font-size: 1.2rem; }
.risk-row p { color: var(--ink-2); margin: 0; }
.wg { width: 16px; height: 21px; border: 1.8px solid var(--ink); border-radius: 1px; background: var(--glass); position: relative; top: 3px; }
.wg::after { content: ''; position: absolute; left: 0; right: 0; top: 45%; border-top: 1.4px solid var(--ink); }
.wg.late { background: var(--ochre); animation: flicker 2.8s infinite; }
.wg.tolet::before { content: ''; position: absolute; left: -3px; right: -3px; bottom: 3px; height: 6px; background: #FBF7F0; border: 1px solid #A8401F; z-index: 1; }
.risk-more { margin-top: 20px; }
@media (max-width: 760px) {
  .risk-row { grid-template-columns: 28px minmax(0, 1fr); }
  .risk-row p { grid-column: 2; margin-top: 6px; }
}

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

.faq-list { border-top: 1.5px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px 0; font-family: var(--f-display); font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); font-weight: 520; letter-spacing: -.015em; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary i { transition: transform .3s var(--ease-out); font-size: 1.2rem; flex: none; }
.faq-list details[open] summary i { transform: rotate(45deg); }
.faq-list .answer { padding: 0 0 24px; color: var(--ink-2); max-width: 70ch; }
.faq-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.faq-layout .faq-head { grid-column: 1 / span 4; }
.faq-layout .faq-list { grid-column: 5 / span 8; }
@media (max-width: 900px) { .faq-layout .faq-head, .faq-layout .faq-list { grid-column: 1 / -1; } }

/* Closing ------------------------------------------------------------------------ */

.closing { text-align: left; }
.closing .grid { align-items: end; row-gap: 32px; }
.closing-copy { grid-column: 1 / span 7; }
.countdown { grid-column: 9 / span 4; display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper-hi); }
.countdown div { padding: 18px 12px; text-align: center; }
.countdown div + div { border-left: 1px solid var(--rule); }
.countdown b { display: block; font: 600 clamp(2rem, 1.5rem + 1.6vw, 2.9rem)/1 var(--f-mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .8125rem; color: var(--ink-3); }
.countdown-cap { grid-column: 9 / span 4; font-size: .875rem; color: var(--ink-3); margin-top: -18px; }
@media (max-width: 900px) { .closing-copy, .countdown, .countdown-cap { grid-column: 1 / -1; } .countdown-cap { margin-top: 0; } }

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

.site-foot { border-top: 1.5px solid var(--ink); padding: 56px 0 40px; font-size: .9375rem; background: var(--paper); }
.foot-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px var(--gutter); }
.site-foot .foot-h { font: 650 .75rem/1.6 var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 12px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.foot-brand p { color: var(--ink-2); margin-top: 14px; max-width: 36ch; }
.foot-legal { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8125rem; color: var(--ink-3); }
.foot-legal p { margin: 0; max-width: 90ch; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* App pages -------------------------------------------------------------------------- */

.page-head { padding: clamp(40px, 5vw, 72px) 0 clamp(24px, 3vw, 40px); }
.page-head h1 { font-size: clamp(2.3rem, 1.4rem + 3vw, 4rem); line-height: 1.04; letter-spacing: -.03em; }
.page-head p { margin-top: 16px; color: var(--ink-2); font-size: 1.125rem; max-width: 60ch; }
.subnav { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: 32px; overflow-x: auto; }
.subnav a { padding: 12px 14px; text-decoration: none; font-weight: 550; font-size: .9375rem; color: var(--ink-2); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brick); }
.banner { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px dashed var(--brick-text); border-radius: var(--r); background: color-mix(in srgb, var(--brick) 6%, transparent); margin-bottom: 28px; font-size: .9375rem; }
.banner i { color: var(--brick-text); font-size: 1.25rem; margin-top: 1px; }
.banner p { margin: 0; }
.banner.ok { border-color: var(--ink-3); background: var(--paper-2); }
.banner.ok i { color: var(--ink-2); }

.panel { border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper-hi); padding: clamp(18px, 2.4vw, 28px); }
.panel h2, .panel h3 { font-size: 1.3rem; margin-bottom: 14px; letter-spacing: -.015em; }
.kv { display: grid; gap: 0; margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: .9375rem; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-family: var(--f-mono); font-variant-numeric: tabular-nums; text-align: right; }
.kv dd a { color: var(--brick-text); }
.kv dd .btn { font-family: var(--f-body); }
.app-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; padding-bottom: 96px; }
.col-7 { grid-column: span 7; } .col-5 { grid-column: span 5; } .col-8 { grid-column: span 8; } .col-4 { grid-column: span 4; } .col-6 { grid-column: span 6; } .col-12 { grid-column: 1 / -1; }
.stack { display: grid; gap: var(--gutter); }
@media (max-width: 960px) { .col-7, .col-5, .col-8, .col-4, .col-6 { grid-column: 1 / -1; } }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper-hi); }
.stat-row > div { padding: 18px 18px 16px; }
.stat-row > div + div { border-left: 1px solid var(--rule); }
.stat-row dt { font-size: .8125rem; color: var(--ink-3); }
.stat-row dd { margin: 6px 0 0; font: 600 clamp(1.25rem, 1rem + .9vw, 1.7rem)/1.1 var(--f-mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .stat-row { grid-template-columns: 1fr 1fr; } .stat-row > div:nth-child(3) { border-left: 0; } .stat-row > div:nth-child(n+3) { border-top: 1px solid var(--rule); } }

/* Swap card */
.swap { border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper-hi); overflow: hidden; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--rule); }
.seg button { height: 52px; border: 0; background: var(--paper-2); cursor: pointer; font-weight: 600; font-size: .98rem; color: var(--ink-2); }
.seg button[aria-selected="true"] { background: var(--paper-hi); color: var(--ink); box-shadow: inset 0 -2px 0 var(--brick); }
.swap-body { padding: clamp(18px, 2.4vw, 28px); display: grid; gap: 16px; }
.io { border: 1px solid var(--rule); border-radius: var(--r); padding: 14px 16px; background: var(--paper); }
.io label, .io .io-top { display: flex; justify-content: space-between; gap: 12px; font-size: .8125rem; color: var(--ink-3); }
.io .io-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.io input { flex: 1; min-width: 0; border: 0; background: transparent; font: 500 clamp(1.6rem, 1.3rem + 1vw, 2.2rem)/1.2 var(--f-mono); color: var(--ink); outline: none; letter-spacing: -.03em; padding: 0; }
.io input::placeholder { color: var(--ink-3); }
.io .io-out { flex: 1; font: 500 clamp(1.6rem, 1.3rem + 1vw, 2.2rem)/1.2 var(--f-mono); letter-spacing: -.03em; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.token-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: var(--r); border: 1px solid var(--rule); background: var(--paper-hi); font-weight: 650; font-size: .9375rem; white-space: nowrap; }
.token-pill .tk { width: 22px; height: 22px; border-radius: 3px; display: grid; place-items: center; font: 700 .625rem var(--f-mono); color: #FFF8EE; background: #2F6B4F; }
.token-pill .tk.vr { background: var(--brick-btn); }
.pcts { display: flex; gap: 6px; }
.pcts button { height: 28px; padding: 0 10px; border: 1px solid var(--rule); border-radius: var(--r); background: transparent; cursor: pointer; font: 650 .75rem var(--f-body); color: var(--ink-2); }
.pcts button:hover { border-color: var(--ink); color: var(--ink); }
.plain { font-size: .9375rem; color: var(--ink-2); margin: 0; min-height: 1.6em; }
.err { color: var(--brick-text); font-size: .9rem; font-weight: 550; min-height: 1.4em; margin: 0; }
.notice { font-size: .9rem; margin: 0; color: var(--ink-2); }
.notice.bad { color: var(--brick-text); }
.txline { font: 500 .8125rem var(--f-mono); color: var(--ink-2); word-break: break-all; }
.txline a { color: var(--brick-text); }
.big-nav { font: 600 clamp(2.6rem, 2rem + 2.5vw, 4.2rem)/1 var(--f-mono); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }

/* Wallet modal and toasts */
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(20, 16, 10, .45); display: grid; place-items: center; padding: 16px; }
.modal { width: min(440px, 100%); background: var(--paper-hi); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 24px; }
.modal header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal h2 { font-size: 1.5rem; }
.wallet-list { display: grid; gap: 8px; }
.wallet-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper); cursor: pointer; text-align: left; font-weight: 600; }
.wallet-opt:hover { border-color: var(--ink); }
.wallet-opt img { width: 28px; height: 28px; border-radius: 6px; }
.wallet-opt .rdns { margin-left: auto; font: 500 .75rem var(--f-body); color: var(--ink-3); }
.wallet-btn.connected { font-family: var(--f-mono); font-size: .875rem; }
.wallet-btn.wrong { --bg: var(--paper-hi); --fg: var(--brick-text); border-color: var(--brick-text); box-shadow: none; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--paper); border-radius: var(--r); padding: 14px 16px; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .6); font-size: .9375rem; display: grid; gap: 4px; }
.toast strong { font-weight: 650; }
.toast.bad { box-shadow: inset 0 0 0 1.5px var(--brick), 0 18px 40px -20px rgba(0, 0, 0, .6); }
.toast a { color: inherit; text-decoration-thickness: 1.5px; }

/* Portfolio */
.bldg-list { display: grid; gap: 0; border-top: 1.5px solid var(--ink); }
.bldg-item { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); padding: 32px 0; border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--header-h) + 20px); }
.bldg-item .b-id { grid-column: 1 / span 4; }
.bldg-item .b-id .letter { font-family: var(--f-display); font-size: 3.4rem; line-height: .9; font-weight: 600; letter-spacing: -.04em; }
.bldg-item .b-id h3 { margin: 10px 0 6px; }
.bldg-item .b-units { grid-column: 5 / span 8; }
.b-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .875rem; color: var(--ink-2); margin: 8px 0 0; }
.b-facts b { color: var(--ink); font-family: var(--f-mono); font-weight: 600; }
.units-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.unit-card { border: 1px solid var(--rule); border-radius: var(--r); padding: 12px; background: var(--paper-hi); display: grid; gap: 6px; }
.unit-card .u-no { font: 600 .9375rem var(--f-mono); }
.unit-card .u-rent { font: 500 .875rem var(--f-mono); color: var(--ink-2); }
.bldg-card { position: absolute; z-index: 6; width: 260px; background: var(--paper-hi); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 14px 16px; font-size: .875rem; pointer-events: none; }
.bldg-card h4 { font-family: var(--f-display); font-size: 1.2rem; font-weight: 560; letter-spacing: -.015em; margin-bottom: 6px; }
@media (max-width: 900px) { .bldg-item .b-id, .bldg-item .b-units { grid-column: 1 / -1; } }

/* Roll page */
.roll-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.roll-tools select, .roll-tools input[type="search"] { height: 40px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper-hi); color: var(--ink); padding: 0 12px; font: 500 .9375rem var(--f-body); }
.roll-tools select:focus, .roll-tools input:focus { border-color: var(--ink); outline: none; }
.filter-seg { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.filter-seg button { height: 38px; padding: 0 12px; border: 0; background: var(--paper-hi); cursor: pointer; font-weight: 550; font-size: .875rem; color: var(--ink-2); }
.filter-seg button + button { border-left: 1px solid var(--rule); }
.filter-seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.verify-box { display: grid; gap: 10px; }
.drop { border: 1.5px dashed var(--ink-3); border-radius: var(--r); padding: 18px; text-align: center; font-size: .9rem; color: var(--ink-2); cursor: pointer; transition: background .2s, border-color .2s; }
.drop.over { border-color: var(--brick-btn); background: color-mix(in srgb, var(--brick) 7%, transparent); }
.verdict { padding: 10px 12px; border-radius: var(--r); font-size: .9rem; }
.verdict.ok { background: var(--paper-2); box-shadow: inset 0 0 0 1.5px var(--ink); }
.verdict.bad { background: color-mix(in srgb, var(--brick) 14%, transparent); color: var(--brick-text); }
.verdict.info { background: var(--paper-2); }

/* Docs */
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 200px; gap: clamp(24px, 3vw, 48px); padding: 40px 0 96px; }
.doc-nav { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: .9375rem; max-height: calc(100dvh - var(--header-h) - 48px); overflow: auto; }
.doc-nav h4 { font: 650 .72rem/1.6 var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 22px 0 6px; }
.doc-nav h4:first-child { margin-top: 0; }
.doc-nav a { display: block; padding: 5px 10px; text-decoration: none; color: var(--ink-2); border-left: 2px solid transparent; }
.doc-nav a[aria-current="page"] { color: var(--ink); border-left-color: var(--brick); font-weight: 600; }
.doc-nav a:hover { color: var(--ink); }
.doc { min-width: 0; }
.doc h1 { font-size: clamp(2.1rem, 1.5rem + 2vw, 3.1rem); line-height: 1.06; letter-spacing: -.03em; }
.doc .doc-sub { font-size: 1.15rem; color: var(--ink-2); margin: 14px 0 32px; }
.doc h2 { font-size: clamp(1.45rem, 1.2rem + .8vw, 1.85rem); margin: 44px 0 12px; scroll-margin-top: calc(var(--header-h) + 20px); }
.doc h3 { font-size: 1.2rem; margin: 28px 0 8px; }
.doc p, .doc li { max-width: 70ch; color: var(--ink); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc pre { background: var(--ink); color: var(--paper); padding: 16px 18px; border-radius: var(--r); overflow-x: auto; font: 500 .84rem/1.6 var(--f-mono); }
.doc :not(pre) > code { background: var(--paper-2); padding: 1px 6px; border-radius: 3px; font-size: .86em; }
.doc table { border-collapse: collapse; width: 100%; margin: 12px 0 22px; font-size: .9375rem; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.doc th { font: 650 .75rem/1.4 var(--f-body); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); border-bottom: 1.5px solid var(--ink); }
.doc .callout { border: 1px dashed var(--brick-text); border-radius: var(--r); padding: 14px 16px; margin: 20px 0; background: color-mix(in srgb, var(--brick) 5%, transparent); }
.doc .callout p:last-child { margin: 0; }
.doc-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--rule); }
.doc-pager a { text-decoration: none; display: grid; gap: 2px; }
.doc-pager a span { font-size: .8125rem; color: var(--ink-3); }
.doc-pager a strong { font-family: var(--f-display); font-weight: 560; font-size: 1.15rem; }
.doc-pager .next { text-align: right; margin-left: auto; }
.doc-toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: .875rem; }
.doc-toc h4 { font: 650 .72rem/1.6 var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 8px; }
.doc-toc a { display: block; padding: 4px 0; text-decoration: none; color: var(--ink-2); }
.doc-toc a:hover { color: var(--ink); }
@media (max-width: 1100px) { .docs-layout { grid-template-columns: 220px minmax(0, 1fr); } .doc-toc { display: none; } }
@media (max-width: 760px) { .docs-layout { grid-template-columns: 1fr; padding-top: 16px; } .doc-nav { position: static; max-height: none; border-bottom: 1px solid var(--rule); padding-bottom: 16px; } }

/* Reveal defaults: content is visible unless the motion layer takes it over. */
.js-motion .reveal { opacity: 0; }
.js-motion .reveal.animate__animated { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .street .win.is-late .light { opacity: .55; animation: none; }
  .js-motion .reveal { opacity: 1; }
}

@media print {
  .site-head, .strip, .site-foot, .toasts { display: none; }
  body { background: #fff; color: #000; }
}

.tally { font-size: .9375rem; color: var(--ink-2); }
.tally b { color: var(--ink); font-weight: 600; }
@media (min-width: 901px) { .portfolio-frame { height: min(62vh, 540px); } }

/* Visible focus for the big numeric fields. */
.io:focus-within { border-color: var(--ink); box-shadow: 0 0 0 2px var(--brick-btn); }
.amount:focus-within { box-shadow: 0 2px 0 0 var(--paper); outline: 2px solid var(--paper); outline-offset: 6px; }
.carried { color: var(--ink); font-weight: 650; }
