:root {
  --bg: #fff5fb;
  --surface: #ffffff;
  --text: #3a2b4d;
  --muted: #6f5f86;
  --primary: #ff85c0;
  --accent: #b79bff;

  --font-head: "Baloo 2", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 22px;
  --stitch: 2px dashed var(--accent);
  --shadow: 0 10px 0 -4px rgba(58, 43, 77, 0.08), 0 18px 40px -22px rgba(58, 43, 77, 0.35);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  overflow-wrap: anywhere;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  overflow-wrap: normal;
}

p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
  border-radius: 6px;
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--text);
  color: var(--surface);
  border-radius: 12px;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}
.skip:focus { transform: none; }

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 2.5px solid var(--text);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-pink { background: var(--primary); color: var(--text); box-shadow: 0 4px 0 var(--text); }
.btn-wool { background: var(--surface); color: var(--text); box-shadow: 0 4px 0 var(--accent); }
.pill { min-height: 44px; padding: 8px 18px; font-size: 0.98rem; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
  .btn-wool:hover { background-color: #f6f0ff; }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 245, 251, 0.94);
  border-bottom: var(--stitch);
}
.bar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  min-height: 44px;
  overflow-wrap: normal;
}
.wordmark-mitten { width: 24px; height: 28px; flex: none; }
@media (max-width: 419px) {
  .wordmark span { display: none; }
}
.nav { display: none; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 160ms var(--ease-out);
}
.bar .pill { margin-left: auto; }
@media (min-width: 980px) {
  .nav { display: flex; }
  .bar .pill { margin-left: 8px; }
}
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { background-color: #f6e6ff; }
}

/* Hero */
.hero {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  min-height: calc(100svh - 68px);
  padding-block: clamp(28px, 5vw, 64px);
}
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}
.masthead { display: grid; gap: 18px; justify-items: start; }
.edition {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: var(--stitch);
  width: 100%;
}
.edition span + span::before { content: "•"; margin-right: 16px; color: var(--primary); }
.kicker {
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 0.9rem + 1vw, 1.5rem);
  font-weight: 600;
  color: var(--muted);
}
.hero h1 {
  font-size: clamp(2.1rem, 1.2rem + 4.6vw, 4.4rem);
  letter-spacing: -0.01em;
}
.accent {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.1em;
}
.issued { font-size: 1.05rem; color: var(--muted); }
.token-name { color: var(--text); }
.pitch { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }

.plate { margin: 0; }
.plate-art {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface);
  border: 3px solid var(--text);
  border-radius: 30px;
  box-shadow: var(--shadow);
}
figcaption {
  margin-top: 12px;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--muted);
}
.svg-label { font: 500 11px var(--font-mono); fill: #3a2b4d; letter-spacing: 0.06em; }
.svg-label-lg { font: 700 17px var(--font-head); fill: #3a2b4d; letter-spacing: 0.04em; }
.svg-tag { font: 500 8px var(--font-mono); fill: #3a2b4d; }
.svg-initial { font: 700 16px var(--font-head); fill: #3a2b4d; }

/* Parts */
.part {
  padding-block: clamp(56px, 8vw, 104px);
  border-top: 3px double var(--text);
}
.part-head {
  display: grid;
  gap: 12px;
  max-width: 46rem;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.part-no {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.part h2 { font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem); }
.part-lede { font-size: 1.08rem; }
.drop::first-letter {
  float: left;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 3.6em;
  line-height: 0.9;
  padding: 6px 10px 0 0;
  color: var(--primary);
}

.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.fine { font-size: 0.92rem; color: var(--muted); }

/* Part I: rack of mittens */
.rack {
  display: grid;
  gap: 20px;
  position: relative;
  padding-top: 18px;
}
.rack::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  border-radius: 6px;
  background: var(--text);
}
@media (min-width: 560px) {
  .rack { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}
.hang {
  position: relative;
  display: grid;
  min-height: 260px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius);
}
.hang-peg {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 4px;
  height: 30px;
  margin-left: -2px;
  background: var(--text);
  border-radius: 2px;
  z-index: 2;
}
.hang-face {
  grid-area: 1 / 1;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 28px 18px 20px;
  border-radius: var(--radius);
  border: 2.5px solid var(--text);
  transition: opacity 240ms var(--ease-out), transform 260ms var(--ease-out);
}
.hang-out {
  justify-items: center;
  background: var(--surface);
}
.hang-out svg { width: min(100%, 130px); height: auto; }
.hang-cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.hang-in {
  background: #fdf7e8;
  outline: var(--stitch);
  outline-offset: -10px;
  opacity: 0;
  transform: scale(0.95);
}
.hang[aria-pressed="true"] .hang-out { opacity: 0; transform: scale(0.95) rotate(-3deg); }
.hang[aria-pressed="true"] .hang-in { opacity: 1; transform: none; }
.label-no {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.label-title { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; line-height: 1.15; }
.label-text { font-size: 1rem; }
@media (hover: hover) and (pointer: fine) {
  .hang:hover .hang-face { transform: translateY(-4px); }
  .hang[aria-pressed="true"]:hover .hang-out { transform: scale(0.95) rotate(-3deg); }
}

/* Part II: catalogue pages */
.book { display: grid; gap: 18px; }
.page {
  display: grid;
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  padding: clamp(20px, 4vw, 44px);
  background: var(--surface);
  border: 2.5px solid var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background-image: linear-gradient(90deg, transparent calc(50% - 1px), rgba(58, 43, 77, 0.12) calc(50% - 1px), rgba(58, 43, 77, 0.12) calc(50% + 1px), transparent calc(50% + 1px));
}
@media (max-width: 819px) { .page { background-image: none; } }
@media (min-width: 820px) {
  .page { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.page-art { width: min(100%, 300px); height: auto; justify-self: center; }
.page.is-turning { opacity: 0; transform: translateX(16px); }
.page { transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out); }
.entry { display: grid; gap: 14px; }
.entry-no { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.entry h3 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.entry-fields, .claim-fields, .label-list { margin: 0; display: grid; gap: 10px; }
.entry-fields div, .claim-fields div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(58, 43, 77, 0.14);
}
dt { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
dd { margin: 0; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.folio { font-family: var(--font-mono); font-size: 0.9rem; color: var(--muted); }

/* Part III: claim desk */
.desk {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
@media (min-width: 820px) {
  .desk { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.fields { display: grid; gap: 12px; }
.field {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 2.5px solid var(--text);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.yarns {
  border: 0;
  margin: 6px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.yarns legend { margin-bottom: 8px; }
.yarn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  border: 2px solid rgba(58, 43, 77, 0.25);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.yarn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.yarn:has(input:checked) { border-color: var(--text); }
.yarn:has(input:focus-visible) { outline: 3px solid var(--text); outline-offset: 3px; }
.yarn:active { transform: scale(0.97); }
.swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--text);
  background: var(--swatch);
  flex: none;
}
.desk-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 6px; }

.claim-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 24px;
  background: var(--surface);
  border: 2.5px solid var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  outline: var(--stitch);
  outline-offset: -12px;
}
.claim-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.claim-art { width: min(100%, 220px); height: auto; justify-self: center; }
.claim-tag {
  position: absolute;
  right: 22px;
  top: 56px;
  display: grid;
  justify-items: center;
  padding: 8px 14px;
  background: var(--primary);
  border: 2.5px solid var(--text);
  border-radius: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.1;
  text-transform: uppercase;
  visibility: hidden;
  transform: rotate(8deg) scale(0.95) translateY(-16px);
  transition: transform 300ms var(--ease-out), visibility 0ms linear 300ms;
}
.claim-tag small { font-family: var(--font-mono); font-weight: 500; font-size: 0.66rem; letter-spacing: 0.08em; }
.claim-card.is-claimed .claim-tag { visibility: visible; transform: rotate(8deg); transition: transform 300ms var(--ease-out), visibility 0ms linear 0ms; }

/* Part IV: rows */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
@media (min-width: 820px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.step {
  display: grid;
  gap: 8px;
  padding: 22px 22px 22px 26px;
  background: var(--surface);
  border: 2.5px solid var(--text);
  border-radius: var(--radius);
  border-left-width: 12px;
  border-left-color: var(--primary);
}
.step:nth-child(2) { border-left-color: var(--accent); }
.step:nth-child(3) { border-left-color: #8fdcc2; }
.step-extra { border-style: dashed; border-left-style: solid; border-left-color: #ffd98a; background: transparent; }
.step-no { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.step h3 { font-size: 1.45rem; }

/* Part V: contract and window */
.ca-box {
  display: grid;
  gap: 12px;
  padding: 22px;
  background: var(--surface);
  border: 2.5px solid var(--text);
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.ca-box code {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 0.88rem + 0.4vw, 1.15rem);
  padding: 14px 16px;
  background: var(--bg);
  border: 2px dashed var(--accent);
  border-radius: 14px;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.ca-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.copy-note { font-family: var(--font-mono); font-size: 0.9rem; color: var(--muted); }

.window {
  display: grid;
  gap: 20px;
  align-items: center;
}
@media (min-width: 820px) {
  .window { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}
.pane {
  position: relative;
  display: grid;
  min-height: 220px;
  border: 10px solid #ffd98a;
  outline: 2.5px solid var(--text);
  border-radius: 18px;
  overflow: hidden;
  background: #eaf4ff;
}
.pane-notice {
  grid-area: 1 / 1;
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 24px;
}
.notice-title { font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; }
.notice-sig { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.pane-frost {
  grid-area: 1 / 1;
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #f7fbff 0%, #e9f1ff 55%, #f6efff 100%);
  transition: opacity 400ms var(--ease-out), clip-path 500ms var(--ease-in-out);
  clip-path: circle(150% at 50% 55%);
}
.pane-frost svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.frost-text {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.pane.is-clear .pane-frost { opacity: 0; clip-path: circle(0% at 50% 55%); }
.window-control { display: grid; gap: 12px; justify-items: start; }

/* Part VI: contents */
.contents-grid {
  display: grid;
  gap: 24px;
  padding: clamp(20px, 4vw, 36px);
  background: #fdf7e8;
  border: 2.5px solid var(--text);
  border-radius: var(--radius);
  outline: var(--stitch);
  outline-offset: -12px;
}
@media (min-width: 820px) {
  .contents-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .contents-grid .notes { grid-column: 1 / -1; }
  .contents-grid:not(:has([data-tcc-distribution])) { grid-template-columns: minmax(0, 1fr); }
}
.label-list .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding-bottom: 10px;
  border-bottom: 1.5px dashed rgba(58, 43, 77, 0.3);
}
.label-list dd { font-weight: 600; text-align: right; }
.skeins h3 { font-size: 1.3rem; margin-bottom: 12px; }
.shares { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.share { display: grid; gap: 6px; }
.share-rail {
  display: block;
  height: 14px;
  border-radius: 999px;
  border: 2px solid var(--text);
  background: var(--surface);
  overflow: hidden;
}
.share-fill {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--primary) 0 10px, #ff9fcd 10px 20px);
  transform-origin: left center;
  transform: scaleX(calc(var(--share) / 100));
}
.notes { color: var(--muted); font-style: italic; }

/* Part VII: FAQ */
.faq-list { display: grid; gap: 12px; max-width: 52rem; }
.faq-item {
  background: var(--surface);
  border: 2.5px solid var(--text);
  border-radius: 18px;
}
.faq-item summary {
  position: relative;
  min-height: 56px;
  padding: 14px 52px 14px 20px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
  border-radius: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 12px;
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform 200ms var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 20px 18px; }
.faq-item[open] p { animation: open 260ms var(--ease-out); }
@keyframes open { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Footer */
.site-footer {
  border-top: 3px double var(--text);
  background: var(--surface);
  padding-block: clamp(40px, 6vw, 72px);
}
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 820px) {
  .footer-grid { display: flex; align-items: flex-start; gap: 40px; }
  .footer-brand { flex: 1 1 0; }
  .footer-socials { flex: 0 1 220px; }
  .footer-fine { flex: 1.6 1 0; }
}
.footer-end { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.footer-name { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; line-height: 1.2; margin: 8px 0; }
.footer-motto { color: var(--muted); }
.footer-h { font-size: 1.15rem; margin-bottom: 10px; }
.social-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.social-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.social-list a::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--text);
  background: var(--accent);
}
.social-list [data-kind="x"] a::before { background: var(--text); }
.social-list [data-kind="telegram"] a::before { background: #9cc9ff; }
.social-list [data-kind="dexscreener"] a::before { background: #8fdcc2; }
.social-list [data-kind="pumpfun"] a::before { background: var(--primary); }
.footer-fine p { font-size: 0.9rem; color: var(--muted); }
.colophon { margin-top: 12px; font-family: var(--font-mono); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .page.is-turning { opacity: 1; transform: none; }
}
