/* Bastion website. One stylesheet for every page.
   Colours are the app's own palette. Light is the default, and dark follows the
   system setting (prefers-color-scheme). */

:root {
  color-scheme: light dark;

  --bg: #FBFAF8;
  --bg-sidebar: #F2F0EC;
  --surface: #EFEDE8;
  --selected: #E4E1DA;
  --border: #E0DDD6;
  --text: #1B1A18;
  --text-2: #5C5852;
  --text-3: #6E6962;
  --heading: #000000;
  --accent: #E6AC50;
  --accent-hover: #EDB862;
  --accent-text: #835508;
  --on-accent: #1A1408;
  --green: #2B6E45;

  /* Pieces of drawn macOS chrome (menu bar, windows, browser). */
  --menubar: rgba(251, 250, 248, 0.72);
  --menubar-line: rgba(27, 26, 24, 0.06);
  --pressed: rgba(27, 26, 24, 0.1);
  --win-bg: radial-gradient(ellipse 90% 120% at 0% 0%, #E9E5DE 0%, #FBFAF8 60%);
  --win-shadow: inset 0 1px 0 #FFFFFF, 0 0 0 1px rgba(27, 26, 24, 0.08), 0 24px 64px -16px rgba(27, 26, 24, 0.18), 0 8px 20px -8px rgba(27, 26, 24, 0.1);
  --sidebar-glass: rgba(242, 240, 236, 0.7);
  --sidebar-edge: rgba(255, 255, 255, 0.9);
  --sidebar-shadow: 0 8px 24px rgba(27, 26, 24, 0.12);
  --seg-on: #FFFFFF;
  --seg-shadow: 0 1px 2px rgba(27, 26, 24, 0.12);
  --chrome: #F4F2EE;
  --address: #FFFFFF;
  --address-ring: rgba(27, 26, 24, 0.06);
  --dots: #D9D5CD;
  --knob-shadow: 0 1px 2px rgba(27, 26, 24, 0.2);
  --tile-shadow: 0 0 0 1px rgba(27, 26, 24, 0.06), 0 6px 16px -6px rgba(27, 26, 24, 0.18);

  /* The "How it holds" card is dark in both themes. */
  --ink-bg: #141312;
  --ink-border: transparent;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  /* -apple-system is SF Pro on Apple devices, with the right optical size for each
     text size. SF Pro may not be served as a web font, so other systems use their own. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(20px, 5vw, 64px);
  --content: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --bg-sidebar: #0E0D0C;
    --surface: #1D1C1A;
    --selected: #292724;
    --border: #2B2926;
    --text: #F2EFEA;
    --text-2: #ABA69E;
    --text-3: #8A857D;
    --heading: #F2EFEA;
    --accent: #E8B15C;
    --accent-hover: #F0BE70;
    --accent-text: #E8B15C;
    --green: #86C59B;

    --menubar: rgba(20, 19, 18, 0.72);
    --menubar-line: rgba(255, 255, 255, 0.06);
    --pressed: rgba(255, 255, 255, 0.14);
    --win-bg: radial-gradient(ellipse 90% 120% at 0% 0%, #24221F 0%, #141312 60%);
    --win-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.1), 0 24px 64px -16px rgba(0, 0, 0, 0.5), 0 8px 20px -8px rgba(0, 0, 0, 0.4);
    --sidebar-glass: rgba(43, 41, 38, 0.6);
    --sidebar-edge: rgba(255, 255, 255, 0.12);
    --sidebar-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --seg-on: #3A3733;
    --seg-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --chrome: #1D1C1A;
    --address: #292724;
    --address-ring: rgba(255, 255, 255, 0.06);
    --dots: #3A3733;
    --knob-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --tile-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.5);

    --ink-bg: #0E0D0C;
    --ink-border: #2B2926;
  }
}

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

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.container { width: min(var(--content), 100% - 2 * var(--gutter)); margin-inline: auto; }
[id] { scroll-margin-top: 24px; }

.eyebrow {
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent-text);
}

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

.button {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border-radius: 999px;
  font-size: 16px; line-height: 20px; font-weight: 600; white-space: nowrap;
  background: var(--accent); color: var(--on-accent);
  transition: transform 160ms var(--ease-out), background-color 150ms ease-out;
}
.button.soft { background: var(--surface); color: var(--text); font-weight: 500; }
.button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-hover); }
  .button.soft:hover { background: var(--selected); }
}

/* ---------- Nav ---------- */

.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px var(--gutter);
}
.wordmark {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 17px; line-height: 22px; font-weight: 600;
  letter-spacing: -0.01em; color: var(--heading);
}
.mark-arch { fill: var(--text); }
.mark-door { fill: var(--accent); }
.nav-links { display: flex; gap: 32px; font-size: 14px; line-height: 18px; color: var(--text-2); }
.nav-links a { transition: color 150ms ease-out; }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { color: var(--text); } }
.nav-cta {
  padding: 8px 16px; border-radius: 999px; background: var(--text); color: var(--bg);
  font-size: 14px; line-height: 18px; font-weight: 500;
  transition: transform 160ms var(--ease-out), opacity 150ms ease-out;
}
.nav-cta:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .nav-cta:hover { opacity: 0.86; } }
@media (max-width: 720px) { .nav-links { display: none; } }

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

