/* ══════════════════════════════════════════════════════════════
   AXIOM
   One colour scheme at every screen size — the palette does not
   follow the OS light/dark setting, so phones match desktop.
   The site is a tool, not a brochure. One field, one result set,
   almost no chrome. No spine column and no section furniture. Each
   name carries a box line whose hue is derived from the name itself.
   ══════════════════════════════════════════════════════════════ */

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

/* Component display rules (.cell is flex) would otherwise override the
   hidden attribute the search sets, leaving non-matches on screen. */
[hidden] { display: none !important; }

:root {
  --bg:       #fbfcfb;
  --bg-2:     #f2f5f3;
  --fg:       #0a1410;
  --fg-2:     #55635c;
  --fg-3:     #8a978f;
  --fg-4:     #b3bfb8;
  --line:     #e6ebe8;
  --line-2:   #d3dbd6;

  --mint:     #00875c;   /* passes as text */
  --mint-hi:  #00d492;   /* fills only, ink on top */
  --wash:     #eafaf3;
  --on-mint:  #04180f;

  --ui:   'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --wrap: 1180px;
  --gut:  clamp(22px, 5vw, 60px);
  --hair: 1px;
}

/* Retina: 1px is two device pixels there and reads as a line. */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  :root { --hair: 0.5px; }
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor targets must clear the sticky bar. */
  scroll-padding-top: 84px;
}

body {
  background: var(--bg);
  color: var(--fg-2);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--mint-hi); color: var(--on-mint); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.hide { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--fg); color: var(--bg);
  padding: 9px 14px; font: 500 12px/1 var(--mono); border-radius: 4px;
}
.skip:focus { left: 12px; }

/* ── Bar ───────────────────────────────────────────────────
   No border, no background, no shadow. It simply sits there. ── */
.bar {
  position: sticky; top: 0; z-index: 60;
  background: var(--bg);
  padding: 16px 0 13px;
}
.bar-in { display: flex; align-items: center; gap: 20px; }
.lockup { display: inline-flex; align-items: center; gap: 9px; }

/* The eye from the original site: pupil darts and blinks on a 6.5s
   loop, faster on hover. SVG, so it holds up at any pixel density. */
.eye { display: inline-flex; width: 30px; height: 30px; color: var(--fg); flex: none; }
.eye svg { display: block; width: 100%; height: 100%; }
.eye-pupil {
  transform-origin: 18px 18px; transform-box: fill-box;
  animation: eye-dart 6.5s infinite ease-in-out;
}
@keyframes eye-dart {
  0%, 18%   { transform: translate(0, 0); }
  22%, 30%  { transform: translate(2.4px, -0.6px); }
  34%, 42%  { transform: translate(-2.4px, 0.4px); }
  46%, 50%  { transform: translate(0, 0); }
  52%       { transform: translate(0, 0) scaleY(1); }
  54%       { transform: translate(0, 0) scaleY(0.08); }
  56%       { transform: translate(0, 0) scaleY(1); }
  62%, 70%  { transform: translate(1.4px, 1.4px); }
  74%, 82%  { transform: translate(-1.6px, -1.2px); }
  86%       { transform: translate(0, 0) scaleY(1); }
  88%       { transform: translate(0, 0) scaleY(0.08); }
  90%, 100% { transform: translate(0, 0) scaleY(1); }
}
.lockup:hover .eye-pupil { animation-duration: 2.5s; }

.mark {
  font-family: var(--mono); font-weight: 500; font-size: 18px;
  letter-spacing: -.05em; color: var(--fg);
}
.mark i { font-style: normal; color: var(--mint); }

.bar nav { margin-left: auto; display: flex; gap: 2px; }
.bar nav a {
  font-size: 13.5px; color: var(--fg-3);
  padding: 6px 10px; border-radius: 5px;
  white-space: nowrap; transition: color .14s, background .14s;
}
.bar nav a:hover { color: var(--fg); background: var(--bg-2); }
.bar nav a[aria-current] { color: var(--fg); }

/* ── Type ──────────────────────────────────────────────────── */
.h1, .h2 {
  font-weight: 500; color: var(--fg);
  letter-spacing: -.038em; line-height: 1.02;
}

.h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.032em; }

.lede { font-size: 16px; line-height: 1.55; color: var(--fg-2); max-width: 52ch; }
.tag {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: -.02em; color: var(--fg-3);
}

/* ══ CONSOLE ═══════════════════════════════════════════════
   The whole first screen: one statement, one field, the sectors.
   ═══════════════════════════════════════════════════════════ */
.console { padding-bottom: clamp(22px, 4vh, 40px); }

/* ══ OPENING ═══════════════════════════════════════════════
   Every page opens the same way: a left-aligned title and lede, and
   a field study drawn beside them. */
