/* Sarah Deak — portfolio
   Black, white, and two deep reds. One loud moment (the sword drawing), everything else quiet. */

@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --black: #000000;
  --white: #ffffff;
  --wine: #4b0f2a;
  --plum: #2c0d22;
  --blush: #ecd0db;
  --grey: #5f5a5d;
  --rule: #d9d4d6;
  --display: "Hanken Grotesk", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--white); color: var(--black); font-family: var(--body); font-size: 1.125rem; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--white); color: var(--black); padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; top: 1rem; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; margin: 0; letter-spacing: -.03em; }
p { margin: 0 0 1em; }
.pad { padding-inline: var(--gutter); }

/* Top bar */
.bar { position: absolute; inset: 0 0 auto 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 1.5rem var(--gutter); color: var(--white); }
.bar .name { font-family: var(--display); font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.bar ul { display: flex; gap: clamp(1rem, 3vw, 2.25rem); list-style: none; margin: 0; padding: 0; }
.bar a { text-decoration: none; }
.bar a:hover, .bar a[aria-current] { text-decoration: underline; }

/* Hero */
.hero { position: relative; min-height: 100vh; background: var(--wine); color: var(--white); overflow: hidden; display: flex; align-items: flex-end; }
.hero .sword { position: absolute; right: clamp(-4rem, 3vw, 5rem); top: 3.5rem; height: 118%; width: auto; max-width: none; pointer-events: none; }
.hero .inner { position: relative; z-index: 2; padding: 8rem var(--gutter) clamp(2.5rem, 6vw, 4.5rem); width: 100%; }
.hero h1 { font-size: clamp(4.2rem, 13vw, 11.5rem); line-height: .88; letter-spacing: -.045em; }
.hero p { font-size: clamp(1.2rem, 1.9vw, 1.5rem); line-height: 1.45; max-width: min(25em, 44vw); margin: 2.2rem 0 0; color: var(--blush); }
@media (max-width: 800px) { .hero .sword { right: -10rem; opacity: .35; } .hero p { max-width: 25em; } }

/* Work index */
.work { padding-block: clamp(4rem, 9vw, 7rem) 1rem; }
.section-title { font-size: clamp(2.2rem, 4vw, 3rem); margin-bottom: 2.5rem; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--black); }
.rows li { border-bottom: 1px solid var(--rule); }
.rows a { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1rem 3rem; padding: 2rem 0 2.1rem; text-decoration: none; }
.rows h3 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
.rows .what { color: var(--grey); margin: 0 0 .6rem; }
.rows .result { font-weight: 700; margin: 0; }
.rows a:hover h3 { color: var(--wine); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; }
@media (max-width: 760px) { .rows a { grid-template-columns: 1fr; } }

.also { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; padding-block: 3.5rem 5.5rem; }
.also h2 { font-size: 1.6rem; }
.also dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 3rem; }
.also dt { font-weight: 700; }
.also dd { margin: .2rem 0 0; color: var(--grey); font-size: 1rem; }
@media (max-width: 760px) { .also { grid-template-columns: 1fr; } .also dl { grid-template-columns: 1fr; } }

/* Building UX (black) */
.dark { background: var(--black); color: var(--white); padding-block: clamp(4rem, 9vw, 7rem); }
.dark .grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
.dark .lead { font-size: 1.3rem; color: var(--blush); max-width: 26em; }
.dark ul { list-style: none; padding: 0; margin: 2rem 0 0; }
.dark li { padding: 1.1rem 0; border-top: 1px solid #3a3a3a; }
.dark li b { display: block; font-weight: 700; }
.dark li span { color: #c9c3c6; }
.talk { background: var(--plum); padding: clamp(1.75rem, 3vw, 2.75rem); }
.talk .where { color: var(--blush); margin-bottom: 1.2rem; }
.talk h3 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); margin-bottom: 1.2rem; }
.talk p:last-child { margin: 0; color: #d8cfd4; }
@media (max-width: 860px) { .dark .grid { grid-template-columns: 1fr; gap: 3rem; } }

/* About */
.about { padding-block: clamp(4rem, 9vw, 7rem); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.about img { filter: grayscale(1) contrast(1.05); }
.about h2 { font-size: clamp(2.2rem, 4vw, 3rem); margin-bottom: 1.5rem; }
.about .copy { max-width: 34em; }
.about .facts { margin: 2rem 0 0; display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; font-size: 1rem; }
.about dt { font-weight: 700; }
.about dd { margin: 0; color: var(--grey); }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; } .about img { max-width: 420px; } }

/* Art */
.art { background: var(--wine); color: var(--white); padding-block: clamp(4rem, 9vw, 7rem); }
.art .head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }
.art .head h2 { font-size: clamp(2.2rem, 4vw, 3rem); }
.art .head p { color: var(--blush); margin: 0; }
.art .wall { columns: 4 220px; column-gap: 1rem; }
.art figure { margin: 0 0 1rem; break-inside: avoid; background: var(--white); }