.hero {
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  padding: clamp(56px, 8vw, 96px) var(--gutter) 64px; text-align: center;
}
.hero h1 {
  max-width: 1000px; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(52px, 8.4vw, 96px); line-height: 1; letter-spacing: -0.04em; color: var(--heading);
}
.hero h1 span { color: var(--text-3); }
.hero .lead {
  max-width: 600px; font-size: clamp(18px, 2vw, 21px); line-height: 1.43; letter-spacing: -0.01em;
  color: var(--text-2); text-wrap: balance;
}
.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 12px; }
.hero-actions .buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero-actions .fine { font-size: 13px; line-height: 18px; color: var(--text-3); }

/* ---------- Hero shot: a desk with a menu bar and Bastion's window ----------
   Drawn at 1200 × 760 and scaled to fit by main.js (--desk-scale). On a phone the frame is
   square and shows part of the desk; main.js moves the camera (--cam-x, --cam-y). */

.shot { padding: 24px var(--gutter) 0; }
.desk-frame {
  position: relative; width: min(1200px, 100%); margin-inline: auto; aspect-ratio: 1200 / 760;
  overflow: clip; border-radius: calc(28px * var(--desk-scale, 1));
}
.desk {
  position: absolute; top: 0; left: 0; width: 1200px; height: 760px; overflow: clip;
  background: var(--surface); transform-origin: top left;
  transform: scale(var(--desk-scale, 1)) translate(calc(var(--cam-x, 0) * -1px), calc(var(--cam-y, 0) * -1px));
  font-size: 13px; line-height: 18px; text-align: left;
}
.menubar {
  position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  height: 30px; padding: 0 16px; background: var(--menubar);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--menubar-line); font-size: 13px; line-height: 16px; color: var(--text);
}
.menus { display: flex; gap: 20px; }
.menus b { font-weight: 600; }
.status { display: flex; align-items: center; gap: 14px; }
.glyph-btn {
  display: grid; place-items: center; width: 30px; height: 22px; border-radius: 6px;
  transition: background-color 150ms ease-out;
}
.glyph-btn[data-pressed] { background: var(--pressed); }
/* The door rises into the arch's opening; the clip path keeps it inside. */
.door { transform: translateY(8px); transition: transform 320ms var(--ease-out); }
[data-session] .door { transform: translateY(0); }