.ph { padding: clamp(36px, 8vh, 84px) 0 clamp(18px, 4vh, 40px); }
.ph-in {
  display: grid; grid-template-columns: 1fr; align-items: center;
  gap: clamp(20px, 4vw, 56px);
}
.ph-with-art { padding-top: clamp(16px, 4vh, 40px); }
.ph-with-art .ph-in { grid-template-columns: 1fr 1fr; }
.ph-h {
  font-weight: 500; color: var(--fg);
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  letter-spacing: -.038em; line-height: 1.04; max-width: 16ch;
}
.ph-lede { margin-top: 16px; }
.ph .field { margin-top: clamp(24px, 4vh, 36px); }
.ph-art canvas { display: block; width: 100%; aspect-ratio: 4 / 3; }
.ph-txt { max-width: 60ch; }

/* Image story: one picture beside the text, level with the title,
   held in view while the page is read. */
.sp {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .78fr);
  column-gap: clamp(32px, 6vw, 96px); align-items: start;
}
.sp .ph, .sp .ph-in { display: contents; }
.sp .ph-txt { grid-column: 1; margin-top: clamp(36px, 8vh, 84px); }
.sp > .page { grid-column: 1; padding-top: clamp(26px, 5vh, 44px); }
.sp-art {
  grid-column: 2; grid-row: 1 / span 2;
  position: sticky; top: 92px; margin-top: clamp(28px, 6vh, 64px);
}
.sp-art canvas { display: block; width: 100%; aspect-ratio: 4 / 3; }

.field {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  margin-top: clamp(32px, 5vh, 52px);
  padding: 16px 16px 16px 18px;
  background: var(--bg-2);
  border: var(--hair) solid transparent;
  border-radius: 12px;
  transition: border-color .16s, background .16s;
}
.field:focus-within { border-color: var(--mint-hi); background: var(--bg); }
.field > svg { flex: none; color: var(--fg-4); transition: color .16s; }
.field:focus-within > svg { color: var(--mint); }
.field input {
  flex: 1; min-width: 0;
  border: 0; background: none; padding: 0;
  font: 400 clamp(16px, 1.9vw, 19px)/1.3 var(--ui);
  letter-spacing: -.022em; color: var(--fg);
}
.field input::placeholder { color: var(--fg-4); }
.field input:focus { outline: none; }
.field input::-webkit-search-cancel-button { display: none; }

kbd {
  font: 400 11px/1 var(--mono);
  color: var(--fg-3); background: var(--bg);
  border: var(--hair) solid var(--line-2); border-radius: 5px;
  padding: 5px 7px; flex: none;
}
.field:focus-within kbd { opacity: 0; }

.chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 16px;
}
/* While a term is typed the chips step aside, so the matches sit directly
   under the field instead of below the fold (the chips are ~250px on a phone). */
.searching .chips { display: none; }
.chips button {
  border: 0; cursor: pointer;
  font: 400 12.5px/1 var(--ui); letter-spacing: -.012em;
  color: var(--fg-3); background: none;
  padding: 7px 11px; border-radius: 20px;
  transition: color .14s, background .14s;
}
.chips button:hover { color: var(--fg); background: var(--bg-2); }
.chips button[aria-pressed='true'] { color: var(--on-mint); background: var(--mint-hi); }
.chips button[data-sector=''] { font-family: var(--mono); font-size: 12px; letter-spacing: -.02em; }

.state {
  margin-top: 22px; min-height: 18px;
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: -.02em; color: var(--fg-3);
}
.state b { font-weight: 400; color: var(--mint); }

/* ══ RESULTS ═══════════════════════════════════════════════ */
.results { padding-bottom: clamp(60px, 10vh, 110px); }

/* Each sector is a panel like "More in …" on the detail pages: a soft
   tint (its hue in --gh), a mint label, a heading and the sector's line,
   with the names on white cards inside. */
.group {
  scroll-margin-top: 84px;
  padding: clamp(22px, 3.4vw, 40px);
  border-radius: 18px;
  background:
    radial-gradient(80% 120% at 100% 0%, hsl(var(--gh, 160) 50% 92% / .75), transparent 60%),
    var(--bg-2);
}
.group + .group { margin-top: clamp(14px, 2.4vh, 22px); }
.group-h { padding-bottom: 0; margin-bottom: clamp(16px, 2.6vh, 24px); }
.group-h .h2 { margin-top: 8px; font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
/* Search results sit in the same kind of panel. */
#found {
  padding: clamp(22px, 3.4vw, 40px); border-radius: 18px;
  background: radial-gradient(80% 120% at 100% 0%, hsl(158 50% 92% / .75), transparent 60%), var(--bg-2);
}
#found .cell, .group .cell { background: var(--bg); }
.group .cell:hover, .group .cell:focus-within, .group .cell.cursor { background: hsl(var(--h) 58% 98%); }
.group-h p { margin-top: 8px; max-width: 70ch; font-size: 14px; line-height: 1.55; color: var(--fg-3); }

