@font-face { font-family: "Young Serif"; src: url(/assets/fonts/young-serif-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url(/assets/fonts/schibsted-grotesk-latin-wght-normal.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  /* page: celery paper, forest ink, coral accent */
  --L-paper: #eaf0e6; --L-paper-2: #d5e1cf; --L-card: #fbfdf8; --L-ink: #12241b; --L-ink-soft: #435a4d;
  --L-henna: #b83a12; --L-henna-deep: #932c0b; --L-line: #b9cbb3; --L-f1: #c0821a; --L-f2: #8a5a2b; --L-f4: #12241b;
  /* band: the salon-green block behind header, hero, titles and footer */
  --B-bg: #163a2c; --B-card: #1f4a39; --B-ink: #f5f1e4; --B-soft: #c2d6c8; --B-accent: #ff8c5f; --B-line: #2f5c48;
  --honey: #f0a92e;
  --blush: #fde1d4;
  --sage: #dbe8d4;
  --paper: var(--L-paper); --paper-2: var(--L-paper-2); --card: var(--L-card); --ink: var(--L-ink); --ink-soft: var(--L-ink-soft);
  --henna: var(--L-henna); --henna-deep: var(--L-henna-deep); --line: var(--L-line);
  --f1: var(--L-f1); --f2: var(--L-f2); --f3: var(--L-henna); --f4: var(--L-f4);
  --display: "Young Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Schibsted Grotesk", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
.band, header.site, footer.site {
  --paper: var(--B-bg); --paper-2: var(--B-card); --card: var(--B-card); --ink: var(--B-ink); --ink-soft: var(--B-soft);
  --henna: var(--B-accent); --henna-deep: var(--B-accent); --line: var(--B-line);
  --f1: #f2b84f; --f2: #e6a57c; --f3: var(--B-accent); --f4: var(--B-ink);
  color: var(--ink);
}
#quiz {
  --paper: var(--L-paper); --paper-2: var(--L-paper-2); --card: var(--L-card); --ink: var(--L-ink); --ink-soft: var(--L-ink-soft);
  --henna: var(--L-henna); --henna-deep: var(--L-henna-deep); --line: var(--L-line);
  --f1: var(--L-f1); --f2: var(--L-f2); --f3: var(--L-henna); --f4: var(--L-f4);
  color: var(--ink);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.64 var(--sans); }
a { color: var(--henna-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s; }
a:hover { color: var(--henna); text-decoration-style: wavy; text-decoration-thickness: 1.5px; }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--ink); color: var(--paper); padding: 6px 10px; z-index: 30; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 16px; }

header.site { position: sticky; top: 0; z-index: 20; background: var(--B-bg); border-bottom: 1px solid var(--B-line); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 22px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 7px; font: 1.4rem/1 var(--display); color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand em { font-style: normal; color: var(--henna); }
.brand svg { width: 15px; height: 30px; overflow: visible; transform-origin: 50% 0; }
.brand path { fill: none; stroke: var(--henna); stroke-width: 3.2; stroke-linecap: round; }
.brand:hover svg { animation: wiggle .6s var(--ease); }
nav.top { display: flex; flex-wrap: wrap; gap: 2px 16px; }
nav.top a { font-size: .9rem; font-weight: 500; color: var(--ink-soft); text-decoration: none; padding: 4px 0; }
nav.top a:hover, nav.top a[aria-current] { color: var(--ink); text-decoration: underline wavy var(--henna) 1.5px; text-underline-offset: 6px; }
.readbar { position: absolute; left: 0; right: 0; bottom: -1.5px; height: 3px; background: var(--henna); transform-origin: 0 50%; transform: scaleX(0); }

main { padding: 0 0 64px; }
.band { position: relative; background: var(--B-bg) url(/assets/band.svg) 0 0 / 300px 300px; padding: 30px 0 46px; margin-bottom: 44px; }
.band::after { content: ""; position: absolute; left: 0; right: 0; bottom: -11px; height: 12px; background: var(--B-bg); -webkit-mask: url(/assets/wave.svg) repeat-x 0 0 / 40px 12px; mask: url(/assets/wave.svg) repeat-x 0 0 / 40px 12px; transform: scaleY(-1); }
.band h1 { margin-bottom: .25em; }
.band a { color: var(--B-soft); }
.band a:hover { color: var(--B-ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.14; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); margin: .1em 0 .35em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.8rem); margin: 1.9em 0 .5em; }
h3 { font-size: 1.2rem; margin: 1.5em 0 .35em; }
.lede { font-size: 1.14rem; line-height: 1.55; color: var(--ink-soft); max-width: 36rem; }
.crumbs { font-size: .85rem; color: var(--ink-soft); margin: 0 0 6px; }
.crumbs a { color: var(--ink-soft); }
.updated { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); border-top: 1.5px solid var(--ink); padding-top: 6px; margin: 0; }

