/* ==========================================================================
   jiwonpi.com — editorial portfolio in the NSBG design language
   One typeface (Inter Tight, very thin display weights), paper and ink,
   hairlines and dots, generous space, masked line reveals.
   Light is the reference design; dark is tuned separately, not inverted.
   ========================================================================== */

:root {
  color-scheme: light;
  --paper: #ffffff;
  --paper-2: #f7f6f2;
  --ink: #141414;
  --ink-2: #5e5d59;          /* body copy, captions */
  --ink-3: #75746e;          /* small labels; ≥ 4.5:1 on paper */
  --line: rgba(20, 20, 20, 0.13);
  --line-2: rgba(20, 20, 20, 0.3);
  --media: 1;
  --head-bg: rgba(255, 255, 255, 0.985);

  --font: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 4.4vw, 72px);
  --gap: clamp(14px, 2vw, 32px);
  --header-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.18, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f0f0e;
  --paper-2: #171716;
  --ink: #ecebe8;
  --ink-2: #aeada7;
  --ink-3: #8f8e88;
  --line: rgba(236, 235, 232, 0.12);
  --line-2: rgba(236, 235, 232, 0.28);
  --media: 0.88;
  --head-bg: rgba(15, 15, 14, 0.985);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0f0f0e;
    --paper-2: #171716;
    --ink: #ecebe8;
    --ink-2: #aeada7;
    --ink-3: #8f8e88;
    --line: rgba(236, 235, 232, 0.12);
    --line-2: rgba(236, 235, 232, 0.28);
    --media: 0.88;
    --head-bg: rgba(15, 15, 14, 0.985);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-weight: 360; font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3, figure, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 14px; background: var(--ink); color: var(--paper); text-decoration: none; font-size: 12px; letter-spacing: .08em; }
.skip:focus { top: 12px; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* ---------- type ---------- */
.label { font-size: 11px; font-weight: 420; letter-spacing: 0.18em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.display { font-weight: 250; font-size: clamp(2.5rem, 5.4vw, 6rem); line-height: 0.98; letter-spacing: -0.04em; }
.body { max-width: 36ch; font-size: clamp(15px, 1.08vw, 17px); line-height: 1.66; color: var(--ink-2); }

/* text links: hairline that draws in from the left, leaves to the right */
.tl { position: relative; text-decoration: none; }
.tl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform .55s var(--ease-io);
}
.tl:hover::after, .tl:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }

/* ---------- reveals (each plays once, then stays still) ---------- */
.rl-line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.rl-inner { display: inline-block; }
.js .rl .rl-inner {
  transform: translate3d(0, 112%, 0) rotate(1.5deg); transform-origin: 0 100%;
  transition: transform 1.3s var(--ease-out); transition-delay: calc(var(--rl-delay, 0ms) + var(--i, 0) * 105ms);
}
.js .rl.is-in .rl-inner { transform: none; }

.js .fade-up { opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity 1.1s ease, transform 1.3s var(--ease-out); transition-delay: calc(.25s + var(--d, 0ms)); }
.js .fade-up.is-in { opacity: 1; transform: none; }

/* section index: 01 ——— Selected work */
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(32px, 7vh, 72px); }
.sec-rule { width: 56px; height: 1px; background: var(--ink); }
.js .sec-rule { transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.2s var(--ease-io) .1s; }
.js .sec-head.is-in .sec-rule { transform: scaleX(1); }
.js .sec-num, .js .sec-label, .js .sec-note { opacity: 0; transition: opacity .9s ease .5s; }
.js .sec-head.is-in .sec-num, .js .sec-head.is-in .sec-label, .js .sec-head.is-in .sec-note { opacity: 1; }
.sec-note { margin-left: auto; color: var(--ink-2); letter-spacing: .14em; display: inline-flex; align-items: center; gap: 10px; }

