/* ————————————————————————————————————————————
   braid — paper, ink & thread
   ———————————————————————————————————————————— */

@font-face {
  font-family: "Berkeley Mono";
  src: url("assets/fonts/BerkeleyMonoVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Blocks Sans";
  src: url("assets/fonts/font-medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #F2ECDF;
  --paper-deep: #EAE2CF;
  --paper-bright: #F9F5EB;
  --ink: #1B1712;
  --ink-soft: #6A6152;
  --ink-faint: #9C917D;
  --rule: #D8CFBA;
  --clay: #C05B34;
  --green: #3E7A54;
  --blue: #44669F;
  --amber: #B98A2A;
  --serif-display: "Instrument Serif", Georgia, serif;
  --serif-body: "Newsreader", Georgia, serif;
  --mono: "Berkeley Mono", "SFMono-Regular", Menlo, monospace;
  --sans: "Blocks Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* paper grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: .45;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.62 0 0 0 0 0.58 0 0 0 0 0.5 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23g)'/%3E%3C/svg%3E");
}

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

a { color: inherit; }
em { font-style: italic; }
code { font-family: var(--mono); font-size: .88em; }

/* ————— nav ————— */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 48px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-word { height: 34px; display: block; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 30px); }
.nav-links a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--clay); border-bottom-color: var(--clay); }
.nav-cta {
  color: var(--paper-bright) !important;
  background: var(--ink);
  padding: 7px 14px 8px;
  border-radius: 3px;
}
.nav-cta:hover { background: var(--clay); border-bottom-color: transparent !important; }

/* ————— hero ————— */
.hero { position: relative; padding: clamp(56px, 9vh, 110px) 24px 200px; }
#braid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: clamp(0px, 2vw, 44px);
  text-align: left;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--ink-soft);
  margin-bottom: 26px;
}
.hero h1 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(46px, 7.6vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.015em;
  max-width: 12ch;
}
.hero h1 em { color: var(--clay); }
.hero-sub {
  max-width: 520px;
  margin: 28px 0 0;
  font-size: 18.5px;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.hero-cta {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.install {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13.5px;
  background: var(--paper-bright);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 11px 12px 11px 16px;
  box-shadow: 3px 3px 0 var(--ink);
}
.install-prompt { color: var(--clay); }
.install-cmd { color: var(--ink); }
.install-copy {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 4px 8px;
  cursor: pointer;
}
.install-copy:hover { color: var(--clay); border-color: var(--clay); }
.btn-download {
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--paper-bright);
  background: var(--ink);
  border-radius: 4px;
  padding: 13px 22px;
  box-shadow: 3px 3px 0 var(--clay);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-download:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--clay); }
.hero-fine {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--ink-faint);
}

/* ————— ticker ————— */
.ticker {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
  padding: 10px 0;
  background: var(--paper-deep);
}
.ticker-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: tick 72s linear infinite;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tseq { display: inline-flex; align-items: center; gap: 26px; padding-right: 26px; }
.tseq i { font-style: normal; color: var(--clay); }
.tseq i:nth-of-type(3n) { color: var(--green); }
.tseq i:nth-of-type(3n+1) { color: var(--blue); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ————— argument ————— */
.argument { padding: clamp(70px, 11vh, 130px) 24px; }
.argument-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.kicker {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: lowercase;
  color: var(--clay);
  margin-bottom: 22px;
}
.kicker::before { content: "— "; color: var(--ink-faint); }
.creed { list-style: none; }
.creed li {
  position: relative;
  padding: 20px 0 20px 64px;
  font-size: clamp(19px, 2.1vw, 23px);
  line-height: 1.45;
  border-top: 1px solid var(--rule);
  text-wrap: pretty;
}
.creed li:last-child { border-bottom: 1px solid var(--rule); }
.creed .no {
  position: absolute;
  left: 0;
  top: 24px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--clay);
}
.creed li:nth-child(2) .no { color: var(--green); }
.creed li:nth-child(3) .no { color: var(--blue); }
.creed li:nth-child(4) .no { color: var(--amber); }
.creed-close {
  margin-top: 40px;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(34px, 4vw, 48px);
  position: relative;
  display: inline-block;
}
.thread-underline {
  position: absolute;
  left: 0; right: -8px; bottom: -6px;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='8' viewBox='0 0 120 8'%3E%3Cpath d='M0,4 C15,0 25,8 40,4 S65,0 80,4 S105,8 120,4' fill='none' stroke='%23C05B34' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 120px 8px;
}