.win {
  position: absolute; left: 80px; top: 78px; width: 1040px; height: 700px; display: flex;
  border-radius: 24px 24px 0 0; background: var(--win-bg); box-shadow: var(--win-shadow); overflow: hidden;
}
.sidebar {
  width: 220px; flex-shrink: 0; margin: 8px 0 8px 8px; border-radius: 16px; display: flex; flex-direction: column;
  background: var(--sidebar-glass); border: 1px solid var(--sidebar-edge); box-shadow: var(--sidebar-shadow);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.lights { display: flex; gap: 8px; height: 44px; align-items: center; padding: 0 12px; }
.lights i { width: 12px; height: 12px; border-radius: 999px; }
.lights i:nth-child(1) { background: #FF5F57; }
.lights i:nth-child(2) { background: #FEBC2E; }
.lights i:nth-child(3) { background: #28C840; }
.navlist { display: flex; flex-direction: column; gap: 2px; padding: 8px; flex: 1 1 0; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border-radius: 8px; color: var(--text-2); }
.nav-item svg { flex-shrink: 0; color: var(--text-2); }
.nav-item[data-selected] { background: var(--selected); color: var(--text); font-weight: 500; }
.nav-item[data-selected] svg { color: var(--text); }
.nav-item .trail {
  margin-left: auto; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--accent-text);
  font-variant-numeric: tabular-nums; opacity: 0; transition: opacity 200ms ease-out;
}
[data-session] .nav-item .trail { opacity: 1; }
.badge {
  margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  font-size: 11px; line-height: 18px; font-weight: 600; text-align: center; color: var(--accent-text);
}
.side-foot { display: flex; align-items: center; gap: 10px; padding: 16px 20px; color: var(--text-2); }
.side-foot .t1 { font-size: 12px; line-height: 16px; font-weight: 600; }
.side-foot .t2 { font-size: 12px; line-height: 16px; color: var(--text-3); }
.content { flex: 1 1 0; display: flex; flex-direction: column; min-width: 0; }
.titlebar { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 48px; flex-shrink: 0; }
.titlebar .t { font-weight: 600; }
.titlebar .d { font-size: 12px; line-height: 16px; color: var(--text-3); }
.bodies { display: grid; flex: 1 1 0; min-height: 0; }
.body {
  grid-area: 1 / 1; display: flex; gap: 48px; padding: 24px 48px 48px;
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}
.body[data-hidden] { opacity: 0; visibility: hidden; transition: opacity 160ms ease-out, visibility 0s 160ms; }
.body.running[data-hidden] { transform: translateY(6px); }
.col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.side-col {
  width: 240px; flex-shrink: 0; padding-left: 32px; padding-top: 4px; border-left: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 22px;
}
.side-col .h { font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.side-col .v { font-size: 15px; line-height: 20px; font-weight: 500; }
.side-col .s { font-size: 12px; line-height: 16px; color: var(--text-3); margin-top: 2px; }
.caps { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.limit { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; }
.limit .row { display: flex; justify-content: space-between; }
.limit .row span:last-child { font-size: 12px; line-height: 16px; color: var(--text-3); }
.limit .track { height: 3px; border-radius: 999px; background: var(--border); }
.limit .track i { display: block; height: 100%; border-radius: 999px; background: var(--text-2); }

.idle .col { gap: 26px; }
.duration { font-family: var(--font-display); font-weight: 300; font-size: 88px; line-height: 88px; letter-spacing: -0.03em; margin: 8px 0 0 -4px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--surface); color: var(--text-2); }
.chip[data-on] { background: var(--text); color: var(--bg); font-weight: 500; }
.chip.list { height: 30px; }
.chip.list[data-on] { background: var(--selected); color: var(--text); }
.chip.list .n { color: var(--text-3); font-size: 12px; }
.label { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-2); margin-bottom: 8px; }
.hint-s { font-size: 12px; line-height: 16px; color: var(--text-3); margin-top: 8px; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--surface); }
.seg span { width: 92px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: var(--text-2); }
.seg span[data-on] { background: var(--seg-on); color: var(--text); font-weight: 500; box-shadow: var(--seg-shadow); }
.start-row { display: flex; align-items: center; gap: 16px; margin-top: auto; }
.start-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 600;
  transition: transform 160ms var(--ease-out);
}
.start-btn[data-pressed] { transform: scale(0.97); }
.start-row .ends { color: var(--text-3); }

.running .col { justify-content: space-between; }
.locked { display: flex; align-items: center; gap: 8px; color: var(--accent-text); }
.countdown {
  font-family: var(--font-display); font-weight: 300; font-size: 144px; line-height: 148px;
  letter-spacing: -0.03em; margin-left: -7px; font-variant-numeric: tabular-nums;
}
.progress { height: 2px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress i {
  display: block; height: 100%; background: var(--accent-text); transform-origin: left center;
  transform: scaleX(0); transition: transform 1000ms linear;
}
.times { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; }
.times .a { font-size: 15px; line-height: 20px; font-weight: 500; }
.times .b { font-size: 12px; line-height: 16px; color: var(--text-3); }
.reassure { color: var(--text-2); }
.reassure + .reassure { color: var(--text-3); }
.listrow { padding: 12px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.listrow .row { display: flex; justify-content: space-between; align-items: baseline; font-weight: 500; }
.listrow .row span:last-child { font-size: 12px; font-weight: 400; color: var(--text-2); }
.listrow .s { font-size: 12px; line-height: 16px; color: var(--text-3); }

/* A browser window that opens on Bastion's blocked page. */
.bwin {
  position: absolute; z-index: 1; width: 760px; height: 520px; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 16px; background: var(--bg); box-shadow: var(--win-shadow);
  transition: opacity 240ms var(--ease-out), transform 280ms var(--ease-out);
}
.bwin[data-hidden] {
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(0.965);
  transition: opacity 160ms ease-out, transform 160ms ease-out, visibility 0s 160ms;
}
.bwin .bar { display: flex; align-items: center; gap: 18px; height: 48px; padding: 0 16px; flex-shrink: 0; background: var(--chrome); border-bottom: 1px solid var(--border); }
.bwin .lights { height: auto; padding: 0; }
.lights[data-inactive] i { background: var(--dots); }
.address {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; height: 30px;
  border-radius: 9px; background: var(--address); box-shadow: 0 0 0 1px var(--address-ring); color: var(--text);
}
.bwin .who { width: 20px; height: 20px; flex-shrink: 0; border-radius: 5px; object-fit: contain; }
.bwin .page { position: relative; flex: 1 1 0; min-height: 0; }
.loadbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2; height: 2px; background: var(--accent);
  transform-origin: left center; transform: scaleX(0); opacity: 0;
}
.shield {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 36px 44px;
  opacity: 0; transform: translateY(4px); transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out);
}
.shield[data-on] { opacity: 1; transform: none; }
.shield .brand { display: flex; align-items: center; gap: 9px; font-size: 14px; line-height: 18px; font-weight: 600; color: var(--text-2); }
.shield .kind { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.shield .headline { margin-top: 8px; font-family: var(--font-display); font-size: 24px; line-height: 30px; font-weight: 500; letter-spacing: -0.01em; }
.shield .count { margin: 4px 0 0 -5px; font-family: var(--font-display); font-weight: 300; font-size: 112px; line-height: 116px; letter-spacing: -0.03em; }
.shield .foot { color: var(--text-3); }

/* The ⌘-Tab switcher. It appears and goes at once, as it does on a Mac. */
.switcher {
  position: absolute; left: 50%; top: 50%; z-index: 6; display: flex; gap: 8px; padding: 18px; border-radius: 28px;
  transform: translate(-50%, -50%); background: var(--sidebar-glass); border: 1px solid var(--sidebar-edge);
  box-shadow: var(--win-shadow); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  opacity: 0; transition: opacity 120ms ease-out;
}
.switcher[data-on] { opacity: 1; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 108px; padding: 12px 0 10px; border-radius: 18px; }
.slot[data-on] { background: var(--pressed); }
.slot .t { font-size: 13px; line-height: 16px; font-weight: 500; opacity: 0; }
.slot[data-on] .t { opacity: 1; }
.app-icon {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 19px; overflow: hidden;
  background: #FFFFFF; box-shadow: var(--tile-shadow);
}
.app-icon img { width: 50px; height: 50px; object-fit: contain; }
.app-icon img.full { width: 100%; height: 100%; }
.slot[data-app="bastion"] .app-icon { background: #1B1A18; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), var(--tile-shadow); }

@media (max-width: 720px) {
  .desk-frame { aspect-ratio: 1; border-radius: 20px; }
  /* In the middle of what the camera shows: half of PHONE_SPAN in main.js. */
  .switcher { left: calc((var(--cam-x, 0) + 320) * 1px); top: calc((var(--cam-y, 0) + 320) * 1px); }
  .desk-frame[data-ready] .desk { transition: transform 700ms cubic-bezier(0.77, 0, 0.175, 1); }
}

/* ---------- Features ---------- */

.features { display: flex; flex-direction: column; gap: 56px; padding-top: clamp(96px, 11vw, 160px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 64px; }
.section-head h2 {
  max-width: 640px; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(40px, 5.4vw, 64px); line-height: 1.0625; letter-spacing: -0.035em; color: var(--heading);
}
.section-head p { max-width: 400px; padding-bottom: 6px; font-size: 17px; line-height: 26px; color: var(--text-2); }
@media (max-width: 900px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 20px; }
}

.bento { display: flex; flex-direction: column; gap: 16px; }
.bento-row { display: grid; gap: 16px; }
.bento-row.one { grid-template-columns: minmax(0, 1fr) 400px; min-height: 520px; }
.bento-row.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 400px; min-height: 400px; }

.card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 36px; border-radius: 28px; background: var(--surface); min-width: 0;
}
.card.large { padding: 40px; }
.card-copy { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.card h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 32px;
  letter-spacing: -0.025em; color: var(--heading);
}
.card.large h3 { font-size: 32px; line-height: 36px; }
.card p { font-size: 16px; line-height: 24px; color: var(--text-2); text-wrap: pretty; }
.card.large p { font-size: 17px; line-height: 26px; }

/* Focus sessions */
.big-length { display: flex; align-items: baseline; gap: 12px; }
.big-length b {
  font-family: var(--font-display); font-weight: 300; font-size: clamp(112px, 14vw, 168px); line-height: 0.95;
  letter-spacing: -0.04em; color: var(--heading); font-variant-numeric: tabular-nums;
}
.big-length span { font-family: var(--font-display); font-size: 28px; line-height: 32px; letter-spacing: -0.02em; color: var(--text-2); }
.focus-foot { display: flex; flex-direction: column; gap: 28px; }
.focus-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.lengths { display: flex; flex-wrap: wrap; gap: 8px; }
.lengths span { padding: 9px 16px; border-radius: 999px; background: var(--bg); font-size: 14px; line-height: 18px; color: var(--text-2); }
.lengths span[data-on] { background: var(--text); color: var(--bg); font-weight: 500; }
.pill-accent {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 15px; line-height: 20px; font-weight: 600;
}

/* Always-on */
.site-list { display: flex; flex-direction: column; padding: 4px 16px; border-radius: 16px; background: var(--bg); list-style: none; }
.site-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; line-height: 20px; color: var(--heading); }
.site-list li:last-child { border-bottom: 0; }
.site-list .fav { width: 20px; height: 20px; flex-shrink: 0; display: grid; place-items: center; border-radius: 6px; background: var(--selected); color: var(--text-3); }
/* A site's own logo, in its own colours, needs no tile behind it. */
.site-list .fav.logo { background: none; border-radius: 0; }
.site-list .fav.logo img { display: block; object-fit: contain; }
.site-list .name { flex: 1 1 0; }
.site-list .lock { color: var(--text-3); flex-shrink: 0; }
.toggle { width: 32px; height: 20px; flex-shrink: 0; display: flex; justify-content: flex-end; padding: 2px; border-radius: 999px; background: var(--accent); }
.toggle i { width: 16px; height: 16px; border-radius: 999px; background: #FFFFFF; box-shadow: var(--knob-shadow); }

/* Schedules */
.schedule { display: flex; flex-direction: column; gap: 14px; }
.days { display: flex; gap: 6px; }
.days span {
  flex: 1 1 0; height: 40px; display: grid; place-items: center; border-radius: 12px;
  background: var(--bg); color: var(--text-3); font-size: 14px; line-height: 18px; font-weight: 500;
}
.days span[data-on] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.schedule .when { display: flex; justify-content: space-between; font-size: 15px; line-height: 20px; font-variant-numeric: tabular-nums; }
.schedule .when b { font-weight: 500; color: var(--heading); }
.schedule .when span { color: var(--text-2); }

/* Daily limits */
.budget { display: flex; flex-direction: column; gap: 12px; }
.budget .left { display: flex; align-items: baseline; gap: 8px; }
.budget .left b {
  font-family: var(--font-display); font-weight: 300; font-size: 56px; line-height: 56px;
  letter-spacing: -0.03em; color: var(--heading); font-variant-numeric: tabular-nums;
}
.budget .left span { font-size: 15px; line-height: 20px; color: var(--text-2); }
.budget .bar { height: 6px; border-radius: 999px; background: var(--selected); }
.budget .bar i { display: block; width: 73%; height: 100%; border-radius: 999px; background: var(--text); }

/* Any browser: the browsers travel along an arch around Bastion's gate. Drawn at 400 × 240,
   the width of the card. These are the places at rest; main.js moves the tiles on from them. */
/* Clip, not hidden: the tiles below the edge must not make the card scrollable. */
.card.browser { position: relative; overflow: clip; min-height: 400px; }
.card.browser .card-copy { position: relative; z-index: 1; }
.card.browser p { max-width: 280px; }
.arch { position: absolute; left: 50%; bottom: 0; width: 400px; height: 240px; margin-left: -200px; transform-origin: bottom center; }
.arch-line { fill: none; stroke: var(--border); stroke-width: 1.5; }
.arch-tiles { list-style: none; }
.arch-tiles li {
  position: absolute; left: -30px; top: -30px; width: 60px; height: 60px; display: grid; place-items: center; overflow: hidden;
  border-radius: 16px; background: #FFFFFF; box-shadow: var(--tile-shadow); transform: translate(52px, 320px);
}
.arch-tiles li:nth-child(3) { transform: translate(52px, 188px); }
.arch-tiles li:nth-child(4) { transform: translate(95.3px, 83.3px); }
.arch-tiles li:nth-child(5) { transform: translate(200px, 40px); }
.arch-tiles li:nth-child(6) { transform: translate(304.7px, 83.3px); }
.arch-tiles li:nth-child(7) { transform: translate(348px, 188px); }
.arch-tiles img { width: 38px; height: 38px; object-fit: contain; }
.arch-tiles img.full { width: 100%; height: 100%; }

/* ---------- How it holds (dark card in both themes) ---------- */

.ink {
  --surface: #1D1C1A; --selected: #292724; --border: #2B2926;
  --text: #F2EFEA; --text-2: #ABA69E; --text-3: #8A857D;
  --accent: #E8B15C; --accent-hover: #F0BE70; --green: #86C59B;
  display: flex; align-items: center; justify-content: space-between; gap: 64px;
  padding: clamp(28px, 5vw, 64px); border-radius: 28px; background: var(--ink-bg);
  border: 1px solid var(--ink-border); color: var(--text);
}
.ink .copy { display: flex; flex-direction: column; gap: 16px; max-width: 540px; }
.ink .eyebrow { color: var(--accent); }
.ink h2 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(36px, 4vw, 48px); line-height: 1.083;
  letter-spacing: -0.03em; color: var(--text);
}
.ink h2 span { color: var(--text-3); }
.ink p { font-size: 17px; line-height: 26px; color: var(--text-2); text-wrap: pretty; }

