@font-face { font-family: "Slyng Condensed"; src: url("fonts/slyng-condensed-bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Slyng Text"; src: url("fonts/slyng-text-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Slyng Text"; src: url("fonts/slyng-text-bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --sky: #D8E8F0;
  --sky-deep: #C7DCE7;
  --haze: #EEF3F6;
  --paper: #FBFCFD;
  --ink: #15243B;
  --ink-2: #4A5B73;
  --ink-3: #7A889B;
  --line: rgba(21, 36, 59, 0.16);
  --rubber: #E2412E;
  --rubber-dark: #B52E1F;
  --wood: #8A5A35;
  --wood-dark: #5E3B20;
  --leather: #6B4A2E;
  --stone: #F0A532;
  --stone-dark: #A86814;
  --cond: "Slyng Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --text: "Slyng Text", "Century Gothic", "Avenir", system-ui, sans-serif;
  --radius: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--haze);
  color: var(--ink);
  font: 400 17px/1.55 var(--text);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--rubber-dark); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
h2, h3 { font-family: var(--cond); font-weight: 700; letter-spacing: 0.005em; line-height: 1.05; margin: 0 0 0.5em; }
h2 { font-size: clamp(2rem, 4.4vw, 2.75rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 0.9em; }
.tiny { font-size: 0.82rem; color: var(--ink-2); }

/* ------------------------------------------------------------------ the bar */
.bar {
  display: flex; align-items: center; gap: 22px;
  padding: 12px clamp(16px, 3vw, 32px);
  background: var(--sky);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.mark { width: 30px; height: 30px; }
.m-wood { fill: none; stroke: var(--wood); stroke-width: 4.4; stroke-linecap: round; }
.m-band { fill: none; stroke: var(--rubber); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m-stone { fill: var(--stone); stroke: var(--stone-dark); stroke-width: 1; }
.word { font-family: var(--cond); font-weight: 700; font-size: 1.75rem; letter-spacing: 0.04em; line-height: 1; padding-top: 2px; }
.motto { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.links { display: flex; gap: 18px; margin-left: auto; font-size: 0.95rem; }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; }
.join {
  font-size: 0.92rem; text-decoration: none; padding: 8px 15px; border-radius: 999px;
  border: 1.5px solid var(--ink); white-space: nowrap;
}
.join:hover { background: var(--ink); color: var(--paper); }

/* ------------------------------------------------------------------ the studio */
.studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  background: var(--sky);
  border-bottom: 1px solid var(--line);
}
.range { display: flex; flex-direction: column; align-items: center; padding: 14px 16px 22px; min-width: 0; }
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.chip {
  font: 400 0.88rem/1 var(--text); color: var(--ink);
  background: rgba(251, 252, 253, 0.55); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 8px 13px; cursor: pointer;
}
.chip:hover { border-color: var(--ink-2); background: var(--paper); }
.chip.live { border-color: var(--ink); }
.aimed { margin: 10px 0 0; font-size: 0.9rem; max-width: 34em; text-align: center; color: var(--ink); background: rgba(240, 165, 50, 0.22); padding: 6px 12px; border-radius: 8px; }

.sling { width: min(100%, 470px); height: auto; aspect-ratio: 420 / 436; display: block; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.sling:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; border-radius: 18px; }
.sling .grab { fill: transparent; touch-action: none; cursor: grab; }
.sling.pulling .grab { cursor: grabbing; }
.fence-arc { fill: none; stroke: var(--ink); stroke-opacity: 0.28; stroke-width: 2; stroke-dasharray: 0.5 8; stroke-linecap: round; }
.ring { fill: none; stroke: var(--ink); stroke-opacity: 0.16; stroke-width: 1; opacity: 0; transition: opacity 0.15s, stroke-opacity 0.1s; }
.ring-note { stroke-dasharray: 3 4; }
.ring.reached { stroke: var(--rubber); stroke-opacity: 0.22; }
.ring.at { stroke: var(--rubber); stroke-opacity: 0.95; stroke-width: 2; }
.ring-label { font: 400 11px var(--text); fill: var(--ink-2); opacity: 0; transition: opacity 0.15s; }
.ring-label.minor { display: none; }
.ring-label.current { display: inline; fill: var(--ink); font-weight: 700; }
.ring-label.crowded { display: none; }
.sling.pulling .ring, .sling:focus-visible .ring, .sling.keyed .ring { opacity: 1; }
.sling.pulling .ring-label, .sling:focus-visible .ring-label, .sling.keyed .ring-label { opacity: 1; }
.ring-suggest { fill: none; stroke: var(--stone-dark); stroke-width: 2; stroke-dasharray: 5 4; opacity: 0; }
.sling.suggesting .ring-suggest { opacity: 0.9; }
.trajectory { fill: none; stroke: var(--ink); stroke-opacity: 0.5; stroke-width: 2; stroke-dasharray: 0.5 7; stroke-linecap: round; opacity: 0; }
.trajectory.on { opacity: 1; }
.trajectory.live { stroke: var(--rubber); stroke-opacity: 0.8; }
.target-face { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.target-halo { fill: none; stroke: transparent; stroke-width: 2.5; }
.target.aimed .target-halo { stroke: var(--rubber); }
.target.aimed .target-face { stroke-width: 2; }
.target-initial { font: 700 21px var(--cond); fill: var(--ink); }
.target-name { font: 400 12.5px var(--text); fill: var(--ink); }
.target-sub { font: 400 10.5px var(--text); fill: var(--ink-2); }
.fork-handle, .fork-arms { fill: none; stroke: var(--wood); stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; }
.fork-wrap { fill: none; stroke: var(--wood-dark); stroke-width: 3.5; stroke-linecap: round; }
.band { stroke: var(--rubber); stroke-width: calc(5.5px - 2.6px * var(--tension, 0)); stroke-linecap: round; }
.pouch { fill: none; stroke: var(--leather); stroke-width: 7; stroke-linecap: round; }
.stone { fill: var(--stone); stroke: var(--stone-dark); stroke-width: 1.5; }
.note-paper { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.note-lines { stroke: var(--ink-2); stroke-width: 1; }
.note-string { stroke: var(--ink-2); stroke-width: 1; }
.splash { fill: none; stroke: var(--stone); stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: splash 0.7s ease-out forwards; }
@keyframes splash { from { transform: scale(0.8); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
.float { font: 700 21px var(--cond); fill: var(--ink); animation: float 1.5s ease-out forwards; }
@keyframes float { from { transform: translateY(0); opacity: 1; } 70% { opacity: 1; } to { transform: translateY(-26px); opacity: 0; } }

.readout { text-align: center; min-height: 5.2em; margin-top: -6px; }
.amt { font: 700 clamp(2.3rem, 8vw, 3.3rem)/1 var(--cond); margin: 0 0 6px; letter-spacing: 0.01em; font-variant-numeric: tabular-nums lining-nums; }
.sub { margin: 0; color: var(--ink-2); font-size: 0.95rem; min-height: 1.5em; text-wrap: balance; }
.note { width: min(100%, 420px); margin-top: 8px; }
.note textarea {
  width: 100%; resize: none; font: 400 1rem/1.4 var(--text); color: var(--ink);
  background: rgba(251, 252, 253, 0.75); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 14px; min-height: 44px; max-height: 7.5em; text-align: center;
}
.note textarea:focus { outline: none; border-color: var(--ink); background: var(--paper); text-align: left; }
.note textarea::placeholder { color: var(--ink-3); }
.flight { margin-top: 12px; }
.fence-row { margin: 14px 0 0; font-size: 0.92rem; }

/* ------------------------------------------------------------------ buttons */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 700 0.95rem/1 var(--text); padding: 11px 18px; border-radius: 999px; cursor: pointer;
  color: var(--paper); background: var(--ink); border: 1.5px solid var(--ink); text-decoration: none;
}
.pill:hover { background: #22375A; color: var(--paper); }
.pill.small { font-size: 0.86rem; padding: 8px 14px; }
.pill.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.pill.ghost:hover { border-color: var(--ink); background: var(--paper); color: var(--ink); }
.pill.catch { background: var(--rubber); border-color: var(--rubber); font-size: 1rem; padding: 12px 22px; }
.pill.catch:hover { background: var(--rubber-dark); border-color: var(--rubber-dark); }
.pill[disabled] { opacity: 0.45; cursor: default; }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--rubber-dark); }

/* ------------------------------------------------------------------ the log */
.log { background: rgba(238, 243, 246, 0.6); border-left: 1px solid var(--line); padding: 16px 18px 20px; min-width: 0; }
.log-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.log-tabs button {
  font: 700 1.25rem/1 var(--cond); letter-spacing: 0.01em; background: none; border: 0; color: var(--ink-2);
  padding: 6px 0 9px; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer;
}
.log-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.count { font: 400 0.8rem var(--text); color: var(--ink-2); }
.entries { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.entry { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.face {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--paper); border: 1.5px solid var(--ink); font: 700 15px var(--cond);
}
.face img { width: 100%; height: 100%; object-fit: cover; }
.entry-top { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.entry-what { font-size: 0.93rem; line-height: 1.35; }
.entry-what b { font-weight: 700; }
.entry-when { font-size: 0.78rem; color: var(--ink-3); white-space: nowrap; }
.entry-note { margin: 4px 0 0; font-size: 0.93rem; line-height: 1.4; overflow-wrap: anywhere; }
.entry-note::before { content: "\201C"; }
.entry-note::after { content: "\201D"; }
.entry-status { display: inline-block; margin-top: 5px; font-size: 0.78rem; color: var(--ink-2); }
.entry-status.bad { color: var(--rubber-dark); }
.entry-status.good { color: var(--ink); font-weight: 700; }
.entry button.aim-back { display: block; margin-top: 6px; font-size: 0.84rem; }
.empty { color: var(--ink-2); font-size: 0.92rem; margin: 12px 0 0; }

/* ------------------------------------------------------------------ the page below */
main > section:not(.studio) { padding: clamp(40px, 7vw, 76px) clamp(16px, 5vw, 48px); max-width: 1120px; margin: 0 auto; }
.story { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(18px, 3vw, 30px); }
.bigword {
  font: 700 clamp(5rem, 21vw, 15rem)/0.82 var(--cond); letter-spacing: 0.02em; margin: 0;
  display: flex; align-items: flex-end; color: var(--ink);
}
.bigy { height: 0.74em; width: auto; margin: 0 0.035em 0.005em; overflow: visible; }
.y-wood { fill: none; stroke: var(--wood); stroke-width: 9.5; stroke-linecap: round; stroke-linejoin: round; }
.y-band { fill: none; stroke: var(--rubber); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.y-stone { fill: var(--stone); stroke: var(--stone-dark); stroke-width: 1.5; }
.story-text { max-width: 38em; columns: 2 18em; column-gap: 40px; }
.story-text h2 { column-span: all; }

.steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 44px); }
.steps p { color: var(--ink-2); max-width: 32em; }
.diagram { width: 150px; height: 100px; display: block; margin-bottom: 12px; }
.d-fence { fill: none; stroke: var(--ink); stroke-opacity: 0.35; stroke-width: 1.5; stroke-dasharray: 0.5 5; stroke-linecap: round; }
.d-dot { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.d-dot.on { stroke: var(--rubber); stroke-width: 2.5; }
.d-arrow { fill: none; stroke: var(--ink); stroke-opacity: 0.55; stroke-width: 1.5; stroke-dasharray: 0.5 5; stroke-linecap: round; }
.d-pull { fill: none; stroke: var(--rubber); stroke-width: 3; stroke-linecap: round; }
.d-ring { fill: none; stroke: var(--ink); stroke-opacity: 0.25; stroke-width: 1.2; }
.d-ring.on { stroke: var(--rubber); stroke-opacity: 0.8; stroke-width: 1.6; }
.d-stone { fill: var(--stone); stroke: var(--stone-dark); stroke-width: 1; }
.d-arc { fill: none; stroke: var(--ink); stroke-opacity: 0.5; stroke-width: 1.6; stroke-dasharray: 0.5 6; stroke-linecap: round; }

.agents > * { max-width: 760px; }
.lead { font-size: 1.25rem; line-height: 1.4; }
.snippet { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 18px; }
.snippet pre { margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 0.92rem/1.5 var(--text); }

.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0; border-top: 2px solid var(--ink); }
.plan { padding: 22px 26px 6px 0; }
.plan + .plan { padding-left: 26px; border-left: 1px solid var(--line); }
.price { font: 700 1.15rem/1.3 var(--cond); letter-spacing: 0.01em; }
.join-plan { margin: 4px 0 10px; }

.fine dl { margin: 0; display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 12px 28px; max-width: 900px; }
.fine dt { font-weight: 700; }
.fine dd { margin: 0; color: var(--ink-2); max-width: 40em; }
.next ul { margin: 0; padding-left: 1.1em; max-width: 44em; }
.next li { margin-bottom: 0.45em; }
.next li::marker { color: var(--rubber); }

.foot { padding: 26px clamp(16px, 5vw, 48px) 40px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.86rem; max-width: 1120px; margin: 0 auto; }

/* ------------------------------------------------------------------ dialogs */
.dlg { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 24px)); color: var(--ink); background: var(--paper); box-shadow: 0 18px 60px rgba(21, 36, 59, 0.28); }
.dlg.wide { width: min(620px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(21, 36, 59, 0.38); }
.form { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 12px; }
.form h2 { font-size: 1.9rem; margin: 0; }
.form p { margin: 0; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; }
.form input[type="password"], .form input[type="search"], .form input[type="text"] {
  font: 400 1rem var(--text); color: var(--ink); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; width: 100%;
}
.form input:focus { outline: none; border-color: var(--ink); }
.choices { display: grid; gap: 8px; }
.choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--ink); font: inherit;
}
.choice:hover { border-color: var(--ink); }
.choice b { font-size: 1rem; }
.choice span { font-size: 0.86rem; color: var(--ink-2); }
.choice[disabled] { opacity: 0.55; cursor: default; }
.group summary { cursor: pointer; font-size: 0.92rem; }
.group[open] { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.status { min-height: 1.2em; font-size: 0.9rem; color: var(--ink-2); }
.status.bad { color: var(--rubber-dark); }
.secret { margin: 0; padding: 12px 14px; background: var(--haze); border-radius: 10px; font: 400 0.92rem/1.4 var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.people { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow-y: auto; border-top: 1px solid var(--line); }
.people li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.people .who-name { font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .who-sub { font-size: 0.78rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 20;
  background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 12px; font-size: 0.93rem;
  max-width: min(92vw, 520px); box-shadow: 0 10px 30px rgba(21, 36, 59, 0.3);
}

/* ------------------------------------------------------------------ narrow screens */
@media (max-width: 960px) {
  .motto { display: none; }
}
@media (max-width: 860px) {
  .studio { grid-template-columns: minmax(0, 1fr); }
  .log { border-left: 0; border-top: 1px solid var(--line); }
  .entries { max-height: none; }
  .story { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .plan + .plan { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .fine dl { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .fine dd { margin-bottom: 12px; }
}
@media (max-width: 640px) {
  .links { display: none; }
  .bar { gap: 12px; padding: 10px 14px; }
  .join { margin-left: auto; padding: 7px 12px; font-size: 0.86rem; }
  .word { font-size: 1.55rem; }
  .range { padding: 10px 6px 18px; }
  .sub { font-size: 0.9rem; padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .splash, .float { animation-duration: 0.01s; }
  .ring, .ring-label { transition: none; }
}