/* status: a hollow dot (stopped) or a filled dot (built / launched) */
.dot { width: 5px; height: 5px; border-radius: 50%; border: 1px solid currentColor; flex: none; display: inline-block; }
.dot--on { background: currentColor; }
.status { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 30; height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 var(--gutter);
  border-bottom: 1px solid transparent; transition: background-color .6s ease, border-color .6s ease;
}
.site-header.is-scrolled { background: var(--head-bg); border-bottom-color: var(--line); }
.site-nav ul { display: flex; gap: clamp(16px, 2.2vw, 34px); }
.site-nav a, .util {
  position: relative; display: inline-block; padding: 6px 0; text-decoration: none;
  font-size: 11px; font-weight: 420; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2);
  transition: color .4s ease; line-height: 1.6;
}
.site-nav a::after, .util::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform .55s var(--ease-io);
}
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="true"], .util:hover, .util:focus-visible { color: var(--ink); }
.site-nav a:hover::after, .site-nav a:focus-visible::after, .util:hover::after, .util:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }
.site-nav a[aria-current="true"]::before { content: ""; position: absolute; left: -11px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--ink); }
.wordmark {
  grid-column: 2; justify-self: center; text-decoration: none; white-space: nowrap;
  font-size: 15px; font-weight: 400; letter-spacing: .92em; padding-left: .92em; color: var(--ink);
}
.wm-letter { display: inline-block; }
.site-utils { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); }
.util-state { display: inline-block; min-width: 2.8em; color: var(--ink); }
.util-state::before { content: "Light"; }
:root[data-theme="dark"] .util-state::before { content: "Dark"; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .util-state::before { content: "Dark"; } }
.menu-toggle { display: none; }

/* header arrives in sequence */
.js .site-header .site-nav li, .js .site-header .site-utils, .js .site-header .wm-letter { opacity: 0; transform: translate3d(0, -6px, 0); transition: opacity 1s ease, transform 1.2s var(--ease-out); }
.js .site-header.is-in .site-nav li, .js .site-header.is-in .site-utils, .js .site-header.is-in .wm-letter { opacity: 1; transform: none; }
.site-header.is-in .wm-letter { transition-delay: calc(.15s + var(--i) * .09s); }
.site-header.is-in .site-nav li { transition-delay: calc(.55s + var(--i) * .07s); }
.site-header.is-in .site-utils { transition-delay: .9s; }

/* full-screen menu on small screens */
.site-menu {
  position: fixed; inset: 0; z-index: 25; background: var(--paper);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 4vh) var(--gutter) max(28px, env(safe-area-inset-bottom));
}
.site-menu[hidden] { display: none; }
.site-menu ol li { border-top: 1px solid var(--line); }
.site-menu ol li:last-child { border-bottom: 1px solid var(--line); }
.site-menu ol a { display: flex; align-items: baseline; gap: 18px; padding: 16px 0; text-decoration: none; font-size: clamp(2rem, 9.5vw, 3.4rem); font-weight: 250; letter-spacing: -.035em; line-height: 1.1; }
.menu-num { font-size: 11px; letter-spacing: .16em; color: var(--ink-3); font-weight: 420; }
.menu-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
:root.menu-open { overflow: hidden; }
:root.menu-open .site-header { background: var(--paper); }

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .site-header { grid-template-columns: auto 1fr auto; }
  .site-nav { display: none; }
  .wordmark { grid-column: 1; justify-self: start; letter-spacing: .6em; padding-left: 0; font-size: 13px; }
  .site-utils .util-theme { display: none; }
  .menu-toggle { display: inline-block; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr auto;
  column-gap: var(--gap); padding: calc(var(--header-h) + 5vh) var(--gutter) 5vh;
}
.hero-intro { grid-column: 1 / span 4; grid-row: 1; display: flex; flex-direction: column; gap: 22px; }
.hero-lede { font-size: clamp(15px, 1.15vw, 18px); line-height: 1.5; color: var(--ink-2); max-width: 34ch; }
.hero-plate { grid-column: 8 / span 4; grid-row: 1 / span 2; justify-self: center; align-self: start; width: min(100%, 44vh); width: min(100%, 44svh); }
.plate-frame { position: relative; aspect-ratio: 1; }
.plate-frame svg { width: 100%; height: 100%; overflow: visible; color: var(--ink); }
.plate-frame .pt-o { vector-effect: non-scaling-stroke; }   /* not on .draw: it breaks pathLength dashes in Chrome */
.js .plate-frame .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.4s var(--ease-io); transition-delay: calc(.2s + var(--i, 0) * .25s); }
.js .hero-plate.is-in .plate-frame .draw { stroke-dashoffset: 0; }
.js .plate-frame .pt { opacity: 0; transition: opacity .9s ease; transition-delay: calc(1.5s + var(--i, 0) * .14s); }
.js .hero-plate.is-in .plate-frame .pt { opacity: 1; }
.plate-frame .pt-label { font-family: var(--font); font-weight: 420; font-size: 7.5px; letter-spacing: .16em; fill: var(--ink-3); }
.hero-plate figcaption, .fig figcaption {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding-top: 12px;
  font-size: 12px; letter-spacing: .02em; color: var(--ink-2);
}
.hero-plate figcaption { justify-content: space-between; }
.js .hero-plate figcaption { opacity: 0; transition: opacity 1.2s ease 2.1s; }
.js .hero-plate.is-in figcaption { opacity: 1; }
.fig-num { color: var(--ink); font-size: 11px; font-weight: 420; letter-spacing: .18em; text-transform: uppercase; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-title {
  grid-column: 1 / span 10; grid-row: 3; align-self: end;
  font-weight: 220; font-size: clamp(2rem, 5.2vw, 5.6rem); line-height: .96; letter-spacing: -.055em;
}
.scroll-cue {
  grid-column: 11 / span 2; grid-row: 3; justify-self: end; align-self: end;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-decoration: none;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2);
}
.scroll-line { width: 1px; height: 64px; background: var(--ink); }
.js .scroll-cue { opacity: 0; transition: opacity 1s ease 1.4s; }
.js .scroll-cue.is-in { opacity: 1; }
.js .scroll-line { transform: scaleY(0); transform-origin: 50% 0; transition: transform 1.4s var(--ease-io) 1.6s; }
.js .scroll-cue.is-in .scroll-line { transform: scaleY(1); }
@media (max-width: 760px) {
  .hero { min-height: 0; grid-template-rows: auto auto auto; padding-top: calc(var(--header-h) + 7vh); padding-bottom: 0; }
  .hero-title { grid-column: 1 / -1; grid-row: 1; align-self: start; font-size: clamp(2.1rem, 10vw, 3rem); }
  .hero-intro { grid-column: 1 / -1; grid-row: 2; margin-top: 5vh; gap: 12px; }
  .hero-plate { grid-column: 1 / -1; grid-row: 3; width: min(86vw, 360px); margin-top: 9vh; }
  .scroll-cue { display: none; }
}