/* Contact */
.contact { background: var(--black); color: var(--white); padding-block: clamp(4.5rem, 10vw, 8rem) 2rem; }
.contact p { color: var(--blush); font-size: 1.25rem; }
.contact .email { display: inline-block; font-family: var(--display); font-weight: 700; letter-spacing: -.04em; font-size: clamp(2rem, 7vw, 6rem); line-height: 1; margin: 1rem 0 3rem; overflow-wrap: anywhere; text-decoration: none; }
.contact .email:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.contact .links { display: flex; gap: 2rem; list-style: none; padding: 0; margin: 0 0 4rem; }
.contact small { color: #8f878b; font-size: .85rem; }

/* Case studies */
.case-top { background: var(--wine); color: var(--white); padding: 7.5rem var(--gutter) 3.5rem; }
.case-top .back { color: var(--blush); }
.case-top h1 { font-size: clamp(3rem, 8vw, 6.5rem); line-height: .92; margin: 2.5rem 0 1.5rem; max-width: 12em; }
.case-top .lede { font-size: 1.3rem; color: var(--blush); max-width: 32em; margin: 0; }
.case-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.5rem 2rem; margin: 3rem 0 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.3); }
.case-facts dt { color: var(--blush); font-size: .95rem; }
.case-facts dd { margin: .2rem 0 0; }
.case-body { padding-block: 3rem 4rem; }
.case-body > section { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; padding: 3rem 0; border-top: 1px solid var(--rule); }
.case-body > section:first-child { border-top: 0; }
.case-body h2 { font-size: 1.7rem; }
.case-body .text { max-width: 980px; }
.case-body .text > p, .case-body .text > ul, .case-body .text > ol, .case-body .text > blockquote { max-width: 36em; }
.case-body ul { padding-left: 1.1rem; margin: 0 0 1em; }
.case-body li { margin-bottom: .4rem; }
@media (max-width: 760px) { .case-body > section { grid-template-columns: 1fr; gap: 1rem; } }
.full { margin: 0 0 1rem; }
.full img { border: 1px solid var(--rule); }
.full figcaption { color: var(--grey); font-size: .95rem; margin-top: .6rem; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.5rem; }
@media (max-width: 700px) { .duo { grid-template-columns: 1fr; } }
.todo { display: grid; place-items: center; min-height: 280px; padding: 1.5rem; text-align: center; color: var(--grey); font-size: .95rem; border: 2px dashed var(--rule); }
.numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2rem 1.5rem; margin-top: 1.5rem; }
.numbers b { display: block; font-family: var(--display); font-weight: 700; font-size: 2.4rem; letter-spacing: -.03em; line-height: 1; color: var(--wine); }
.numbers span { color: var(--grey); font-size: .95rem; }
blockquote { margin: 1.2rem 0; font-family: var(--display); font-weight: 500; font-size: 1.4rem; line-height: 1.25; color: var(--wine); }
.case-next { background: var(--black); color: var(--white); padding: 3rem var(--gutter); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.case-next a.big { font-family: var(--display); font-weight: 700; letter-spacing: -.03em; font-size: clamp(2rem, 5vw, 3.5rem); text-decoration: none; }
.case-next a.big:hover { text-decoration: underline; }
.case-next span { color: var(--blush); }
.bar .name { display: inline-flex; align-items: center; gap: .6rem; }
.bar .name img { width: 30px; height: 30px; }

/* Illustration for Purdue */
.visuals { padding-block: clamp(4rem, 9vw, 7rem); border-top: 1px solid var(--rule); }
.vis-lead { color: var(--grey); max-width: 34em; margin: -1.5rem 0 2.5rem; }
.vis-grid { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; gap: 1.25rem; }
.vis-grid .wide { grid-row: span 2; }
.vis-grid figure { margin: 0; }
.vis-grid img { border: 1px solid var(--rule); width: 100%; }
.vis-grid figcaption { color: var(--grey); font-size: .95rem; margin-top: .5rem; }
@media (max-width: 760px) { .vis-grid { grid-template-columns: 1fr; } .vis-grid .wide { grid-row: auto; } }


/* ---------- v4 ---------- */
/* Hero */
.hero { flex-direction: column; justify-content: flex-end; align-items: stretch; }
.hero .sword { right: clamp(-4rem, 4vw, 6rem); top: 3rem; height: 112%; opacity: .95; }
.hero .inner { max-width: 60%; padding-bottom: 2.5rem; }
.hero .role { font-size: 1.15rem; color: var(--blush); margin: 0 0 1.2rem; font-weight: 500; }
.proof { position: relative; z-index: 2; list-style: none; margin: 0; padding: 1.4rem var(--gutter) 2.2rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2.5rem; border-top: 1px solid rgba(255,255,255,.25); background: linear-gradient(180deg, rgba(75,15,42,.0), rgba(44,13,34,.55)); }
.proof b { display: block; font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.03em; line-height: 1.1; }
.proof span { color: var(--blush); font-size: .98rem; }
@media (max-width: 800px) { .hero .inner { max-width: none; } .proof { grid-template-columns: 1fr; gap: .9rem; } }

/* Work cards */
.work-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
.work-head .section-title { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { font: inherit; font-size: .95rem; font-weight: 500; padding: .5rem 1rem; min-height: 40px; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--white); color: var(--black); cursor: pointer; }
.chip:hover { border-color: var(--wine); }
.chip[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: var(--white); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 1.75rem; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.card[hidden] { display: none; }
.card a { display: block; text-decoration: none; }
.card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: #f3eff1; border: 1px solid var(--rule); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .35s ease; }
.card a:hover .thumb img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .card .thumb img { transition: none; } .card a:hover .thumb img { transform: none; } }
.card-body { padding-top: 1rem; }
.card .label { font-size: .88rem; color: var(--grey); margin: 0 0 .25rem; }
.card h3 { font-size: 1.5rem; letter-spacing: -.02em; }
.card a:hover h3 { color: var(--wine); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; }
.card .hi { font-weight: 700; color: var(--wine); margin: .4rem 0 .15rem; }
.card .one { color: var(--grey); margin: 0; font-size: 1rem; }
.also dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .also dl { grid-template-columns: 1fr; } }