.ledger { width: 460px; flex-shrink: 0; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.ledger .site-row { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.ledger .fav {
  width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: 9px;
  background: var(--selected); font-family: var(--font-display); font-weight: 600; font-size: 15px;
}
.ledger .site-meta { display: flex; flex-direction: column; gap: 2px; flex: 1 1 0; min-width: 0; }
.ledger .site { font-size: 15px; line-height: 20px; font-weight: 500; }
.ledger .state { font-size: 13px; line-height: 18px; color: var(--text-3); }
.ledger .btn {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; white-space: nowrap;
  background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 600;
  transition: transform 160ms var(--ease-out), background-color 150ms ease-out, color 150ms ease-out, opacity 150ms ease-out;
}
.ledger .btn.quiet { background: var(--selected); color: var(--text); }
.ledger .btn:active { transform: scale(0.97); }
.ledger .btn:disabled { opacity: 0.45; cursor: default; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .ledger .btn:not(:disabled):hover { background: var(--accent-hover); }
  .ledger .btn.quiet:not(:disabled):hover { background: #34312D; }
}
.log { list-style: none; padding: 4px 24px 8px; min-height: 228px; }
.log-empty { padding: 20px 0; font-size: 14px; line-height: 20px; color: var(--text-3); }
.log-row {
  display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}
.log-row:last-child { border-bottom: 0; }
.log-row[data-enter] { opacity: 0; transform: translateY(-6px); }
.dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 999px; background: var(--text-3); transition: background-color 200ms ease-out; }
.dot.green { background: var(--green); }
.dot.amber { background: var(--accent); }
.log-main { display: flex; flex-direction: column; gap: 2px; flex: 1 1 0; min-width: 0; }
.log-title { font-size: 15px; line-height: 20px; }
.log-sub { font-size: 13px; line-height: 18px; color: var(--text-3); }
.log-trail { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.log-trail .count { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--accent); }
.log-trail .done { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text-2); }
.link {
  font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text-2);
  text-decoration: underline; text-underline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) { .link:hover { color: var(--text); } }