/* ---------- sections ---------- */
.section { padding: clamp(110px, 18vh, 200px) var(--gutter) 0; }
.section-intro { align-items: end; margin-bottom: clamp(48px, 9vh, 110px); }
.section-intro .display { grid-column: 1 / span 7; }
.section-intro .body { grid-column: 9 / span 4; }
@media (max-width: 900px) {
  .section-intro .display, .section-intro .body { grid-column: 1 / -1; }
  .section-intro .body { margin-top: 24px; }
}

/* ---------- projects ---------- */
.proj { border-top: 1px solid var(--line); padding: clamp(28px, 4vw, 44px) 0 clamp(90px, 14vh, 160px); }
.proj-grid { align-items: start; }
.proj-copy { grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + 28px); display: flex; flex-direction: column; gap: clamp(22px, 3.6vh, 34px); }
.proj-media { grid-column: 6 / span 7; }
.proj-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--ink-3); }
.proj-title { font-weight: 250; font-size: clamp(2.4rem, 4.6vw, 5.2rem); line-height: .98; letter-spacing: -.045em; }
.proj-link { align-self: flex-start; font-size: 14px; color: var(--ink-2); }
.proj-link .arr { display: inline-block; transition: transform .45s var(--ease-out); }
.proj-link:hover .arr { transform: translate(2px, -2px); }
@media (max-width: 900px) {
  .proj-copy { grid-column: 1 / -1; position: static; }
  .proj-media { grid-column: 1 / -1; margin-top: 40px; }
}