/* plates (engravings) */
.plate { position: relative; text-align: center; }
.plate img {
  width: 100%;
  max-width: 420px;
  background: var(--paper-bright);
  border: 1px solid var(--rule);
  padding: 22px;
  transform: rotate(1.6deg);
  box-shadow: 6px 8px 0 rgba(27,23,18,.12);
}
.plate figcaption {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-faint);
}
.tape {
  position: absolute;
  width: 96px;
  height: 28px;
  background: rgba(200, 186, 150, .45);
  border-left: 1px dashed rgba(27,23,18,.12);
  border-right: 1px dashed rgba(27,23,18,.12);
  z-index: 2;
  backdrop-filter: blur(1px);
}
.tape-tl { top: -12px; left: 50%; transform: translateX(-70%) rotate(-5deg); }
.tape-top { top: -13px; left: 50%; transform: translateX(-50%) rotate(3deg); }
.stamp {
  position: absolute;
  right: -14px;
  bottom: 34px;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clay);
  border: 2px solid var(--clay);
  border-radius: 4px;
  padding: 8px 12px;
  transform: rotate(-7deg);
  opacity: .85;
  background: color-mix(in srgb, var(--paper-bright) 65%, transparent);
}
.stamp-small {
  position: static;
  transform: rotate(-4deg);
  font-size: 10.5px;
  padding: 4px 8px;
}

/* ————— thread dividers ————— */
.thread-divider { height: 60px; max-width: 1200px; margin: 0 auto; opacity: .9; }
.thread-divider svg { width: 100%; height: 100%; }
.thread-divider path { fill: none; stroke-width: 1.8; }
.td-clay { stroke: var(--clay); }
.td-green { stroke: var(--green); }
.td-ink { stroke: var(--ink-faint); }

/* ————— letter section ————— */
.letter-section { padding: clamp(70px, 11vh, 130px) 24px; }
.letter-grid {
  max-width: 1150px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}
.letter-left { padding-top: 36px; }
.letter-left h2 { max-width: 12ch; }
.letter-left .section-sub { margin-left: 0; max-width: 400px; text-align: left; }
.letter-right { position: relative; padding-top: 10px; }
h2 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
h2 em { color: var(--clay); }
.letter-section h2 em { color: var(--blue); }
.section-sub {
  margin: 20px auto 0;
  max-width: 560px;
  color: var(--ink-soft);
  font-size: 17.5px;
  text-wrap: pretty;
}

.margin-note {
  font-family: "Zeyada", cursive;
  font-size: 27px;
  line-height: 1.1;
  color: var(--ink-soft);
}
.margin-note .arrow { width: 64px; height: 48px; display: block; margin: 0 0 6px; }
.margin-note .arrow path { fill: none; stroke: var(--clay); stroke-width: 2; stroke-linecap: round; }
.note-right .arrow { margin-top: 8px; margin-bottom: 0; }
.note-right .arrow path { stroke: var(--green); }
.note-left { transform: rotate(-2deg); margin: 44px 0 0 24px; max-width: 240px; }
.note-right {
  position: absolute;
  right: -6px;
  top: -44px;
  transform: rotate(2deg);
  text-align: center;
}

/* the conversation card */
.convo {
  position: relative;
  background: var(--paper-bright);
  border: 1px solid var(--ink);
  border-radius: 4px;
  box-shadow: 7px 9px 0 rgba(27,23,18,.14);
  transform: rotate(-.4deg);
}
.convo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.src-badge {
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  color: var(--paper-bright);
  background: var(--clay);
}
.convo-meta { margin-left: auto; color: var(--ink-faint); }
.convo-body { padding: 10px 24px 6px; }