/* Each cell carries its own box line. The hue comes from the name, so
   the grid looks varied but never reshuffles between builds. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 8px;
}
.cell {
  position: relative;
  display: flex; flex-direction: column;
  padding: 13px 13px 12px;
  border: var(--hair) solid hsl(var(--h) 26% 86%);
  border-radius: 10px;
  transition: border-color .15s, background .15s;
}
.cell:hover, .cell:focus-within, .cell.cursor {
  border-color: hsl(var(--h) 48% 52%);
  background: hsl(var(--h) 58% 97%);
}

.cell-n {
  font-family: var(--mono); font-size: 14.5px;
  letter-spacing: -.045em; line-height: 1.3; color: var(--fg);
  overflow-wrap: anywhere; transition: color .15s;
  /* Keeps a long name clear of the share button, which sits over the
     top-right corner and is always visible on touch screens. */
  padding-right: 26px;
}
.cell-n i { font-style: normal; color: var(--fg-4); transition: color .15s; }
.cell:hover .cell-n, .cell.cursor .cell-n { color: hsl(var(--h) 72% 26%); }
.cell:hover .cell-n i, .cell.cursor .cell-n i { color: hsl(var(--h) 40% 46%); }

.cell-d {
  margin-top: 6px; font-size: 12.5px; line-height: 1.45;
  color: var(--fg-3);
}
.cell-go::after { content: ''; position: absolute; inset: 0; border-radius: 10px; }

.cell-s {
  position: absolute; top: 9px; right: 9px; z-index: 2;
  border: 0; background: none; cursor: pointer; padding: 4px;
  color: var(--fg-4); line-height: 0; border-radius: 5px;
  opacity: 0; transition: opacity .14s, color .14s;
}
.cell:hover .cell-s, .cell-s:focus-visible { opacity: 1; }
.cell-s:hover { color: hsl(var(--h) 60% 34%); }

.empty { padding: 40px 0; font-size: 14.5px; color: var(--fg-3); }
.empty a { color: var(--mint); }

/* ── Share popover ─────────────────────────────────────── */
.pop {
  position: absolute; z-index: 90;
  background: var(--bg); border: var(--hair) solid var(--line-2);
  border-radius: 10px; padding: 5px; min-width: 176px;
  box-shadow: 0 8px 28px -14px rgba(0, 0, 0, .28);
}
.pop[hidden] { display: none; }
.pop b {
  display: block; font-family: var(--mono); font-size: 11px; font-weight: 400;
  letter-spacing: -.03em; color: var(--fg-4);
  padding: 7px 9px 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pop a, .pop button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; background: none; cursor: pointer; text-align: left;
  font: 400 13px/1 var(--ui); color: var(--fg);
  padding: 9px; border-radius: 6px; transition: background .12s, color .12s;
}
.pop a:hover, .pop button:hover { background: var(--wash); color: var(--mint); }
.pop svg { flex: none; }

/* ══ BUTTONS ═══════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 13.5px/1 var(--ui); letter-spacing: -.014em;
  padding: 13px 18px; border-radius: 9px;
  border: var(--hair) solid var(--mint-hi);
  background: var(--mint-hi); color: var(--on-mint);
  cursor: pointer; transition: filter .15s, background .15s, color .15s, border-color .15s;
}
.btn i { font-style: normal; }
.btn:hover { filter: brightness(1.07); }
.btn-line { background: none; color: var(--fg); border-color: var(--line-2); }
.btn-line:hover { filter: none; color: var(--mint); border-color: var(--mint); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* ══ PAGE (about / protocol / legal / contact) ════════════
   One column, no spine, no eyebrows. ══════════════════════ */
.page { padding: clamp(10px, 2vh, 20px) 0 clamp(60px, 10vh, 110px); max-width: 68ch; }
.page > header { margin-bottom: clamp(30px, 5vh, 48px); }
.page > header .lede { margin-top: 16px; }
.page .tag { display: block; margin-bottom: 14px; }

.page h2 {
  font-size: 15.5px; font-weight: 500; color: var(--fg);
  letter-spacing: -.02em; line-height: 1.3;
  margin-top: 2.4em; margin-bottom: .55em;
}
.page p { font-size: 15px; line-height: 1.68; }
.page p + p { margin-top: .9em; }
.page strong { color: var(--fg); font-weight: 500; }
.page em {
  font-style: normal; font-family: var(--mono);
  font-size: .88em; letter-spacing: -.035em; color: var(--fg);
}
.page a:not(.btn):not(.mail) { color: var(--mint); }
.page ol { list-style: none; counter-reset: step; margin-top: 1.4em; }
.page ol li {
  counter-increment: step; position: relative;
  padding-left: 34px; margin-top: 1.35em;
}
.page ol li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 2px;
  font-family: var(--mono); font-size: 11px; color: var(--mint);
}
.page ol b { display: block; color: var(--fg); font-weight: 500; margin-bottom: 3px; }
.page ol p { font-size: 14.5px; }

.mail { color: var(--mint); font-family: var(--mono); font-size: .95em; letter-spacing: -.03em; }

