/* Windows live in their own fixed layer so text size never depends on the laptop's scale. The layer lets
   clicks through; only windows (and the Mission Control backdrop) take them. js/wm.js positions each window.
   Colours are semantic tokens with light and dark values; see the dark and accessibility blocks at the end. */
.win-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.win {
  --label: #252523;
  --label-2: #5d5d58; /* 6.6:1 on white */
  --tint: #0b4d1e; /* accent text, icons, selection */
  --on-tint: #fff;
  --fill: rgba(11, 77, 30, .07); /* hover */
  --row: #f3f4f0; /* grouped rows on the content surface */
  --surface: #fff;
  --separator: rgba(0, 0, 0, .1);
  --ctl: rgba(0, 0, 0, .05); /* toolbar button capsule */
  --ctl-hover: rgba(0, 0, 0, .1);
  --sel-box: rgba(0, 0, 0, .08); /* box behind a selected Finder icon */
  --btn: #1e1e1e;
  --btn-hover: #0b4d1e;
  --light-off: #d3d4d0;
  --seg-on: #fff; /* the selected segment, raised off the --ctl track */
  --danger: #b3261e; /* error text: 6.5:1 on white */

  --shadow: 0 0 0 .5px rgba(0, 0, 0, .22), 0 4px 12px rgba(0, 0, 0, .08), 0 24px 72px rgba(0, 0, 0, .28);
  --shadow-off: 0 0 0 .5px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .06), 0 12px 36px rgba(0, 0, 0, .16);

  position: absolute;
  left: 24px;
  top: 24px;
  display: flex;
  flex-direction: column;
  width: min(960px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-radius: 26px; /* macOS 26 radius for a window with a toolbar-height title bar */
  background: var(--surface);
  /* The macOS window edge: a hairline, then a deep, soft shadow. Windows behind the key window sit lower. */
  box-shadow: var(--shadow-off);
  color: var(--label);
  font-family: 'Poppins', sans-serif;
  transform-origin: 0 0;
  pointer-events: auto;
}
.win.key { box-shadow: var(--shadow); }
.win:focus { outline: none; }
.win :focus-visible { outline-color: var(--tint); }
/* Minimised: kept in place (scroll position survives) but invisible and inert until restored from the Dock. */
.win.min { visibility: hidden; pointer-events: none; }
.win.moving .win-body { pointer-events: none; } /* no text selection or hover flicker while dragging */

/* Title bar: one surface with the body, as in macOS 26 (windows.md › macOS window anatomy). Window controls on
   the leading side, the title centred in system type, and a hairline only once content scrolls under it. */
.win-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 16px 8px 18px;
  background: var(--surface);
  user-select: none;
  -webkit-user-select: none;
  transition: box-shadow .15s ease;
}
.win-bar.edge { box-shadow: 0 1px 0 var(--separator); }
.win-lead { display: flex; align-items: center; gap: 12px; }
.win-trail { display: flex; justify-content: flex-end; }
.win-bar h2 {
  min-width: 0;
  transition: color .15s ease;
  margin: 0;
  overflow: hidden;
  font-family: var(--font-sys);
  font-weight: 600;
  font-size: 13px;
  line-height: 16px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Traffic lights: 14px circles 8px apart, each in a 20px hit area (the macOS minimum control size). Only the key
   window shows them in colour; inactive windows use grey until the pointer is over them, and their title dims
   (windows.md › macOS window states). */
.lights { display: flex; gap: 2px; }
.light {
  position: relative;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
}
.light::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--light-off);
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18);
}
.light.close::before { background: #ff5f57; box-shadow: inset 0 0 0 .5px #e0443e; }
.light.min::before { background: #febc2e; box-shadow: inset 0 0 0 .5px #dea123; }
.light.zoom::before { background: #28c840; box-shadow: inset 0 0 0 .5px #1aab29; }
.win:not(.key) .lights:not(:hover) .light::before { background: var(--light-off); box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12); }
.win:not(.key) .win-bar h2 { color: var(--label-2); }
.light::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 11px/1 var(--font-sys);
  color: rgba(0, 0, 0, .5);
  opacity: 0;
}
.light.close::after { content: '\00d7'; }
.light.min::after { content: '\2212'; }
.light.zoom::after { content: '+'; }
.lights:hover .light::after, .light:focus-visible::after { opacity: 1; }
.light:focus-visible { outline-offset: 0; }

.win-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 28px;
  border-radius: 14px; /* a toolbar item capsule, as in macOS 26 */
  background: var(--ctl);
  color: var(--label);
  transition: background-color .15s ease;
}
.win-btn[hidden] { display: none; } /* display: grid above would otherwise override [hidden] */
.win-btn .i { width: 16px; height: 16px; }
.win-btn:hover { background: var(--ctl-hover); }
.m-close { display: none; }

