/* Atlas Toolkit: preview site */

:root {
  --paper: #f5f3ee;
  --paper-2: #efece5;
  --ink: #1c2433;
  --ink-2: #3a4252;
  --muted: #6b6f78;
  --faint: #9a9ca2;
  --rule: #dcd8cf;
  --rule-2: #e7e3da;
  --accent: #3b5b8c;
  --node: #fbfaf7;

  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  font-feature-settings: "ss01", "kern";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

::selection { background: var(--ink); color: var(--paper); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.serif { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------- Notice bar ---------- */

.notice {
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .01em;
}
.notice .wrap { display: flex; gap: 12px; align-items: center; justify-content: center; padding-top: 9px; padding-bottom: 9px; text-align: center; }
.notice .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; animation: pulse 2.4s ease-in-out infinite; }
.notice em { font-family: var(--serif); font-size: 14.5px; color: var(--ink-2); }
@keyframes pulse { 50% { opacity: .25; } }

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

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand span { font-weight: 600; letter-spacing: .02em; font-size: 15px; }
.brand span small { font-weight: 400; color: var(--muted); letter-spacing: .01em; margin-left: 6px; font-size: 13px; }

.nav { display: flex; gap: 28px; align-items: center; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
/* The early-bird pass: the one accented item (in the menu panel too) */
.nav .nav-early { color: var(--accent); font-weight: 500; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.nav .nav-early::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.nav .nav-early:hover { color: var(--ink); }
.nav .nav-cta { border: 1px solid var(--ink); padding: 7px 14px; border-radius: 999px; color: var(--ink); transition: background .2s, color .2s; }
.nav .nav-cta:hover { background: var(--ink); color: var(--paper); }

/* With nine menu items the brand's subtitle would crowd them: it gives way first */
@media (max-width: 1200px) { .brand span small { display: none; } }
/* Narrower, the bar holds only the brand and the menu button: every link is in the menu panel */
@media (max-width: 1080px) {
  .nav { display: none; }
  .brand span small { display: none; }
  .brand span { white-space: nowrap; }
}
.site-header .nav { margin-left: auto; }   /* the links and the menu button sit together on the right */

/* Hairline separators between the menu's words, wide windows only (narrower, the menu panel takes over) */
@media (min-width: 1081px) {
  .nav > a { position: relative; }
  .nav > a + a:not(.nav-cta)::after {
    content: ""; position: absolute; left: -14px; top: 50%; width: 1px; height: .95em; transform: translateY(-50%);
    background: color-mix(in srgb, var(--ink) 16%, transparent); pointer-events: none;
  }
}

/* The menu button and its panel (built by site.js): shown where the bar hides links */
.site-header .wrap { position: relative; }
.menu-btn {
  display: none; flex: none; width: 40px; height: 40px; padding: 0; border-radius: 999px;
  border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center; transition: border-color .2s, background .2s;
}
.menu-btn:hover, .menu-btn[aria-expanded="true"] { border-color: var(--ink); }
.menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; overflow: visible; }
.menu-btn svg path { transition: transform .3s var(--ease), opacity .2s; transform-origin: 12px 12px; }
.menu-btn[aria-expanded="true"] .m1 { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .m2 { opacity: 0; }
.menu-btn[aria-expanded="true"] .m3 { transform: translateY(-4px) rotate(-45deg) scaleX(1.6); }
@media (max-width: 1080px) { .menu-btn { display: inline-flex; } }

.menu-panel {
  position: absolute; top: calc(100% - 6px); right: var(--gutter); z-index: 30;
  width: min(288px, calc(100vw - 2 * var(--gutter))); max-height: calc(100dvh - 96px); overflow: auto;
  padding: 14px 8px 8px; background: var(--node); border: 1px solid var(--rule); border-radius: 6px;
  box-shadow: 0 1px 0 var(--rule-2), 0 24px 48px -24px color-mix(in srgb, var(--ink) 35%, transparent);
  transform-origin: top right; animation: menu-in .24s var(--ease);
}
.menu-panel[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.menu-label { margin: 0 12px 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-panel li + li { border-top: 1px solid var(--rule-2); }
.menu-item {
  display: grid; grid-template-columns: 26px 1fr auto; align-items: baseline; gap: 6px;
  padding: 11px 12px; border-radius: 3px; text-decoration: none; color: var(--ink); font-size: 15.5px; font-weight: 600;
  letter-spacing: -.005em;
}
.menu-n { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.menu-arrow { color: var(--muted); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .25s var(--ease); }
.menu-item:hover, .menu-item:focus-visible { background: var(--paper); }
.menu-item:hover .menu-arrow, .menu-item:focus-visible .menu-arrow { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .menu-panel { animation: none; } .menu-btn svg path { transition: none; } }

/* ---------- Type ---------- */

h1, h2, h3 { font-weight: 500; letter-spacing: -.02em; margin: 0; color: var(--ink); }

.display {
  font-size: clamp(40px, 6.6vw, 92px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 400;
}
.display .serif { letter-spacing: -.015em; }

h2 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.08; letter-spacing: -.028em; font-weight: 400; }
h3 { font-size: 19px; line-height: 1.3; letter-spacing: -.01em; }

.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 36em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }

.label {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  font-weight: 500;
}
.label b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.label::after { content: ""; flex: 1; height: 1px; background: var(--rule); transform: translateY(-3px); }

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

.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  border: 1px solid var(--ink);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--ink-2); color: var(--paper); }
.btn-line { color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
/* The hero's download button: an ink capsule inside a hairline pill, the version beside it. On hover a pen line is
   drawn under the version, left to right, like a plotter stroke. */
.btn-dl { padding: 5px 20px 5px 5px; gap: 14px; color: var(--ink); font-weight: 400; background: color-mix(in srgb, var(--node) 70%, transparent); }
.btn-dl-tag {
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: 8px 18px;
  font-weight: 500; letter-spacing: .01em; transition: background .2s var(--ease);
}
.btn-dl-text {
  color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; padding: 3px 0;
  background: linear-gradient(var(--ink), var(--ink)) left bottom / 0 1px no-repeat;
  transition: background-size .45s var(--ease), color .2s var(--ease);
}
.btn-dl:hover { color: var(--ink); }
.btn-dl:hover .btn-dl-tag { background: var(--ink-2); }
.btn-dl:hover .btn-dl-text { color: var(--ink); background-size: 100% 1px; }
@media (prefers-reduced-motion: reduce) { .btn-dl-text { transition: none; } }
@media (max-width: 420px) { .btn-dl { gap: 10px; padding-right: 16px; } .btn-dl-os { display: none; } }
/* In the hero the two buttons stack: the download first, Ko-fi under it, both on the column's left edge */
.hero-foot .btns { flex-direction: column; align-items: flex-start; }

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

.hero { padding: clamp(56px, 9vw, 120px) 0 0; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 36px; }
.hero .kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 28px; display: flex; gap: 18px; flex-wrap: wrap; }
.hero .kicker span + span::before { content: "/"; margin-right: 18px; color: var(--rule); }
@media (max-width: 560px) {
  .hero .kicker { gap: 6px 14px; font-size: 12px; }
  .hero .kicker span + span::before { content: none; }
  .hero .kicker span + span { padding-left: 14px; border-left: 1px solid var(--rule); }
  .hero .kicker span:nth-child(3) { padding-left: 0; border-left: 0; }
}
.hero-foot { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-top: 8px; }
@media (max-width: 820px) { .hero-foot { grid-template-columns: 1fr; gap: 28px; } }

.hero-figure { margin: clamp(48px, 7vw, 88px) 0 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.hero-figure img { width: 100%; }
.hero-figure figcaption { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; font-size: 13px; color: var(--muted); border-top: 1px solid var(--rule-2); flex-wrap: wrap; }
.hero-figure figcaption .serif { font-size: 15px; color: var(--ink-2); }

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

section { padding: clamp(72px, 10vw, 140px) 0 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; margin: 28px 0 clamp(36px, 5vw, 64px); align-items: end; }
.section-head p { margin: 0; color: var(--ink-2); max-width: 34em; }
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; gap: 20px; } }

/* About: three principles */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.principles > div { padding: 24px 28px 8px 0; }
.principles > div + div { padding-left: 28px; border-left: 1px solid var(--rule); }
.principles h3 { margin-bottom: 12px; }
.principles h3 .serif { color: var(--muted); font-size: 17px; margin-right: 8px; }
.principles p { color: var(--ink-2); font-size: 16px; }
@media (max-width: 820px) {
  .principles { grid-template-columns: 1fr; }
  .principles > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
}

.app-figure { margin: clamp(48px, 6vw, 80px) 0 0; }
.app-figure .frame { background: #0f1520; padding: clamp(8px, 1.2vw, 14px); border-radius: 10px; }
.app-figure img { border-radius: 4px; width: 100%; }
.app-figure figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.app-figure figcaption .serif { font-size: 16px; color: var(--ink-2); }

/* Audience */
.audience { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.audience li { display: grid; grid-template-columns: 60px minmax(0, 4fr) minmax(0, 7fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.audience .n { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.audience h3 { font-weight: 500; font-size: 22px; letter-spacing: -.02em; }
.audience p { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 720px) { .audience li { grid-template-columns: 36px 1fr; } .audience p { grid-column: 2; } }

/* ---------- Half-image crops (README pairs: model | drawing, caption baked in) ---------- */

.crop { position: relative; overflow: hidden; aspect-ratio: 500 / 612; background: var(--paper); }
.crop img { position: absolute; top: 0; height: auto; width: 200%; max-width: none; }
.crop.l img { left: 0; }
.crop.r img { left: -100%; }
.crop.sq { aspect-ratio: 1 / 1; }
.crop.sq img { width: 100%; left: 0; top: 0; }
.crop.full { aspect-ratio: 2000 / 600; }
.crop.full img { width: 100%; left: 0; }

/* "Before" inset: the original model, in the corner of a processed result */
.before {
  position: absolute; z-index: 2; left: 8px; top: 8px; width: 30%; min-width: 46px; max-width: 84px;
  background: var(--paper); border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); border-radius: 3px;
  overflow: hidden;
}
.before, .before .crop { display: block; }
.before .crop { aspect-ratio: 1 / 1; border: 0 !important; border-radius: 0; }
.before .crop img { top: -6%; transform: none !important; }
.before i {
  display: block; font-style: normal; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); text-align: center; padding: 2px 2px 3px; border-top: 1px solid var(--rule-2); background: var(--node);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.from { display: block; font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted); margin-top: 2px; }
.from b { font-family: var(--sans); font-style: normal; font-weight: 500; color: var(--ink-2); font-size: 13px; }

/* Inputs */
.inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.inputs figure { margin: 0; padding: 24px 28px 0 0; }
.inputs figure + figure { padding-left: 28px; border-left: 1px solid var(--rule); }
.inputs .crop { aspect-ratio: 1 / 1; border: 1px solid var(--rule-2); border-radius: 3px; }
.inputs .crop.l img { top: -6%; }
.inputs figcaption { padding-top: 16px; }
.inputs figcaption h3 { font-size: 24px; font-weight: 500; letter-spacing: -.02em; margin: 4px 0 8px; }
.inputs figcaption p { font-size: 15px; color: var(--ink-2); margin: 0; line-height: 1.55; max-width: 26em; }
.tag { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
@media (max-width: 820px) {
  .inputs { grid-template-columns: 1fr; }
  .inputs figure { padding-right: 0; }
  .inputs figure + figure { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); margin-top: 28px; }
  .inputs .crop { aspect-ratio: 4 / 3; }
}

/* Options per input */
.opt { border-top: 1px solid var(--ink); padding-top: 26px; }
.opt h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 400; letter-spacing: -.025em; margin: 6px 0 12px; }
.opt header p { color: var(--ink-2); font-size: 16px; max-width: 34em; margin: 0; }
.opt-main { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 56px); }
.opt-main h3 { font-size: clamp(28px, 3vw, 40px); }
.facts { list-style: none; margin: 24px 0 0; padding: 0; }
.facts li { padding: 10px 0; border-top: 1px solid var(--rule); font-size: 14.5px; color: var(--muted); }
.facts li b { color: var(--ink); font-weight: 600; margin-right: 6px; }
.opt-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.opt-figs.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
.opt-figs figure { margin: 0; }
.opt-figs .crop { border: 1px solid var(--rule-2); border-radius: 3px; }
.opt-figs figcaption { padding-top: 9px; font-size: 13.5px; color: var(--muted); }
.opt-figs figcaption b { color: var(--ink); font-weight: 600; }
.opt-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); margin-top: clamp(48px, 6vw, 80px); }
.opt-svg { margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--rule); padding-top: 18px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 56px); align-items: baseline; }
.opt-svg p { margin: 0; color: var(--ink-2); font-size: 16px; }
.opt-svg p b { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) {
  .opt-main, .opt-pair, .opt-svg { grid-template-columns: 1fr; }
  .opt-svg { gap: 6px; }
}
@media (max-width: 560px) {
  .opt-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opt-figs:not(.two) figure:last-child { grid-column: 1 / -1; }
  .opt-figs:not(.two) figure:last-child .crop { aspect-ratio: 4 / 3; }
}