.strand { overflow: visible; display: block; }
.strand path { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.f1 path { stroke: var(--f1); } .f2 path { stroke: var(--f2); } .f3 path { stroke: var(--f3); } .f4 path { stroke: var(--f4); }
.draw path { stroke-dashoffset: 1; animation: draw 1.4s var(--ease) forwards; }
.sway { transform-origin: 50% 0; animation: sway 5.5s ease-in-out infinite alternate; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px 56px; align-items: start; padding-top: 10px; }
.hero h1 { margin-top: .15em; }
.squig { position: relative; display: inline-block; color: var(--henna); }
.squig svg { position: absolute; left: 0; bottom: -.14em; width: 100%; height: .3em; overflow: visible; }
.squig path { fill: none; stroke: var(--honey); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s .35s var(--ease) forwards; }
.hero-art { display: flex; align-items: flex-start; gap: 30px; height: 220px; margin: 30px 0 0 6px; }
.hero-art .strand { width: 44px; height: 176px; }
.hero-art .strand path { stroke-width: 3.4; }
.hero-art .strand:nth-child(1) { animation-duration: 6.2s; }
.hero-art .strand:nth-child(2) { animation-duration: 4.8s; margin-top: 14px; }
.hero-art .strand:nth-child(3) { animation-duration: 5.6s; margin-top: 4px; }
.hero-art .strand:nth-child(4) { animation-duration: 4.3s; margin-top: 22px; }
.hero-art .strand:nth-child(2) path { animation-delay: .15s; } .hero-art .strand:nth-child(3) path { animation-delay: .3s; } .hero-art .strand:nth-child(4) path { animation-delay: .45s; }
.hero-art figcaption { align-self: flex-end; font-size: .78rem; color: var(--ink-soft); max-width: 9rem; line-height: 1.35; }

#quiz { position: relative; background: var(--card); border: 1.5px solid var(--ink); border-radius: 6px; box-shadow: 8px 8px 0 var(--honey), 8px 8px 0 1.5px var(--L-ink); padding: 22px 22px 24px; margin: 6px 0 34px; min-height: 380px; }
#quiz fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
#quiz legend { font: 1.36rem/1.28 var(--display); margin-bottom: 14px; padding: 0; }
.q-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.q-count { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin: 0; }
.q-count b { color: var(--henna); font-weight: 800; }
.q-keys { font-size: .74rem; color: var(--ink-soft); margin: 0; }
.q-wave { display: block; width: 100%; height: 14px; margin: 4px 0 16px; overflow: visible; }
.q-wave path { fill: none; stroke-width: 3; stroke-linecap: round; }
.q-wave .track { stroke: var(--paper-2); }
.q-wave .fill { stroke: var(--henna); stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .5s var(--ease); }
.q-hint { font-size: .92rem; color: var(--ink-soft); margin: -8px 0 14px; }
.enter { animation: qin .38s var(--ease) both; }
.enter .opt { animation: qin .42s var(--ease) both; }
.enter .opt:nth-of-type(2) { animation-delay: .04s; } .enter .opt:nth-of-type(3) { animation-delay: .08s; } .enter .opt:nth-of-type(4) { animation-delay: .12s; } .enter .opt:nth-of-type(5) { animation-delay: .16s; } .enter .opt:nth-of-type(6) { animation-delay: .2s; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; font-size: 1rem; line-height: 1.35; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 4px; padding: 10px 13px; margin: 0 0 9px; cursor: pointer; transition: transform .18s var(--ease), border-color .15s, background .15s, box-shadow .18s var(--ease); }
.opt kbd { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; font: 700 .8rem/1 var(--sans); color: var(--ink-soft); border: 1.5px solid var(--line); border-radius: 3px; background: var(--card); transition: background .15s, border-color .15s, color .15s; }
.opt:hover { border-color: var(--ink); background: var(--card); transform: translateX(4px); box-shadow: -4px 0 0 var(--henna); }
.opt:hover kbd { border-color: var(--ink); color: var(--ink); }
.opt.picked, .opt.chosen { border-color: var(--henna); background: var(--blush); }
.opt.picked kbd, .opt.chosen kbd { background: var(--henna); border-color: var(--henna); color: var(--card); }
.opt.chosen { animation: pop .2s var(--ease); }
.link-btn { font: inherit; font-size: .92rem; font-weight: 500; background: none; border: 0; padding: 4px 0; color: var(--henna-deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; margin-top: 6px; }
.link-btn:hover { text-decoration-style: wavy; }
.result:focus { outline: none; }
.result-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; animation: qin .45s var(--ease) both; }
.result-head h2 { margin: .15em 0 .3em; font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
.result-head .strand { width: 48px; height: 150px; margin-right: 6px; }
.result-head .strand path { stroke-width: 3.6; }
.result h3 { margin-top: 1.3em; }
.routine { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.routine li { counter-increment: step; position: relative; padding: 0 0 14px 46px; margin: 0 0 12px; border-bottom: 1px dashed var(--line); animation: qin .45s var(--ease) both; }
.routine li:nth-child(2) { animation-delay: .06s; } .routine li:nth-child(3) { animation-delay: .12s; } .routine li:nth-child(4) { animation-delay: .18s; } .routine li:nth-child(5) { animation-delay: .24s; } .routine li:nth-child(n+6) { animation-delay: .3s; }
.routine li::before { content: counter(step); position: absolute; left: 2px; top: -3px; font: 1.9rem/1 var(--display); color: var(--henna); }
.routine li p { margin: 2px 0 6px; }
.picks { list-style: none; padding: 0; margin: 8px 0 10px; border-left: 3px solid var(--honey); }
.picks li, .routine .picks li { counter-increment: none; padding: 7px 0 7px 14px; margin: 0; border-bottom: 1px dotted var(--line); animation: none; }
.picks li:last-child, .routine .picks li:last-child { border-bottom: 0; }
.routine .picks li::before { content: none; }
.picks a { font-weight: 650; color: var(--ink); text-decoration-color: var(--henna); text-decoration-thickness: 2px; }
.picks a::after { content: " \2197"; font-size: .8em; color: var(--henna-deep); }
.picks span { display: block; font-size: .9rem; color: var(--ink-soft); line-height: 1.45; margin-top: 2px; }
.prose .picks { margin: 10px 0 18px; }
.fine { font-size: .82rem; color: var(--ink-soft); }
.noscript { color: var(--henna-deep); }

.shop, .routine a.more { display: inline-block; font-size: .86rem; font-weight: 600; color: var(--ink); text-decoration: none; border: 1.5px dashed var(--ink); border-radius: 3px; padding: 5px 10px; margin: 4px 0; background: var(--card); transition: transform .15s var(--ease), background .15s; }
.shop:hover, .routine a.more:hover { color: var(--ink); text-decoration: none; background: var(--honey); border-style: solid; transform: rotate(-1deg) translateY(-1px); }

.patterns { border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); margin: 34px 0 10px; padding: 22px 0 6px; }
.pat-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 24px; }
.pat-head h2 { margin: 0; }
.pat-head p { margin: 0; color: var(--ink-soft); font-size: .95rem; max-width: 30rem; }
.strip { list-style: none; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); padding: 0; margin: 16px 0 0; }
.strip li { border-left: 1px solid var(--line); }
.strip li:nth-child(3n+1) { border-left: 1.5px solid var(--ink); }
.strip li:first-child { border-left: 0; }
.strip a { display: flex; flex-direction: column; align-items: center; padding: 8px 2px 12px; color: var(--ink); text-decoration: none; transition: background .2s; }
.strip .strand { width: 34px; height: 136px; transition: transform .35s var(--ease); }
.strip .strand path { transition: stroke-width .2s; }
.strip .code { font: 1.15rem/1 var(--display); margin-top: 10px; transition: transform .25s var(--ease), color .2s; }
.strip .nm { font-size: .72rem; line-height: 1.25; color: var(--ink-soft); text-align: center; margin-top: 4px; min-height: 2.5em; overflow-wrap: anywhere; hyphens: auto; padding: 0 2px; }
.strip a:hover, .strip a:focus-visible { background: var(--card); }
.strip a:hover .strand { transform: scaleY(1.06); }
.strip a:hover .strand path { stroke-width: 3.8; }
.strip a:hover .code { color: var(--henna); transform: translateY(-3px); }
.strip li:nth-child(odd) .sway { animation-duration: 4.6s; }
.strip li:nth-child(3n) .sway { animation-duration: 6.4s; animation-direction: alternate-reverse; }
.strip li:nth-child(4n) .sway { animation-duration: 5.1s; }
.strip li:nth-child(2) path { animation-delay: .05s; } .strip li:nth-child(3) path { animation-delay: .1s; } .strip li:nth-child(4) path { animation-delay: .15s; }
.strip li:nth-child(5) path { animation-delay: .2s; } .strip li:nth-child(6) path { animation-delay: .25s; } .strip li:nth-child(7) path { animation-delay: .3s; } .strip li:nth-child(8) path { animation-delay: .35s; }
.strip li:nth-child(9) path { animation-delay: .4s; } .strip li:nth-child(10) path { animation-delay: .45s; } .strip li:nth-child(11) path { animation-delay: .5s; } .strip li:nth-child(12) path { animation-delay: .55s; }