/* Content layer: the same opaque surface; no glass in content (materials.md › Liquid Glass). */
.win-body {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 24px 40px 40px;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--surface);
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
}
.win-body p { margin: 0 0 12px; max-width: 68ch; }
.win-body h3 {
  margin: 0 0 24px;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(32px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -.025em;
}
.win-body .sub { margin: 0 0 8px; font-weight: 500; line-height: 20px; color: var(--tint); }
.win-body .empty { color: var(--label-2); }

.stat {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 24px;
  padding: 24px;
  border-radius: 24px;
  background: #0b4d1e;
  color: #fff;
}
.stat b { font-family: 'Playfair Display', serif; font-weight: 600; font-size: 60px; line-height: 60px; letter-spacing: -.025em; white-space: nowrap; }
.stat span { font-weight: 500; line-height: 20px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 11.2px;
  background: var(--btn);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease;
}
.btn:hover, .btn:focus-visible { background: var(--btn-hover); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.btn .i { width: 16px; height: 16px; }

/* An app (a text file running its own page, js/app-frame.js): the page in a frame as tall as its content, so the
   window body is the only scroll view (scroll-views.md). Starts tall so the window opens at full height. */
.app-frame { display: block; width: 100%; height: 1800px; border: 0; background: var(--surface); }

/* Editorial profile (a text file with a hero image): full-bleed picture, text beside links, figures, pictures. */
.win-body:has(.hero) { padding: 0 0 40px; }
.hero { display: block; width: 100%; height: clamp(180px, 40vw, 380px); object-fit: cover; object-position: 50% 45%; }
/* A calculator display: the whole screen on black. A video hero drops the showcase tile shape. */
.hero.hero-lcd { object-fit: contain; background: #000; }
.show-video.hero { grid-row: auto; border-radius: 0; background: #000; }
.show-video.hero video { object-fit: contain; }
.profile { padding: 32px 40px 0; }
.profile-main { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.profile-main p { margin: 0 0 12px; }
.links.stack { flex-direction: column; margin-top: 0; gap: 8px; }
.links.stack .btn { justify-content: space-between; height: 44px; }
/* Labels share the leading edge down the stack; a download's icon trails like the external link's arrow. */
.links.stack .btn[download] { flex-direction: row-reverse; }
.figs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin-top: 32px; }
.fig { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: 24px; background: var(--row); }
.fig b { font-family: 'Playfair Display', serif; font-weight: 600; font-size: 48px; line-height: 48px; letter-spacing: -.025em; color: var(--tint); }
.fig span { font-weight: 500; line-height: 20px; }
.fig.accent { background: #0b4d1e; color: #fff; }
.fig.accent b { color: #fff; }
.pics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.pics img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.pics img:only-child { grid-column: 1 / -1; aspect-ratio: auto; }
.pics img.pic-lcd { aspect-ratio: 396 / 224; object-fit: contain; border-radius: 4px; }
.pics img.pic-lcd:only-child { grid-column: auto; }
@media (max-width: 720px) {
  .profile { padding: 24px 20px 0; }
  .profile-main, .pics { grid-template-columns: 1fr; }
  .figs { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; }
}

/* Rentals in numbers (js/windows.js › renderDashboard). The area switch is a macOS segmented control: equal-width
   segments on a recessed track, the selected one raised (segmented-controls.md › Best practices). Each area opens
   on a photograph of the place with the revenue on it, the page's one bold element; everything below stays on the
   quiet grouped-row surface (branding.md). Colours are the window's semantic tokens, so dark mode follows. */
.dash-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 16px 0 20px; }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 2px; border-radius: 9px; background: var(--ctl); }
.seg button {
  min-width: 104px;
  height: 28px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--label);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .15s ease;
}
.seg button:hover { background: var(--ctl-hover); }
.seg button[aria-pressed="true"] { background: var(--seg-on); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .14), 0 1px 2px rgba(0, 0, 0, .14); }
.dash-intro { max-width: 62ch; margin: 8px 0 0; color: var(--label-2); }
.dash-period { margin: 0; font-size: 13px; line-height: 18px; color: var(--label-2); }
/* One short settle when an area appears; none with reduced motion (motion.md). */
.dash-area { animation: dash-in .32s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes dash-in { from { opacity: 0; transform: translateY(8px); } }

/* The photograph: a dark scrim from the foot keeps white text above 7:1 over any part of the picture. */
.dash-hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 280px; overflow: hidden; border-radius: 24px; color: #fff; background: #0b2f20; }
.dash-hero img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.dash-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(4, 18, 10, .9) 0%, rgba(4, 18, 10, .62) 42%, rgba(4, 18, 10, 0) 100%); }
.dash-hero-text { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px 24px; width: 100%; padding: 24px 28px; }
.dash-hero .dash-meta { grid-column: 1; margin: 0; font-size: 13px; font-weight: 500; line-height: 18px; color: rgba(255, 255, 255, .88); }
.dash-hero h4 { grid-column: 1; margin: 0; font-family: 'Playfair Display', serif; font-size: 44px; font-weight: 600; line-height: 48px; letter-spacing: -.02em; }
.dash-rev { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.dash-rev span { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .88); }
.dash-rev b { font-family: 'Playfair Display', serif; font-size: 56px; font-weight: 600; line-height: 56px; letter-spacing: -.025em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-hero .delta.up, .dash-hero .delta.down, .dash-hero .delta.flat { background: rgba(255, 255, 255, .18); color: #fff; }
/* Says where the photo's revenue (all units) ends and the short-term statistics begin. */
.dash-scope { margin: 20px 4px 0; font-size: 13px; font-weight: 500; line-height: 18px; color: var(--label-2); }
/* The company's own mark in the top corner, the same square logos as the experience pages. */
.dash-logo { position: absolute; top: 20px; left: 20px; width: 64px; height: 64px; overflow: hidden; border-radius: 16px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 6px 20px rgba(0, 0, 0, .35); }
.dash-hero .dash-logo img { position: static; z-index: auto; display: block; width: 100%; height: 100%; object-fit: cover; }

/* Key figures: label, value and January–December as a sparkline along the foot; months on the books dotted. */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; } /* four figures, the review band below */
.kpi { display: flex; flex-direction: column; gap: 6px; min-height: 152px; padding: 18px 18px 0; overflow: hidden; border-radius: 20px; background: var(--row); }
.kpi:not(:has(.spark)) { padding-bottom: 18px; }
.kpi > span { font-size: 13px; font-weight: 500; line-height: 18px; color: var(--label-2); }
.kpi b { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 600; line-height: 36px; letter-spacing: -.02em; color: var(--label); font-variant-numeric: tabular-nums; }
.delta { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 18px; font-variant-numeric: tabular-nums; }
.dash-rev .delta { align-self: flex-end; }
.delta.up { background: var(--fill); color: var(--tint); }
.delta.down, .delta.flat { background: var(--ctl); color: var(--label-2); }
.spark { display: block; width: calc(100% + 36px); height: 40px; margin: auto -18px 0; }
.spark polygon { fill: var(--fill); }
.spark polyline { fill: none; stroke: var(--tint); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.spark .otb { stroke-dasharray: 1 4; opacity: .8; }
/* Reviews: one band across the grid, the score as a ring and three categories as bars. */
.kpi.score { grid-column: 1 / -1; min-height: 0; padding-bottom: 18px; }
.score-body { display: flex; align-items: center; gap: 28px; }
.cats { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; margin: 0; padding: 0; list-style: none; }
.cats li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px 8px; }
.cats span { font-size: 13px; font-weight: 500; line-height: 18px; color: var(--label); }
.kpi .cats b { font-family: inherit; font-size: 15px; font-weight: 600; line-height: 20px; letter-spacing: 0; }
.cats i { position: relative; grid-column: 1 / -1; height: 6px; overflow: hidden; border-radius: 3px; background: var(--ctl-hover); }
.cats i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); border-radius: inherit; background: var(--tint); }
.gauge { position: relative; width: 68px; height: 68px; margin: 2px 0; }
.gauge svg { display: block; width: 100%; height: 100%; }
.gauge circle { fill: none; stroke-width: 6; }
.gauge .track { stroke: var(--ctl-hover); }
.gauge .val { stroke: var(--tint); stroke-linecap: round; }
.gauge b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; line-height: 1; }
.kpi.score small { font-size: 12px; line-height: 16px; color: var(--label-2); }

