/* The homepage (2026-10-25), from the Claude Design handover: results 01 (colour and type),
   02 (desktop at 1440), 03 (mobile at 390), 04 (hero map) and 06 (motion). Tokens come from
   /assets/tokens.css ([data-look="lav"]); the header and footer from /assets/chrome.css.
   Grid: 12 columns, 16 px gap, 56 px gutter, max 1440; the nav, the coin note and the footer
   columns all start on column 7. Mobile is one column on a 20 px gutter under 860 px. */

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; font-optical-sizing: auto; font-variant-numeric: tabular-nums; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[data-look="lav"] { color-scheme: light; --live-core: #FFFFFF; --live-shadow: 0 0 0 1px rgba(22,26,22,.55), 0 0 3px 2px rgba(255,255,255,.55); --coin-shadow-c: rgba(22,26,22,.42); --flap-shadow-c: rgba(22,26,22,.32); }
[data-look="lav"][data-theme="dark"] { color-scheme: dark; --live-core: #F4EEDD; --live-shadow: 0 0 3px 1px rgba(255,236,204,.6), 0 0 10px 3px rgba(255,236,204,.16); --coin-shadow-c: rgba(0,0,0,.55); --flap-shadow-c: rgba(0,0,0,.45); }
body { margin: 0; min-width: 320px; min-height: 100svh; font-size: var(--t-body); line-height: var(--lh-body); letter-spacing: var(--tr-body); font-weight: 400; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
p, h1, h2, h3, ul { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.only-dark, .only-touch { display: none; }
[data-theme="dark"] .only-light { display: none; }
[data-theme="dark"] .only-dark { display: block; }
@media (hover: none) { .only-pointer { display: none; } .only-touch { display: inline; } }

/* Type roles as classes, so a line of markup says which role it has. */
.t-display { font-size: var(--t-display); line-height: var(--lh-display); letter-spacing: var(--tr-display); font-weight: 300; }
.t-title { font-size: var(--t-title); line-height: var(--lh-title); letter-spacing: var(--tr-title); font-weight: 300; }
.t-statement { font-size: var(--t-statement); line-height: var(--lh-statement); letter-spacing: var(--tr-statement); font-weight: 400; }
.t-body { font-size: var(--t-body); line-height: var(--lh-body); letter-spacing: var(--tr-body); font-weight: 400; }
.t-ui { font-size: var(--t-ui); line-height: var(--lh-ui); letter-spacing: 0; font-weight: 400; }
.t-caption { font-size: var(--t-caption); line-height: var(--lh-caption); letter-spacing: var(--tr-caption); font-weight: 400; }

/* Content links: accent, underlined, never broken across lines. The only accent on the page. */
.link { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; white-space: nowrap; }
.link:hover { text-decoration-thickness: 2px; }

/* ── Sections ── */
.sec { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.sec-title { margin: 0 0 0 var(--tr-title); color: var(--ink); }
.sec-note { color: var(--muted); }

/* ── Hero: the live map, the copy on the left, the live note and the Map switch bottom right. ── */
.hero { position: relative; height: clamp(780px, 100svh, 960px); margin-top: -64px; overflow: hidden; }
.hero__scene {
  position: absolute; inset: 0; z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, rgba(0,0,0,.6) 82%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 62%, rgba(0,0,0,.6) 82%, transparent 100%);
}
.hero__ground { position: absolute; left: 0; top: 0; display: none; image-rendering: pixelated; }
.hero__sheet, .hero__lights { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero__copy {
  position: absolute; z-index: 2; left: max(var(--gutter), calc(50% - (var(--maxw) / 2) + var(--gutter))); top: 50%; transform: translateY(-44%);
  max-width: 880px; display: flex; flex-direction: column; align-items: flex-start; pointer-events: none;
}
.hero__role { margin: 0 0 32px; color: var(--muted); }
.intro-pending .site-head__line { transform: scaleX(0); }
.intro-pending :is(.site-head__name, .site-nav > a, .site-nav__group > a, .site-head__right button, [data-h], .hero__note) { opacity: 0; }
.hero__name { margin: 0 0 28px -0.05em; color: var(--ink); white-space: nowrap; }
.hero__tag { margin: 0 0 20px; color: var(--ink); }
.hero__lead { margin: 0; max-width: 31em; color: var(--muted); text-wrap: pretty; }
.hero__readout { position: absolute; z-index: 2; left: max(var(--gutter), calc(50% - (var(--maxw) / 2) + var(--gutter))); bottom: 44px; margin: 0; min-height: 18px; color: var(--muted); }
.hero__readout:empty { visibility: hidden; }
.hero__note {
  position: absolute; z-index: 2; right: max(var(--gutter), calc(50% - (var(--maxw) / 2) + var(--gutter))); bottom: 40px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 16px; max-width: 400px; text-align: right;
}
.live { margin: 0; color: var(--muted); text-wrap: pretty; }
.live__dot { display: inline-block; width: 7px; height: 7px; margin: 0 8px 0 0; border-radius: 50%; vertical-align: 1px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.live[data-state="live"] .live__dot { background: var(--live-core); box-shadow: var(--live-shadow); }
.map-pick { display: flex; align-items: center; gap: 14px; }
.map-pick__k { color: var(--muted); }
.seg { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--muted); border-radius: 999px; }
.seg button { padding: 4px 14px; border-radius: 999px; color: var(--muted); transition: background-color .2s, color .2s; }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--bg); }

/* ── Things I build: a mosaic of big rounded frames, each a capture with one word and one line
   on a fade into the frame's surface. Most crops are given in source pixels of the 1600 x 1000
   captures as --cx, --cy, --cw (left, top, width); the image is scaled so that --cw fills the frame. ── */
.things { padding-top: 152px; }
.things .sec-title { margin-bottom: 48px; }
.mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.frame { position: relative; display: block; overflow: hidden; border-radius: 28px; background: var(--surface); color: var(--ink); isolation: isolate; }
/* the fade and a video carry the corners themselves: with a video playing under the caption, Chrome drew
   the fade square at one corner despite the overflow clip */
.frame--loop .frame__fade, .frame--loop video { border-radius: inherit; }
.frame:focus-visible { outline-offset: 4px; border-radius: 28px; }
.frame__img { position: absolute; top: 0; max-width: none; height: auto; }
/* one capture per theme; the other stays out of the layout (lazy, so it is not fetched either) */
.frame__img.only-dark { display: none; }
[data-theme="dark"] .frame__img.only-dark { display: block; }
[data-theme="dark"] .frame__img.only-light { display: none; }
.frame__img--crop { left: calc(-1 * var(--cx) / var(--cw) * 100%); margin-top: calc(-1 * var(--cy) / var(--cw) * 100%); width: calc(1600 / var(--cw) * 100%); }
.frame__img--cover { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.frame__fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 58%; pointer-events: none;
  background: linear-gradient(to top, var(--surface) 0%, color-mix(in srgb, var(--surface) 94%, transparent) 34%, color-mix(in srgb, var(--surface) 55%, transparent) 66%, transparent 100%);
}
.frame__text { position: absolute; left: 30px; right: 30px; bottom: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.frame__word { display: block; margin-left: var(--tr-title); color: var(--ink); }
.frame__line { display: block; max-width: 30em; color: var(--muted); text-wrap: pretty; }
.frame__live { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.frame__live[hidden] { display: none; }
.frame__live .live__dot { margin: 0; background: var(--live-core); box-shadow: var(--live-shadow); }
/* Loop frames (a recording of the tool, one per theme): the caption sits on a firmer fade so the tool's own
   text never shows through it; in dark the fade is a little darker than the surface, under the darker captures. */
.frame--loop .frame__fade { height: 62%; background: linear-gradient(to top, var(--surface) 0%, color-mix(in srgb, var(--surface) 96%, transparent) 46%, color-mix(in srgb, var(--surface) 60%, transparent) 74%, transparent 100%); }
[data-theme="dark"] .frame--loop { background: #14151A; }
[data-theme="dark"] .frame--loop .frame__fade { background: linear-gradient(to top, #1E241F 0%, rgba(30,36,31,.96) 46%, rgba(30,36,31,.6) 74%, rgba(30,36,31,0) 100%); }
.f-finance { grid-column: span 7; aspect-ratio: 768 / 560; }
.f-slmap { grid-column: span 5; aspect-ratio: 544 / 560; --cx: 353; --cy: 100; --cw: 874; }   /* retaken 2026-10-25 with the panel closed: T-Centralen at 790, 490 */
.f-brf { grid-column: span 5; aspect-ratio: 544 / 480; }
.f-networth { grid-column: span 7; aspect-ratio: 768 / 480; }
.f-tunnelbana { grid-column: span 6; aspect-ratio: 656 / 560; }
[data-theme="dark"] .f-tunnelbana { background: #090C11; }
[data-theme="dark"] .f-networth { background: #2C332D; }
.f-tunnelbana .frame__fade { height: 52%; }
/* Wake sits beside Tunnelbana (the two games, 2026-11-30); dark ground is the game's own indigo */
.f-wake { grid-column: span 6; aspect-ratio: 656 / 560; }
[data-theme="dark"] .f-wake { background: #10122E; }
.f-wake .frame__fade { height: 52%; }
/* Split-Flap has its own row since Wake joined: the board keeps its size on the right half, the caption sits left */
.f-flap { grid-column: span 12; aspect-ratio: 1328 / 560; }
.f-flap .frame__fade { height: 46%; background: linear-gradient(to top, var(--surface) 0%, color-mix(in srgb, var(--surface) 94%, transparent) 40%, transparent 100%); }
.f-flap .frame__text { right: 52%; }
.flap-stage { position: absolute; left: 50.5%; right: 3.5%; top: 9%; display: block; }
.flap-scroll-wrap { --flap-shadow: var(--flap-shadow-c); }

/* Between a tablet and the design's 1440 the 6/6 row is too short for the board and a four-line caption
   (the board sat on the word by up to 102 px at 861). The row gets taller and the board smaller and higher, so
   the two never meet; Tunnelbana shares the row height. Review 703, fix 1. */
@media (min-width: 861px) and (max-width: 1199px) {
  .f-tunnelbana, .f-wake { aspect-ratio: 656 / 800; }
  .f-flap { aspect-ratio: 1328 / 640; }
  /* the BRF and Net worth captions run to four lines here, so their row gets taller too and the loop keeps its
     top half clear above the caption; BRF plays its tall file (data-tall-mq), Net worth shows its whole wide file on the
     matching ground */
  .f-brf { aspect-ratio: 544 / 680; }
  .f-tunnelbana .frame__fade, .f-wake .frame__fade { height: 54%; }
  .f-networth { aspect-ratio: 768 / 680; }
  .f-brf .frame__fade { height: 66%; background: linear-gradient(to top, var(--surface) 0%, color-mix(in srgb, var(--surface) 97%, transparent) 62%, color-mix(in srgb, var(--surface) 60%, transparent) 84%, transparent 100%); }
  [data-theme="dark"] .f-brf .frame__fade { background: linear-gradient(to top, #1E241F 0%, rgba(30,36,31,.97) 62%, rgba(30,36,31,.6) 84%, rgba(30,36,31,0) 100%); }
  .f-networth .frame__img--cover { object-fit: contain; }
  .flap-stage { left: 50.5%; right: 3.5%; top: 9%; }
}
/* up to 1299 the board only just clears the word (0 px at 1200), so it sits a little higher */
@media (min-width: 1200px) and (max-width: 1299px) {
  .flap-stage { top: 6%; }
}

/* ── The coin and the note: the hobby small, the note the row's one strong element. ── */
.coins { padding-top: 184px; }
.coins__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 16px; align-items: center; }
.coins__coin { grid-column: 1 / span 4; display: flex; align-items: center; gap: 28px; }
.coins .coin-turn { --coin-size: 148px; --coin-shadow: var(--coin-shadow-c); --coin-focus: var(--accent); flex: none; }
.coins__line { margin: 0; max-width: 15em; color: var(--muted); text-wrap: pretty; }
.coins__line .link { text-underline-offset: 3px; }
.coins__note { grid-column: 6 / span 7; }
.coins__statement { margin: 0; color: var(--ink); text-wrap: pretty; }
.coins__source { margin: 24px 0 0; color: var(--muted); }

/* ── Work: the timeline drawn to scale, the move to Stockholm as a step. Positions are written by
   home.js as inline left/width (desktop) or top/height (phones), in the units below. ── */
.work { padding-top: 184px; }
.work .sec-head { margin-bottom: 56px; }
.tl-years { position: relative; height: 18px; }
.tl-year { position: absolute; top: 0; color: var(--muted); white-space: nowrap; }
.tl-track { position: relative; height: 160px; margin-top: 18px; }
.tl-rule { position: absolute; background: var(--hairline); }
.tl-up { left: 0; width: 47.5%; top: 64px; height: 1px; }
.tl-step { left: 47.5%; top: 64px; width: 1px; height: 61px; }
.tl-low { left: 47.5%; right: 0; top: 124px; height: 1px; }
.tl-riser { position: absolute; left: 47.5%; top: 18px; height: 46px; width: 0; border-left: 1px dashed var(--hairline); }
.tl-move { position: absolute; left: calc(47.5% + 10px); top: 10px; color: var(--muted); white-space: nowrap; }
.tl-tick { position: absolute; width: 1px; height: 9px; background: var(--hairline); }
.tl-role { position: absolute; top: 0; bottom: 0; min-width: 24px; text-align: left; }
.tl-role:focus-visible { outline-offset: 0; }
.tl-seg { position: absolute; left: 2px; right: 2px; height: 2px; border-radius: 1px; background: var(--ink); transition: top .15s, height .15s; }
.tl-role[aria-expanded="true"] .tl-seg { height: 4px; }
.tl-org { position: absolute; left: 10px; color: var(--ink); white-space: nowrap; }
.tl-sub { position: absolute; left: 10px; color: var(--muted); white-space: nowrap; }
.tl-role[aria-expanded="true"] .tl-sub { color: var(--ink); }
.tl-role--end .tl-org, .tl-role--end .tl-sub { left: auto; right: 2px; text-align: right; }
.tl-detail { margin-top: 40px; min-height: 168px; max-width: 34em; }
.tl-when { margin: 0 0 8px; color: var(--muted); }
.tl-text { margin: 0; color: var(--ink); text-wrap: pretty; }
/* the vertical drawing (phones) */
.tl-v { position: relative; }
.tl-v .tl-year { left: 0; }
.tl-v .tl-rule { width: 1px; }
.tl-v .tl-vstep { height: 1px; width: 25px; }
.tl-v .tl-dash { position: absolute; width: 18px; height: 0; border-top: 1px dashed var(--hairline); }
.tl-v .tl-move { left: 108px; }
.tl-v .tl-tick { width: 9px; height: 1px; }
.tl-v .tl-role { left: 40px; right: 0; bottom: auto; }
.tl-v .tl-seg { right: auto; transition: left .15s, width .15s; }
.tl-v .tl-lbl { position: absolute; right: 0; display: flex; flex-direction: column; gap: 2px; }
.tl-v .tl-org, .tl-v .tl-sub { position: static; left: auto; white-space: nowrap; }

/* ── Photography: one tall frame and two stacked, a short dark fade in both themes. ── */
.photos { padding-top: 168px; padding-bottom: 200px; }
.photos .sec-head { margin-bottom: 48px; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.photo-col { display: flex; flex-direction: column; gap: 16px; }
.frame--photo { background: #2C332D; color: #EEF1EC; }
.frame--photo .frame__fade { height: 52%; background: linear-gradient(to top, rgba(18,22,18,.72) 0%, rgba(18,22,18,.42) 45%, rgba(18,22,18,0) 100%); }
.frame--photo .frame__text { gap: 10px; }
.frame--photo .frame__word { color: #EEF1EC; }
.frame--photo .frame__line { color: #D3D9D2; }
.photo--tall { aspect-ratio: 656 / 688; }
.photo--tall .frame__fade { height: 34%; }
.photo--wide { aspect-ratio: 656 / 336; }
.p-vietnam .frame__img { object-position: 32% 50%; }
.p-lomond .frame__img { object-position: 50% 40%; }
.p-owls .frame__img { object-position: 50% 35%; }
.photos__more { margin: 28px 0 0; }

/* ── Phones and narrow widths: one column on a 20 px gutter. ── */
@media (max-width: 860px) {
  .hero { height: auto; margin-top: -56px; }
  .hero__scene {
    inset: auto 0 auto 0; top: 0; height: 560px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 58%, rgba(0,0,0,.55) 78%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 58%, rgba(0,0,0,.55) 78%, transparent 100%);
  }
  .hero__copy { position: relative; left: auto; top: auto; transform: none; max-width: none; padding: 420px var(--gutter) 0; pointer-events: auto; }
  .hero__role { margin-bottom: 20px; }
  .hero__name { margin-bottom: 20px; white-space: normal; }
  .hero__tag { margin-bottom: 14px; }
  .hero__lead { max-width: 34em; }
  .hero__readout { display: none; }
  .hero__note { position: relative; right: auto; bottom: auto; max-width: none; padding: 36px var(--gutter) 0; align-items: flex-start; text-align: left; gap: 14px; }
  .live { min-height: 36px; }
  /* 40 px buttons as drawn, a 44 px hit area (the brief's phone minimum) */
  .seg button { position: relative; height: 40px; padding: 0 18px; }
  .seg button::after { content: ''; position: absolute; inset: -2px 0; }
  .coins__line .link { position: relative; }
  .coins__line .link::after { content: ''; position: absolute; left: 0; right: 0; top: -9px; bottom: -9px; }

  .things { padding-top: 112px; }
  .things .sec-title { margin-bottom: 32px; }
  .mosaic { display: flex; flex-direction: column; gap: 12px; }
  .mosaic .frame { aspect-ratio: 4 / 5; }
  .frame__text { left: 20px; right: 20px; bottom: 22px; gap: 10px; }
  .frame__fade { height: 60%; background: linear-gradient(to top, var(--surface) 0%, color-mix(in srgb, var(--surface) 94%, transparent) 40%, color-mix(in srgb, var(--surface) 55%, transparent) 70%, transparent 100%); }
  .frame--loop .frame__fade { height: 58%; background: linear-gradient(to top, var(--surface) 0%, color-mix(in srgb, var(--surface) 96%, transparent) 48%, color-mix(in srgb, var(--surface) 60%, transparent) 76%, transparent 100%); }
  [data-theme="dark"] .frame--loop .frame__fade { background: linear-gradient(to top, #1E241F 0%, rgba(30,36,31,.96) 48%, rgba(30,36,31,.6) 76%, rgba(30,36,31,0) 100%); }
  /* BRF's caption runs to four lines on a phone, so its fade reaches higher */
  .f-brf .frame__fade { height: 70%; background: linear-gradient(to top, var(--surface) 0%, color-mix(in srgb, var(--surface) 97%, transparent) 64%, color-mix(in srgb, var(--surface) 60%, transparent) 86%, transparent 100%); }
  [data-theme="dark"] .f-brf .frame__fade { background: linear-gradient(to top, #1E241F 0%, rgba(30,36,31,.97) 64%, rgba(30,36,31,.6) 86%, rgba(30,36,31,0) 100%); }
  .f-tunnelbana .frame__fade, .f-wake .frame__fade { height: 54%; }
  .f-flap .frame__text { right: 20px; }
  .f-slmap { --cx: 430; --cy: 40; --cw: 720; }
  .f-flap .frame__fade { height: 46%; background: linear-gradient(to top, var(--surface) 0%, color-mix(in srgb, var(--surface) 94%, transparent) 50%, transparent 100%); }
  .flap-stage { left: 6%; right: 6%; top: 9%; }

  .coins { padding-top: 128px; }
  .coins__grid { display: block; }
  .coins__coin { gap: 20px; }
  .coins .coin-turn { --coin-size: 120px; }
  .coins__line .link { display: inline-block; padding: 4px 0; }
  .coins__note { margin-top: 40px; }
  .coins__source { margin-top: 20px; }

  .work { padding-top: 128px; }
  .work .sec-head { display: block; margin-bottom: 36px; }
  .work .sec-title { margin-bottom: 12px; }
  .tl-detail { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--hairline); min-height: 0; }
  .tl-when { margin-bottom: 6px; }
  .tl-text .link { white-space: normal; }
  .tl-text .link + .link, .tl-text .link:last-of-type { white-space: nowrap; }

  .photos { padding-top: 120px; padding-bottom: 140px; }
  .photos .sec-head { display: block; margin-bottom: 28px; }
  .photos .sec-title { margin-bottom: 10px; }
  .photos .sec-link { display: inline-block; padding: 11px 0; }
  .photo-grid { display: flex; flex-direction: column; gap: 12px; }
  .photo-col { gap: 12px; }
  .photo--tall { aspect-ratio: 4 / 5; }
  .photo--wide { aspect-ratio: 4 / 3; }
  .photo--wide .frame__fade { height: 56%; }
  .frame--photo .frame__text { gap: 8px; }
  .p-lomond .frame__img { object-position: 22% 50%; }
  .p-owls .frame__img { object-position: 74% 30%; }
  .photos__more { margin-top: 16px; }
  .photos__more .link { display: inline-block; padding: 11px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .seg button, .tl-seg { transition: none; }
}