.prose { max-width: 41rem; }
.home-prose { margin-top: 10px; }
.prose > .lede + p::first-letter { float: left; font: 3.3em/.82 var(--display); color: var(--henna); margin: .08em .1em 0 0; }
.art-head { max-width: 46rem; padding-bottom: 6px; }
.art-grid { display: grid; grid-template-columns: minmax(0, 41rem) 14.5rem; justify-content: space-between; gap: 0 48px; margin-top: 18px; }
.art-grid .prose { grid-column: 1; grid-row: 1; }
.toc { grid-column: 2; grid-row: 1; align-self: start; position: sticky; top: 86px; font-size: .9rem; }
.toc summary { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); cursor: pointer; padding: 6px 0; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 4px 0 0; padding: 0; border-left: 1.5px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1.5px; border-left: 3px solid transparent; color: var(--ink-soft); text-decoration: none; line-height: 1.35; transition: color .2s, border-color .2s, padding .2s var(--ease); }
.toc a:hover { color: var(--ink); padding-left: 18px; text-decoration: none; }
.toc a.on { color: var(--ink); border-left-color: var(--henna); font-weight: 600; }
.h-type { display: flex; align-items: center; gap: 14px; }
.h-type .strand { width: 20px; height: 70px; flex: none; }
.h-type .strand path { stroke-width: 4; }
td .strand { display: inline-block; vertical-align: middle; width: 9px; height: 34px; margin-right: 10px; }
td .strand path { stroke-width: 5; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; margin: 1.2em 0; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 10px 8px 0; text-align: left; vertical-align: middle; }
th { font: 700 .76rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); border-bottom: 2px solid var(--honey); }
td:first-child { font-family: var(--display); font-size: 1.05rem; white-space: nowrap; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--sage); }
.tablewrap { overflow-x: auto; }
blockquote, .note { background: var(--blush); border-left: 4px solid var(--henna); margin: 1.4em 0; padding: 12px 16px; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--henna); }

