/* Paper, blue-black ink, and the two colours of the "마음" cover given one job each:
   the handwriting blue is always a line (underlines, strokes, the sound wave),
   the sleeve mint is always a surface (the panel behind the drawing, the highlighter).
   Every other colour on the site comes from an album cover and stays inside its square. */
:root {
  --paper: #FAF8F3;
  --paper-deep: #F1EEE6;
  --ink: #17212B;
  --ink-soft: #5A6673;
  --rule: #E2DDD2;
  --line: #1C93C4;        /* pen blue for strokes */
  --line-text: #0D6C97;   /* the same blue, dark enough to read as text */
  --wash: #DDEFED;        /* mint as a surface */
  --marker: #BDE4E1;      /* mint as a highlighter */
  --heart: #DA646E;       /* marks a favourite track, nothing else */

  --serif: var(--sans);   /* headings use the same family as the text, set heavier and tighter */
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --s-2: 0.8125rem;
  --s-1: 0.9rem;
  --s0: 1.0625rem;
  --s1: 1.25rem;
  --s2: 1.75rem;
  --wrap: 64rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10161C;
    --paper-deep: #18212A;
    --ink: #E8EDF1;
    --ink-soft: #9BA8B4;
    --rule: #28333E;
    --line: #4DB5DE;
    --line-text: #7CCBEA;
    --wash: #163230;
    --marker: #1E4F4C;
    --heart: #EC8A92;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--s0);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--marker); color: #17212B; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-line: underline; text-decoration-color: var(--line); text-decoration-thickness: 1.5px; text-underline-offset: 0.24em; }
a:hover { color: var(--line-text); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--line); outline-offset: 3px; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 750; text-wrap: balance; margin: 0; letter-spacing: -0.03em; }
html[data-lang="en"] .ko, html[data-lang="ko"] .en { display: none !important; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
}

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 1.75rem; padding-block: 1.1rem; }
.brand { font-family: var(--serif); font-weight: 750; letter-spacing: -0.03em; font-size: 1.25rem; line-height: 1.2; text-decoration: none; margin-right: auto; padding-block: 0.6rem; margin-block: -0.6rem; }   /* taller to press, same place */
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; list-style: none; margin: 0; padding: 0; font-size: var(--s-1); }
.nav a { text-decoration: none; color: var(--ink-soft); padding-block: 0.3rem; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--line); }
.nav .soon { color: var(--ink-soft); opacity: 0.5; }
.lang { display: flex; align-items: baseline; font-size: var(--s-2); }
.lang button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink-soft); }
.lang button + button::before { content: "·"; margin-inline: 0.4em; color: var(--ink-soft); }
.lang button[aria-pressed="true"] { color: var(--ink); font-weight: 700; }