.msg { position: relative; padding: 14px 0 14px 22px; }
.msg::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 2px;
}
.msg-human { font-size: 17.5px; }
.msg-human p { font-family: var(--serif-body); font-style: italic; }
.msg-human::before { background: var(--clay); }
.msg-agent { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.msg-agent::before { background: var(--rule); }
.msg-agent p + p { margin-top: 8px; }
.tool-line { color: var(--ink-faint); font-size: 12.5px; }
.diff-add { color: var(--green); }
.diff-del { color: var(--clay); }

.fork { position: relative; margin: 6px 0 6px 22px; padding-left: 30px; }
.fork-rail {
  position: absolute;
  left: 6px;
  top: -14px;
  bottom: 50%;
  width: 16px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  border-bottom-left-radius: 12px;
}
.fork-card {
  background: color-mix(in srgb, var(--green) 7%, var(--paper-bright));
  border: 1px solid color-mix(in srgb, var(--green) 45%, var(--rule));
  border-radius: 4px;
  padding: 12px 16px;
}
.fork-title { font-family: var(--serif-body); font-size: 15.5px; }
.fork-note {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--green);
}
.attn-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--amber);
  animation: attn 1.6s ease-in-out infinite;
  vertical-align: 1px;
}
@keyframes attn { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

.convo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--rule);
}
.foot-hint { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }

.pigeon {
  position: absolute;
  right: -34px;
  bottom: -64px;
  width: 168px;
  transform: rotate(6deg) scaleX(-1);
  opacity: .9;
  pointer-events: none;
}
.convo { max-width: 640px; }

/* ————— loom / cards ————— */
.loom { padding: clamp(70px, 11vh, 130px) 24px 40px; }
.loom-head { position: relative; max-width: 1080px; margin: 0 auto 70px; }
.loom-head h2 { max-width: 620px; }
.loom-head h2 em { color: var(--green); }
.loom-plate {
  position: absolute;
  right: 0;
  top: -30px;
  width: clamp(160px, 22vw, 260px);
  transform: rotate(2.5deg);
  opacity: .9;
}
.cards {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 26px;
}
.card {
  position: relative;
  background: var(--paper-bright);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 24px 22px 26px;
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 5px 6px 0 color-mix(in srgb, var(--shadow, var(--ink)) 55%, var(--paper));
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 7px 9px 0 var(--shadow, var(--ink));
}
.card-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--shadow, var(--clay));
  margin-bottom: 10px;
}
.card h3 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
  margin-bottom: 12px;
}
.card p { font-size: 15.5px; color: var(--ink-soft); text-wrap: pretty; }
.card .chips { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.card .chips span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  padding: 2px 7px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper);
}
.card-plate {
  width: 82%;
  margin: 4px auto 10px;
  display: block;
  opacity: .92;
}
.heatmap {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 3px;
}
.heatmap i {
  aspect-ratio: 1;
  border-radius: 1.5px;
  background: var(--green);
  opacity: var(--o, .15);
}

/* ————— colophon ————— */
.colophon {
  max-width: 1080px;
  margin: 40px auto 0;
  padding: 56px 24px 90px;
  border-top: 1px solid var(--rule);
}
.colophon .kicker { text-align: center; }
.colophon-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  max-width: 820px;
  margin: 0 auto;
}
.colophon-list li {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 14px;
  background: var(--paper-bright);
}

/* ————— footer ————— */
.footer {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: 80px 24px 44px;
}
.footer-word { display: block; width: min(320px, 60vw); margin: 0 auto 34px; }
.footer-line {
  font-family: var(--serif-display);
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.2;
  margin-bottom: 34px;
}
.footer-line em { color: color-mix(in srgb, var(--clay) 75%, var(--paper)); }
.install-dark {
  background: color-mix(in srgb, var(--paper) 8%, var(--ink));
  border-color: color-mix(in srgb, var(--paper) 30%, var(--ink));
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--clay) 70%, var(--ink));
}
.install-dark .install-cmd { color: var(--paper); }
.install-dark .install-copy { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 30%, var(--ink)); }
.footer-links {
  margin-top: 34px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-faint);
  display: flex;
  justify-content: center;
  gap: 14px;
}
.footer-links a { color: color-mix(in srgb, var(--paper) 75%, var(--ink)); text-decoration: none; }
.footer-links a:hover { color: var(--clay); }
.footer-fine {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: color-mix(in srgb, var(--paper) 40%, var(--ink));
}

/* ————— reveal ————— */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1.02); }
.reveal.in { opacity: 1; transform: translateY(0); }
.plate.reveal.in { transform: translateY(0); }
.note-left.reveal.in { transform: rotate(-2deg); }
.note-right.reveal.in { transform: rotate(2deg); }
.convo.reveal.in { transform: rotate(-.4deg); }
.card.reveal.in { transform: rotate(var(--tilt, 0deg)); }
.card.reveal.in:hover { transform: rotate(0deg) translateY(-3px); }

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* (responsive design lives at the end of the file — one design per format) */