/* Legal: numbered, dense, deliberately plain. */
.clauses { counter-reset: c; margin-top: 1.6em; }
.clauses section { counter-increment: c; padding: 16px 0; border-top: var(--hair) solid var(--line); }
.clauses h2 {
  margin: 0 0 5px; font-size: 14.5px;
  display: flex; gap: 10px;
}
.clauses h2::before {
  content: counter(c, decimal-leading-zero);
  font-family: var(--mono); font-size: 11px; color: var(--fg-4);
  flex: none; padding-top: 2px;
}
.clauses p { font-size: 13.5px; line-height: 1.62; color: var(--fg-3); }

/* ══ FORM ══════════════════════════════════════════════════ */
.form { margin-top: clamp(26px, 4vh, 40px); }
.f-row + .f-row { margin-top: 18px; }
.f-row label { display: block; margin-bottom: 7px; font-size: 13px; color: var(--fg-2); }
.f-row label .req { color: var(--mint); }
.f-row input, .f-row textarea, .f-row select {
  width: 100%; font: 400 15px/1.5 var(--ui); color: var(--fg);
  background: var(--bg-2); border: var(--hair) solid transparent;
  border-radius: 9px; padding: 12px 13px;
  transition: border-color .15s, background .15s;
}
.f-row textarea { resize: vertical; min-height: 92px; }
.f-row select {
  font-family: var(--mono); font-size: 13.5px; letter-spacing: -.03em; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a978f' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 32px;
}
.f-row input::placeholder, .f-row textarea::placeholder { color: var(--fg-4); }
.f-row :is(input, textarea, select):focus {
  outline: none; border-color: var(--mint-hi); background: var(--bg);
}
.f-row input.f-fixed {
  font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: -.03em;
  color: var(--fg); background: var(--wash); border-color: transparent; cursor: default;
}
.f-row input.f-fixed:focus { border-color: transparent; background: var(--wash); }
.f-hint { margin-top: 9px; font-size: 12.5px; line-height: 1.5; color: var(--fg-4); }

.f-err {
  display: none; margin-top: 16px; padding: 11px 13px; border-radius: 9px;
  background: rgba(214, 60, 60, .09); color: #c0392b; font-size: 13.5px;
}
.f-err.on { display: block; }
.form .btn { width: 100%; justify-content: center; margin-top: 20px; }

.f-done { padding: 8px 0; }
.f-done .tag { display: block; margin-bottom: 12px; color: var(--mint); }
.f-done h2 { margin: 0 0 8px; }

/* ══ PICTURES ══════════════════════════════════════════════
   Story pages carry their pictures pre-drawn as inline SVG
   (src/lib/draw.js): strokes keep their pixel width at any size, tones
   come from the palette. Every other picture is a canvas drawn live by
   the pen in art.js. */
.art { display: block; width: 100%; height: auto; }
.art path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.art path.i { stroke: var(--fg); }
.art path.m { stroke: var(--fg-3); }
.art path.l { stroke: var(--fg-4); }
.art path.a { stroke: var(--mint); }
.art path.bg { fill: var(--bg); stroke: none; }
.art text { font-family: var(--mono); font-weight: 500; }
.art text.i { fill: var(--fg); }
.art text.m { fill: var(--fg-3); }
.art text.l { fill: var(--fg-4); }
.art text.a { fill: var(--mint); }

/* ══ DOMAIN PAGE ═══════════════════════════════════════════
   The name and its line on the left, its sigil on the right: a figure
   traced through the name's own letters, unique to every name.
   ═══════════════════════════════════════════════════════════ */