/* ---------- Principles ---------- */

.principles { display: flex; gap: 48px; padding-top: clamp(96px, 10vw, 144px); }
.principles > div { flex: 1 1 0; display: flex; flex-direction: column; gap: 10px; padding-top: 24px; border-top: 1px solid var(--border); }
.principles h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 28px; letter-spacing: -0.02em; color: var(--heading); }
.principles p { font-size: 16px; line-height: 24px; color: var(--text-2); }
.principles a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border); }
@media (hover: hover) and (pointer: fine) { .principles a:hover { color: var(--text); } }

/* ---------- Install ---------- */

.install { display: flex; flex-direction: column; align-items: center; gap: 32px; padding: clamp(120px, 13vw, 192px) var(--gutter) 160px; text-align: center; }
.install h2 {
  max-width: 900px; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(44px, 5.6vw, 80px); line-height: 1.05; letter-spacing: -0.04em; color: var(--heading);
}
.command {
  display: flex; align-items: center; gap: 12px; width: min(980px, 100%); padding: 6px 6px 6px 20px;
  border-radius: 16px; background: var(--surface); text-align: left;
}
.command code {
  flex: 1 1 0; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none;
  font-family: var(--font-mono); font-size: 14px; line-height: 20px; color: var(--text); padding: 12px 0;
}
.command code::-webkit-scrollbar { display: none; }
.command code .prompt { color: var(--text-3); user-select: none; -webkit-user-select: none; }
.copy-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; min-width: 92px;
  height: 40px; padding: 0 16px; border-radius: 11px; background: var(--accent); color: var(--on-accent);
  font-size: 14px; line-height: 18px; font-weight: 600;
  transition: transform 160ms var(--ease-out), background-color 150ms ease-out;
}
.copy-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .copy-btn:hover { background: var(--accent-hover); } }
.install-note { max-width: 560px; font-size: 15px; line-height: 22px; color: var(--text-2); text-wrap: balance; }
.install-note a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border); }