/* ————————————————————————————————————————————
   the human layer — handwriting, scraps, pins
   ———————————————————————————————————————————— */

.hand { font-family: "Zeyada", cursive; }

/* hang-tag off the hero's top edge */
.hangtag {
  position: absolute;
  top: 0;
  right: clamp(24px, 9vw, 150px);
  z-index: 2;
  transform-origin: top center;
  animation: sway 6s ease-in-out infinite;
}
.hangtag-string { display: block; width: 40px; height: 84px; margin: 0 auto -6px; }
.hangtag-string path { fill: none; stroke: var(--ink-soft); stroke-width: 1.5; }
.hangtag-card {
  position: relative;
  background: var(--paper-bright);
  border: 1px solid var(--ink);
  border-radius: 3px;
  padding: 20px 18px 12px;
  font-family: "Zeyada", cursive;
  font-size: 21px;
  line-height: 1.02;
  text-align: center;
  color: var(--ink);
  transform: rotate(4deg);
  box-shadow: 3px 4px 0 rgba(27,23,18,.14);
}
.hangtag-hole {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink-faint);
}
@keyframes sway {
  0%, 100% { transform: rotate(-1.6deg); }
  50% { transform: rotate(2.2deg); }
}

/* sticky note */
.sticky {
  display: inline-block;
  margin: 34px 0 0 46px;
  padding: 22px 26px 18px;
  background: #F1E1B4;
  font-family: "Zeyada", cursive;
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
  transform: rotate(2.5deg);
  box-shadow: 3px 5px 0 rgba(27,23,18,.14);
  vertical-align: top;
}
.sticky em { color: var(--clay); font-style: normal; }

/* clipped engraving in the letter spread's left column */
.letter-section { position: relative; }
.people-clip {
  position: relative;
  width: 205px;
  margin: 48px 0 0 8px;
  text-align: center;
  transform: rotate(-4deg);
}
.people-clip img {
  width: 100%;
  background: var(--paper-bright);
  border: 1px solid var(--rule);
  padding: 12px;
  box-shadow: 4px 5px 0 rgba(27,23,18,.12);
}
.people-clip figcaption { margin-top: 8px; font-size: 22px; line-height: 1; color: var(--ink-soft); }

/* card scrawls replace the mono eyebrows */
.card-scrawl {
  font-family: "Zeyada", cursive;
  font-size: 26px;
  line-height: 1;
  color: var(--sc, var(--clay));
  margin-bottom: 8px;
  transform: rotate(-2deg);
  display: inline-block;
}

/* coupon cut-line on the branch card */
.card-cut { padding-top: 40px; }
.cut-line {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  border-top: 2px dashed var(--green);
}
.cut-line img {
  position: absolute;
  left: 16px;
  top: -19px;
  width: 46px;
  transform: rotate(-8deg);
}
.cut-line .hand {
  position: absolute;
  right: 18px;
  top: -30px;
  font-size: 23px;
  color: var(--green);
}

/* pushpin */
.pushpin {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #D96A55, #A93226 62%, #7E241B);
  box-shadow: 0 3px 3px rgba(27,23,18,.3);
  z-index: 2;
}