.crumbs {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding-top: clamp(18px, 4vh, 34px);
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: -.02em; color: var(--fg-4);
}
.crumbs a { transition: color .14s; }
.crumbs a:hover { color: var(--mint); }
.crumbs [aria-current] {
  color: var(--fg-3); min-width: 0; flex: 1 1 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.dx-live { display: inline-flex; align-items: center; gap: 8px; color: var(--mint); font-weight: 500; }
.dx-live b {
  position: relative; width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint-hi);
}
.dx-live b::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: var(--hair) solid var(--mint-hi);
  animation: dx-pulse 2.6s ease-out infinite;
}
@keyframes dx-pulse {
  0%   { transform: scale(.4); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.dom { margin-top: clamp(26px, 6vh, 64px); }

.dom .btns { margin-top: clamp(24px, 4vh, 34px); }
.dom .share { margin-top: 22px; }
.dom .share button { margin-left: 0; }

.book-end {
  margin: clamp(10px, 3vh, 30px) 0 0; text-align: right;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em;
  text-transform: uppercase; color: var(--fg-4);
}
/* Tale: a hand-written story. A cover, then scenes; the pictures carry
   the story, so they stay on every screen size. */
.tale-cover {
  display: grid; grid-template-columns: 1fr 1.1fr; align-items: center;
  gap: clamp(20px, 5vw, 72px);
  padding: clamp(20px, 5vh, 50px) 0 clamp(20px, 5vh, 50px);
  border-bottom: var(--hair) solid var(--line);
}
.tale-cover, .tale-title { container-type: inline-size; }
.tale-title .tale-name { margin-top: clamp(20px, 4vh, 34px); }
.tale-title .dx-live { font-family: var(--mono); font-size: 11px; letter-spacing: .02em; text-transform: uppercase; font-weight: 500; }
.tale-k {
  margin-top: clamp(28px, 6vh, 56px);
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--fg-4);
}
.tale-h {
  margin-top: 10px; font-weight: 500; color: var(--fg);
  font-size: clamp(2.1rem, 5vw, 3.6rem); letter-spacing: -.042em; line-height: 1.02;
}
.tale-name {
  font-family: var(--mono); letter-spacing: -.062em;
  /* Sized to its own column (container units), from the name's length: a
     mono character here is about 0.54em wide, so 0.58 leaves a margin. The
     name never wraps; a long one shrinks instead. */
  font-size: min(3.4rem, calc(100cqw / (var(--len) * 0.58)));
  white-space: nowrap;
}
.tale-name i { font-style: normal; color: var(--mint); }
/* The line under the name is a little smaller than body copy, and shrinks
   with the name's length so a long name and its line stay in proportion. */
.tale-by { margin-top: 12px; font-size: clamp(13px, calc(17px - var(--len, 12) * 0.12px), 15.5px); line-height: 1.45; color: var(--fg-3); }
.tale-by b { font-weight: 500; color: var(--fg); }
.tale-title .share { margin-top: clamp(22px, 4vh, 34px); }
.tale-title .share button { margin-left: 0; }
.tale-art canvas { display: block; width: 100%; aspect-ratio: 4 / 3; }
.tale .scene-txt h2 { font-size: clamp(1.25rem, 2.2vw, 1.65rem); }
.tale .scene-txt em {
  font-style: normal; font-family: var(--mono); font-size: .9em;
  letter-spacing: -.035em; color: var(--fg);
}
.tale .scene:first-of-type { padding-top: clamp(30px, 6vh, 60px); }

/* Standard page: the cover beside a pattern of machine thought. */
.std-cover .tale-name { margin-top: clamp(20px, 4vh, 32px); }
.std-cover .tale-by { color: var(--fg-2); max-width: 44ch; }

.std-cover .btns { margin-top: clamp(22px, 4vh, 30px); }
.std-art canvas {
  aspect-ratio: 1; max-width: 440px; margin-left: auto;
  /* The artwork fills the square and is cut round: the circle is the
     edge of the drawing itself, with no line drawn around it. */
  border-radius: 50%;
}

/* Sharing sits at the foot of a detail page: a quiet centred strip. */
.sharebar {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin-top: clamp(30px, 6vh, 56px); padding: clamp(22px, 4vh, 32px) 0;
  border-top: var(--hair) solid var(--line); border-bottom: var(--hair) solid var(--line);
}
.sharebar .share { margin: 0; justify-content: center; }
.sharebar + .book-legal { margin-top: clamp(18px, 3vh, 28px); }

/* On phones the enquiry button sits under the term cards. */
.terms-cta { display: none; }

.book-legal {
  margin: clamp(30px, 6vh, 56px) 0 clamp(40px, 7vh, 70px); max-width: 70ch;
  font-size: 12.5px; line-height: 1.6; color: var(--fg-4);
}

.share {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 18px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: -.02em;
}
.share > span { color: var(--fg-4); margin-right: 4px; }
.share a, .share button {
  display: inline-flex; align-items: center;
  border: var(--hair) solid var(--line-2); border-radius: 8px;
  background: var(--bg); padding: 6px 11px; cursor: pointer;
  font: inherit; color: var(--fg-2); transition: color .14s, border-color .14s, background .14s;
}
.share a:hover, .share button:hover { color: var(--mint); border-color: var(--mint); background: var(--wash); }
/* The one action among the share chips: same box, mint. */
.share .share-enq { color: var(--mint); border-color: hsl(160 45% 72%); font-weight: 500; gap: 5px; }
.share .share-enq i { font-style: normal; }
.share .share-enq:hover { background: var(--wash); border-color: var(--mint); }
.share button { margin-left: auto; }

/* ══ LAB ════════════════════════════════════════════════════
   A name told as a short picture story: unframed ink drawings on the
   page itself, each followed by a few lines, sides alternating.
   ══════════════════════════════════════════════════════════════ */
.story { padding: clamp(18px, 3.5vh, 30px) 0 clamp(50px, 9vh, 90px); }

.story-buy i { font-style: normal; margin-left: 2px; transition: transform .15s; }
.story-buy:hover { text-decoration: underline; text-underline-offset: 3px; }
.story-buy:hover i { transform: translateX(2px); }

.scene {
  display: grid; grid-template-columns: 1.25fr 1fr; align-items: center;
  gap: clamp(20px, 5vw, 72px);
  padding: clamp(18px, 4vh, 40px) 0;
}
.scene:nth-of-type(even) .scene-art { order: 2; }
/* On a story page each drawing sits on a soft panel: the cards' mint glow
   over the pale ground, the glow turning corner with each section. */
.tale-art, .tale .scene-art {
  border-radius: 18px; padding: clamp(8px, 2vw, 22px);
  background: radial-gradient(90% 120% at 100% 0%, hsl(158 50% 93% / .7), transparent 60%), var(--bg-2);
}
.tale .scene:nth-of-type(even) .scene-art {
  background: radial-gradient(90% 120% at 0% 100%, hsl(158 50% 93% / .7), transparent 60%), var(--bg-2);
}
.scene-art canvas { display: block; width: 100%; aspect-ratio: 4 / 3; }
.scene-txt { max-width: 40ch; }
.scene-n { font: 500 11px/1 var(--mono); color: var(--mint); }
.scene-txt h2 {
  margin-top: 12px;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 500;
  letter-spacing: -.032em; line-height: 1.12; color: var(--fg);
}
.scene-txt .btns { margin-top: clamp(28px, 5vh, 44px); }
.scene-txt p { margin-top: 12px; font-size: 16px; line-height: 1.6; color: var(--fg-2); }

.fact-art { display: block; width: 72px; height: 48px; margin: -4px 0 12px -6px; }

/* A small mono label over a section heading. */
.kick {
  display: block; font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase; color: var(--mint);
}

/* How the sale works: the one panel on the page that carries terms, so
   it gets a surface of its own and cards that read at a glance. */
.terms {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.6fr);
  gap: clamp(24px, 4vw, 56px); align-items: start;
  margin: clamp(40px, 7vh, 72px) 0;
  padding: clamp(24px, 4vw, 48px);
  border-radius: 18px;
  background:
    radial-gradient(80% 120% at 0% 100%, hsl(158 60% 92% / .7), transparent 60%),
    var(--bg-2);
}
.terms-h .h2 { margin-top: 12px; }
.terms-h p { margin-top: 12px; font-size: 15px; line-height: 1.55; color: var(--fg-2); max-width: 34ch; }
.terms-h .btn { margin-top: 24px; }
.terms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.terms-grid > div {
  padding: 18px 18px 20px; border-radius: 12px;
  background: var(--bg); border: var(--hair) solid var(--line);
  transition: border-color .15s, transform .2s;
}
.terms-grid > div:hover { border-color: var(--mint-hi); transform: translateY(-1px); }
.terms-grid dt {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--fg-3);
}
.terms-grid dd { margin-top: 6px; }
.terms-grid dd b { display: block; font-size: 16.5px; font-weight: 500; letter-spacing: -.02em; color: var(--fg); }
.terms-grid dd span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--fg-3); }