/* How I work */
.dark .grid { align-items: center; }
.loop { width: 100%; max-width: 520px; height: auto; display: block; }
.loop .ink path, .loop .ink circle { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.loop .ink.thin path, .loop .ink.thin circle { stroke: var(--blush); stroke-width: 1.8; }
.loop .dot circle { fill: var(--wine); stroke: #fff; stroke-width: 2; }
.loop .lbl text { fill: #fff; font: 700 20px var(--body); }
.loop .sm text { fill: var(--blush); font: 500 14px var(--body); }
.how { list-style: none; margin: 0 0 2rem; padding: 0; }
.how li { padding: .9rem 0; border-top: 1px solid #3a3a3a; color: #d6cfd3; }
.how li:last-child { border-bottom: 1px solid #3a3a3a; }
.how b { color: #fff; }
a.talk { display: grid; grid-template-columns: 140px 1fr; gap: 1rem; align-items: center; padding: 1rem; color: #fff; text-decoration: none; background: var(--plum); }
a.talk img { margin: 0; border-radius: 2px; }
a.talk b { display: block; color: var(--blush); font-weight: 500; font-size: .9rem; }
a.talk span { font-weight: 700; line-height: 1.3; }
a.talk:hover span { text-decoration: underline; }

/* About facts */
.about .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 2rem; margin-top: 2rem; }
.about .facts div { border-top: 1px solid var(--rule); padding-top: .6rem; }
.about .facts dd { margin: .2rem 0 0; }
@media (max-width: 600px) { .about .facts { grid-template-columns: 1fr; } }

/* Animation */
.film { margin: 0 0 2.5rem; }
.film video { width: 100%; max-width: 960px; display: block; background: #000; }
.film figcaption { color: var(--blush); margin-top: .8rem; max-width: 40em; }
.film figcaption b { color: #fff; }

/* Case study at-a-glance strip */
.tldr { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; padding-block: 2rem; border-bottom: 1px solid var(--rule); background: #faf6f8; }
.tldr b { display: block; font-size: 2rem; letter-spacing: -.03em; color: var(--wine); line-height: 1.1; }
.tldr span { color: var(--grey); font-size: .95rem; }
.full + .full { margin-top: 1.5rem; }
.text .full, .text .duo { margin-top: 1.5rem; }
.proof { background: rgba(44,13,34,.94); }
.cards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.card { grid-column: span 2; }
.card.feature, .card.student { grid-column: span 3; }
.card.feature h3 { font-size: 1.9rem; }
.divider { grid-column: 1 / -1; border-top: 2px solid var(--black); padding-top: 1rem; margin-top: 1rem; }
.divider[hidden] { display: none; }
.divider h3 { font-size: 1.4rem; }
.card.student .thumb { aspect-ratio: 16 / 9; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card, .card.feature, .card.student { grid-column: span 1; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.art .film { background: none; }

/* ---------- v5 ---------- */
/* Hero: poster with the sword between the names */
.hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6rem var(--gutter) 3rem; }
.hero h1 { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(.5rem, 2vw, 2rem); width: 100%; font-size: clamp(3.4rem, 11vw, 10.5rem); line-height: .9; letter-spacing: -.05em; margin: 0; }
.hero h1 .n1 { text-align: right; }
.hero h1 .n2 { text-align: left; }
.hero h1 .sword { position: static; height: min(62vh, 620px); width: auto; max-width: none; opacity: 1; }
.hero .role { color: var(--blush); font-size: 1.15rem; font-weight: 500; margin: 1.5rem 0 .4rem; }
.hero .tag { font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.45; max-width: 30em; margin: 0 auto; color: #fff; }
.hero .down { margin-top: 2rem; color: #fff; font-weight: 700; border: 2px solid #fff; padding: .8rem 1.4rem; text-decoration: none; }
.hero .down:hover { background: #fff; color: var(--wine); }
@keyframes drawdown { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes slidein-l { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes slidein-r { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .sword { animation: drawdown 1.6s cubic-bezier(.2,.7,.2,1) both; }
  .hero h1 .n1 { animation: slidein-l .9s .5s ease-out both; }
  .hero h1 .n2 { animation: slidein-r .9s .5s ease-out both; }
}
@media (max-width: 700px) {
  .hero h1 { grid-template-columns: 1fr; position: relative; }
  .hero h1 .sword { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); height: 120%; opacity: .3; animation: none; }
  .hero h1 .n1, .hero h1 .n2 { text-align: center; position: relative; }
}

/* Cards: picture, title, one line */
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 1.75rem; }
.card, .card.feature, .card.student { grid-column: auto; }
.card h3 { font-size: 1.35rem; margin-top: .9rem; }
.card .hi { color: var(--grey); font-weight: 400; margin: .2rem 0 0; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* From school */
.school { background: #f6f1f3; padding-block: 3rem 3.5rem; border-top: 1px solid var(--rule); }
.school h2 { font-size: 1.8rem; }
.school > p { color: var(--grey); margin: .4rem 0 1.5rem; }
.school ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.school a { display: grid; grid-template-columns: 180px 1fr; gap: 1.2rem; align-items: center; text-decoration: none; background: #fff; border: 1px solid var(--rule); padding: .9rem; }
.school .thumb { aspect-ratio: 4 / 3; overflow: hidden; }
.school .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.school h3 { font-size: 1.25rem; }
.school p { margin: .2rem 0 0; color: var(--grey); }
.school a:hover h3 { color: var(--wine); text-decoration: underline; }
@media (max-width: 800px) { .school ul { grid-template-columns: 1fr; } .school a { grid-template-columns: 120px 1fr; } }

/* How I work doodle */
.doodle { width: 100%; max-width: 900px; height: auto; display: block; margin: 1rem auto 2.5rem; }
.doodle .ink path, .doodle .ink circle { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.doodle .ink .soft { stroke: var(--blush); stroke-width: 2; }
.doodle .ink .dash { stroke: var(--blush); stroke-dasharray: 2 10; stroke-width: 2.6; }
.doodle .dot circle { fill: var(--wine); stroke: #fff; stroke-width: 2.4; }
.doodle .lbl text { fill: #fff; font: 700 17px var(--body); }
.doodle .note { fill: var(--blush); font: 500 14px var(--body); }
#how .how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; max-width: 1100px; }
@media (max-width: 760px) { #how .how { grid-template-columns: 1fr; } }
.hero h1 .sword { -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }

/* ---------- v6 hero: untangle ---------- */
.hero.untangle { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; padding: 7rem var(--gutter) 30vh; }
.hero.untangle .copy { position: relative; z-index: 2; max-width: 62rem; }
.hero.untangle .name { color: var(--blush); font-weight: 700; font-size: 1.1rem; margin: 0 0 1rem; }
.hero.untangle h1 { display: block; font-size: clamp(2.8rem, 7vw, 6.4rem); line-height: .98; letter-spacing: -.045em; text-wrap: balance; }
.hero.untangle .sub { font-size: clamp(1.1rem, 1.7vw, 1.35rem); color: var(--blush); max-width: 30em; margin: 1.5rem 0 0; }
.hero.untangle .down { display: inline-block; margin-top: 2rem; }
.knotline { position: absolute; left: 0; right: 0; bottom: 6%; width: 100%; height: 40%; pointer-events: none; }
.knotline .knot, .knotline .line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.knotline .knot { stroke: #fff; }
.knotline .line { stroke: var(--blush); }
@media (max-width: 700px) { .hero.untangle { padding-bottom: 24vh; } .knotline { height: 26%; } }
@media (max-width: 520px) { .bar .name { font-size: 0; gap: 0; } .bar ul { gap: 1rem; } }
/* condensed hero */
.hero.untangle { min-height: 0; padding: 8.5rem var(--gutter) 8.5rem; }
.hero.untangle h1 { font-size: clamp(2.3rem, 4.8vw, 4.3rem); max-width: 16em; }
.hero.untangle .sub { margin-top: 1rem; }
.hero.untangle .knotline { bottom: 1.5rem; height: 90px; }
@media (max-width: 700px) { .hero.untangle { padding: 7rem var(--gutter) 7rem; } .hero.untangle .knotline { height: 60px; } }
.hero.untangle { padding-bottom: 11rem; }
.hero.untangle .knotline { bottom: .5rem; height: 160px; }
.work { padding-top: 4rem; }
@media (max-width: 700px) { .hero.untangle { padding-bottom: 8rem; } .hero.untangle .knotline { height: 100px; } }
/* endless thread */
.knotline .base, .knotline .glow { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.knotline .base { stroke: rgba(255,255,255,.28); stroke-width: 2.5; }
.knotline .glow { stroke: #fff; stroke-width: 3.5; }
@media (prefers-reduced-motion: reduce) { .knotline .glow { stroke: rgba(255,255,255,.85); } }
/* hero: text left, line art right */
.hero.untangle { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 2rem; padding: 8rem var(--gutter) 5.5rem; overflow: hidden; }
.hero.untangle .knotline { position: relative; inset: auto; bottom: auto; width: 100%; height: auto; overflow: visible; }
.hero.untangle .knotline .base { stroke-width: 2.5; }
.hero.untangle .knotline .glow { stroke-width: 4; }
@media (max-width: 800px) { .hero.untangle { grid-template-columns: 1fr; padding: 7rem var(--gutter) 3rem; } .hero.untangle .knotline { height: auto; max-height: 220px; } }

/* ---------- v7: game opening scene ---------- */
.px { font-family: "Pixelify Sans", var(--body); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.world { position: relative; height: min(86vh, 740px); min-height: 580px; overflow: hidden; background: linear-gradient(#2c0d22 0%, #4b0f2a 55%, #6b1d3d 100%); color: #fff; }
.world .land { position: absolute; inset: auto 0 0 0; width: 100%; height: 78%; }
.world .moon { position: absolute; right: 12%; top: 15%; width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff3e6, #ecd0db 70%); box-shadow: 0 0 80px 20px rgba(236,208,219,.22); }
.flies i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #ffd27a; box-shadow: 0 0 10px 3px rgba(255,210,122,.7); animation: drift 9s ease-in-out infinite; }
@keyframes drift { 0%,100% { transform: translate(0,0); opacity: .2; } 50% { transform: translate(var(--dx), var(--dy)); opacity: 1; } }
.skip-intro { position: absolute; z-index: 6; right: var(--gutter); top: 4.6rem; color: var(--blush); font-size: .95rem; }
.fox { position: absolute; left: 62%; bottom: 40%; width: min(190px, 22vw); padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); transition: transform .2s; }
.fox:hover { transform: translateY(-4px); }
.zzz { position: absolute; left: calc(62% + min(150px, 17vw)); bottom: calc(40% + min(150px, 17vw)); font-size: 22px; font-weight: 700; color: var(--blush); animation: zz 2.4s ease-in-out infinite; }
@keyframes zz { 0% { opacity: 0; transform: translate(0,0); } 50% { opacity: 1; } 100% { opacity: 0; transform: translate(14px,-26px); } }
.awake .zzz { display: none; }
.knotwrap { position: absolute; left: 6%; bottom: 36%; width: min(56vw, 720px); z-index: 3; }
.knotwrap[hidden] { display: none; }
.knot { width: 100%; height: auto; overflow: visible; touch-action: none; }
.kbase { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; }
.kend { fill: #ffd27a; stroke: #fff; stroke-width: 3; cursor: grab; filter: drop-shadow(0 0 8px rgba(255,210,122,.9)); }
.kend:active { cursor: grabbing; }
.solved .kbase { stroke: #ffd27a; }
.dlg { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); width: min(880px, calc(100% - 32px)); z-index: 4; background: #fff7ef; color: #2a1020; border: 4px solid #2a1020; border-radius: 14px; box-shadow: 0 0 0 4px #fff7ef, 0 0 0 8px #2a1020, 0 18px 40px rgba(0,0,0,.45); padding: 1.1rem 1.3rem 1rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.dlg .who { width: 86px; height: 86px; border-radius: 10px; background: #f3d9c4; border: 3px solid #2a1020; display: grid; place-items: center; overflow: hidden; }
.dlg .who img { width: 120%; max-width: none; transform: translate(-6%, 8%); }
.dlg .who img.logo { width: 62%; transform: none; }
.speaker { display: inline-block; background: var(--wine); color: #fff; padding: .1rem .7rem; border-radius: 6px; font-size: 1rem; margin-bottom: .4rem; }
.line { font-size: clamp(1.1rem, 1.8vw, 1.45rem); line-height: 1.35; font-weight: 700; min-height: 2.7em; margin: 0; cursor: pointer; }
.line .more { display: inline-block; margin-left: .3rem; color: var(--wine); animation: bob 1s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.choices button { font: 700 1rem var(--body); background: #fff; border: 3px solid #2a1020; border-radius: 8px; padding: .5rem .9rem; cursor: pointer; color: #2a1020; min-height: 44px; }
.choices button::before { content: "\25B8  "; color: var(--wine); }
.choices button:hover, .choices button:focus-visible { background: var(--wine); color: #fff; outline: none; }
.choices button:hover::before, .choices button:focus-visible::before { color: #fff; }
@media (max-width: 800px) {
  .world { height: auto; min-height: 640px; }
  .dlg { grid-template-columns: 1fr; } .dlg .who { display: none; }
  .fox { left: 56%; bottom: 52%; width: 130px; } .zzz { display: none; }
  .knotwrap { left: 4%; width: 92%; bottom: 46%; }
}
@media (prefers-reduced-motion: reduce) { .flies i, .zzz, .line .more { animation: none; } }

/* quest log cards */
.work { background: #fff7ef; }
.work .section-title .aka { font-size: .5em; color: var(--grey); font-weight: 500; letter-spacing: 0; }
.card a { background: #fff; border: 3px solid #2a1020; border-radius: 12px; overflow: hidden; box-shadow: 4px 4px 0 #2a1020; transition: transform .15s, box-shadow .15s; height: 100%; }
.card a:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #2a1020; }
.card .thumb { border: 0; border-bottom: 3px solid #2a1020; }
.card .qb { padding: .8rem 1rem 1rem; }
.card .qs { display: flex; justify-content: space-between; margin: 0; font-size: .9rem; color: var(--wine); }
.card .qs .st { color: #8a6a00; } .card .qs .st.done { color: #2f6b3a; }
.card h3 { margin-top: .25rem; }
.card .hi { color: #2a1020; }
.card .hi b { color: var(--wine); }
.chip[aria-pressed="true"] { box-shadow: 2px 2px 0 #2a1020; }
.school { background: #f6ece6; }
.school a { border: 3px solid #2a1020; border-radius: 12px; box-shadow: 4px 4px 0 #2a1020; }
@media (min-width: 1200px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.speaker.narr { background: #8a7580; }
.fox img { width: 100%; height: auto; }
.standing .fox { animation: trot .45s ease-in-out infinite; }
@keyframes trot { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .standing .fox { animation: none; } }

/* v8: character sheet, playstyle, cutscenes, save point */
.cs { background: #fff7ef; padding-block: clamp(4rem, 9vw, 7rem); }
.sheet { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: 2rem; align-items: start; }
.portrait { border: 3px solid #2a1020; box-shadow: 4px 4px 0 #2a1020; background: var(--wine); }
.portrait img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; border-bottom: 3px solid #2a1020; }
.plate { color: var(--white); padding: 1rem 1.2rem; display: grid; gap: .1rem; }
.plate b { font-size: 1.35rem; letter-spacing: -.02em; }
.plate span { color: var(--blush); font-size: 1rem; }
.panel { border: 3px solid #2a1020; box-shadow: 4px 4px 0 #2a1020; background: var(--white); min-height: 100%; }
.tabs { display: flex; flex-wrap: wrap; border-bottom: 3px solid #2a1020; }
.tabs button { font: inherit; font-size: 1rem; background: transparent; border: 0; border-right: 3px solid #2a1020; padding: .8rem 1.2rem; cursor: pointer; color: #2a1020; }
.tabs button[aria-selected="true"] { background: var(--wine); color: var(--white); }
.tabs button:hover:not([aria-selected="true"]) { background: var(--blush); }
.tabs button:focus-visible { outline: 3px solid #f0a24a; outline-offset: -6px; }
.tp { padding: clamp(1.25rem, 3vw, 2.25rem); max-width: 40em; }
.tp h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.tp p { margin: 0 0 1rem; }
.tp .facts { margin: 0; display: grid; gap: 1.1rem; }
.tp .facts div { display: block; border: 0; padding: 0; }
.tp .facts dt { font-weight: 700; }
.tp .facts dd { margin: .15rem 0 0; color: var(--grey); }
.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.perks li { border: 2px solid var(--blush); padding: 1.1rem 1.2rem; }
.save { position: relative; display: grid; justify-items: center; text-align: center; padding-top: clamp(4rem, 8vw, 6rem); }
.camp { display: flex; align-items: flex-end; gap: .5rem; margin-bottom: -1.2rem; position: relative; z-index: 1; }
.camp .sleepfox { width: clamp(120px, 14vw, 170px); }
.camp .fire { width: 58px; filter: drop-shadow(0 0 18px rgba(240,162,74,.7)); }
.fire .f1, .fire .f2 { transform-origin: 40px 80px; animation: flick 1.1s ease-in-out infinite alternate; }
.fire .f2 { animation-duration: .8s; }
@keyframes flick { to { transform: scale(.92, 1.06) skewX(3deg); } }
.save-dlg { position: relative; inset: auto; transform: none; max-width: 44rem; width: 100%; display: block; text-align: left; padding: 1.8rem clamp(1.25rem, 3vw, 2.25rem); }
.save-dlg h2 { font-size: clamp(2rem, 4vw, 3rem); margin: .8rem 0 .4rem; color: #2a1020; }
.save-dlg p { color: var(--grey); font-size: 1.15rem; margin: 0; }
.save-dlg .email { color: var(--wine); font-size: clamp(1.5rem, 4.4vw, 2.6rem); margin: 1rem 0 1.2rem; }
.save-dlg .links { color: #2a1020; }
.save small { margin-top: 3rem; color: var(--blush); }
@media (max-width: 760px) { .sheet { grid-template-columns: 1fr; } .portrait { max-width: 320px; } }
@media (prefers-reduced-motion: reduce) { .fire .f1, .fire .f2 { animation: none; } }
.section-title .aka { font-size: .45em; font-weight: 500; letter-spacing: 0; color: var(--grey); }
.dark .section-title .aka, .art .section-title .aka { color: var(--blush); }
.panel { min-height: 0; align-self: stretch; }
.camp { margin-bottom: -6px; }
.camp .fire { width: 84px; margin-bottom: 4px; }
.save { background: linear-gradient(#1c0716, #000 70%); }
.save-dlg { min-height: 0; }
.how.perks { gap: 1rem; column-gap: 1rem; max-width: none; border: 0; }
.how.perks li { margin: 0; border: 2px solid var(--blush); border-radius: 0; padding: 1.1rem 1.2rem; }
#how .how.perks { gap: 1rem; }
.save-dlg .links { margin: 0; } .save-dlg { padding-bottom: 1.6rem; }

/* v9: expanded character sheet */
.sheet2 { display: grid; grid-template-columns: minmax(220px, 300px) 1fr 1fr; grid-template-areas: "pic intro intro" "pic story story" "traits traits gear"; gap: clamp(1rem, 2vw, 1.5rem); margin-top: 2rem; }
.sheet2 .portrait { grid-area: pic; align-self: start; }
.sheet2 .intro { grid-area: intro; } .sheet2 .story { grid-area: story; } .sheet2 .traits { grid-area: traits; } .sheet2 .gear { grid-area: gear; }
.box { border: 3px solid #2a1020; box-shadow: 4px 4px 0 #2a1020; background: var(--white); padding: clamp(1.1rem, 2.4vw, 1.8rem); }
.box .lbl { display: inline-block; background: var(--wine); color: var(--white); font-size: .9rem; padding: .1rem .55rem; margin: 0 0 .9rem; border-radius: 3px; }
.intro h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: .8rem; }
.intro p:not(.lbl) { margin: 0 0 .8rem; max-width: 38em; }
.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.path::before { content: ""; position: absolute; left: 9px; right: 9px; top: 8px; border-top: 3px dashed #c9a6b5; }
.path li { position: relative; padding: 1.8rem .8rem 0 0; font-size: .98rem; line-height: 1.4; }
.path li::before { content: ""; position: absolute; left: 0; top: 0; width: 13px; height: 13px; border: 3px solid #2a1020; background: var(--blush); border-radius: 50%; }
.path li.now::before { background: #f0a24a; box-shadow: 0 0 0 5px rgba(240,162,74,.3); }
.path b { display: block; color: var(--wine); }
.path span { color: var(--grey); }
.traits ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.4rem; }
.traits li { border-left: 4px solid var(--wine); padding-left: .8rem; }
.traits b { display: block; } .traits span { color: var(--grey); font-size: 1rem; line-height: 1.45; display: block; }
.slots { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.slots li { border: 2px solid #2a1020; background: #fff7ef; display: grid; justify-items: center; gap: .3rem; padding: .7rem .3rem .55rem; text-align: center; font-size: .85rem; line-height: 1.2; }
.slots svg { width: 30px; height: 30px; color: var(--wine); }
.slots li:hover { background: var(--blush); }
.gear .note { margin: 0; color: var(--grey); font-size: 1rem; }
@media (max-width: 1000px) { .sheet2 { grid-template-columns: 1fr 1fr; grid-template-areas: "pic intro" "story story" "traits traits" "gear gear"; } }
@media (max-width: 680px) {
  .sheet2 { grid-template-columns: 1fr; grid-template-areas: "pic" "intro" "story" "traits" "gear"; }
  .sheet2 .portrait { max-width: 300px; }
  .path { grid-template-columns: 1fr; } .path::before { top: 9px; bottom: 9px; left: 6px; right: auto; border-top: 0; border-left: 3px dashed #c9a6b5; }
  .path li { padding: 0 0 1.1rem 2rem; } .traits ul { grid-template-columns: 1fr; }
}
.sheet2 .traits { display: flex; flex-direction: column; }
.traits ul { flex: 1; grid-auto-rows: 1fr; }
.traits li { border: 2px solid #2a1020; border-left-width: 6px; border-left-color: var(--wine); background: #fff7ef; padding: 1rem 1.1rem; display: flex; flex-direction: column; justify-content: center; }
.traits b { font-size: 1.15rem; margin-bottom: .25rem; }
.sheet2 .traits .lbl { align-self: flex-start; }

/* v10: condensed character sheet */
.sheet3 { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: clamp(1rem, 2.5vw, 2rem); margin-top: 2rem; align-items: start; }
.sheet3 .plate span { font-size: .95rem; }
.stats { border: 3px solid #2a1020; box-shadow: 4px 4px 0 #2a1020; background: var(--white); }
.stats .row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; align-items: start; padding: 1.1rem clamp(1rem, 2.4vw, 1.6rem); }
.stats .row + .row { border-top: 2px dashed #e2c9d3; }
.stats .lbl { margin: .15rem 0 0; justify-self: start; display: inline-block; background: var(--wine); color: var(--white); font-size: .85rem; padding: .1rem .5rem; border-radius: 3px; }
.stats .cls { margin: 0; max-width: 40em; }
.tr { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .45rem 1.4rem; font-size: 1rem; line-height: 1.4; color: var(--grey); }
.tr b { color: #2a1020; }
.stats .path { grid-template-columns: repeat(4, 1fr); }
.stats .path li { padding: 1.5rem .6rem 0 0; font-size: .95rem; color: var(--grey); }
.stats .path b { display: block; color: var(--wine); }
.stats .slots { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.stats .slots li { width: 4.6rem; padding: .45rem .2rem .35rem; font-size: .72rem; gap: .2rem; }
.stats .slots svg { width: 22px; height: 22px; }
.stats .slots li.sep { width: 0; padding: 0; border: 0; border-left: 2px dashed #c9a6b5; background: none; margin: 0 .3rem; }
@media (max-width: 760px) {
  .sheet3 { grid-template-columns: 1fr; } .sheet3 .portrait { max-width: 260px; }
  .stats .row { grid-template-columns: 1fr; gap: .5rem; } .tr { grid-template-columns: 1fr; }
  .stats .path { grid-template-columns: 1fr 1fr; row-gap: .8rem; } .stats .path::before { display: none; }
}
.stats .row { grid-template-columns: 6.5rem 1fr; }
@media (max-width: 760px) {
  .stats .row { grid-template-columns: 1fr; gap: .6rem; }
  .sheet3 .portrait { max-width: 200px; }
  .stats .slots li { width: calc((100% - 1.2rem) / 4); }
  .stats .slots li.sep { display: none; }
}

/* v11: character creator */
.creator { margin-top: 2rem; display: grid; grid-template-columns: 1fr minmax(260px, 340px); background: #2c0d22; color: var(--white); border: 3px solid #2a1020; box-shadow: 6px 6px 0 #2a1020; border-radius: 6px; overflow: hidden; }
.cc-bar { grid-column: 1 / -1; background: #1c0716; text-align: center; padding: .7rem; font-size: clamp(1.1rem, 2vw, 1.4rem); letter-spacing: .04em; color: var(--blush); }
.cc-opts { padding: clamp(1.25rem, 3vw, 2.25rem); display: grid; gap: .9rem; align-content: start; justify-items: center; }
.opt { width: 100%; max-width: 30rem; }
.ol { text-align: center; margin: 0 0 .3rem; font-size: .95rem; color: var(--blush); }
.oc { display: grid; grid-template-columns: 2.6rem 1fr 2.6rem; gap: .6rem; align-items: center; }
.arw { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 2px solid #2a1020; background: #f0a24a; color: #2a1020; font-size: .9rem; cursor: pointer; box-shadow: 0 3px 0 #a8622a; }
.arw:hover { background: #ffb867; } .arw:active { transform: translateY(2px); box-shadow: 0 1px 0 #a8622a; }
.arw:focus-visible, .rot:focus-visible, .play:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.val { display: block; text-align: center; background: #fff7ef; color: #2a1020; border: 2px solid #2a1020; border-radius: 999px; padding: .5rem 1rem; font-weight: 700; font-size: 1rem; box-shadow: 0 3px 0 #b08a9a; }
.cc-info { width: 100%; max-width: 30rem; min-height: 3.6em; margin: .6rem 0 0; background: #fff7ef; color: #2a1020; border: 3px solid #2a1020; outline: 2px solid #fff7ef; padding: .8rem 1rem; font-size: 1rem; line-height: 1.45; border-radius: 4px; }
.cc-side { background: var(--wine); padding: clamp(1.25rem, 3vw, 2rem); display: grid; justify-items: center; align-content: start; gap: .9rem; }
.stage { position: relative; width: 100%; aspect-ratio: 4 / 5; max-height: 360px; background: radial-gradient(circle at 50% 40%, #6b2448, #3a0f28 70%); border: 3px solid #2a1020; border-radius: 10px; display: grid; place-items: center; }
.model { width: 48%; transition: transform .35s ease; animation: idle 2.4s ease-in-out infinite; z-index: 1; }
.model.flip { transform: scaleX(-1); }
.model svg, .model img { width: 100%; height: auto; display: block; }
@keyframes idle { 50% { translate: 0 -5px; } }
.stage .shadow { position: absolute; bottom: 9%; left: 50%; width: 40%; height: 10px; translate: -50% 0; background: rgba(0,0,0,.35); border-radius: 50%; }
.rot { position: absolute; top: 50%; translate: 0 -50%; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid #2a1020; background: #fff7ef; color: #2a1020; font-size: 1.1rem; cursor: pointer; z-index: 2; }
.rot.l { left: .6rem; } .rot.r { right: .6rem; }
.nm { margin: 0; text-align: center; color: var(--blush); font-size: .95rem; line-height: 1.35; } .nm b { display: block; color: var(--white); font-size: 1.25rem; }
.play { display: block; width: 100%; text-align: center; background: #f0a24a; color: #2a1020; border: 2px solid #2a1020; border-radius: 999px; padding: .6rem 1rem; text-decoration: none; font-size: 1.1rem; box-shadow: 0 4px 0 #a8622a; }
.play:hover { background: #ffb867; }
@media (max-width: 760px) { .creator { grid-template-columns: 1fr; } .cc-side { order: -1; } .stage { max-width: 260px; } }
@media (prefers-reduced-motion: reduce) { .model { animation: none; transition: none; } }
@media (max-width: 760px) { .cc-bar { order: -2; } }

/* v12: everything visible */
.creator { grid-template-columns: 1fr minmax(240px, 320px); }
.cc-opts { justify-items: stretch; gap: 1.3rem; }
.grp .ol { text-align: left; margin: 0 0 .5rem; }
.cls { margin: 0; background: #fff7ef; color: #2a1020; border: 3px solid #2a1020; outline: 2px solid #fff7ef; border-radius: 4px; padding: .9rem 1.1rem; font-size: 1.05rem; line-height: 1.5; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.tiles li { background: #45142f; border: 2px solid #6b2448; border-radius: 6px; padding: .7rem .8rem; line-height: 1.35; }
.tiles b { display: block; color: #ffd39c; font-size: 1rem; margin-bottom: .15rem; }
.tiles span { color: var(--blush); font-size: .9rem; }
.row2 { display: grid; grid-template-columns: 4fr 3fr; gap: 1.2rem; }
.creator .slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr)); gap: .5rem; }
.creator .slots li { background: #45142f; border: 2px solid #6b2448; border-radius: 6px; display: grid; justify-items: center; gap: .3rem; padding: .6rem .2rem .45rem; font-size: .8rem; color: var(--blush); text-align: center; }
.creator .slots svg { width: 26px; height: 26px; color: #ffd39c; }
.cc-side { justify-content: center; }
@media (max-width: 1100px) { .tiles { grid-template-columns: 1fr 1fr; } .tiles.three { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 760px) { .tiles, .tiles.three, .row2 { grid-template-columns: 1fr; } .creator .slots { grid-template-columns: repeat(4, 1fr); } }
.row2 > div:first-child .slots { grid-template-columns: repeat(4, 1fr); }
.row2 > div:last-child .slots { grid-template-columns: repeat(3, 1fr); }

/* v13: inspectable items */
.cc-opts { gap: 1.1rem; }
.cc-opts .cls { padding: .8rem 1rem; }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.it { font: inherit; font-size: .95rem; cursor: pointer; background: #45142f; color: var(--blush); border: 2px solid #6b2448; border-radius: 6px; padding: .45rem .85rem; display: flex; align-items: center; gap: .45rem; }
.it svg { width: 20px; height: 20px; color: #ffd39c; }
.it:hover { border-color: #ffd39c; color: var(--white); }
.it[aria-pressed="true"] { background: #ffd39c; color: #2a1020; border-color: #2a1020; box-shadow: 0 0 0 2px #ffd39c; }
.it[aria-pressed="true"] svg { color: #2a1020; }
.it:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.row2 { grid-template-columns: auto auto; justify-content: start; gap: 2rem; }
.cc-info { max-width: none; min-height: 0; margin: .2rem 0 0; display: flex; gap: .7rem; align-items: baseline; }
.cc-info .hint { flex: none; background: var(--wine); color: var(--white); font-size: .8rem; padding: .05rem .5rem; border-radius: 3px; }
.equip { position: absolute; right: 18%; bottom: 14%; width: 3rem; height: 3rem; border-radius: 50%; background: #fff7ef; border: 2px solid #2a1020; display: grid; place-items: center; opacity: 0; scale: .5; transition: opacity .2s, scale .2s; z-index: 1; }
.equip svg { width: 60%; height: 60%; color: var(--wine); }
.equip.on { opacity: 1; scale: 1; }
.equip.on.pop { animation: pop .35s ease; }
@keyframes pop { 40% { scale: 1.25; } }
@media (max-width: 760px) { .row2 { grid-template-columns: 1fr; gap: 1.1rem; } }
@media (prefers-reduced-motion: reduce) { .equip.on.pop { animation: none; } }

/* v14: arrows + equip + read toggle */
.cc-bar { display: flex; justify-content: center; align-items: center; position: relative; }
.readtog { position: absolute; right: .8rem; font: inherit; font-size: .9rem; background: transparent; color: var(--blush); border: 2px solid #6b2448; border-radius: 999px; padding: .25rem .8rem; cursor: pointer; }
.readtog:hover { border-color: var(--blush); color: var(--white); }
.readtog:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.cc-opts { justify-items: center; gap: .9rem; }
.cc-info { max-width: 30rem; min-height: 3.6em; display: block; }
.cc-read { padding: clamp(1.25rem, 3vw, 2.25rem); color: var(--blush); }
.cc-read p { margin: 0 0 1.2rem; color: var(--white); font-size: 1.1rem; max-width: 36em; }
.cc-read dl { margin: 0; display: grid; gap: .8rem; }
.cc-read dl div { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; }
.cc-read dt { color: #ffd39c; font-weight: 700; } .cc-read dd { margin: 0; }
.equip { opacity: 1; scale: 1; }
.equip:empty { opacity: 0; }
.equip.g { right: 14%; bottom: 30%; }
.equip.p { left: 12%; right: auto; bottom: 11%; width: 3.4rem; height: 3.4rem; }
@media (max-width: 760px) {
  .readtog { position: static; margin-left: auto; }
  .cc-bar { justify-content: space-between; padding-inline: 1rem; }
  .stage { max-width: 220px; }
  .cc-read dl div { grid-template-columns: 1fr; gap: .1rem; }
}
.creator [hidden] { display: none !important; } .cc-read { grid-column: 1; grid-row: 2; }
@media (max-width: 760px) {
  .creator { grid-template-columns: 1fr; }
  .cc-bar { grid-row: 1; } .cc-side { grid-row: 2; order: 0; } .cc-opts, .cc-read { grid-row: 3; grid-column: 1; }
  .cc-side .stage { width: 100%; max-width: 230px; }
}

/* v15: per-row descriptions */
.cc-opts { gap: 1.1rem; }
.od { margin: .45rem auto 0; max-width: 24rem; text-align: center; font-size: .92rem; line-height: 1.4; color: var(--blush); min-height: 2.6em; }
.equip.m { right: auto; left: 50%; translate: -50% 0; top: 9%; bottom: auto; width: 2.6rem; height: 2.6rem; }
.equip:not(:empty) { animation: float 3s ease-in-out infinite; }
.equip.p:not(:empty) { animation-delay: -1s; } .equip.m:not(:empty) { animation-delay: -2s; }
@keyframes float { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .equip:not(:empty) { animation: none; } }

/* v16: ember accent (the fox's orange) for anything you can play with */
:root { --ember: #f0a24a; --ember-hi: #ffb867; --ember-deep: #a8622a; }
.choices button::before { color: var(--ember-deep); }
.choices button:hover, .choices button:focus-visible { background: var(--ember); color: #2a1020; box-shadow: 0 3px 0 var(--ember-deep); }
.choices button:hover::before, .choices button:focus-visible::before { color: #2a1020; }
.kend { fill: var(--ember-hi); filter: drop-shadow(0 0 8px rgba(240,162,74,.9)); }
.chip[aria-pressed="true"] { background: var(--ember); border-color: #2a1020; color: #2a1020; box-shadow: 0 3px 0 var(--ember-deep); }
.chip:hover { border-color: var(--ember-deep); }
.card a:hover { box-shadow: 6px 6px 0 var(--ember); }
.doodle .dot circle { fill: var(--ember); stroke: #fff; }
.save-dlg .email:hover { color: var(--ember-deep); }
a:focus-visible, button:focus-visible { outline-color: var(--ember); }
.arw, .play { background: var(--ember); box-shadow: 0 3px 0 var(--ember-deep); }
.arw:hover, .play:hover { background: var(--ember-hi); }

/* v17: playstyle level map */
.map { position: relative; margin: 3rem 0 1rem; --dip: 5rem; }
.trail { position: absolute; left: 0; right: 0; top: 9px; width: 100%; height: var(--dip); overflow: visible; z-index: 0; }
.trail path { fill: none; stroke: var(--blush); stroke-width: 3; stroke-dasharray: 2 10; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.levels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; z-index: 1; }
.levels li { display: grid; justify-items: center; text-align: center; padding: 0 .6rem; align-content: start; }
.levels li:nth-child(even) { margin-top: var(--dip); }
.node { width: 18px; height: 18px; border-radius: 50%; background: var(--ember); border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(240,162,74,.25); }
.levels li:last-child .node { background: #fff; border-color: var(--ember); }
.lvl-ic { height: 52px; width: auto; margin: 1rem 0 .4rem; overflow: visible; }
.lvl-ic .ink path, .lvl-ic .ink circle { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.lvl-ic .ink .soft { stroke: var(--blush); stroke-width: 2; }
.levels .lv { margin: 0; font-size: .8rem; color: var(--ember); }
.levels h3 { font-size: 1.3rem; margin: .15rem 0 .35rem; color: #fff; }
.levels .ln { margin: 0; font-size: .95rem; line-height: 1.45; color: var(--blush); max-width: 15em; }
.loop { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: 2.5rem 0 0; color: var(--blush); }
.loop svg { width: 40px; height: 20px; fill: none; stroke: var(--ember); stroke-width: 2.4; stroke-linecap: round; }
@media (max-width: 1000px) {
  .trail { display: none; }
  .levels { grid-template-columns: 1fr; gap: 1.6rem; border-left: 3px dashed #6b2448; margin-left: 8px; }
  .levels li { grid-template-columns: auto 1fr; grid-template-areas: "ic lv" "ic h" "ic ln"; justify-items: start; text-align: left; column-gap: 1rem; padding: 0 0 0 1.4rem; position: relative; }
  .levels li:nth-child(even) { margin-top: 0; }
  .node { position: absolute; left: -11px; top: .3rem; }
  .lvl-ic { grid-area: ic; height: 40px; margin: 0; width: 48px; }
  .levels .lv { grid-area: lv; } .levels h3 { grid-area: h; } .levels .ln { grid-area: ln; max-width: 30em; }
  .loop { justify-content: flex-start; }
}
.levels li { border-top: 0; padding-top: 0; padding-bottom: 0; }
.loopback { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: 2.5rem 0 0; color: var(--blush); }
.loopback svg { width: 40px; height: 20px; fill: none; stroke: var(--ember); stroke-width: 2.4; stroke-linecap: round; }
@media (max-width: 1000px) { .levels li { padding: 0 0 0 1.4rem; } .loopback { justify-content: flex-start; } }

/* v18: level select */
.lvb { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: grid; justify-items: center; }
.lvb .lv { margin: 0; font-size: .8rem; color: var(--ember); }
.lvb .h { font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; margin: .15rem 0 .35rem; color: #fff; }
.lvb:hover .h { text-decoration: underline; text-underline-offset: .2em; text-decoration-color: var(--ember); }
.lvb:focus-visible { outline: 3px solid var(--ember); outline-offset: 6px; border-radius: 8px; }
.lvb[aria-pressed="true"] .node { background: #fff; border-color: var(--ember); box-shadow: 0 0 0 6px rgba(240,162,74,.45); }
.lvb[aria-pressed="true"] .h { color: var(--ember); }
.levels li:last-child .node { background: var(--ember); border-color: #fff; }
.levels .ln { display: none; }
.avatar { position: absolute; left: 0; top: 0; width: 30px; height: 45px; margin: -46px 0 0 -15px; z-index: 3; pointer-events: none; will-change: transform; }
.avatar svg { width: 100%; height: 100%; display: block; animation: idle 1.6s ease-in-out infinite; filter: drop-shadow(0 3px 0 rgba(0,0,0,.4)); }
.avatar.walk svg { animation: hop .22s ease-in-out infinite; }
.avatar.left svg { scale: -1 1; }
@keyframes hop { 50% { translate: 0 -5px; } }
.lvbanner { margin: 2.2rem auto 0; max-width: 40rem; background: #fff7ef; color: #2a1020; border: 3px solid #2a1020; outline: 2px solid #fff7ef; border-radius: 6px; padding: .8rem 1.1rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; }
.lvbanner .px { background: var(--wine); color: #fff; font-size: .8rem; padding: .05rem .5rem; border-radius: 3px; }
.lvbanner b { font-size: 1.15rem; }
.lvbanner #lvText { flex-basis: 100%; color: var(--grey); }
.loopback { margin-top: 1.4rem; }
@media (max-width: 1000px) {
  .lvb { grid-template-columns: auto 1fr; grid-template-areas: "ic lv" "ic h"; justify-items: start; text-align: left; column-gap: 1rem; }
  .lvb .lvl-ic { grid-area: ic; } .lvb .lv { grid-area: lv; } .lvb .h { grid-area: h; margin-bottom: 0; }
  .levels .ln { display: block; margin-top: .2rem; }
  .levels li { display: block; }
  .avatar { margin: -40px 0 0 -15px; transition: transform .35s ease; }
  .lvbanner { display: none; }
}
@media (prefers-reduced-motion: reduce) { .avatar svg, .avatar.walk svg { animation: none; } .avatar { transition: none; } }
.avatar { width: 38px; height: 57px; margin: -58px 0 0 -19px; }
@media (max-width: 1000px) {
  .levels .ln { margin-left: calc(48px + 1rem); }
  .avatar { width: 26px; height: 39px; margin: -20px 0 0 -44px; }
}
@media (max-width: 1000px) { .avatar { display: none; } }

/* v19: overworld map */
.how-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.omap { margin-top: 2rem; }
.omap [hidden] { display: none !important; }
.omap-play { display: grid; grid-template-columns: 1fr minmax(240px, 320px); gap: 1.5rem; align-items: start; }
.world-map { width: 100%; height: auto; display: block; }
.paper { fill: #2c0d22; stroke: #6b2448; stroke-width: 3; }
.world-map .ink path, .world-map .ink circle { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.world-map .ink .soft { stroke: var(--blush); stroke-width: 2; }
.world-map .deco path, .world-map .deco circle { stroke: #8a4a68; }
.world-map .deco .river { stroke: #b98aa0; stroke-width: 3; stroke-dasharray: 10 8; }
.world-map .nlbl { fill: #8a4a68; font: 700 16px var(--body); stroke: none; }
.road { fill: none; stroke: var(--blush); stroke-width: 3; stroke-dasharray: 2 10; stroke-linecap: round; }
.back { fill: none; stroke: var(--ember); stroke-width: 2.4; stroke-dasharray: 6 8; stroke-linecap: round; opacity: .7; }
.loc { cursor: pointer; outline: none; }
.loc text { fill: #fff; font: 700 22px var(--body); paint-order: stroke; stroke: #2c0d22; stroke-width: 6px; }
.loc .pin { fill: var(--ember); stroke: #fff; stroke-width: 3; }
.loc .star { fill: #ffd27a; stroke: #2a1020; stroke-width: 1.5; opacity: 0; transition: opacity .3s; }
.loc.seen .star { opacity: 1; }
.loc.here .pin { fill: #fff; stroke: var(--ember); stroke-width: 4; }
.loc.here text { fill: var(--ember); }
.loc:hover .ink path, .loc:hover .ink circle { stroke: var(--ember); }
.loc:focus-visible text { text-decoration: underline; fill: var(--ember); }
.loc:focus-visible .pin { stroke: var(--ember); stroke-width: 5; }
.traveler .bob { animation: tbob 1.6s ease-in-out infinite; }
.traveler.walk .bob { animation: thop .22s ease-in-out infinite; }
@keyframes tbob { 50% { transform: translateY(-3px); } }
@keyframes thop { 50% { transform: translateY(-6px); } }
.omap-card { background: #fff7ef; color: #2a1020; border: 3px solid #2a1020; outline: 2px solid #fff7ef; border-radius: 6px; padding: 1.1rem 1.2rem; }
.omap-card .where { display: inline-block; margin: 0 0 .6rem; background: var(--wine); color: #fff; font-size: .8rem; padding: .05rem .5rem; border-radius: 3px; }
.omap-card h3 { font-size: 1.5rem; margin: 0 0 .4rem; color: #2a1020; }
.omap-card p { margin: 0; color: var(--grey); font-size: 1rem; line-height: 1.5; }
.omap-card .explored { margin-top: 1rem; color: var(--ember-deep); font-size: .85rem; }
.omap.complete .omap-card { outline-color: var(--ember); }
.omap-read { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem 2rem; }
.omap-read li { border-left: 3px solid var(--ember); padding-left: 1rem; }
.omap-read b { display: block; color: #fff; font-size: 1.15rem; } .omap-read span { color: var(--blush); }
@media (max-width: 900px) { .omap-play { grid-template-columns: 1fr; } .loc text { font-size: 30px; } }
@media (prefers-reduced-motion: reduce) { .traveler .bob, .traveler.walk .bob { animation: none; } }
.how-head .readtog { position: static; }
.backlbl { fill: var(--ember); font: 500 15px var(--body); opacity: .85; }
.loc .hit { fill: transparent; }

/* v20: compact cutscenes */
.art { padding-block: clamp(3rem, 6vw, 4.5rem); }
.art-row { display: grid; grid-template-columns: minmax(0, 560px) 1fr; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; margin-top: 1.5rem; }
.art .film { margin: 0; max-width: 560px; }
.art .film video { width: 100%; display: block; border: 3px solid #2a1020; border-radius: 8px; }
.art .film figcaption { font-size: .95rem; margin-top: .6rem; color: var(--blush); }
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; align-content: start; }
.shelf a { display: block; aspect-ratio: 1; border: 3px solid #2a1020; border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 3px 3px 0 #2a1020; transition: transform .15s, box-shadow .15s; }
.shelf img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shelf a:hover, .shelf a:focus-visible { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ember); outline: none; }
.lightbox { border: 3px solid #2a1020; border-radius: 8px; padding: 0; max-width: min(92vw, 1100px); max-height: 90vh; background: #fff; overflow: visible; }
.lightbox::backdrop { background: rgba(28, 7, 22, .85); }
.lightbox img { display: block; max-width: min(92vw, 1100px); max-height: 86vh; width: auto; height: auto; }
.lb-close { position: absolute; top: -14px; right: -14px; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid #2a1020; background: var(--ember); color: #2a1020; font-size: 1.4rem; line-height: 1; cursor: pointer; }
@media (max-width: 860px) { .art-row { grid-template-columns: 1fr; } .shelf { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-reduced-motion: reduce) { .shelf a { transition: none; } }
@media (min-width: 861px) { .shelf { grid-template-columns: repeat(4, 112px); } }
.art-row { grid-template-columns: minmax(0, 600px) 1fr; }
.art .film { max-width: 600px; }
@media (min-width: 861px) { .shelf { grid-template-columns: repeat(4, minmax(0, 160px)); gap: .8rem; } }
@media (min-width: 861px) and (max-width: 1200px) { .shelf { grid-template-columns: repeat(3, minmax(0, 150px)); } }
.dlg.narrator .who, .dlg.narrator .speaker { display: none; }
.dlg.narrator { grid-template-columns: 1fr; }
.dlg.narrator .line { margin-top: 0; }
.world:not(.awake) .fox { cursor: pointer; }
.p1 { margin: 0; display: flex; align-items: center; gap: .7rem; color: var(--blush); font-size: 1rem; }
.namefield { background: #fff7ef; color: #2a1020; border: 2px solid #2a1020; outline: 2px solid #6b2448; border-radius: 4px; padding: .15rem .7rem; letter-spacing: .12em; font-size: 1.15rem; display: inline-flex; align-items: center; }
.namefield i { display: inline-block; width: .55em; height: 2px; margin-left: .15em; background: var(--ember-deep); align-self: flex-end; margin-bottom: .3em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .namefield i { animation: none; } }

/* v21: real chibi + item art */
.model { width: 62%; animation: none; }
.model img { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 0 rgba(0,0,0,.25)); }
.equip, .equip:empty { background: none; border: 0; border-radius: 0; opacity: 1; scale: 1; width: auto; height: auto; display: block; }
.equip img { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 0 rgba(0,0,0,.3)); }
.equip.g { width: 22%; right: 6%; bottom: 34%; left: auto; top: auto; translate: none; }
.equip.m { width: 18%; left: 8%; top: 8%; right: auto; bottom: auto; translate: none; }
.equip.p { width: 34%; left: 2%; bottom: 4%; right: auto; top: auto; z-index: 2; }
.stage .shadow { bottom: 6%; }
.rot { top: auto; bottom: .6rem; translate: none; }
.equip.p { width: 28%; left: 4%; bottom: 9%; }
.equip.g { width: 20%; right: 5%; bottom: 42%; }
.equip.m { width: 17%; left: 7%; top: 7%; }
.rot.l { left: auto; right: 3.4rem; } .rot.r { right: .6rem; } .rot { z-index: 3; }
@media (max-width: 860px) {
  .art-row { grid-template-columns: 1fr; }
  .art .film { max-width: none; }
  .shelf { grid-template-columns: repeat(4, 1fr); gap: .6rem; }
}
@media (max-width: 420px) { .shelf { grid-template-columns: repeat(3, 1fr); } }