/* varied papers + staggered pinboard so the cards don't feel stamped out */
.cards { position: relative; }
.cards article:nth-of-type(3n) { background: #F6F0E0; }
.cards article:nth-of-type(3n+1) { background: var(--paper-bright); }
.cards article:nth-of-type(4n) { background: #F4EEE4; }
@media (min-width: 1101px) {
  .cards article:nth-of-type(2) { margin-top: 42px; }
  .cards article:nth-of-type(3) { margin-top: -16px; }
  .cards article:nth-of-type(4) { margin-top: -22px; }
  .cards article:nth-of-type(5) { margin-top: 28px; }
  .cards article:nth-of-type(6) { margin-top: -10px; }
}

/* the spool wandering out of the grid */
.spool {
  position: absolute;
  left: -104px;
  bottom: -46px;
  width: 168px;
  transform: rotate(-10deg);
  opacity: .92;
  pointer-events: none;
}
.spool-note {
  position: absolute;
  left: -92px;
  bottom: -86px;
  font-size: 24px;
  color: var(--ink-soft);
  transform: rotate(-6deg);
}

/* woven band before the footer */
.weave-band {
  height: 48px;
  margin-top: 60px;
  border-top: 1px solid var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Crect width='64' height='64' fill='%23EAE2CF'/%3E%3Crect y='0' width='64' height='16' fill='%233E7A54'/%3E%3Crect y='32' width='64' height='16' fill='%23B98A2A'/%3E%3Crect x='0' width='16' height='64' fill='%23C05B34'/%3E%3Crect x='32' width='16' height='64' fill='%2344669F'/%3E%3Crect x='0' y='32' width='16' height='16' fill='%23B98A2A'/%3E%3Crect x='32' y='0' width='16' height='16' fill='%233E7A54'/%3E%3C/svg%3E");
  background-size: 30px 30px;
}

/* reveal end-states for the new pieces */
.sticky.reveal.in { transform: rotate(2.5deg); }
.people-clip.reveal.in { transform: rotate(-4deg); }
.spool-note.reveal.in { transform: rotate(-6deg); }

/* ————————————————————————————————————————————
   the worktable — scattered, draggable artifacts
   ———————————————————————————————————————————— */

.desk { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.artifact {
  position: absolute;
  pointer-events: auto;
  transform: rotate(var(--r, 0deg));
  animation: settle .8s cubic-bezier(.2,.8,.3,1.15) backwards;
}
.desk .artifact:nth-child(1) { animation-delay: .15s; }
.desk .artifact:nth-child(2) { animation-delay: .3s; }
.desk .artifact:nth-child(3) { animation-delay: .45s; }
.desk .artifact:nth-child(4) { animation-delay: .55s; }
.desk .artifact:nth-child(5) { animation-delay: .65s; }
.desk .artifact:nth-child(6) { animation-delay: .75s; }
.desk .artifact:nth-child(7) { animation-delay: .85s; }
.desk .artifact:nth-child(8) { animation-delay: .95s; }
.desk .artifact:nth-child(9) { animation-delay: 1.1s; }
@keyframes settle {
  from { opacity: 0; transform: translateY(-16px) rotate(calc(var(--r, 0deg) - 5deg)); }
  to { opacity: 1; transform: rotate(var(--r, 0deg)); }
}

.mw-card {
  background: var(--paper-bright);
  border: 1px solid var(--ink);
  border-radius: 4px;
  box-shadow: 3px 4px 0 rgba(27,23,18,.16);
  overflow: hidden;
}
.mw-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-deep);
}
.mw-bar .d { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.mw-bar span { font-family: var(--mono); font-size: 10px; letter-spacing: .03em; color: var(--ink-soft); margin-left: 5px; }
.mw-human { font-family: var(--serif-body); font-style: italic; font-size: 13px; line-height: 1.4; padding: 9px 12px 4px; }
.mw-agent { font-family: var(--mono); font-size: 10.5px; color: var(--ink-soft); padding: 0 12px 10px; }
.mw-agent b { color: var(--green); font-weight: 400; }
.mw-file { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); margin-top: 7px; text-align: center; }

.scrap {
  background: var(--paper-bright);
  border: 1px solid var(--rule);
  padding: 10px 14px 8px;
  font-size: 23px;
  line-height: 1;
  color: var(--ink);
  box-shadow: 2px 3px 0 rgba(27,23,18,.12);
}
.kao { font-family: var(--mono); font-size: 19px; color: var(--ink-soft); }
.stamp-loose {
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.35;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--clay);
  border: 2px solid var(--clay);
  border-radius: 4px;
  padding: 7px 11px;
  opacity: .85;
}
.hint { font-size: 21px; color: var(--ink-faint); }