/* More on the same shelf. */
.near {
  margin: clamp(16px, 3vh, 28px) 0;
  padding: clamp(24px, 4vw, 48px);
  border-radius: 18px;
  background:
    radial-gradient(80% 120% at 100% 0%, hsl(176 50% 92% / .7), transparent 60%),
    var(--bg-2);
}
.near .cell { background: var(--bg); }
.near .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.near-h {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px 32px; margin-bottom: clamp(18px, 3vh, 26px);
}
.near-h .h2 { margin-top: 10px; }
.near-h p { margin-top: 10px; max-width: 60ch; font-size: 14.5px; line-height: 1.55; color: var(--fg-3); }
.near-all {
  display: inline-flex; gap: 6px; flex: none;
  font-family: var(--mono); font-size: 12px; letter-spacing: -.02em; color: var(--fg-2);
  padding: 9px 14px; border-radius: 9px; border: var(--hair) solid var(--line-2);
  transition: color .14s, border-color .14s;
}
.near-all:hover { color: var(--mint); border-color: var(--mint); }
.near-all i { font-style: normal; }

/* ══ DEVELOPED BAND ══════════════════════════════════════════
   The two built assets get the only tinted surface on the site: a
   mint wash with a dot field, white cards resting on it. ══════════ */
.dev {
  position: relative; isolation: isolate; overflow: hidden;
  margin: clamp(40px, 7vh, 70px) 0 0;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 18px;
  background:
    radial-gradient(90% 120% at 0% 0%, hsl(158 70% 90% / .9), transparent 60%),
    radial-gradient(70% 90% at 100% 100%, hsl(176 60% 91% / .8), transparent 60%),
    var(--wash);
}
.dev::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(circle at center, hsl(160 30% 62% / .55) .7px, transparent 1px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(120deg, transparent 35%, #000 90%);
          mask-image: linear-gradient(120deg, transparent 35%, #000 90%);
}
.dev-k {
  font-family: var(--mono); font-size: 11px; letter-spacing: .02em;
  text-transform: uppercase; color: var(--mint); font-weight: 500;
}
.dev-h .h2 { margin-top: 12px; }
.dev-h .lede { margin-top: 12px; }
.dev-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px; margin-top: clamp(24px, 4vh, 36px);
}
.dev-i {
  display: flex; flex-direction: column;
  padding: clamp(20px, 2.4vw, 28px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border: var(--hair) solid hsl(160 30% 80%);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: border-color .15s, transform .2s;
}
.dev-i:hover { border-color: var(--mint-hi); transform: translateY(-2px); }
.dev-i b {
  font-family: var(--mono); font-weight: 500; font-size: clamp(18px, 2vw, 22px);
  letter-spacing: -.05em; color: var(--fg);
}
.dev-i em { display: block; margin-top: 8px; font-style: normal; font-size: 15px; color: var(--fg); letter-spacing: -.014em; }
.dev-i p { margin-top: 10px; font-size: 13.5px; line-height: 1.55; color: var(--fg-2); }
.dev-i .dev-inc { font-size: 12.5px; color: var(--fg-3); }
.dev-inc span {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--mint); margin-right: 6px;
}
.dev-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: auto; padding-top: 20px; }
.dev-visit { font-family: var(--mono); font-size: 12px; letter-spacing: -.02em; color: var(--fg-3); transition: color .14s; }
.dev-visit:hover { color: var(--mint); }
.dev-visit i { font-style: normal; margin-left: 3px; }
.dev + .close { border-top: 0; }