/* Season chart: lines in an SVG that stretches to the plot, tick labels and the peak as HTML so they stay round and
   readable at any width. The y axis uses the familiar 0/50/100 sequence (charts.md › Axes). */
.season { margin: 8px 0 0; padding: 20px 20px 12px; border-radius: 20px; background: var(--row); }
.season figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-bottom: 32px; font-weight: 500; }
.season figcaption > span:first-child { margin-right: auto; }
.chart-key { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.chart-key i { width: 20px; border-top: 3px solid var(--tint); }
.chart-key.otb i { border-top: 3px dotted var(--tint); }
.plot { position: relative; height: 180px; margin-left: 44px; }
.plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.plot .grid { stroke: var(--separator); stroke-width: 1; }
.plot .area { stroke: none; }
.season stop { stop-color: var(--tint); stop-opacity: .3; }
.season stop + stop { stop-opacity: 0; }
.plot polyline { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.plot .cy { stroke: var(--tint); stroke-width: 3; }
.plot .otb { stroke: var(--tint); stroke-width: 3; stroke-dasharray: 1 6; opacity: .8; }
.yl { position: absolute; left: -44px; width: 36px; transform: translateY(-50%); font-size: 12px; line-height: 16px; text-align: right; color: var(--label-2); font-variant-numeric: tabular-nums; }
.peak { position: absolute; width: 0; height: 0; pointer-events: none; }
.peak i { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--tint); box-shadow: 0 0 0 3px var(--row); }
.peak em { position: absolute; left: 0; bottom: 12px; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; background: var(--tint); color: var(--on-tint); font-size: 12px; font-style: normal; font-weight: 600; line-height: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); margin: 8px 0 0 44px; font-size: 12px; line-height: 16px; text-align: center; color: var(--label-2); }

@media (max-width: 720px) {
  .dash-hero { min-height: 320px; }
  .dash-hero::after { background: linear-gradient(to top, rgba(4, 18, 10, .92) 0%, rgba(4, 18, 10, .66) 60%, rgba(4, 18, 10, .4) 100%); }
  .dash-hero-text { grid-template-columns: 1fr; padding: 20px; }
  .dash-hero h4 { font-size: 32px; line-height: 36px; }
  .dash-rev { grid-column: 1; grid-row: auto; align-items: flex-start; margin-top: 12px; text-align: left; }
  .dash-rev .delta { align-self: flex-start; }
  .dash-rev b { font-size: 44px; line-height: 48px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi b { font-size: 26px; line-height: 30px; }
  .dash-logo { top: 16px; left: 16px; width: 52px; height: 52px; border-radius: 13px; }
  .score-body { flex-wrap: wrap; gap: 16px; }
  .cats { flex-basis: 100%; grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .dash-area { animation: none; }
}

/* CV */
.cv-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.cv-head h3 { margin: 0; font-size: clamp(28px, 4vw, 40px); }
.cv-sec { margin-top: 24px; }
.cv-sec h4 {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tint);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tint);
}
.cv-entry { margin-bottom: 12px; }
.cv-row { display: flex; justify-content: space-between; gap: 16px; }
.cv-row b { font-weight: 500; }
.cv-row span { flex: none; text-align: right; color: var(--label-2); }
.cv-entry ul { margin: 4px 0 0; padding-left: 20px; }
.doc-dl { display: inline-flex; vertical-align: -3px; margin-left: 4px; color: var(--tint); border-radius: 4px; }
.doc-dl .i { width: 16px; height: 16px; }
.doc-dl:hover { opacity: .7; }
.doc-dl:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }
.cv-line { margin: 0 0 4px; max-width: none; }
.cv-line b { font-weight: 500; }

/* Folder: Finder icon view. The same file icons as the desktop; selection is a soft box behind the icon and
   the label in an accent pill, as in Finder. */
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); gap: 8px; }
.file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border-radius: 10px;
  font-family: var(--font-sys);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  text-align: center;
  color: var(--label);
  transition: background-color .15s ease;
}
.file .fi { --s: 64px; border-radius: 8px; transition: background-color .15s ease, box-shadow .15s ease; }
.file .role { max-width: 100%; font-size: 12px; line-height: 16px; color: var(--label-2); }
.file .lbl { padding: 0 6px; border-radius: 5px; transition: background-color .15s ease, color .15s ease; }
.file:hover { background: var(--fill); }
.file:focus-visible { outline: none; } /* selection look replaces the focus ring; keyboard only, no flash on click */
/* Only a selected file drops the hover tile; a quiet one (focus handed back after a window closes) keeps it. */
.file:not(.quiet):focus-visible { background: none; }
.file:not(.quiet):focus-visible .fi { background: var(--sel-box); box-shadow: 0 0 0 4px var(--sel-box); }
.file:not(.quiet):focus-visible .lbl { background: var(--tint); color: var(--on-tint); }

/* Summary button above a folder's files, and files split into side-by-side groups. Groups are told apart by a
   section label and a hairline between columns (collections.md › Best practices: group related items with
   negative space or separator lines). */