/* Why / Goal / Outcome — the NSBG spec list */
.spec > div { display: grid; grid-template-columns: 6.6em 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.spec > div:last-child { border-bottom: 1px solid var(--line); }
.spec dt { color: var(--ink-3); padding-top: .3em; }
.spec dd { font-size: 15px; line-height: 1.55; }
.js .spec { opacity: 0; transition: opacity 1.2s ease .4s; }
.js .spec.is-in { opacity: 1; }

/* ---------- autoplay video figure ---------- */
.fig { position: relative; }
.frame { position: relative; overflow: hidden; background: var(--paper-2); }
.frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px var(--line); }
.frame video, .frame img { width: 100%; height: 100%; object-fit: cover; filter: brightness(var(--media)); }
/* opens from a horizontal seam while the picture settles from a slight zoom */
.js .fig.seam .frame { clip-path: inset(50% 0 50% 0); transition: clip-path 1.6s var(--ease-io) .1s; }
.js .fig.seam .frame > video, .js .fig.seam .frame > img { transform: scale(1.14); transition: transform 2.6s var(--ease-out) .1s; }
.js .fig.seam.is-in .frame { clip-path: inset(0 0 0 0); }
.js .fig.seam.is-in .frame > video, .js .fig.seam.is-in .frame > img { transform: none; }
.vid-toggle {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px;
  background: var(--head-bg); color: var(--ink);
  font-size: 10.5px; font-weight: 420; letter-spacing: .16em; text-transform: uppercase;
  opacity: 0; transition: opacity .5s ease;
}
.vid-toggle .t-play { display: none; }
.vid.is-paused .vid-toggle .t-play { display: inline; }
.vid.is-paused .vid-toggle .t-pause { display: none; }
.vid.is-playing .vid-toggle .dot { background: currentColor; }
.vid:hover .vid-toggle, .vid-toggle:focus-visible, .vid.is-paused .vid-toggle { opacity: 1; }
@media (hover: none) { .vid-toggle { opacity: .9; } }