/* The mark above "Get back to what matters", its door lit like a rune. The default is the
   lit state, so the page without JavaScript shows it. main.js sets data-armed (unlit) while
   the mark is out of view, and data-lit when it comes in. */
.rune { --rune-rest: 0.45; --rune-line: #FFF6E3; }
.rune .rune-glow { fill: var(--accent); opacity: var(--rune-rest); }
.rune .rune-core { opacity: 0.3; }
.rune .rune-line {
  fill: none; stroke: var(--rune-line); stroke-width: 0.32; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 0; opacity: 0.55;
}
.rune[data-armed] .rune-glow, .rune[data-armed] .rune-core { opacity: 0; }
/* Hidden, not just undrawn: the round caps of an empty dash still show as a dot. */
.rune[data-armed] .rune-line { stroke-dashoffset: 1; opacity: 0; }
/* One-shot: the trace runs up both sides from the sill and meets at the top; the glow
   blooms as the trace closes, then settles to its resting light. */
.rune[data-lit] .rune-line {
  animation: rune-trace 900ms cubic-bezier(0.23, 1, 0.32, 1) both, rune-line-settle 1200ms ease-out 1100ms both;
}
.rune[data-lit] .rune-glow { animation: rune-bloom 1800ms cubic-bezier(0.23, 1, 0.32, 1) 650ms both; }
.rune[data-lit] .rune-core { animation: rune-core 1800ms cubic-bezier(0.23, 1, 0.32, 1) 650ms both; }
@media (prefers-color-scheme: dark) { .rune { --rune-rest: 0.6; --rune-line: #FFF1D2; } }
@keyframes rune-trace {
  0% { stroke-dashoffset: 1; opacity: 0; }
  12% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes rune-line-settle { from { opacity: 1; } to { opacity: 0.55; } }
@keyframes rune-bloom { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: var(--rune-rest); } }
@keyframes rune-core { 0% { opacity: 0; } 30% { opacity: 0.75; } 100% { opacity: 0.3; } }

.soon {
  display: inline-flex; align-items: center; gap: 8px; margin-top: -8px;
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-2);
}
.soon svg { color: var(--text-3); }
.soon-badge {
  padding: 1px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: 11px; line-height: 18px; font-weight: 600; letter-spacing: 0.02em; color: var(--accent-text);
}

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

.footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 28px 0 40px; border-top: 1px solid var(--border); font-size: 13px; line-height: 18px; color: var(--text-3);
}
.footer nav { display: flex; flex-wrap: wrap; gap: 28px; }
.footer a { transition: color 150ms ease-out; }
@media (hover: hover) and (pointer: fine) { .footer a:hover { color: var(--text); } }

/* ---------- Privacy page ---------- */

.doc { max-width: 680px; margin-inline: auto; padding: clamp(56px, 8vw, 96px) var(--gutter) 120px; }
.doc h1 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(44px, 6vw, 64px); line-height: 1.06;
  letter-spacing: -0.035em; color: var(--heading); margin-bottom: 20px;
}
.doc .lead { font-size: 20px; line-height: 30px; color: var(--text-2); margin-bottom: 56px; text-wrap: pretty; }
.doc h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 28px; letter-spacing: -0.02em;
  color: var(--heading); padding-top: 24px; border-top: 1px solid var(--border); margin: 40px 0 10px;
}
.doc p { font-size: 17px; line-height: 27px; color: var(--text-2); text-wrap: pretty; }
.doc p + p { margin-top: 14px; }
.doc a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border); }
.doc code { font-family: var(--font-mono); font-size: 0.9em; }