/* ══ DEVELOPED ════════════════════════════════════════════
   Same box line as an index cell, but taller and with two actions:
   these sell as the whole asset { padding: clamp(40px, 7vh, 70px) 0; border-top: var(--hair) solid var(--line); }

/* ══ CLOSE ═════════════════════════════════════════════════ */
.close {
  padding: clamp(44px, 8vh, 80px) 0;
  border-top: var(--hair) solid var(--line);
}
.close .lede { margin-top: 14px; }
.close .btns { margin-top: 24px; }

/* ══ FOOT ══════════════════════════════════════════════════ */
.foot {
  padding: 26px 0 34px;
  border-top: var(--hair) solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 26px;
  align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--fg-4);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot nav a { transition: color .14s; }
.foot nav a:hover { color: var(--mint); }

/* ══ RESPONSIVE ════════════════════════════════════════════ */
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .bar { padding: 13px 0 10px; }
  .eye { width: 26px; height: 26px; }
  .mark { font-size: 16px; }
  .bar-in { gap: 12px; }
  .bar nav { gap: 0; overflow-x: auto; scrollbar-width: none; }
  .bar nav::-webkit-scrollbar { display: none; }
  .bar nav a { padding: 6px 8px; font-size: 13px; }
  .field { padding: 13px 13px 13px 15px; border-radius: 10px; }
  .field kbd { display: none; }
  .grid { grid-template-columns: 1fr; }
  .cell { padding: 12px; }
  .cell-s { opacity: 1; }
  .group { padding: 20px 14px; border-radius: 14px; margin-inline: calc(var(--gut) * -0.4); }
  .foot { flex-direction: column; align-items: flex-start; }
  .btns .btn { flex: 1 1 auto; justify-content: center; }

  .share button { margin-left: 0; }
  .scene { grid-template-columns: 1fr; gap: 8px; }
  .scene:nth-of-type(even) .scene-art { order: 0; }
  .ph-with-art .ph-in { grid-template-columns: 1fr; }
  .dev { border-radius: 14px; padding: 22px 16px; margin-inline: calc(var(--gut) * -0.4); }
}