footer.site { position: relative; background: var(--B-bg); color: var(--B-soft); font-size: .86rem; padding: 34px 0 40px; margin-top: 30px; }
footer.site::before { content: ""; position: absolute; left: 0; right: 0; top: -11px; height: 12px; background: var(--B-bg); -webkit-mask: url(/assets/wave.svg) repeat-x 0 0 / 40px 12px; mask: url(/assets/wave.svg) repeat-x 0 0 / 40px 12px; }
footer.site p { margin: .4em 0; max-width: 46rem; }
footer.site a { color: var(--honey); }
footer.site a:hover { color: #fff; }
.foot-brand { font: 1.5rem/1 var(--display); color: var(--B-ink); }
.foot-brand span { color: var(--B-accent); }
footer.site .foot-brand { margin-bottom: 12px; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes sway { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }
@keyframes wiggle { 30% { transform: rotate(-12deg); } 60% { transform: rotate(9deg); } }
@keyframes qin { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { 50% { transform: scale(1.02); } }

@media (max-width: 1000px) {
  .art-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { grid-column: 1; grid-row: 1; position: static; border: 1.5px solid var(--ink); border-radius: 4px; padding: 4px 14px; margin-bottom: 18px; background: var(--card); }
  .toc ol { margin-bottom: 8px; }
  .art-grid .prose { grid-row: 2; }
  .strip { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 8px; }
  .strip li:nth-child(7) { border-left: 0; }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-art { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  header.site .wrap { padding-top: 8px; padding-bottom: 6px; }
  nav.top { gap: 0 13px; }
  nav.top a { font-size: .84rem; }
  #quiz { padding: 16px 14px 18px; box-shadow: 5px 5px 0 var(--honey); margin-right: 5px; }
  #quiz legend { font-size: 1.2rem; }
  .q-keys { display: none; }
  .opt kbd { display: none; }
  .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .strip li:nth-child(n) { border-left: 1px solid var(--line); }
  .strip li:nth-child(4n+1) { border-left: 0; }
  .strip .strand { height: 112px; }
  .result-head .strand { width: 36px; height: 112px; }
  .routine li { padding-left: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .draw path, .squig path { stroke-dashoffset: 0; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --L-paper: #0e1712; --L-paper-2: #1c2a22; --L-card: #142019; --L-ink: #e6eee6; --L-ink-soft: #a5b8ab;
    --L-henna: #ff8f66; --L-henna-deep: #ffab8a; --L-line: #2e4136; --L-f1: #e6b45c; --L-f2: #c4895a; --L-f4: #e6eee6;
    --B-bg: #153428; --B-card: #1c4133; --B-ink: #f1efe4; --B-soft: #b9cfc1; --B-accent: #ff9a70; --B-line: #2c5543;
    --honey: #e5a537; --blush: #3a2219; --sage: #1b2c22;
  }
}