/* evidence: smaller figures, numbered as sub-figures */
.evidence { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(32px, 5vh, 52px); }
.ev { display: block; width: 100%; text-align: left; cursor: zoom-in; }
.ev .frame { aspect-ratio: 16 / 10; }
.ev .frame img, .ev .frame video { object-position: 0 0; transition: transform 1.2s var(--ease-out); }
.ev:hover .frame img, .ev:hover .frame video, .ev:focus-visible .frame img { transform: scale(1.04); }
.ev-cap { display: flex; gap: 10px; align-items: baseline; padding-top: 10px; font-size: 12px; line-height: 1.45; color: var(--ink-2); }
@media (max-width: 640px) { .evidence { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- other experiences ---------- */
.exps { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(64px, 10vh, 110px); border-top: 1px solid var(--line); padding-top: clamp(28px, 4vw, 44px); }
.exp { grid-column: span 3; display: flex; flex-direction: column; gap: 20px; }
.exp--media { grid-column: span 6; }
.exp-name { font-weight: 260; font-size: clamp(1.7rem, 2.4vw, 2.6rem); line-height: 1.1; letter-spacing: -.03em; }
.exp-sub { margin-top: -12px; color: var(--ink-2); font-size: 14px; }
.exp .spec > div { grid-template-columns: 1fr; gap: 4px; }
.exp .spec dt { padding-top: 0; }
.exp .spec dd { font-size: 14.5px; }
.exp--media .spec > div { grid-template-columns: 6.6em 1fr; gap: 16px; }
@media (max-width: 1000px) { .exp { grid-column: span 6; } .exp--media { grid-column: 1 / -1; } }
@media (max-width: 640px) { .exp { grid-column: 1 / -1; } }

/* ---------- what I learned / long-term ---------- */
.notes { align-items: start; border-top: 1px solid var(--line); padding-top: clamp(28px, 4vw, 44px); }
.learned { grid-column: 1 / span 6; }
.learned li { display: grid; grid-template-columns: 4.2em 1fr; gap: 16px; padding: 20px 0 22px; border-bottom: 1px solid var(--line); }
.learned .label { color: var(--ink-3); padding-top: .9em; }
.learned h3 { font-weight: 270; font-size: clamp(1.5rem, 2.1vw, 2.2rem); line-height: 1.12; letter-spacing: -.03em; }
.learned p { margin-top: 8px; color: var(--ink-2); max-width: 46ch; }
.label-card { grid-column: 8 / span 5; border-top: 1px solid var(--ink); padding-top: 18px; }
.label-card .label { color: var(--ink-3); }
.label-card p:not(.label) { margin-top: 14px; font-weight: 260; font-size: clamp(1.4rem, 2vw, 2.1rem); line-height: 1.2; letter-spacing: -.03em; }
@media (max-width: 900px) { .learned, .label-card { grid-column: 1 / -1; } .label-card { margin-top: 64px; } }

/* ---------- footer / contact ---------- */
.site-footer { margin-top: clamp(130px, 20vh, 220px); padding: clamp(80px, 14vh, 160px) var(--gutter) max(28px, env(safe-area-inset-bottom)); }
.closing { max-width: 34ch; color: var(--ink-2); font-size: clamp(15px, 1.15vw, 18px); line-height: 1.5; }
.mail { display: inline-block; margin: clamp(28px, 5vh, 48px) 0 clamp(70px, 13vh, 140px); font-weight: 220; font-size: clamp(2rem, 6.4vw, 7.4rem); line-height: 1.02; letter-spacing: -.055em; word-break: break-all; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.foot-row nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot-row nav a { font-size: 14px; color: var(--ink-2); padding: 6px 0; }
.foot-row nav a:hover { color: var(--ink); }
.foot-meta { color: var(--ink-3); }
.legal-page .site-footer { margin-top: 0; padding-top: 28px; }

/* ---------- lightbox ---------- */
.lb { width: min(94vw, 1500px); max-width: none; max-height: 94vh; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
.lb::backdrop { background: var(--paper); opacity: .97; }
.lb figure { display: grid; gap: 12px; justify-items: center; }
.lb img, .lb video { max-width: 100%; max-height: 82vh; width: auto; height: auto; box-shadow: 0 0 0 1px var(--line); background: var(--paper-2); }
.lb figcaption { display: flex; gap: 18px; align-items: baseline; font-size: 12px; letter-spacing: .02em; color: var(--ink-2); max-width: 80ch; }
.lb-close { position: fixed; top: 22px; right: var(--gutter); }
.lb[open] { animation: lb-in .6s var(--ease-out); }
@keyframes lb-in { from { opacity: 0; transform: translateY(12px); } }
:root.lb-open { overflow: hidden; }

/* ---------- legal pages / 404 ---------- */
.legal { padding: calc(var(--header-h) + clamp(56px, 10vh, 120px)) var(--gutter) clamp(80px, 12vh, 140px); }
.legal-in { max-width: 760px; }
.legal h1 { font-weight: 250; font-size: clamp(2.5rem, 5.4vw, 4.6rem); line-height: .98; letter-spacing: -.04em; }
.legal .updated { color: var(--ink-3); font-size: 13px; margin: 14px 0 clamp(36px, 6vh, 64px); }
.legal h2 { font-size: 11px; font-weight: 420; letter-spacing: .18em; text-transform: uppercase; margin: 44px 0 12px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 12px; }
.legal ul { display: grid; gap: 6px; padding-left: 1.1em; margin-bottom: 1em; }
.legal li { list-style: disc; }
.legal .summary { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); padding: 18px 0; }
.legal .summary ul { margin: 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 18px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); }
.legal th { font-size: 11px; font-weight: 420; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.legal code { font-size: .9em; white-space: nowrap; }
.legal a { text-underline-offset: .2em; text-decoration-thickness: 1px; }
.table-scroll { overflow-x: auto; }
.back { display: inline-block; margin-bottom: 32px; color: var(--ink-2); }

/* ---------- theme change: a calm cross-fade ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .6s; animation-timing-function: ease; }
.theme-anim, .theme-anim * { transition: background-color .5s ease, color .5s ease, border-color .5s ease !important; }

/* ---------- reduced motion: everything simply present ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .js .rl .rl-inner, .js .fade-up, .js .spec, .js .sec-rule, .js .sec-num, .js .sec-label, .js .sec-note,
  .js .scroll-cue, .js .scroll-line, .js .hero-plate figcaption, .js .plate-frame .pt,
  .js .site-header .site-nav li, .js .site-header .site-utils, .js .site-header .wm-letter { opacity: 1 !important; transform: none !important; }
  .js .fig.seam .frame { clip-path: none !important; }
  .js .fig.seam .frame > video, .js .fig.seam .frame > img { transform: none !important; }
  .js .plate-frame .draw { stroke-dashoffset: 0 !important; }
  .ev:hover .frame img, .ev:hover .frame video { transform: none; }
}

@media print {
  .site-header, .vid-toggle, .scroll-cue { display: none !important; }
  .js .rl .rl-inner, .js .fade-up, .js .spec { opacity: 1 !important; transform: none !important; }
  .js .fig.seam .frame { clip-path: none !important; }
}

/* plate points and evidence frames (added with the build templates) */
.plate-frame .pt-on { fill: currentColor; }
.plate-frame .pt-o { fill: var(--paper); stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.ev .frame { display: block; }