/* ---------- hero ---------- */
.hero { padding-block: 3.5rem 2.75rem; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 2rem 4rem; align-items: end; }
.name { font-size: clamp(3rem, 7vw, 4.75rem); line-height: 1.1; font-weight: 800; letter-spacing: -0.045em; }
.name-line { position: relative; display: inline-block; padding-bottom: 0.14em; }
.pen { position: absolute; left: -1%; bottom: 0; width: 102%; height: 0.2em; overflow: visible; }
.pen path { fill: none; stroke: var(--pen, var(--line)); transition: stroke 0.5s ease; stroke-width: 3.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.name-alt { margin: 0.9rem 0 0; font-size: 1.25rem; font-weight: 500; line-height: 1.3; color: var(--ink-soft); }
.role { margin: 1.5rem 0 0; font-weight: 600; }
.lede { margin: 0.75rem 0 0; font-size: 1.1875rem; line-height: 1.75; max-width: 31em; }
mark { color: inherit; background: linear-gradient(transparent 56%, var(--marker) 56%, var(--marker) 94%, transparent 94%); padding-inline: 0.1em; margin-inline: -0.1em; }

.facts { margin: 0; display: grid; grid-template-columns: 1.5fr 1.2fr 0.8fr 1fr; gap: 1rem 2rem; padding-block: 1.25rem; border-block: 1px solid var(--rule); }
.facts dt { font-size: var(--s-2); color: var(--ink-soft); }
.facts dd { margin: 0.1rem 0 0; font-size: 0.975rem; font-weight: 500; line-height: 1.5; }

/* ---------- sections and lists ---------- */
.section { padding-block: 2.75rem 0.5rem; }
.section:last-of-type { padding-bottom: 3.5rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 0.7rem; border-bottom: 1.5px solid var(--ink); }
.section-title { font-size: 1.6rem; line-height: 1.2; }
.more { font-size: var(--s-1); white-space: nowrap; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-bottom: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto 1.25rem; align-items: center; gap: 0.25rem 1.5rem; padding: 1.1rem 0; text-decoration: none; }
.row-main { display: grid; gap: 0.15rem; min-width: 0; }
.row-title { font-weight: 650; font-size: 1.1875rem; line-height: 1.4; }
.row-note, .row-kind, .soon-text { color: var(--ink-soft); font-size: var(--s-1); font-weight: 400; }
.soon-text { margin-left: 0.6rem; }
.row-go { color: var(--line-text); transition: transform 0.15s ease; }
a.row:hover { color: inherit; }
a.row:hover .row-title { text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
a.row:hover .row-go { transform: translateX(4px); }
.row.is-soon .row-title { color: var(--ink-soft); font-weight: 500; }

/* ---------- album squares ---------- */
/* nested squares sized so each colour covers the share it has on the cover */
.sleeve { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 2px; box-shadow: inset 0 0 0 1px rgb(23 33 43 / 0.1); }
.sleeve i { position: absolute; display: block; }
.shelf { list-style: none; margin: 0; padding: 1.5rem 0 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.5rem 1.25rem; }
.shelf a, .grid a { display: block; text-decoration: none; }
.shelf-title { display: block; margin-top: 0.6rem; font-size: var(--s-1); font-weight: 600; line-height: 1.35; }
.shelf-year { display: block; font-size: var(--s-2); color: var(--ink-soft); }
.group { padding-top: 2.5rem; }
.group:first-child { padding-top: 0; }
.grid { list-style: none; margin: 0; padding: 1.5rem 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2.25rem 1.5rem; }
.album-title { display: block; margin-top: 0.85rem; font-weight: 700; letter-spacing: -0.02em; font-size: 1.2rem; line-height: 1.25; }
.album-sub { display: block; margin-top: 0.3rem; color: var(--ink-soft); font-size: var(--s-2); }
.album-line { display: block; margin-top: 0.4rem; font-size: var(--s-1); line-height: 1.55; }
.grid a:hover .album-title { text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 0.16em; }

/* ---------- inner pages ---------- */
.page-head { padding-block: 3rem 0.5rem; }
.crumb { font-size: var(--s-1); color: var(--ink-soft); margin: 0 0 0.6rem; }
.crumb a { text-decoration: none; color: var(--line-text); font-weight: 600; }
.crumb a:hover { text-decoration: underline; }
.page-title { font-size: clamp(2.5rem, 6vw, 3.9rem); line-height: 1.1; font-weight: 800; letter-spacing: -0.045em; }
.page-lede { margin: 1.1rem 0 0; font-size: 1.1875rem; max-width: 33em; }
.meta { color: var(--ink-soft); font-size: var(--s-1); }
.page-head + .topic { margin-top: 2rem; }
.topic { padding-block: 2.5rem; border-top: 1px solid var(--rule); }
.topic .wrap { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 0.5rem 2rem; }
.topic-kind { font-size: var(--s-1); color: var(--ink-soft); padding-top: 0.55rem; }
.topic h2 { font-size: 1.6rem; line-height: 1.25; margin-bottom: 0.9rem; }
.topic p { margin: 0 0 1rem; max-width: 40em; }
.steps { list-style: none; counter-reset: step; margin: 1.75rem 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.steps li { counter-increment: step; padding: 1.1rem 1.2rem 1.25rem; background: var(--paper-deep); border-top: 2px solid var(--line); }
.steps li::before { content: counter(step); display: block; font-family: var(--sans); font-weight: 700; font-size: 1.05rem; line-height: 1; color: var(--line-text); margin-bottom: 0.6rem; }
.steps strong { display: block; font-size: 1.125rem; font-weight: 650; margin-bottom: 0.3rem; }
.steps li > span { display: block; color: var(--ink-soft); font-size: var(--s-1); line-height: 1.6; }
.todo { border: 1px dashed var(--ink-soft); padding: 0.9rem 1.1rem; color: var(--ink-soft); font-size: var(--s-1); max-width: 40em; margin: 0; }

/* ---------- album page ---------- */
.album-head { padding-block: 2.75rem 2.5rem; }
.album-head .wrap { display: grid; grid-template-columns: minmax(0, 19rem) minmax(0, 1fr); gap: 2rem 9rem; align-items: end; }
.album-facts { margin: 1rem 0 0; color: var(--ink-soft); font-size: 0.975rem; }
.note { margin: 1.5rem 0 0; max-width: 34em; font-size: 1.125rem; line-height: 1.75; }
.note.empty { color: var(--ink-soft); font-size: var(--s0); }
.block { padding-block: 2.25rem; border-top: 1px solid var(--rule); }
.block .wrap { display: grid; grid-template-columns: 22rem minmax(0, 1fr); gap: 0.75rem 6rem; }
.block-title { font-size: 1.3rem; line-height: 1.3; }
.block-note { margin: 0.5rem 0 0; color: var(--ink-soft); font-size: var(--s-2); line-height: 1.6; max-width: 18rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.btn { cursor: pointer; font-size: var(--s-1); font-weight: 600; line-height: 1.2; padding: 0.7rem 1.15rem; border-radius: 999px; border: 1.5px solid var(--ink); background: none; color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn:hover { border-color: var(--line-text); color: var(--line-text); }
.btn.primary:hover { background: var(--line-text); border-color: var(--line-text); color: var(--paper); }
.btn[disabled] { opacity: 0.4; cursor: default; pointer-events: none; }
.slot:not(:empty) { margin-top: 1.25rem; }
.slot iframe { display: block; width: 100%; border: 0; border-radius: 12px; }
.slot.video iframe { aspect-ratio: 16 / 9; height: auto; border-radius: 6px; background: #000; }
.now { margin: 0.6rem 0 0; font-size: var(--s-1); color: var(--ink-soft); }
.tracks { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); font-variant-numeric: tabular-nums; }
.tracks li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) auto 2.75rem; gap: 0 1rem; padding: 0.72rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.tracks .n, .tracks .t { color: var(--ink-soft); font-size: var(--s-1); }
.tracks .t { text-align: right; }
.tracks .tk { min-width: 0; font-weight: 500; }
.tracks .pick::after { content: "♥"; color: var(--heart); margin-left: 0.5rem; font-size: 0.8em; }
.tracks .tn { grid-column: 2 / 5; color: var(--ink-soft); font-size: var(--s-1); margin: 0.25rem 0 0; }
.tracks .play { display: flex; gap: 0.9rem; }
.link { cursor: pointer; background: none; border: 0; padding: 0; font-size: var(--s-2); font-weight: 600; color: var(--line-text); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.24em; }
.link:hover, .link[aria-pressed="true"] { text-decoration-color: var(--line); }
.tracks li.is-playing .tk { color: var(--line-text); }
.pager { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.75rem; border-top: 1px solid var(--rule); font-size: var(--s-1); }
.pager a { text-decoration: none; display: grid; gap: 0.1rem; }
.pager a.next { text-align: right; }
.pager small { color: var(--ink-soft); font-size: var(--s-2); }
.pager .serif { font-size: 1.15rem; line-height: 1.25; letter-spacing: -0.02em; }
.pager a:hover .serif { text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 0.16em; }

/* ---------- footer ---------- */
.site-foot { margin-top: 2.5rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: var(--s-2); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding-block: 1.5rem 2.5rem; }
.site-foot .wrap > :first-child { margin-right: auto; }

/* ---------- narrower screens ---------- */
@media (max-width: 56rem) {
  .hero-top { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .topic .wrap, .block .wrap { grid-template-columns: minmax(0, 1fr); }
  .topic-kind { padding-top: 0; }
  .album-head .wrap { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 1.5rem 6.5rem; }
  .block-note { max-width: none; }
}
@media (max-width: 36rem) {
  .hero { padding-block: 2.25rem 2rem; }
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem 0.9rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1rem; }
  .album-title { font-size: 1.1rem; }
  .album-head .wrap { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .album-art { max-width: 13rem; }
  .row { grid-template-columns: minmax(0, 1fr) 1.25rem; }
  .row > .row-kind { display: none; }
  .tracks li { grid-template-columns: 1.5rem minmax(0, 1fr) 2.5rem; }
  .tracks .play { grid-column: 2; grid-row: 2; margin-top: 0.2rem; }
  .tracks .t { grid-column: 3; grid-row: 1; }
  .tracks .tn { grid-column: 2 / 4; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- album art: cover in front, record behind ---------- */
/* The cover is the picture Spotify provides and is never cropped, covered or animated;
   everything that moves is the record behind it. */
/* --r is the cover's width divided by its height; most are square, one is a portrait picture */
.art { --r: 1; position: relative; display: block; aspect-ratio: 1; }
.cover { position: absolute; z-index: 1; left: 0; bottom: 0; display: block; width: calc(100% * var(--r)); height: auto; border-radius: 4px; background: var(--paper-deep);
  box-shadow: 0 0 0 1px rgb(23 33 43 / 0.08), 0 16px 28px -20px rgb(23 33 43 / 0.6); view-transition-name: var(--vt); }
.album-head .cover { border-radius: 8px; }
span.cover { height: 100%; }
.cover .sleeve { height: 100%; border-radius: inherit; }
.disc { position: absolute; z-index: 0; width: calc(93% * var(--r)); aspect-ratio: 1; left: calc(3.5% * var(--r)); top: calc(50% - 46.5% * var(--r)); border-radius: 50%;
  background:
    conic-gradient(from 25deg, transparent 0 7%, rgb(255 255 255 / 0.13) 11%, transparent 16% 50%, rgb(255 255 255 / 0.09) 60%, transparent 66%),
    repeating-radial-gradient(circle, #15181B 0 1.1px, #23272C 1.1px 2.3px);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.07), 0 8px 18px -12px rgb(0 0 0 / 0.6);
  translate: 0 0; transition: translate 0.55s cubic-bezier(0.2, 0.75, 0.2, 1); }
.label { position: absolute; inset: 31%; border-radius: 50%; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.25); }
.label::before { content: ""; position: absolute; left: 50%; top: 8%; width: 2px; height: 20%; margin-left: -1px; background: rgb(255 255 255 / 0.75); border-radius: 1px; }
.label::after { content: ""; position: absolute; inset: 43%; border-radius: 50%; background: var(--paper); }
a:hover .disc, a:focus-visible .disc { translate: 32% 0; }
a:hover .label, a:focus-visible .label { animation: spin 3.2s linear infinite; }
.album-art { position: relative; }
.album-art .disc { translate: 16% 0; }
.album-art .art.is-playing .disc { translate: 43% 0; }
.album-art .art.is-playing .label { animation: spin 3.2s linear infinite; }
.credit { margin: 0.8rem 0 0; font-size: var(--s-2); color: var(--ink-soft); }
@keyframes spin { to { rotate: 360deg; } }

/* ---------- playing state ---------- */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 0.8em; }
.eq i { width: 2.5px; height: 100%; background: var(--line); border-radius: 1px; transform-origin: bottom; animation: eq 0.9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-duration: 0.6s; animation-delay: -0.3s; }
.eq i:nth-child(3) { animation-duration: 0.75s; animation-delay: -0.5s; }
.eq.is-paused i { animation-play-state: paused; }
@keyframes eq { from { scale: 1 0.25; } to { scale: 1 1; } }
.tracks li.is-playing .n { color: transparent; position: relative; }
.tracks li.is-playing .n .eq { position: absolute; left: 0; bottom: 0.25em; }
.now { display: flex; align-items: center; gap: 0.6rem; }

/* ---------- motion ---------- */
/* entrance: only when scripts run (html.js) and motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(*) { animation-duration: 0.45s; animation-timing-function: cubic-bezier(0.2, 0.75, 0.2, 1); }

  .js .rv { opacity: 0; translate: 0 16px; transition: opacity 0.6s ease, translate 0.6s cubic-bezier(0.2, 0.75, 0.2, 1); transition-delay: calc(var(--n, 0) * 55ms); }
  .js .rv.in { opacity: 1; translate: 0 0; }

  .js .name-line > span { display: inline-block; animation: rise 0.8s cubic-bezier(0.2, 0.75, 0.2, 1) both; }
  .js .pen path { stroke-dasharray: 4; stroke-dashoffset: 4; animation: draw 1.8s 0.45s cubic-bezier(0.3, 0, 0.2, 1) forwards; }
  .js .hero .name-alt, .js .hero .role, .js .hero .lede { animation: rise 0.8s cubic-bezier(0.2, 0.75, 0.2, 1) both; }
  .js .hero .name-alt { animation-delay: 0.15s; }
  .js .hero .role { animation-delay: 0.25s; }
  .js .hero .lede { animation-delay: 0.35s; }
  .js mark { background-repeat: no-repeat; background-size: 0% 100%; transition: background-size 0.9s 0.9s cubic-bezier(0.5, 0, 0.2, 1); }
  .js mark + mark, .js mark ~ mark { transition-delay: 1.4s; }
  .js .lit mark { background-size: 100% 100%; }

  @keyframes rise { from { opacity: 0; translate: 0 18px; } }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes appear { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
  @keyframes sway { from { scale: 1 0.55; } to { scale: 1 1.05; } }
  @keyframes sweep { from { translate: 6px 0; opacity: 0; } 6% { opacity: 0.35; } 94% { opacity: 0.35; } to { translate: 432px 0; opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  a:hover .label, .album-art .art.is-playing .label, .eq i { animation: none; }
}

/* ---------- stock indices ---------- */
:root { --up: #C9414D; --down: #0D6C97; }   /* Korean convention: red rises, blue falls */
@media (prefers-color-scheme: dark) { :root { --up: #EC8A92; --down: #7CCBEA; } }
.indices { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.idx { position: relative; display: grid; align-content: start; padding: 1.25rem 1.1rem 1rem; border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.idx:first-child { border-left: 0; padding-left: 0; }
.idx-market { font-size: var(--s-2); color: var(--ink-soft); }
.idx-name { font-weight: 650; line-height: 1.35; }
.idx-last { margin-top: 0.7rem; font-family: var(--sans); font-weight: 700; font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.idx-chg { margin-top: 0.2rem; font-size: var(--s-1); font-weight: 600; }
.idx-chg.up { color: var(--up); }
.idx-chg.down { color: var(--down); }
.spark { display: block; width: 100%; height: 3.75rem; margin-top: 0.9rem; overflow: visible; cursor: crosshair; touch-action: pan-y; }
.spark .base { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.6; vector-effect: non-scaling-stroke; }
.spark .trace { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark .cursor { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.idx .dot { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--ink); pointer-events: none; }
.idx .dot.up { background: var(--up); }
.idx .dot.down { background: var(--down); }
.idx .dot.probe { background: var(--line); }
.idx-when { margin-top: 0.5rem; font-size: var(--s-2); color: var(--ink-soft); }
.idx-note { margin: 0.9rem 0 0; font-size: var(--s-2); }
@media (prefers-reduced-motion: no-preference) {
  .js .spark .trace { stroke-dasharray: 3; stroke-dashoffset: 3; transition: stroke-dashoffset 2.2s cubic-bezier(0.3, 0, 0.2, 1) 0.2s; }
  .js .idx.in .spark .trace { stroke-dashoffset: 0; }
  .js .idx .dot.end { opacity: 0; transition: opacity 0.3s 1.4s; }
  .js .idx.in .dot.end { opacity: 1; }
}
@media (max-width: 56rem) {
  .indices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .idx:nth-child(4) { border-left: 0; padding-left: 0; }
}
@media (max-width: 36rem) {
  .indices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .idx { padding-inline: 0.9rem; }
  .idx:nth-child(4) { border-left: 1px solid var(--rule); padding-left: 0.9rem; }
  .idx:nth-child(odd) { border-left: 0; padding-left: 0; }
  .idx-last { font-size: 1.4rem; }
}

/* ---------- the hero's side notes ---------- */
.facts.facts-side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; padding: 0; border: 0; }
.facts-side > div { padding: 0.75rem 0 0.85rem; border-top: 1px solid var(--rule); }

/* ---------- the hero picture: a price chart that becomes a record ---------- */
/* No dark screen and no blue: a warm paper panel, candles in ink, and a waveform in the two colours
   of whichever IU record is showing (--hs-a and --hs-b, set by hero.js). */
.hero-strip { --hs-a: #E24A3B; --hs-b: #E0B48A; display: none; margin: 2.75rem 0 0; }
.js .hero-strip { display: block; }
.hs-stage { position: relative; height: 20rem; border-radius: 14px; overflow: hidden; touch-action: pan-y; cursor: crosshair;
  background: linear-gradient(100deg, var(--paper-deep) 0%, color-mix(in srgb, var(--hs-a) 10%, var(--paper-deep)) 52%, color-mix(in srgb, var(--hs-b) 20%, var(--paper-deep)) 100%); }
.hero-strip svg.strip { display: block; width: 100%; height: 100%; }
.hero-strip text { font-family: var(--sans); font-size: 11px; font-variant-numeric: tabular-nums; fill: var(--ink-soft); }
.hs-g1 { stop-color: rgb(23 33 43 / 0.13); }
.hs-g0 { stop-color: rgb(23 33 43 / 0.13); stop-opacity: 0; }
@media (prefers-color-scheme: dark) { .hs-g1, .hs-g0 { stop-color: rgb(232 237 241 / 0.14); } }
.hs-ta { stop-color: var(--hs-a); }
.hs-tb { stop-color: var(--hs-b); }
.hs-grid { stroke-width: 1; fill: none; }
.hs-base { stroke: var(--hs-a); stroke-width: 1; opacity: 0.35; }
.hs-c .wick, .hs-m .wick { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.hs-c rect { stroke: var(--ink); stroke-width: 1.4; }
.hs-c.u rect { fill: none; }                 /* a rising day is hollow, a falling day is filled, as on a printed chart */
.hs-c.d rect { fill: var(--ink); }
/* on the way from candle to bar the ink turns into the record's colour */
.hs-m rect { fill: color-mix(in srgb, var(--hs-a) calc(var(--t) * 100%), var(--ink)); stroke: none; }
.hs-m .wick { stroke: color-mix(in srgb, var(--hs-a) calc(var(--t) * 100%), var(--ink)); opacity: calc(1 - var(--t)); }
.hs-rest { opacity: 0.3; }
.hs-head path { stroke: var(--ink); stroke-width: 1.5; }
.hs-head circle { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.hs-pill rect { fill: var(--ink); }
.hs-pill text { fill: var(--paper); font-weight: 650; font-size: 11px; }
.hs-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem; margin-top: 0.9rem; font-size: var(--s-1); }
.hs-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.75rem; }
.hs-title { font-weight: 700; }
.hs-meta { color: var(--ink-soft); }
.hs-link { font-size: var(--s-2); }
.hs-dots { display: flex; flex-wrap: wrap; gap: 0.5rem; }
/* one dot per record, in its two colours */
.hs-dots button { width: 1.2rem; height: 1.2rem; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: linear-gradient(135deg, var(--a) 0 50%, var(--b) 50% 100%); box-shadow: 0 0 0 1px rgb(23 33 43 / 0.14); transition: transform 0.15s ease; }
.hs-dots button:hover { transform: scale(1.2); }
.hs-dots button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .hero-strip:not(.is-settled) .hs-c, .hero-strip:not(.is-settled) .hs-m { opacity: 0; animation: hs-in 0.45s calc(0.35s + var(--i) * 26ms) ease-out forwards; }
  .hero-strip:not(.is-settled) .hs-rest rect, .hero-strip:not(.is-settled) .hs-played rect { transform-box: fill-box; transform-origin: center; scale: 1 0.02; animation: hs-grow 0.5s calc(0.35s + var(--i) * 26ms) cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
  .hero-strip:not(.is-settled) .hs-head { opacity: 0; animation: hs-in 0.5s 2.4s ease-out forwards; }
  /* changing the record: its bars grow in again */
  .hero-strip.is-swapping .hs-rest rect, .hero-strip.is-swapping .hs-played rect { transform-box: fill-box; transform-origin: center; animation: hs-regrow 0.55s calc(var(--i) * 4ms) cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .js .hero-strip { animation: rise 0.9s 0.3s cubic-bezier(0.2, 0.75, 0.2, 1) both; }
  @keyframes hs-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
  @keyframes hs-grow { to { scale: 1 1; } }
  @keyframes hs-regrow { from { scale: 1 0.02; } to { scale: 1 1; } }
}
@media (max-width: 36rem) { .hero-strip { margin-top: 2rem; } .hs-stage { height: 13.5rem; border-radius: 12px; } .hs-dots button { width: 1.35rem; height: 1.35rem; } }

/* ---------- RSI and MACD under each index ---------- */
.ta { margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--rule); font-size: var(--s-2); }
.ta-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; white-space: nowrap; }
.ta-row .ta-v + .ta-s { margin-left: auto; }
.ta-row .ta-k + .ta-v { margin-left: 0; }
.ta-k { color: var(--ink-soft); }
.ta-v { font-weight: 700; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.ta-s { color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.ta .up { color: var(--up); }
.ta .down { color: var(--down); }
/* the gauge runs 0 to 100, tinted below 30 and above 70 */
.ta-gauge { position: relative; height: 5px; margin: 0.4rem 0 0.9rem; border-radius: 3px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--down) 38%, transparent) 0 30%, var(--rule) 30% 70%, color-mix(in srgb, var(--up) 38%, transparent) 70% 100%); }
.ta-gauge i { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--paper); }
.ta-hist { display: block; width: 100%; height: 1.9rem; margin-top: 0.35rem; }
.ta-hist .zero { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ta-hist .up { fill: var(--up); opacity: 0.85; }
.ta-hist .down { fill: var(--down); opacity: 0.85; }
.ta-sub { margin-top: 0.25rem; }
.ta-sub .ta-v { font-weight: 500; font-size: var(--s-2); color: var(--ink-soft); }

.ta-row:first-child { justify-content: flex-start; }
.ta-row:first-child .ta-s { margin-left: auto; }

/* ---------- research page: four cards in a row, a status line ---------- */
.steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps.plain { counter-reset: none; }
.steps.plain li::before { content: none; }
.stage { margin: 0 0 1rem; padding: 0.85rem 1.1rem; max-width: none; border-left: 3px solid var(--line); background: var(--paper-deep); font-size: var(--s-1); line-height: 1.65; }
.stage b { display: block; margin-bottom: 0.15rem; font-size: var(--s-2); color: var(--line-text); }
.topic[id] { scroll-margin-top: 1rem; }
@media (max-width: 68rem) { .steps.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 36rem) { .steps.four { grid-template-columns: minmax(0, 1fr); } }

.steps.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 52rem) { .steps.three { grid-template-columns: minmax(0, 1fr); } }

/* ---------- the hero picture plays: Spotify's player under it ---------- */
.hs-stage { cursor: pointer; }
.hs-player { margin-top: 0.75rem; max-width: 30rem; }
.hs-player iframe { display: block; width: 100%; border: 0; border-radius: 12px; }
.hs-hint { flex-basis: 100%; font-size: var(--s-2); color: var(--ink-soft); }
.hero-strip.is-live .hs-head circle { fill: var(--hs-a); }
.hero-strip.is-live.is-paused .hs-head circle { fill: var(--paper); }

/* ---------- experience page: dated lines ---------- */
.cv-line { margin: -0.4rem 0 1rem; color: var(--ink-soft); font-size: var(--s-1); }
.cv { list-style: none; margin: 0; padding: 0; max-width: 44rem; border-top: 1px solid var(--rule); }
.cv li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.cv.wide li { grid-template-columns: 9rem minmax(0, 1fr); }
.cv.period li { grid-template-columns: 8.75rem minmax(0, 1fr); }   /* a from-to period needs more room than a year */
.cv-when { color: var(--ink-soft); font-size: var(--s-1); font-variant-numeric: tabular-nums; }
.cv-what { font-weight: 500; }
.contact { margin: 0 0 0.5rem; font-size: 1.35rem; font-weight: 650; letter-spacing: -0.01em; }
@media (max-width: 36rem) { .cv.wide li { grid-template-columns: 6.5rem minmax(0, 1fr); } .cv.period li { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; } }

/* ---------- contact page ---------- */
.contact { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; font-size: clamp(1.35rem, 4vw, 2rem); }
.copy { font: inherit; font-size: var(--s-2); font-weight: 600; padding: 0.35rem 0.8rem; border-radius: 999px; border: 1.5px solid var(--ink); background: none; color: var(--ink); cursor: pointer; }
.copy:hover { border-color: var(--line-text); color: var(--line-text); }
.contact-links { max-width: 44rem; border-top: 1px solid var(--rule); }
.next { margin: 0; font-weight: 600; }

/* ---------- pre-launch pass ---------- */
/* phones: name and language switch share the first row, the menu takes the second */
@media (max-width: 44rem) {
  .site-head .wrap { gap: 0.2rem 1rem; padding-block: 0.8rem 0.5rem; }
  .site-head .lang { order: 2; }
  .site-head nav { order: 3; flex-basis: 100%; }
  .nav { gap: 0 1.35rem; }
}
/* anything that is pressed is at least a comfortable fingertip tall */
.nav a { display: inline-block; padding-block: 0.55rem; }
.lang button { padding: 0.55rem 0.15rem; }
.link { padding: 0.5rem 0.3rem; margin: -0.5rem -0.3rem; min-width: 1.75rem; }
.hs-link, .replay, .more, .crumb a, .next a { display: inline-block; padding-block: 0.35rem; }
@media (max-width: 36rem) { .hs-dots { gap: 0.35rem; } .hs-dots button { width: 1.6rem; height: 1.6rem; } }
.hs-dots button { position: relative; }
.hs-dots button::after { content: ""; position: absolute; inset: -4px; }   /* a little more to aim at than the dot itself */

.page-sub { margin: 1.1rem 0 0.6rem; max-width: 40em; }
.page-head .page-lede { max-width: 36em; }