/* ---------- Workflow canvas ---------- */

.canvas {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background-color: var(--paper-2);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--ink) 16%, transparent) 1px, transparent 1.2px);
  background-size: 22px 22px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.canvas-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--rule); background: var(--paper); font-size: 12px; color: var(--muted); letter-spacing: .06em; position: sticky; left: 0; }
.canvas-bar .file { font-variant-numeric: tabular-nums; }
.canvas-bar .file b { color: var(--ink); font-weight: 500; }
.canvas-bar .state { display: flex; gap: 8px; align-items: center; }
.canvas-bar .state i { width: 7px; height: 7px; border-radius: 50%; background: #5d8a6a; display: inline-block; }

.graph { position: relative; padding: clamp(28px, 3.4vw, 44px); min-width: 880px; }
.graph .wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.graph .wires path { fill: none; stroke: var(--ink); stroke-width: 1.15; opacity: .55; }
.graph .wires path.flow { stroke-dasharray: 3 7; opacity: .9; animation: flow 1.6s linear infinite; }
.graph .wires circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; }
@keyframes flow { to { stroke-dashoffset: -20; } }

.chain { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(26px, 3.4vw, 52px); align-items: center; position: relative; z-index: 1; }

.node {
  background: var(--node);
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 6px;
  position: relative;
  transition: transform .35s var(--ease), border-color .3s;
}
.node:hover { transform: translateY(-3px); border-color: var(--ink); }
.node header { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px 8px; border-bottom: 1px solid var(--rule-2); }
.node header b { font-weight: 600; font-size: 13.5px; letter-spacing: -.005em; white-space: nowrap; }
.node header span { font-size: 10px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.node .crop { margin: 0; border-bottom: 1px solid var(--rule-2); }
.node footer { padding: 8px 12px 10px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.node footer em { font-family: var(--serif); font-size: 13.5px; color: var(--ink-2); }
.node.io header b::before { content: ""; display: inline-block; width: 7px; height: 7px; border: 1px solid var(--ink); border-radius: 50%; margin-right: 7px; transform: translateY(-1px); }
.node.svg .crop { background: #fff; }

.node.text { padding-bottom: 2px; }
.node.text .body { padding: 16px 12px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.node.text .body dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; }
.node.text .body dt { color: var(--muted); }
.node.text .body dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.graph-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 28px; }
.graph-notes p { font-size: 15px; color: var(--ink-2); margin: 0; padding-top: 14px; border-top: 1px solid var(--rule); }
.graph-notes b { font-weight: 600; color: var(--ink); display: block; margin-bottom: 4px; font-size: 14px; }
@media (max-width: 820px) { .graph-notes { grid-template-columns: 1fr; gap: 0; } .graph-notes p { padding-bottom: 14px; } }

.scroll-hint { display: none; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
@media (max-width: 960px) { .scroll-hint { display: block; } }

/* Branching graph */
.branch, .branch-heads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(60px, 7vw, 110px); position: relative; z-index: 1; }
.branch-heads { margin-bottom: 18px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.branch-heads span { text-align: center; }
.branch-heads span:first-child { text-align: left; }
.branch .col { display: flex; flex-direction: column; gap: 26px; justify-content: space-between; align-items: center; }
.branch .col-in { justify-content: space-around; align-items: flex-start; }
.branch .node { width: 100%; max-width: 196px; }
.branch .col-in .node { max-width: 176px; }
.branch .crop { aspect-ratio: 1 / 1; }
.branch .crop img { top: -7%; }
.graph.wide { min-width: 860px; }

/* ---------- Tools catalogue ---------- */

.tool-groups { border-top: 1px solid var(--ink); }
.tool-group { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; padding: 32px 0 40px; border-bottom: 1px solid var(--rule); }
.tool-group > header h3 { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.tool-group > header p { font-size: 14.5px; color: var(--muted); margin: 8px 0 0; max-width: 20em; }
.tool-group > header .count { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 16px; display: block; margin-top: 4px; }
@media (max-width: 820px) { .tool-group { grid-template-columns: 1fr; gap: 20px; } }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 18px; }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1060px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; } }
.tile { margin: 0; }
.tile .crop { border: 1px solid var(--rule-2); border-radius: 3px; transition: border-color .3s; }
.tile:hover .crop { border-color: var(--ink); }
.tile .crop img { transition: transform .6s var(--ease); }
.tile:hover .crop img { transform: scale(1.035); }
.tile figcaption { padding-top: 10px; }
.tile figcaption b { font-weight: 600; font-size: 14.5px; display: block; }
.tile figcaption span { font-size: 13.5px; color: var(--muted); line-height: 1.45; display: block; margin-top: 2px; }

.families { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; margin-top: 30px; }
.families div { padding: 14px 0; border-top: 1px solid var(--rule-2); }
.families h4 { margin: 0 0 4px; font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.families p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
@media (max-width: 820px) { .families { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .families { grid-template-columns: 1fr; } }

.refine { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.refine li { padding: 12px 0; border-top: 1px solid var(--rule-2); font-size: 14.5px; color: var(--muted); }
.refine li b { color: var(--ink); font-weight: 600; margin-right: 6px; }
@media (max-width: 620px) { .refine { grid-template-columns: 1fr; } }

.more { margin-top: 28px; font-size: 15px; }

/* ---------- Presets ---------- */

.picker { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); border-top: 1px solid var(--ink); padding-top: 26px; align-items: start; }
.picker-side h3 { font-size: clamp(28px, 3vw, 40px); font-weight: 400; letter-spacing: -.025em; margin: 6px 0 22px; }
.picker-list { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.picker-list button {
  font: inherit; font-size: 16px; color: var(--muted); text-align: left; background: none; border: 0;
  border-bottom: 1px solid var(--rule); padding: 11px 0 11px 22px; cursor: pointer; position: relative;
  transition: color .2s, padding-left .25s var(--ease);
}
.picker-list button::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.picker-list button:hover { color: var(--ink); }
.picker-list button[aria-selected="true"] { color: var(--ink); font-weight: 500; padding-left: 26px; }
.picker-list button[aria-selected="true"]::before { transform: scaleX(1); }
.picker-tip { margin: 20px 0 0; font-size: 18px; line-height: 1.45; color: var(--ink-2); min-height: 3em; max-width: 26em; }
.picker-view { margin: 0; background: var(--paper); border: 1px solid var(--rule-2); border-radius: 3px; display: flex; justify-content: center; }
.picker-view img { width: auto; max-width: 100%; height: min(72vh, 620px); aspect-ratio: 500 / 640; object-fit: contain; transition: opacity .25s ease; }
.picker-view img.fading { opacity: 0; }
@media (max-width: 820px) {
  .picker { grid-template-columns: 1fr; }
  .picker-list { flex-direction: row; flex-wrap: wrap; gap: 8px; border-top: 0; }
  .picker-list button { border: 1px solid var(--rule); border-radius: 999px; padding: 7px 14px; font-size: 14px; }
  .picker-list button::before { display: none; }
  .picker-list button[aria-selected="true"] { padding-left: 14px; border-color: var(--ink); background: var(--ink); color: var(--paper); }
  .picker-tip { min-height: 0; font-size: 16px; }
  .picker-view { max-width: 460px; }
}

.preset-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: clamp(40px, 5vw, 64px); }
.preset-strip figure { margin: 0; }
.preset-strip img { width: 100%; border: 1px solid var(--rule-2); border-radius: 3px; background: var(--paper); }
.preset-strip figcaption { padding-top: 9px; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.preset-strip figcaption b { display: block; color: var(--ink); font-weight: 600; font-size: 13px; }
@media (max-width: 980px) { .preset-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .preset-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.packs { margin-top: clamp(56px, 7vw, 96px); border-top: 1px solid var(--ink); padding-top: 26px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 28px clamp(28px, 4vw, 56px); }
.packs-head h3 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 400; letter-spacing: -.025em; margin: 0 0 12px; }
.packs-head p { margin: 0; color: var(--ink-2); font-size: 16px; max-width: 26em; }
.tiers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.tiers li { padding: 18px 20px 6px 0; }
.tiers li + li { padding-left: 20px; border-left: 1px solid var(--rule); }
.tiers h4 { margin: 6px 0 8px; font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.tiers p { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.packs-foot { grid-column: 2; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 6px; }
.packs-foot p { margin: 0; font-size: 14.5px; color: var(--muted); max-width: 30em; }
.packs-foot .btns { align-items: center; }
.soon { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 15px; }
@media (max-width: 900px) {
  .packs { grid-template-columns: 1fr; }
  .packs-foot { grid-column: 1; }
}
@media (max-width: 620px) {
  .tiers { grid-template-columns: 1fr; }
  .tiers li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
}

/* ---------- Status ---------- */

.status { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; border-top: 1px solid var(--ink); padding-top: 32px; }
@media (max-width: 900px) { .status { grid-template-columns: 1fr; gap: 28px; } }
.status .big { font-family: var(--serif); font-style: italic; font-size: clamp(26px, 2.8vw, 36px); line-height: 1.25; color: var(--ink); letter-spacing: -.01em; }
.platforms { list-style: none; margin: 0; padding: 0; }
.platforms li { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) auto; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 15px; align-items: baseline; }
.platforms li b { font-weight: 600; }
.platforms li span { color: var(--muted); }
.platforms li i { font-style: normal; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--rule); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
@media (max-width: 560px) { .platforms li { grid-template-columns: 1fr auto; } .platforms li span { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Support ---------- */

.support { margin-top: clamp(72px, 10vw, 140px); background: var(--ink); color: var(--paper); }
.support .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(56px, 7vw, 96px); align-items: end; }
.support h2 { color: var(--paper); }
.support p { color: color-mix(in srgb, var(--paper) 78%, transparent); max-width: 32em; }
.support .btn-solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.support .btn-solid:hover { background: transparent; color: var(--paper); }
.support .btn-line { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 50%, transparent); }
.support .btn-line:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
@media (max-width: 860px) { .support .wrap { grid-template-columns: 1fr; } }

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

.site-footer { padding: 56px 0 40px; font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 2fr)); gap: 32px; }
.foot-grid h4 { margin: 0 0 12px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; color: var(--ink); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { padding: 3px 0; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }
.foot-grid .tag { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--ink-2); max-width: 18em; line-height: 1.35; margin: 14px 0 0; }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--rule); margin-top: 48px; padding-top: 20px; font-size: 13px; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- Contact page ---------- */

.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 6vw, 96px); padding-top: clamp(56px, 8vw, 110px); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact aside p { color: var(--ink-2); }
.contact aside dl { margin: 32px 0 0; border-top: 1px solid var(--ink); }
.contact aside dl div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.contact aside dt { color: var(--muted); }
.contact aside dd { margin: 0; overflow-wrap: anywhere; }

form.mail { border-top: 1px solid var(--ink); }
.field { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.field label { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 10px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid transparent;
  padding: 8px 0; border-radius: 0; outline: none; -webkit-appearance: none; appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.field textarea { min-height: 180px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
@media (max-width: 620px) { .field { grid-template-columns: 1fr; gap: 0; } .field label { padding-top: 0; } }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-top: 24px; flex-wrap: wrap; }
.form-foot small { color: var(--muted); font-size: 13.5px; max-width: 30em; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.flash { padding: 16px 18px; border: 1px solid var(--ink); border-radius: 4px; margin-bottom: 28px; font-size: 15.5px; display: none; }
.flash.show { display: block; }
.flash.ok { background: color-mix(in srgb, #5d8a6a 10%, var(--paper)); border-color: #5d8a6a; }
.flash.err { background: color-mix(in srgb, #a5533f 9%, var(--paper)); border-color: #a5533f; }

/* ---------- Reveal ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .notice .dot, .graph .wires path.flow { animation: none; }
  .node, .tile .crop img, .btn .arrow { transition: none; }
}

.before .crop.sq img { top: 0; }

/* Ko-fi's floating donate button (assets/js/site.js): only while the support band or the footer is on screen */
.floatingchat-container-wrap, .floatingchat-container-wrap-mobi { transition: opacity .3s ease, transform .3s ease; }
html:not(.kofi-on) .floatingchat-container-wrap,
html:not(.kofi-on) .floatingchat-container-wrap-mobi { opacity: 0; transform: translateY(12px); pointer-events: none; }

/* The intro video: the full content width and the corners of the app screenshot, so the two read as a pair */
.atlas-intro-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: clamp(40px, 5vw, 64px) 0 0;
  border: 0;
  border-radius: 10px;
  background: #0f1520;
}