/* drag behavior */
.drag { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.drag:active { cursor: grabbing; }
.drag.reveal { transform: rotate(var(--r, 0deg)); }
.drag.reveal.in { transform: rotate(var(--r, 0deg)); }

/* ————————————————————————————————————————————
   per-format design
   desktop >1100 · tablet 701–1100 · phone ≤700
   ———————————————————————————————————————————— */

@media (max-width: 1100px) {
  /* tablet: calmer desk, single-column spreads, two-column pinboard */
  .argument-grid { grid-template-columns: 1fr; }
  .plate { max-width: 400px; margin: 44px 0 0; text-align: left; }
  .letter-grid { grid-template-columns: 1fr; }
  .letter-left { padding-top: 0; max-width: 560px; }
  .letter-left h2 { max-width: none; }
  .people-clip { display: none; }
  .note-left { display: none; }
  .note-right { position: static; margin: 16px 0 0 auto; width: fit-content; transform: rotate(-2deg); }
  .note-right .arrow { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .loom-plate { position: static; display: block; margin: 24px 0 0; }
  .spool, .spool-note { display: none; }
  .desk .mini-win:not(.keep-sm), .desk img.artifact, .desk .scrap, .desk .hint { display: none; }
  .desk .mini-win.keep-sm { right: 2.5% !important; top: 215px !important; width: 220px !important; }
  .desk .kao { right: 6% !important; top: 440px !important; }
  .desk .stamp-loose { right: 4% !important; top: 505px !important; }
}

@media (max-width: 700px) {
  /* phone: its own composition — left-set type, one scrap peeking
     off the screen edge, cards become a swipeable shelf */
  .nav { padding: 10px 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-word { height: 28px; }
  .hangtag { display: none; }

  .hero { padding: 40px 20px 150px; }
  .hero-inner { padding-left: 0; }
  .hero h1 { font-size: clamp(42px, 12.5vw, 54px); max-width: none; }
  .hero-sub { font-size: 16.5px; }
  .install { font-size: 11px; padding: 10px 8px 10px 12px; }
  .btn-download { width: 100%; text-align: center; }
  .hero-fine { font-size: 10.5px; }

  .desk .artifact { display: none; }
  .hero-inner { padding-top: 30px; }
  .desk .mini-win.keep-sm {
    display: block;
    left: auto !important;
    right: -56px !important;
    top: -16px !important;
    width: 192px !important;
    --r: 10deg;
  }
  .desk .mini-win.keep-sm .mw-file { display: none; }
  .desk .kao.keep-sm { display: block; left: 4px !important; right: auto !important; top: 6px !important; font-size: 15px; }

  .argument { padding: 60px 20px; }
  .creed li { padding-left: 44px; font-size: 18px; }
  .sticky { margin: 26px 0 0 6px; font-size: 25px; }
  .plate { margin-top: 40px; }
  .plate img { padding: 14px; }

  .letter-section { padding: 60px 20px; }
  .convo { transform: rotate(-.3deg); }
  .convo-body { padding: 6px 16px 2px; }
  .msg { padding-left: 16px; }
  .fork { margin-left: 10px; padding-left: 22px; }
  .note-right { font-size: 24px; }
  .pigeon {
    display: block;
    position: static;
    width: 108px;
    margin: 6px 4px 0 auto;
    transform: rotate(8deg) scaleX(-1);
  }

  .loom { padding: 60px 20px 30px; }
  .loom-plate { width: 180px; }
  .cards {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding: 12px 4px 26px;
    margin: 0 -20px;
    scrollbar-width: none;
  }
  .cards::-webkit-scrollbar { display: none; }
  .cards::before, .cards::after { content: ""; min-width: 12px; }
  .card { min-width: 78vw; scroll-snap-align: center; }
  .cards article { margin-top: 0 !important; }
  .shelf-hint { display: block; }

  .weave-band { margin-top: 40px; height: 36px; background-size: 24px 24px; }
  .footer { padding: 60px 20px 36px; }
  .footer-word { width: min(260px, 72vw); }
}

/* swipe hint — phone only */
.shelf-hint {
  display: none;
  font-family: "Zeyada", cursive;
  font-size: 23px;
  color: var(--ink-soft);
  transform: rotate(-2deg);
  margin: 0 0 0 26px;
}

/* platform-aware download states */
.btn-download b { font-weight: 500; }
.btn-download.soon {
  background: transparent;
  color: var(--ink-soft);
  border: 1px dashed var(--ink-faint);
  box-shadow: none;
  cursor: default;
  font-family: "Zeyada", cursive;
  font-size: 21px;
  padding: 10px 20px;
}
.btn-download.soon:hover { transform: none; box-shadow: none; }

/* ————————————————————————————————————————————
   hover previews — the tui & the gui, dummy data
   ———————————————————————————————————————————— */

.hero-cta { position: relative; }
.tip {
  position: absolute;
  bottom: calc(100% + 18px);
  width: 620px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) rotate(0deg);
  transition: opacity .22s ease .08s, transform .22s cubic-bezier(.2,.8,.3,1.1) .08s, visibility 0s linear .3s;
  pointer-events: none;
  z-index: 24;
}
.tip-tui { left: 0; --tr: -1.2deg; }
.tip-gui { left: 200px; --tr: 1.2deg; }
.install:hover ~ .tip-tui,
.btn-download:hover ~ .tip-gui {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) rotate(var(--tr));
  transition: opacity .22s ease .12s, transform .22s cubic-bezier(.2,.8,.3,1.1) .12s;
}
.tip-caption {
  display: inline-block;
  margin: 0 0 12px 14px;
  padding: 8px 16px 4px;
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
  background: var(--paper-bright);
  border: 1px solid var(--rule);
  box-shadow: 2px 3px 0 rgba(27,23,18,.14);
  transform: rotate(-1.2deg);
}
@media (hover: none), (max-width: 1100px) { .tip { display: none; } }

/* app accent colors (the product's own, not the site's) */
.tip { --acc: #5477B8; --acx: #3F9168; --agm: #7E6BB0; --aam: #C79A3D; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.dot-cc { background: var(--acc); }
.dot-cx { background: var(--acx); }
.dot-gm { background: var(--agm); }
.tip .attn-dot { background: var(--aam); width: 6px; height: 6px; margin-left: auto; animation: attn 1.6s ease-in-out infinite; }
.tip .dim { opacity: .45; }

/* ——— the tui ——— */
.term {
  background: #16120E;
  border: 1px solid #000;
  border-radius: 7px;
  box-shadow: 8px 10px 0 rgba(27,23,18,.18);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.75;
  color: #CFC5AE;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  background: #211B14;
  border-bottom: 1px solid #2E2720;
}
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3A322A; }
.term-bar i:nth-child(1) { background: #C05B34; }
.term-bar i:nth-child(2) { background: #C79A3D; }
.term-bar i:nth-child(3) { background: #3F9168; }
.term-bar span { margin-left: 8px; font-size: 10px; color: #8D8168; }
.term-tabs {
  display: flex;
  gap: 16px;
  padding: 5px 12px;
  border-bottom: 1px solid #2E2720;
  font-size: 10px;
  color: #746A54;
}
.term-tabs b { color: #E8DFC8; font-weight: 400; border-bottom: 1px solid #C05B34; }
.term-body { display: flex; }
.term-tree {
  width: 224px;
  flex: none;
  padding: 8px 10px;
  border-right: 1px solid #2E2720;
}
.t-proj { color: #E8DFC8; }
.t-proj.dim { color: #746A54; }
.t-bucket { color: #746A54; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; margin: 3px 0 1px 8px; }
.t-item { display: flex; align-items: center; gap: 6px; padding-left: 8px; color: #B4A98D; white-space: nowrap; }
.t-item.act { background: #241E16; border-radius: 3px; color: #E8DFC8; }
.t-item .ctx { margin-left: 6px; font-size: 9px; color: #746A54; }
.t-shared { color: #8A9BC0; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; margin: 4px 0 1px 8px; }
.term-main { padding: 8px 14px; min-width: 0; }
.tm-title { color: #E8DFC8; margin-bottom: 3px; }
.mini-badge {
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
}
.b-cc { background: #2A3550; color: #9FB4DF; }
.tm-you { color: #E8DFC8; font-style: italic; }
.tm-agent { color: #8D8168; }
.tm-tool { color: #746A54; }
.tm-tool b { color: #6FBF8F; font-weight: 400; }
.tm-tool em { color: #C07A5B; font-style: normal; }
.tm-branch { color: #6FBF8F; padding-left: 10px; border-left: 1px solid #3F9168; margin: 2px 0 2px 4px; }
.caret { color: #C79A3D; animation: attn 1.1s steps(2) infinite; }
.term-status {
  display: flex;
  gap: 14px;
  padding: 5px 12px;
  border-top: 1px solid #2E2720;
  background: #1B1610;
  font-size: 9.5px;
  color: #746A54;
}
.term-status .ok { color: #6FBF8F; margin-left: auto; }

/* ——— the gui ——— */
.app {
  background: #FBF8F1;
  border: 1px solid var(--ink);
  border-radius: 8px;
  box-shadow: 8px 10px 0 rgba(27,23,18,.18);
  overflow: hidden;
  font-family: var(--sans);
  font-size: 10.5px;
  line-height: 1.7;
  color: #3A342A;
}
.app-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  background: #F0EBDD;
  border-bottom: 1px solid #DDD5C2;
}
.app-bar i { width: 10px; height: 10px; border-radius: 50%; }
.app-bar i:nth-child(1) { background: #E0654A; }
.app-bar i:nth-child(2) { background: #D9A83F; }
.app-bar i:nth-child(3) { background: #59A56F; }
.app-bar span { margin-left: 8px; font-size: 10px; color: #8D8168; font-family: var(--mono); }
.app-body { display: flex; }
.app-side {
  width: 190px;
  flex: none;
  background: #F4EFE3;
  border-right: 1px solid #DDD5C2;
  padding: 8px 10px;
}
.as-machine { font-family: var(--mono); font-size: 9.5px; color: #3A342A; margin-bottom: 6px; }
.as-machine .rtt { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #59A56F; margin: 0 4px 0 6px; }
.as-machine span { color: #A99D82; }
.as-nav { color: #8D8168; font-size: 10px; padding: 1px 6px; border-radius: 3px; }
.as-nav.on { background: #E8E1CE; color: #2A2419; }
.as-proj { margin-top: 7px; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: #A99D82; }
.as-item { display: flex; align-items: center; gap: 6px; padding: 1px 6px; color: #55503F; white-space: nowrap; border-radius: 3px; }
.as-item.on { background: #E8E1CE; color: #2A2419; }
.as-shared { margin-top: 6px; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: #5477B8; }
.app-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.app-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 10px 0;
  border-bottom: 1px solid #DDD5C2;
  font-size: 10px;
}
.app-tabs b, .app-tabs span {
  padding: 3px 12px;
  border-radius: 6px 6px 0 0;
  color: #8D8168;
  font-weight: 400;
}
.app-tabs b { background: #FFFDF7; border: 1px solid #DDD5C2; border-bottom-color: #FFFDF7; color: #2A2419; margin-bottom: -1px; }
.app-convo { padding: 10px 14px; background: #FFFDF7; flex: 1; }
.am-you {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 11.5px;
  color: #2A2419;
  border-left: 2px solid #C05B34;
  padding-left: 8px;
  margin-bottom: 5px;
}
.am-agent { font-family: var(--mono); font-size: 9.5px; color: #776F5B; margin-bottom: 4px; display: flex; align-items: center; }
.am-agent .attn-dot { margin-left: 6px; }
.am-tool { font-family: var(--mono); font-size: 9.5px; color: #A99D82; margin-bottom: 5px; }
.am-tool b { color: #3F9168; font-weight: 400; }
.am-tool em { color: #C07A5B; font-style: normal; }
.am-branch {
  font-family: var(--mono);
  font-size: 9.5px;
  color: #3F9168;
  background: #EDF2E8;
  border: 1px solid #C9D8C2;
  border-radius: 4px;
  padding: 3px 8px;
  margin: 0 0 6px 12px;
  width: fit-content;
}
.app-status {
  display: flex;
  gap: 14px;
  padding: 4px 12px;
  border-top: 1px solid #DDD5C2;
  background: #F0EBDD;
  font-family: var(--mono);
  font-size: 9px;
  color: #8D8168;
}
.app-status .ok { color: #3F9168; margin-left: auto; }

/* micro-play: things perk up under the hand */
.heatmap i { transition: opacity .2s ease; cursor: crosshair; }
.hm-hint { margin: 6px 0 0 4px; font-size: 20px; color: var(--ink-faint); transform: rotate(-2deg); }
.scrap, .stamp-loose, .sticky, .kao, .hangtag-card { transition: transform .18s ease; }
.scrap:hover, .stamp-loose:hover, .kao:hover { transform: rotate(0deg) translateY(-2px); }
.sticky:hover { transform: rotate(0.5deg) translateY(-2px); }

/* agent marks in the ticker & chips */
.tseq .tname { display: inline-flex; align-items: center; gap: 9px; }
.tmark { height: 15px; width: 16px; object-fit: contain; display: block; }
.card .chips span { display: inline-flex; align-items: center; gap: 5px; }
.cmark { height: 11px; width: 12px; object-fit: contain; }

/* anchor targets clear the sticky nav */
[id] { scroll-margin-top: 84px; }