/* Below tablet width the pages carry text only: the drawings need room. */
@media (max-width: 900px) {
  .ph-art, .sp-art { display: none; }
  .terms { grid-template-columns: 1fr; }
  .ph-with-art .ph-in, .sp { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ph { padding-top: 28px; }
  .sp .ph-txt { margin-top: 28px; }
  .dom { margin-top: 26px; }

  .terms { grid-template-columns: 1fr; padding: 22px 16px; border-radius: 14px; margin-inline: calc(var(--gut) * -0.4); }
  .near-h { align-items: flex-start; }
  .near .grid { grid-template-columns: 1fr; }
  .near { padding: 22px 16px; border-radius: 14px; margin-inline: calc(var(--gut) * -0.4); }
  /* Phones read the tale top to bottom like a picture book: on the
     cover the name comes first, and every page runs label, heading,
     picture, text, with a rule between pages. */
  .tale-cover { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 18px 0 26px; }
  .tale-title { display: contents; }
  .tale-title .dx-live { order: 1; }
  .tale-k { order: 2; margin-top: 22px; }
  .tale-name { order: 3; }
  .tale-by { order: 4; }
  /* The cover picture is left to wider screens; the parts carry the pictures. */
  .tale-art { display: none; }
  .crumbs { display: none; }
  /* The cover is a card on phones: space under the header, then only what
     a buyer needs: for sale, the name, its line and the buttons. */
  .tale-cover {
    margin-top: 22px; padding: 22px 18px 24px !important;
    background: radial-gradient(90% 120% at 100% 0%, hsl(158 50% 93% / .7), transparent 60%), var(--bg-2);
    border: var(--hair) solid var(--line); border-radius: 16px; border-bottom: var(--hair) solid var(--line);
  }
  .tale-title .share { display: none; }
  .tale-title .btns { display: none; }
  .terms-h .btn { display: none; }
  .terms-cta { display: flex; }
  .terms-cta .btn { width: 100%; justify-content: center; padding: 15px 18px; }
  .tale-title .share { order: 6; margin-top: 8px; }
  /* Each part is a card: white on the page, hairline edge, the part's
     picture set on a soft tinted panel inside it. */
  .tale .scene {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    margin: 14px 0 0; padding: 18px 16px 20px;
    background: var(--bg); border: var(--hair) solid var(--line-2); border-radius: 16px;
    box-shadow: 0 10px 24px -20px rgba(10, 20, 16, .35);
  }
  .tale .scene:first-of-type { margin-top: 22px; padding-top: 18px; }
  .tale .scene-txt { display: contents; }
  .tale .scene-n { order: 1; }
  .tale .scene-txt h2 { order: 2; margin-top: 8px; }
  .tale .scene .scene-art, .tale .scene:nth-of-type(even) .scene-art {
    order: 3; margin: 14px -6px 2px; padding: 8px; border-radius: 12px;
    background: radial-gradient(90% 120% at 100% 0%, hsl(158 50% 93% / .7), transparent 60%), var(--bg-2);
  }
  .tale .scene-art canvas { aspect-ratio: 4 / 3; }
  .tale .scene-txt p { order: 4; }
  .tale .scene-txt .btns { order: 5; margin-top: 20px; }
  .tale .scene-txt .share { order: 5; margin-top: 16px; }
  .tale .book-end { margin-top: 0; padding-top: 18px; }
  .near .grid > :nth-child(n+5) { display: none; }
  .tale-title .btns { order: 4; }
  .tale-title .btns { margin-top: 20px; }
  .std-art { display: none; }

}

/* ══ MOTION / PRINT ════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .eye-pupil { animation: none !important; transform: none !important; }
  .dx-live b::after { display: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .bar, .field, .chips, .cell-s, .pop, .close, .share { display: none !important; }
  .dx-live b::after { display: none; }
  body { background: #fff; color: #000; font-size: 10pt; }
  .cell { break-inside: avoid; }
}

/* Phones: one column, fewer boxes. Lists instead of cards, buttons full
   width, panels closer together, long descriptions left to wider screens. */
@media (max-width: 720px) {
  .tale-cover .tale-name { font-size: min(2.5rem, calc(100cqw / (var(--len) * 0.58))); }
  .std-cover { padding: 14px 0 26px; }
  .std-cover .tale-name { margin-top: 18px; }
  .std-cover .tale-by { margin-top: 10px; }
  .tale-cover .btns { flex-direction: column; gap: 8px; }
  .tale-cover .btns .btn { width: 100%; justify-content: center; padding: 14px 18px; }
  .tale-cover .share { margin-top: 14px; gap: 6px; }
  .share a, .share button { padding: 5px 9px; font-size: 11px; }

  .terms, .near { margin-top: 18px; margin-bottom: 18px; }
  .terms-h p { font-size: 14.5px; }
  .terms-h .btn { width: 100%; justify-content: center; }
  .terms-grid {
    grid-template-columns: 1fr; gap: 0; background: var(--bg);
    border: var(--hair) solid var(--line); border-radius: 12px; overflow: hidden;
  }
  .terms-grid > div {
    display: grid; grid-template-columns: 54px 1fr; column-gap: 12px; align-items: center;
    padding: 12px 14px; border: 0; border-radius: 0; border-top: var(--hair) solid var(--line);
  }
  .terms-grid > div:first-child { border-top: 0; }
  .terms-grid > div:hover { transform: none; }
  .terms-grid .fact-art { grid-row: 1 / span 2; width: 54px; height: 36px; margin: 0; }
  .terms-grid dd { margin-top: 2px; }
  .terms-grid dd b { font-size: 15px; }
  .terms-grid dd span { font-size: 12.5px; margin-top: 2px; }

  .near .grid {
    gap: 0; background: var(--bg); padding: 0 14px;
    border: var(--hair) solid var(--line); border-radius: 12px;
  }
  .near .cell { border: 0; border-top: var(--hair) solid var(--line); border-radius: 0; background: none; padding: 12px 0; }
  .near .cell:first-child { border-top: 0; }
  .near .cell:hover { background: none; }
  .near-all { width: 100%; justify-content: center; }

  .dev { margin-top: 18px; }
  .dev-grid { gap: 10px; }
  .dev-i { padding: 18px 16px; }
  .dev-i p { display: none; }
  .dev-act { padding-top: 14px; }
}

@media (max-width: 460px) {
  .terms-grid { grid-template-columns: 1fr; }
}