/* ---------- Smaller screens ---------- */

@media (max-width: 1100px) {
  .bento-row.one { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .bento-row.one .card.large { min-height: 480px; }
  .bento-row.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bento-row.two .card.browser { grid-column: 1 / -1; }
  .ink { flex-direction: column; align-items: stretch; gap: 40px; }
  .ink .copy { max-width: 640px; }
  .ledger { width: 100%; }
}
@media (max-width: 720px) {
  .bento-row.two { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .bento-row.two .card { min-height: 360px; }
  .bento-row.two .card.browser { min-height: 400px; }
  .arch { transform: scale(0.86); }
  .card, .card.large { padding: 28px; border-radius: 24px; }
  .card h3, .card.large h3 { font-size: 26px; line-height: 30px; }
  .principles { flex-direction: column; gap: 32px; }
  .footer { flex-direction: column; align-items: flex-start; }
  .ledger .site-row { padding: 16px; flex-wrap: wrap; }
  .log { padding: 4px 16px 8px; }
  .command { flex-direction: column; align-items: stretch; padding: 6px; }
  /* The whole command stays readable: it wraps instead of scrolling. */
  .command code { flex: none; padding: 12px 14px; white-space: normal; overflow-wrap: anywhere; }
}

@media (max-width: 350px) { .arch { transform: scale(0.74); } }

@media (prefers-reduced-motion: reduce) {
  .door, .body, .bwin, .shield, .log-row, .progress i, .nav-item .trail { transition: opacity 150ms ease-out !important; }
  .body.running[data-hidden], .bwin, .shield, .log-row[data-enter] { transform: none !important; }
  .desk-frame[data-ready] .desk { transition: none; }
  .rune[data-lit] .rune-line, .rune[data-lit] .rune-glow, .rune[data-lit] .rune-core { animation: none; }
}