.folder-bar { display: flex; margin-bottom: 20px; }
.file-groups { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.file-group { min-width: 0; padding: 0 20px; }
.file-group:first-child { padding-left: 0; }
.file-group:last-child { padding-right: 0; }
.file-group + .file-group { border-left: 1px solid var(--separator); }
.file-group h4 {
  margin: 0 0 8px;
  font-family: var(--font-sys);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  color: var(--label-2);
}
.file-group .files { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
@media (max-width: 720px) {
  .file-groups { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .file-group { padding: 0; }
  .file-group + .file-group { border-left: 0; }
}

/* Download tiles under a folder's files: larger than a file icon, full-width rows with a 44px+ target */
.dl {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 18px 16px;
  border-radius: 12px;
  background: var(--row);
  color: var(--label);
  font-family: var(--font-sys);
  font-size: 15px;
  line-height: 20px;
  transition: background-color .15s ease;
}
.dl:first-child, :not(.dl) + .dl { margin-top: 16px; } /* the first row of a run; a locked row is a button, so not :first-of-type */
.dl .i { width: 22px; height: 22px; color: var(--tint); }
.dl-t { font-weight: 600; }
.dl-s { font-size: 12px; color: var(--tint); }
.dl:hover, .dl:focus-visible { background: var(--fill); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.gallery figcaption { margin-top: 8px; font-size: 14px; line-height: 20px; }

/* Contact */
.contact { display: grid; gap: 8px; max-width: 520px; }
.contact a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--row);
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.contact a:hover, .contact a:focus-visible { background: var(--fill); color: var(--tint); }
.contact b { font-weight: 500; text-align: right; overflow-wrap: anywhere; }

/* Travel map: a dark green panel with the visited countries lit in mint. */
.win.wide { width: min(1240px, 100%); }
/* On desktop the whole panel fits the window: the map shrinks to the height left over instead of scrolling. */
@media (min-width: 721px) {
  .win.wide .win-body { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; padding: 16px 32px 24px; }
  .win.wide .win-body h3 { flex: none; margin-bottom: 16px; font-size: clamp(28px, 6vh, 48px); }
  .win.wide .travel { display: flex; flex: 1; flex-direction: column; min-height: 0; }
  .win.wide .travel-stats, .win.wide .continents { flex: none; padding: clamp(8px, 2vh, 24px); }
  .win.wide .travel-stats b { font-size: clamp(28px, 5vh, 48px); }
  .win.wide .continents b { font-size: clamp(24px, 4vh, 36px); }
  .win.wide .travel-main { flex: 1; min-height: 0; }
  .win.wide .travel-list { min-height: 0; }
  .win.wide .travel-map { min-height: 0; aspect-ratio: auto; max-height: none; }
}
.travel {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(to bottom right, #11402c, #0b2f20);
  color: #fff;
}
.travel-stats { display: flex; justify-content: space-around; gap: 16px; padding: 24px; text-align: center; }
.travel-stats div, .continents div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.travel-stats b, .continents b {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.025em;
  color: var(--mint);
}
.travel-stats b { font-size: clamp(36px, 6vw, 60px); }
.travel-stats small { font-size: .5em; font-weight: 500; letter-spacing: 0; color: rgba(207, 238, 224, .7); }
.travel-stats span, .continents span { font-weight: 500; line-height: 20px; color: rgba(255, 255, 255, .85); }

.travel-main {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 16px;
  padding: 0 16px;
  border-top: 1px solid rgba(207, 238, 224, .12);
  border-bottom: 1px solid rgba(207, 238, 224, .12);
}
/* The list takes the map's height and scrolls inside it. */
.travel-list { position: relative; min-height: 240px; }
.travel-list table {
  position: absolute;
  inset: 0;
  display: block;
  overflow: auto;
  padding: 12px 0;
  border-collapse: collapse;
  scrollbar-width: thin;
  scrollbar-color: rgba(207, 238, 224, .3) transparent;
}
.travel-list th {
  padding: 0 8px 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
  color: rgba(207, 238, 224, .7);
}
.travel-list td { padding: 4px 8px; font-weight: 500; line-height: 20px; }
.travel-list td:first-child { width: 40px; vertical-align: top; padding-top: 5px; }
.travel-list img { border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }
.travel-list tr { cursor: default; transition: background-color .15s ease; }
.travel-list tbody tr.hl { background: rgba(207, 238, 224, .14); }
.travel-list tbody tr.hl td:last-child { color: var(--mint); }

/* The globe (js/globe.js) fills the box; it is drawn square in the middle. */
.travel-map { position: relative; aspect-ratio: 1; max-height: 520px; }
.travel-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.travel-map canvas.dragging { cursor: grabbing; }
/* Names the country under the pointer, since the canvas has no shapes to carry a tooltip. */
.globe-tip {
  position: absolute;
  top: 0;
  left: 0;
  margin: -36px 0 0 12px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(11, 47, 32, .92);
  box-shadow: 0 0 0 1px rgba(207, 238, 224, .2), 0 4px 12px rgba(0, 0, 0, .3);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  color: #fff;
  pointer-events: none;
}

.continents { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; padding: 24px; text-align: center; }
.continents b { font-size: 36px; }
.continents .zero { opacity: .45; }

@media (max-width: 720px) {
  .travel-main { grid-template-columns: 1fr; }
  .travel-map { order: -1; }
  .travel-list { min-height: 0; }
  .travel-list table { position: static; padding-top: 0; }
  .continents { grid-template-columns: repeat(3, 1fr); }
}

/* Resize: thin bands on the edges and larger squares in the corners (windows.md › macOS window anatomy). */
.grip { position: absolute; z-index: 2; touch-action: none; }
.grip.n, .grip.s { left: 22px; right: 22px; height: 6px; cursor: ns-resize; }
.grip.n { top: 0; }
.grip.s { bottom: 0; }
.grip.e, .grip.w { top: 22px; bottom: 22px; width: 6px; cursor: ew-resize; }
.grip.e { right: 0; }
.grip.w { left: 0; }
.grip.ne, .grip.se, .grip.sw, .grip.nw { width: 22px; height: 22px; }
.grip.ne { top: 0; right: 0; cursor: nesw-resize; }
.grip.sw { bottom: 0; left: 0; cursor: nesw-resize; }
.grip.se { bottom: 0; right: 0; cursor: nwse-resize; }
.grip.nw { top: 0; left: 0; cursor: nwse-resize; }
.win-bar { touch-action: none; }

/* Mission Control: the desktop dims and every open window shrinks into a grid; the one under the pointer or
   keyboard gets a ring and its title. The ring keeps a 3px look whatever the window's scale (--mcs). */
.mc-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(4, 22, 14, .55);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility 0s .3s;
}
.mc-backdrop:focus { outline: none; }
.win-layer.mc .mc-backdrop { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .3s ease; }
.win-layer.mc-anim .win { transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .15s ease; }
.win-layer.mc .win { cursor: pointer; box-shadow: var(--shadow); }
.win-layer.mc .win > * { pointer-events: none; }
.win-layer.mc .win.mc-sel { box-shadow: 0 0 0 calc(3px / var(--mcs, 1)) var(--mint), var(--shadow); }
.mc-label {
  position: absolute;
  z-index: 1000;
  translate: -50% 0;
  max-width: 280px;
  padding: 4px 12px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(246, 246, 246, .94);
  color: #252523;
  font: 500 13px/18px var(--font-sys);
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
}
.mc-label.on { opacity: 1; }

@media (prefers-color-scheme: dark) {
  .win {
    --label: #ecece8;
    --label-2: #a3a7a1; /* 6.8:1 on the dark surface */
    --tint: #8fd3b0; /* 9.5:1 on the dark surface */
    --on-tint: #0b2f20;
    --fill: rgba(207, 238, 224, .08);
    --row: #262b28;
    --surface: #1c1f1d;
    --separator: rgba(255, 255, 255, .1);
    --ctl: rgba(255, 255, 255, .08);
    --ctl-hover: rgba(255, 255, 255, .14);
    --sel-box: rgba(255, 255, 255, .1);
    --btn: #2c6b4a;
    --btn-hover: #357d57;
    --light-off: #4a4f4c;
    --seg-on: #3d433f;
    --danger: #ff9b91; /* 8.4:1 on the dark surface */
    /* Dark windows get a faint light edge so they separate from a dark desktop. */
    --shadow: 0 0 0 .5px rgba(255, 255, 255, .22), 0 24px 72px rgba(0, 0, 0, .5);
    --shadow-off: 0 0 0 .5px rgba(255, 255, 255, .14), 0 12px 36px rgba(0, 0, 0, .36);
  }
  .light::after { color: rgba(0, 0, 0, .6); }
  .mc-label { background: rgba(44, 44, 44, .94); color: #ecece8; }
}

/* Reduce Transparency: a solid Mission Control backdrop (windows are already opaque). */
@media (prefers-reduced-transparency: reduce) {
  .mc-backdrop { background: #0b2f20; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
/* Increase Contrast: a visible window edge, a fixed title-bar separator, full-strength secondary text. */
@media (prefers-contrast: more) {
  .win { --label-2: var(--label); --separator: var(--label); --shadow: 0 0 0 1px var(--label), 0 24px 80px rgba(0, 0, 0, .3); --shadow-off: 0 0 0 1px var(--label), 0 12px 40px rgba(0, 0, 0, .2); }
  .win-bar { box-shadow: 0 1px 0 var(--separator); }
}

/* Interests: a coverflow of photo cards (js/interests.js). Each card is a floating glass frame around a photo
   tile, after React Bits' ProfileCard: it tilts toward the pointer, a holographic foil and a glare follow the
   light, and the foot says where a click goes. From DESIGN.md: accent #0B4D1E, the card radius 27px, Playfair for
   the one display name, the soft card shadow, the dot-matrix field with a slow pulse and pointer drift. The frame
   is content, so it uses a standard material, not Liquid Glass (materials.md › Liquid Glass). Motion is
   purposeful and optional (motion.md); the tilt is mouse only and off under reduced motion. */
.ring { --ring-ease: cubic-bezier(.4, 0, .2, 1); display: flex; flex-direction: column; gap: 12px; user-select: none; -webkit-user-select: none; }
.ring-stage {
  --stage-a: #fff;
  --stage-b: #f7f6f1;
  --stage-c: #e6eadf;
  --dot: rgba(11, 77, 30, .22);
  --disc-bg: rgba(255, 255, 255, .7);
  --disc-edge: rgba(11, 77, 30, .14);
  --shade: 35, 42, 35;
  position: relative;
  height: clamp(420px, 62vh, 540px);
  border-radius: 27px;
  background: linear-gradient(to bottom right, var(--stage-a), var(--stage-b) 55%, var(--stage-c));
  box-shadow: inset 0 0 0 1px var(--separator);
  touch-action: pan-y;
  cursor: grab;
  overflow: hidden;
  isolation: isolate;
  perspective: 1200px;
}
.ring.dragging .ring-stage { cursor: grabbing; }

/* Dot-matrix field, faded at the edges; it breathes slowly and drifts a few pixels against the pointer. */
.ring-field {
  position: absolute;
  inset: -24px;
  background: radial-gradient(circle, var(--dot) 1px, transparent 1.6px) 0 0 / 16px 16px;
  -webkit-mask: radial-gradient(60% 55% at 50% 52%, #000 20%, transparent 100%);
  mask: radial-gradient(60% 55% at 50% 52%, #000 20%, transparent 100%);
  transform: translate3d(calc(var(--px, 0) * -16px), calc(var(--py, 0) * -12px), 0);
  transition: transform .6s var(--ring-ease), opacity .4s ease;
  animation: ring-breathe 7s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}
@keyframes ring-breathe { 50% { opacity: .55; } }

/* The card. js/interests.js places it (translate, turn, scale); its inner body tilts with the pointer. */
.ri {
  --lx: 50%; --ly: 50%; --bx: 50%; --by: 50%;
  --rx: 0deg; --ry: 0deg; --sx: 0px; --sy: 0px; --act: 0;
  position: absolute;
  left: 0;
  top: 0;
  width: 264px;
  padding: 0;
  color: var(--label);
  text-align: left;
  font: inherit;
  will-change: transform, opacity;
  transform-style: preserve-3d;
}
.ri:focus-visible { outline: none; }
.pc-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 27px;
  background: var(--disc-bg);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: 0 0 0 1px var(--disc-edge), inset 0 1px 0 rgba(255, 255, 255, .6), rgba(var(--shade), .14) 0 calc(8px + var(--depth, 1) * 20px) calc(16px + var(--depth, 1) * 32px);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .18s ease-out, box-shadow .2s ease;
}
.ri.on .pc-body { box-shadow: 0 0 0 1px rgba(11, 77, 30, .3), inset 0 1px 0 rgba(255, 255, 255, .6), rgba(var(--shade), .22) 0 28px 56px; }
.ri:focus-visible .pc-body { box-shadow: 0 0 0 3px var(--tint), rgba(var(--shade), .22) 0 28px 56px; }
.pc-tile { position: relative; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; isolation: isolate; background: var(--fill); }
.pc-photo {
  position: absolute;
  inset: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  object-fit: cover;
  transform: translate3d(var(--sx), var(--sy), 0);
  transition: transform .18s ease-out;
  pointer-events: none;
}
.pc-holo, .pc-scrim, .pc-glare, .pc-shade { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
/* Foil: a spectrum and diagonal bars, colour-dodged into the photo where the light is. */
.pc-holo {
  background-image:
    repeating-linear-gradient(0deg, hsl(2, 100%, 73%) 5%, hsl(53, 100%, 69%) 10%, hsl(93, 100%, 69%) 15%, hsl(176, 100%, 76%) 20%, hsl(228, 100%, 74%) 25%, hsl(260, 100%, 76%) 30%, hsl(2, 100%, 73%) 35%),
    repeating-linear-gradient(-45deg, #0e152e 0%, hsl(180, 10%, 60%) 3.8%, hsl(180, 29%, 66%) 4.5%, hsl(180, 10%, 60%) 5.2%, #0e152e 10%, #0e152e 12%),
    radial-gradient(farthest-corner circle at var(--lx) var(--ly), hsla(0, 0%, 0%, .1) 12%, hsla(0, 0%, 0%, .15) 20%, hsla(0, 0%, 0%, .25) 120%);
  background-position: 0 var(--by), var(--bx) var(--by), center;
  background-size: 500% 500%, 300% 300%, 200% 200%;
  background-blend-mode: color, hard-light;
  mix-blend-mode: color-dodge;
  filter: brightness(.7) contrast(1.4) saturate(.45);
  opacity: calc(.7 * var(--act));
  transition: opacity .3s ease;
}
.pc-scrim { background: linear-gradient(to top, rgba(0, 0, 0, .62), rgba(0, 0, 0, .3) 28%, rgba(0, 0, 0, 0) 52%); }
.pc-info { position: absolute; left: 16px; right: 16px; bottom: 14px; display: block; color: #fff; }
.pc-name { display: block; font: 600 26px/1.1 'Playfair Display', serif; letter-spacing: -.02em; }
.pc-sub { display: block; margin-top: 4px; font-size: 13px; line-height: 18px; color: rgba(255, 255, 255, .85); }
.pc-foot { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px 4px; font-size: 13px; font-weight: 600; line-height: 20px; color: var(--tint); }
.pc-foot .i { width: 16px; height: 16px; }
.pc-glare {
  background: radial-gradient(farthest-corner circle at var(--lx) var(--ly), rgba(255, 255, 255, .7), rgba(255, 255, 255, .3) 20%, rgba(255, 255, 255, 0) 60%);
  mix-blend-mode: overlay;
  opacity: calc(.6 * var(--act));
  transition: opacity .3s ease;
}
.pc-shade { background: radial-gradient(farthest-corner circle at var(--lx) var(--ly), transparent 30%, rgba(var(--shade), .16)); opacity: var(--act); transition: opacity .3s ease; }
.ri:not(.on) .pc-foot { opacity: 0; }
.ri:not(.on) { cursor: pointer; }
.ri.on { cursor: pointer; }

/* Page dots: where you are in the row, and a shortcut to each interest (page-controls.md). */
.ring-dots { display: flex; justify-content: center; gap: 4px; }
.ring-dots button { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 9999px; }
.ring-dots button::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--label-2);
  opacity: .4;
  transition: width .3s var(--ring-ease), opacity .15s ease, background-color .15s ease;
}
.ring-dots button:hover::before { opacity: .8; }
.ring-dots button[aria-current="true"]::before { width: 18px; opacity: 1; background: var(--tint); }
.ring-dots button:focus-visible { outline: 2px solid var(--tint); outline-offset: 0; }

@media (prefers-color-scheme: dark) {
  .ring-stage {
    --stage-a: #232825;
    --stage-b: #1c1f1d;
    --stage-c: #17201a;
    --dot: rgba(143, 211, 176, .2);
    --disc-bg: rgba(44, 50, 46, .72);
    --disc-edge: rgba(143, 211, 176, .18);
    --shade: 0, 0, 0;
  }
  .pc-body { box-shadow: 0 0 0 1px var(--disc-edge), inset 0 1px 0 rgba(255, 255, 255, .06), rgba(var(--shade), .4) 0 calc(8px + var(--depth, 1) * 20px) calc(16px + var(--depth, 1) * 32px); }
  .ri.on .pc-body { box-shadow: 0 0 0 1px rgba(143, 211, 176, .3), inset 0 1px 0 rgba(255, 255, 255, .06), rgba(var(--shade), .5) 0 28px 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .ring-field { animation: none; transform: none; }
  .pc-body, .pc-photo { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .pc-body { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
}
@media (prefers-contrast: more) {
  .pc-body { box-shadow: 0 0 0 1px var(--label); }
}

/* Timeline (Football): period, dot on a vertical line, then a card per station (lists-and-tables.md, grouped rows). */
.timeline { --tl-when: 150px; margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: grid; grid-template-columns: var(--tl-when) 1fr; align-items: center; column-gap: 28px; padding: 6px 0; }
.timeline li::before { content: ''; position: absolute; top: 0; bottom: 0; left: calc(var(--tl-when) + 13px); border-left: 2px solid var(--tint); }
.timeline li:first-child::before { top: 50%; }
.timeline li:last-child::before { bottom: 50%; }
.tl-when { text-align: right; font: 600 18px/1.2 'Playfair Display', serif; color: var(--tint); }
.tl-dot { position: absolute; left: calc(var(--tl-when) + 4px); top: 50%; width: 20px; height: 20px; margin-top: -10px; box-sizing: border-box; border: 3px solid var(--tint); border-radius: 50%; background: var(--surface); }
.timeline .now .tl-dot { background: var(--tint); box-shadow: 0 0 0 5px var(--fill); }
.tl-card { grid-column: 2; display: flex; align-items: center; gap: 16px; margin-left: 24px; padding: 8px; border-radius: 20px; background: var(--row); }
.tl-card.plain { padding: 14px 18px; }
.tl-card img { flex: none; width: auto; max-width: 200px; height: 132px; object-fit: cover; border-radius: 14px; }
.tl-text h4 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; font: 600 20px/1.2 'Playfair Display', serif; }
.tl-text p { margin: 2px 0 0; font-size: 14px; line-height: 20px; }
.tl-badge { padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--on-tint); font: 600 12px/16px 'Poppins', sans-serif; }
@media (max-width: 720px) {
  .timeline { --tl-when: 0px; }
  .timeline li { grid-template-columns: 1fr; row-gap: 4px; padding-left: 28px; }
  .timeline li::before { left: 9px; }
  .tl-dot { left: 0; }
  .tl-when { grid-column: 1; text-align: left; font-size: 16px; }
  .tl-card { grid-column: 1; margin-left: 0; }
  .tl-card img { max-width: 140px; height: 92px; }
}

/* Showcase: intro over a mosaic of one video and photos (sjøliv). */
/* Snow over a page (js/pixelsnow.js): covers the window body, never takes the pointer. */
.pixel-snow-container { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.win > .pixel-snow-container { top: 52px; } /* below the title bar (its min-height) */
.pixel-snow-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.show-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; margin: 0 0 24px; }
.show-head h3 { margin-bottom: 12px; }
.show-head p:not(.sub) { margin: 0; max-width: 56ch; font-size: 14px; line-height: 24px; }
.show-grid { display: grid; grid-template-columns: minmax(150px, 225px) minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 196px 196px; gap: 8px; }
.show-grid img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 24px; }
.show-grid img.wide { grid-column: 2 / span 2; }
.show-grid img.tall { grid-column: 1; grid-row: 1 / span 2; }
.show-grid.trio { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 400px; }
.show-grid.trio img.tall { grid-column: auto; grid-row: auto; }
.show-grid.duo { grid-template-columns: minmax(150px, 300px) minmax(0, 1fr); }
.show-grid.duo img.wide { grid-column: 2; grid-row: 1 / span 2; }
.show-video { position: relative; grid-row: 1 / span 2; display: block; padding: 0; border: 0; overflow: hidden; border-radius: 24px; background: #0b2f20; cursor: pointer; }
.show-video video { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) {
  .show-head { grid-template-columns: 1fr; gap: 16px; }
    .show-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 140px 140px; }
  .show-video { grid-column: 1 / span 2; grid-row: 1; }
  .show-grid img.wide { grid-column: 1 / span 2; }
  .show-grid img.tall { grid-column: 1 / span 2; grid-row: 1; }
  .show-grid.duo { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 200px; }
  .show-grid.duo img.wide { grid-column: 1 / span 2; grid-row: 2; }
  .show-grid.trio { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 320px; }
  .show-grid.trio img.tall { grid-column: auto; grid-row: auto; }
}

/* Web development: one card per thing built, photo or app icon on the left, text and links on the right. */
.wd-list { display: grid; gap: 8px; }
.wd-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 24px; align-items: center; padding: 16px; border-radius: 24px; background: var(--row); }
.wd-app { display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto; overflow: hidden; border-radius: 22px; background: var(--tint); color: var(--on-tint); }
.wd-app.brand { overflow: visible; background: none; }
.wd-app img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 22px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.wd-app .i { width: 44px; height: 44px; }
.wd-text .sub { margin: 0 0 4px; }
.wd-text h4 { margin: 0 0 8px; font-size: 20px; line-height: 24px; }
.wd-text p:not(.sub) { margin: 0; font-size: 14px; line-height: 22px; }
.wd-text .links { margin-top: 16px; }
@media (max-width: 640px) {
  .wd-card { grid-template-columns: 1fr; gap: 16px; }
  .wd-app { margin: 0; }
}

/* About this site: tip cards on the grouped-row surface, keycaps in the style of the Mac keyboard. */
.about-intro { margin-bottom: 24px; }
.tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.tips li { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 20px; background: var(--row); }
.tip-lead { flex: none; display: flex; gap: 4px; align-items: center; min-width: 56px; }
.tips kbd {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; box-sizing: border-box; padding: 0 7px;
  border-radius: 7px; background: var(--surface); color: var(--label);
  box-shadow: inset 0 -1.5px 0 rgba(0, 0, 0, .16), 0 0 0 1px rgba(0, 0, 0, .1);
  font-family: var(--font-sys); font-size: 12px; font-weight: 600; line-height: 14px;
}
.tip-glyph { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(11, 77, 30, .1); color: var(--tint); }
.tip-glyph .i { width: 18px; height: 18px; }
.lights { display: flex; gap: 4px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.tip-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tip-text b { font-weight: 500; line-height: 20px; }
.tip-text span { font-family: var(--font-sys); font-size: 13px; line-height: 20px; color: var(--label-2); }
.about-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 24px; padding: 16px 20px;
  border-radius: 20px; background: #0b4d1e; color: #fff; line-height: 20px;
}
.about-foot span:last-child { font-size: 13px; font-weight: 500; color: #cfeee0; }
@media (max-width: 720px) {
  .tips { grid-template-columns: 1fr; }
  .about-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* Ask about Karl (js/chat.js): a sidebar beside the conversation, as in Messages (sidebars.md; designing-for-macos.md ›
   Best practices: more content in fewer levels). The sidebar says who answers and that it is AI, with the badge on
   the photo and in words (generative-ai.md › Transparency); its topics and the empty state's cards are curated
   starting questions ("consider offering curated suggestions that make it easy to get started"). Only the log
   scrolls; the composer and the notice under it stay put. Every colour is a window token, so dark mode follows
   (dark-mode.md). Rules are scoped to .chat so they win over the general .win-body p and h3 rules. */
.win-body:has(> .chat) { display: flex; padding: 0; overflow: hidden; }
.chat {
  --tile: color-mix(in srgb, var(--tint) 12%, transparent);
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  flex: 1;
  min-height: min(628px, 76vh);
}

/* Sidebar */
.chat-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  overflow: auto;
  padding: 24px 16px 20px;
  background: var(--row);
  border-right: 1px solid var(--separator);
}
.chat-id { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 0 8px; }
.chat-name { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.chat-title { font: 600 28px/32px 'Playfair Display', serif; letter-spacing: -.025em; color: var(--label); }
.chat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--on-tint);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
}
.chat-badge svg { width: 11px; height: 11px; }
.chat .chat-scope { margin: 0; font-size: 13px; line-height: 20px; color: var(--label-2); }
.chat-topics { display: flex; flex-direction: column; gap: 2px; }
.chat-eyebrow { padding: 0 12px 6px; font-size: 11px; font-weight: 500; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--label-2); }
.chat-topic {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--label);
  font: 500 14px/20px 'Poppins', sans-serif;
  text-align: left;
  transition: background-color .15s ease;
}
.chat-topic:hover { background: var(--fill); }
/* The topic of the question on screen, raised like a selected sidebar row. */
.chat-topic.on { background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 0 0 1px var(--separator); }
.chat-tile { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--tile); color: var(--tint); }
.chat-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chat-links { display: flex; gap: 8px; margin-top: auto; padding: 0 8px; }
.chat-links .btn, .chat-actions .btn { height: 32px; padding: 0 12px; font-size: 13px; }

/* Karl's photo with the AI sparkle */
.chat-avatar { position: relative; display: block; flex: none; width: 64px; height: 64px; }
.chat-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 20%; }
.chat-spark {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #0b4d1e;
  color: var(--mint);
  box-shadow: 0 0 0 2px var(--ring, var(--surface));
}
.chat-spark svg { width: 16px; height: 16px; }
.chat-avatar.small { width: 32px; height: 32px; }
.chat-avatar.small .chat-spark { width: 13px; height: 13px; }
.chat-avatar.small .chat-spark svg { width: 8px; height: 8px; }

/* Conversation */
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 0px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 28px 32px 20px;
}
.chat-log:focus-visible { outline: 2px solid var(--tint); outline-offset: -2px; }
.chat-start { display: flex; flex-direction: column; gap: 8px; margin-block: auto; }
.chat .chat-start h3 { margin: 0; font-size: clamp(32px, 4.4vw, 44px); line-height: 1.09; }
.chat .chat-intro { margin: 0 0 12px; max-width: 52ch; color: var(--label-2); }
.chat-suggest { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-height: 112px;
  padding: 16px;
  border-radius: 20px;
  background: var(--row);
  color: var(--label);
  font: 500 14px/20px 'Poppins', sans-serif;
  text-align: left;
  transition: background-color .15s ease;
}
.chat-card:hover { background: color-mix(in srgb, var(--row), var(--label) 5%); }
.chat-card .chat-tile { width: 32px; height: 32px; border-radius: 10px; background: var(--surface); }
.chat .msg {
  max-width: min(100%, 64ch);
  margin: 0;
  font-size: 14px;
  white-space: pre-wrap; /* answers are plain text; keep their line breaks */
  overflow-wrap: anywhere;
}
.chat .msg.me {
  align-self: flex-end;
  max-width: min(60%, 48ch);
  padding: 10px 16px;
  border-radius: 20px 20px 6px 20px;
  background: var(--tint);
  color: var(--on-tint);
  line-height: 22px;
}
.chat-row { display: flex; align-items: flex-start; gap: 12px; max-width: 88%; }
.chat .msg.bot { padding: 16px 18px; border-radius: 6px 22px 22px 22px; background: var(--row); color: var(--label); line-height: 24px; }
.chat .msg.me.failed { opacity: .55; }
.chat .msg.wait { color: var(--label-2); }
.chat-error { align-self: stretch; margin-left: 44px; padding: 12px 14px; border-radius: 12px; background: var(--row); }
.chat .chat-error p { margin: 0 0 10px; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Composer */
.chat-dock { display: flex; flex-direction: column; gap: 8px; padding: 0 32px 20px; }
.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: 52px;
  padding: 8px 8px 8px 18px;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--separator), 0 8px 24px rgba(var(--shade, 35, 42, 35), .08);
}
.chat-form:focus-within { box-shadow: 0 0 0 2px var(--tint), 0 8px 24px rgba(var(--shade, 35, 42, 35), .08); }
.chat-form textarea {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  max-height: 120px;
  padding: 8px 0;
  border: 0;
  outline: 0;
  resize: none;
  background: none;
  color: var(--label);
  font: inherit;
  line-height: 20px;
}
.chat-form textarea::placeholder { color: var(--label-2); }
.chat-count { flex: none; font-size: 11px; line-height: 36px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.chat-send {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--light-off);
  color: #fff;
  transition: background-color .15s ease;
}
.chat-form.ready .chat-send { background: var(--tint); color: var(--on-tint); }
.chat-send svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chat-form.ready .chat-send[aria-disabled='true'] { background: var(--light-off); color: #fff; cursor: default; }
.chat-send:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }
.chat .chat-privacy { max-width: none; margin: 0; color: var(--label-2); font-size: 11px; line-height: 16px; text-align: center; }

/* Narrow windows: the conversation alone; the badge's disclosure stays in the notice under the composer. */
@media (max-width: 720px) {
  .chat { grid-template-columns: minmax(0, 1fr); }
  .chat-side { display: none; }
  .chat-suggest { grid-template-columns: 1fr; }
  .chat-card { min-height: 0; flex-direction: row; align-items: center; }
  .chat-log { padding: 20px 16px; }
  .chat-dock { padding: 0 16px 16px; }
  .chat-row { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-topic, .chat-card, .chat-send { transition: none; }
}

/* Transcripts (js/request.js, spec 2026-12-03-transcript-access-design.md). A locked transcript row is the same
   row as a download, so it keeps its size and place (branding.md: a restyled control keeps familiar sizing); the
   lock and the words "on request" say it is locked, not the colour alone (accessibility.md). */
button.dl { width: 100%; border: 0; text-align: left; cursor: pointer; }
.dl.locked .i { color: var(--label-2); }
.dl.locked .dl-s { color: var(--label-2); }

/* The request window: one column of labelled fields at one width (text-fields.md › Best practices: "Stack multiple
   text fields vertically ... use consistent widths"), a label above each field and the hint inside it. */
.req { max-width: 460px; }
.win-body .req h3 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 8px; }
.req-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.req-head p { color: var(--label-2); }
.req-badge { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--row); color: var(--tint); }
.req-badge .i { width: 22px; height: 22px; }
.req-form { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; font-family: var(--font-sys); }
.req-field { display: flex; flex-direction: column; gap: 6px; }
.req-label { font-size: 13px; font-weight: 600; line-height: 16px; color: var(--label); }
.req-label i { font-style: normal; font-weight: 400; color: var(--label-2); }
.req-field input, .req-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--separator);
  color: var(--label);
  font: 400 14px/20px var(--font-sys);
  transition: box-shadow .15s ease;
}
.req-field textarea { resize: vertical; min-height: 76px; }
.req-field input::placeholder, .req-field textarea::placeholder { color: var(--label-2); }
.req-field input:focus, .req-field textarea:focus { outline: 0; box-shadow: 0 0 0 2px var(--tint); }
.req-field input[aria-invalid] { box-shadow: 0 0 0 2px var(--danger); }
.req-note { font-size: 12px; line-height: 16px; color: var(--label-2); }
.req-note.bad { color: var(--danger); }
.req-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.win-body .req-error { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--row); color: var(--danger); font-size: 13px; line-height: 20px; }
.req-actions { display: flex; }
.req-form .btn[disabled] { opacity: .4; cursor: default; }
.req-form .btn[disabled]:hover { background: var(--btn); }
.req-form.busy .btn { opacity: .7; cursor: progress; }
.win-body .req-privacy { margin: 0; font-size: 12px; line-height: 16px; color: var(--label-2); }

/* The outcome replaces the form in place (feedback.md › "Consider integrating status feedback into your
   interface"), with a way to start over. */
.req-done { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 8px; }
.req-done h3:focus { outline: 0; }
.win-body .req-done p { margin: 0; color: var(--label-2); }
.req-done p b { color: var(--label); font-weight: 600; overflow-wrap: anywhere; }
.btn.quiet { background: var(--ctl); color: var(--label); }
.btn.quiet:hover, .btn.quiet:focus-visible { background: var(--ctl-hover); }

@media (prefers-reduced-motion: reduce) {
  .req-field input, .req-field textarea { transition: none; }
}
