/* ═══════════════════════════════════════════════
   REFRAME — Design System Stylesheet
   Warm Editorial · Light & Dark Mode
═══════════════════════════════════════════════ */

/* ─── Design tokens ─────────────────────────── */
:root {
  /* Terracotta */
  --tc-dark:  #712B13;
  --tc:       #993C1D;
  --tc-mid:   #D85A30;
  --tc-light: #F0997B;
  --tc-tint:  #FAECE7;

  /* Teal */
  --tl-dark:  #085041;
  --tl:       #0F6E56;
  --tl-mid:   #1D9E75;
  --tl-light: #5DCAA5;
  --tl-tint:  #E1F5EE;

  /* Amber */
  --am-dark:  #633806;
  --am:       #854F0B;
  --am-mid:   #BA7517;
  --am-light: #EF9F27;
  --am-tint:  #FAEEDA;

  /* Semantic tags */
  --nar:  #D75930;
  --tech: #326FB5;
  --his:  #BC1C1C;
  --geo:  #1B9D75;
  --pop:  #7e50b3;

  /* Border radius */
  --r4:    4px;
  --r8:    8px;
  --r10:   10px;
  --r12:   12px;
  --r16:   16px;
  --r20:   20px;
  --rpill: 100px;

  /* Motion */
  --ease-out:  cubic-bezier(.16, 1, .3, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --ease-in:   cubic-bezier(.4, 0, 1, 1);
  --dur-fast:  150ms;
  --dur-mid:   260ms;
  --dur-slow:  420ms;
  --dur-xslow: 600ms;

  /* Typefaces */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
}

/* ─── Light mode ────────────────────────────── */
[data-theme="light"] {
  --bg0: #FDFAF6;
  --bg1: #F7F4EF;
  --bg2: #EDE9E2;
  --bg3: #E3DDD5;
  --t1:  #2C2C2A;
  --t2:  #5F5E5A;
  --t3:  #888780;
  --t4:  #B4B2A9;
  --bd:  rgba(136, 135, 128, .18);
  --bd2: rgba(136, 135, 128, .32);
  --shadow:    0 1px 3px rgba(44,44,42,.06), 0 4px 12px rgba(44,44,42,.08);
  --shadow-lg: 0 8px 32px rgba(44,44,42,.12), 0 2px 8px rgba(44,44,42,.06);
}

/* ─── Dark mode ─────────────────────────────── */
[data-theme="dark"] {
  --bg0: #120E0B;
  --bg1: #1A1612;
  --bg2: #231F1A;
  --bg3: #2E281F;
  --t1:  #F2EAE4;
  --t2:  #A8998E;
  --t3:  #6B6058;
  --t4:  #3D352E;
  --bd:  rgba(255, 255, 255, .07);
  --bd2: rgba(255, 255, 255, .14);
  --shadow:    0 1px 3px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.3);
}

/* ─── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg0);
  color: var(--t1);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 14px;
  transition: background .35s, color .35s;
}

/* ─── Nav ───────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--bg1);
  border-bottom: .5px solid var(--bd);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  gap: 12px;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--t1);
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.nav__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--tc-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .3s var(--ease-back);
}
.nav__logo-mark:hover { transform: scale(1.08); }

.nav__sub {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--t4);
  margin-left: 2px;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Segmented control */
.seg {
  display: flex;
  background: var(--bg2);
  border-radius: var(--r8);
  padding: 3px;
  border: .5px solid var(--bd);
  position: relative;
}

.seg__opt {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--t3);
  cursor: pointer;
  border-radius: 6px;
  position: relative;
  z-index: 1;
  transition: color .2s;
  white-space: nowrap;
  user-select: none;
}
.seg__opt.active { color: var(--t1); }

.seg__slider {
  position: absolute;
  top: 3px;
  bottom: 3px;
  background: var(--bg0);
  border: .5px solid var(--bd2);
  border-radius: 6px;
  box-shadow: var(--shadow);
  transition: left var(--dur-mid) var(--ease-back), width var(--dur-mid) var(--ease-back);
  z-index: 0;
}

/* Light switch */
.light-switch {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg2);
  border: .5px solid var(--bd2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--t2);
  flex-shrink: 0;
  transition: background .25s, transform .2s var(--ease-back);
}
.light-switch:hover { transform: scale(1.08); }

/* ─── Hero ──────────────────────────────────── */
.hero {
  padding: 48px 24px 32px;
  border-bottom: .5px solid var(--bd);
  max-width: 1280px;
  margin: 0 auto;
}

.hero__eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tc-mid);
  margin-bottom: 10px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  color: var(--t1);
  line-height: 1.1;
  letter-spacing: -.02em;
  max-width: 600px;
  margin-bottom: 12px;
}

.hero__sub {
  font-size: 14px;
  color: var(--t2);
  max-width: 540px;
  line-height: 1.7;
}

/* ─── Main ──────────────────────────────────── */
.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.panel { display: none; }
.panel.active { display: block; }

/* ─── Collection panel ────────────────────────────── */

#collection-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.mwg_effect000 {
    height: 100vh;
    overflow: hidden;
    position: relative;
    display: grid;
    place-items: center;
}

.mwg_effect000 .header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border-bottom: 1px solid #323232;
    padding: 20px 25px;
    color: #BAB8B9;
}
.mwg_effect000 .header div:nth-child(2) {
    font-size: 26px;
}
.mwg_effect000 .header div:last-child {
    display: flex;
    justify-content: flex-end;
}
.mwg_effect000 .button {
    font-size: 14px;
    text-transform: uppercase;
    
    border-radius: 24px;
    height: 48px;
    gap: 5px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    width: max-content; 
}
.mwg_effect000 .button1 {
    background-color: #232323;
}
.mwg_effect000 .button2 {
    border: 1px solid #323232;
}


.mwg_effect000 .button img {
    width: 22px;
    height: auto;
    display: block;
}

.mwg_effect000 .medias {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1vw;
}
.mwg_effect000 .medias img {
    width: 11vw;
    height: 11vw;
    object-fit: cover;
    border-radius: 4%;
    display: block;
    pointer-events: none;
    will-change: transform;
    overflow: hidden;
}

@media (max-width: 768px) {
    .mwg_effect000 .header {
        padding: 15px;
        margin: auto;
        display: flex;
        justify-content: center;
    }
    .mwg_effect000 .header div:nth-child(2) {
        display: none;
    }
    .mwg_effect000 .medias {
        gap: 2vw;
    }
    .mwg_effect000 .medias img {
        width: 18vw;
        height: 18vw;
    }
}

/* ─── Bento grid ────────────────────────────── */
.bento { display: grid; gap: 12px; }
.bento--2 { grid-template-columns: repeat(2, 1fr); }
.bento--3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
  .bento--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .bento--2,
  .bento--3 { grid-template-columns: 1fr; }
}

/* ─── Tile ──────────────────────────────────── */
.tile {
  background: var(--bg1);
  border: .5px solid var(--bd);
  border-radius: var(--r16);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: background .3s, border-color .3s;
  overflow: hidden;
  position: relative;
}

.tile--accent { border-color: rgba(216, 90, 48, .3); }
.tile--wide   { grid-column: 1 / -1; }

.tile__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 16px;
}

/* ─── Section headings ──────────────────────── */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 40px 0 16px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--t1);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.section-head__line {
  flex: 1;
  height: .5px;
  background: var(--bd);
  margin-bottom: 4px;
}
.section-head__count {
  font-size: 11px;
  color: var(--t4);
  white-space: nowrap;
}

/* ─── Swatches ──────────────────────────────── */
.colour-strip {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.sw-col { text-align: center; }

.swatch {
  flex: 1;
  min-width: 36px;
  height: 44px;
  border-radius: var(--r8);
  position: relative;
  cursor: default;
  transition: transform .2s var(--ease-back);
  border: .5px solid rgba(0,0,0,.06);
}
[data-theme="dark"] .swatch { border-color: rgba(255,255,255,.06); }
.swatch--light-bd { border-color: rgba(136,135,128,.2) !important; }
.swatch:hover { transform: scaleY(1.06); }

.swatch__hex {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--t3);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
}
.swatch:hover .swatch__hex { opacity: 1; }

.sw-name { font-size: 9px; color: var(--t4); margin-top: 24px; }
.sw-name--mid   { color: var(--tc-mid); }
.sw-name--teal  { color: var(--tl-mid); }
.sw-name--amber { color: var(--am-mid); }

.colour-meta { margin-top: 20px; }
.colour-name { font-size: 11px; font-weight: 500; margin-bottom: 5px; }
.colour-name.tc    { color: var(--tc-mid); }
.colour-name.teal  { color: var(--tl-mid); }
.colour-name.amber { color: var(--am-mid); }
.colour-use { font-size: 11px; color: var(--t3); line-height: 1.65; }

/* ─── Surface ramp ──────────────────────────── */
.surface-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
@media (max-width: 640px) { .surface-grid { grid-template-columns: repeat(2, 1fr); } }

.surface-swatch {
  height: 48px;
  border-radius: var(--r8);
  border: .5px solid var(--bd2);
  margin-bottom: 6px;
}
.surface-name { font-size: 10px; color: var(--t3); font-weight: 500; }
.surface-val  { font-size: 9px;  color: var(--t4); margin-top: 2px; }
.surface-note { font-size: 12px; color: var(--t3); line-height: 1.7; max-width: 720px; }

/* ─── Colour psychology ─────────────────────── */
.psych-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 0;
}
@media (max-width: 640px) { .psych-grid { grid-template-columns: 1fr; } }

.psych-card {
  background: var(--bg2);
  border-radius: var(--r12);
  padding: 16px;
  border: .5px solid var(--bd);
}
.psych-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.psych-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--t1);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}
.psych-use { font-size: 11px; color: var(--t3); line-height: 1.6; }

/* ─── Typography ────────────────────────────── */
.type-stack { display: flex; flex-direction: column; gap: 0; }

.type-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: .5px solid var(--bd);
  gap: 12px;
}
.type-row:last-child { border-bottom: none; }
.type-row__meta { font-size: 10px; color: var(--t2); white-space: nowrap; text-wrap: wrap; text-align: right; }

/* Type specimens */
.ts-display { font-family: var(--font-display); color: var(--t1); }
.ts-32 { font-size: 32px; letter-spacing: -.02em; line-height: 1.1; }
.ts-22 { font-size: 22px; letter-spacing: -.015em; }
.ts-18 { font-size: 18px; letter-spacing: -.01em; }
.ts-16i { font-size: 16px; font-style: italic; color: var(--t2); }

.ts-body { font-family: var(--font-body); }
.ts-16m  { font-size: 16px; font-weight: 500; color: var(--t1); }
.ts-14   { font-size: 14px; color: var(--t1); }
.ts-13   { font-size: 13px; }
.ts-11   { font-size: 11px; }
.ts-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--t3);
}
.t2 { color: var(--t2); }
.t3 { color: var(--t3); }

/* ─── Tags ──────────────────────────────────── */
.tags-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--r4);
}
.tag--tech     { background: var(--tech); color: var(--tc-tint); }
.tag--nar      { background: var(--nar); color: var(--tc-tint); }
.tag--his      { background: var(--his); color: var(--tc-tint); }
.tag--geo      { background: var(--geo); color: var(--tc-tint); }
.tag--pop      { background: var(--pop); color: var(--tc-tint); }
.tag-note { font-size: 12px; color: var(--t3); line-height: 1.7; }

/* ─── Border radius demo ────────────────────── */
.radius-demo { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.r-col { text-align: center; }
.r-box {
  background: var(--bg2);
  border: .5px solid var(--bd2);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  font-size: 10px;
  color: var(--t3);
  transition: background .25s, transform .2s var(--ease-back);
  cursor: default;
}
.r-box:hover { background: var(--tc-tint); transform: scale(1.06); }
.r-label { font-size: 9px; color: var(--t3); margin-top: 5px; }

/* ─── Spacing ───────────────────────────────── */
.sp-strip { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.sp-row   { display: flex; align-items: center; gap: 12px; }
.sp-label { font-size: 11px; color: var(--t3); width: 52px; flex-shrink: 0; }
.sp-bar   { height: 10px; background: var(--tc-mid); border-radius: 3px; }
.sp-val   { font-size: 11px; color: var(--t2); font-weight: 500; }

.gap-examples { display: flex; flex-direction: column; gap: 14px; }
.gap-example__label { font-size: 12px; font-weight: 500; color: var(--t1); margin-bottom: 6px; }
.gap-block { height: 28px; background: var(--bg3); border-radius: var(--r8); }
.gap-chip  { height: 28px; background: var(--bg3); border-radius: var(--rpill); flex: 1; }
.gap-chip--active { background: var(--tc-tint); border: .5px solid rgba(153,60,29,.2); }
.gap-list { border: .5px solid var(--bd); border-radius: var(--r8); overflow: hidden; }
.gap-list-row {
  padding: 8px 12px;
  border-bottom: .5px solid var(--bd);
  font-size: 12px;
  color: var(--t2);
}

/* ─── Buttons ───────────────────────────────── */
.btn-grid { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  border-radius: var(--r10);
  padding: 0 18px;
  height: 40px;
  letter-spacing: .01em;
  transition: transform var(--dur-fast) var(--ease-back), opacity var(--dur-fast);
}
.btn:active { transform: scale(.97); }

.btn--primary { background: var(--tc-mid);   color: #fff; }
.btn--ghost   { background: var(--tc-tint);  color: var(--tc);  border: .5px solid rgba(153,60,29,.25); }
.btn--outline { background: transparent;     color: var(--t1);  border: .5px solid var(--bd2); }
.btn--teal    { background: var(--tl-mid);   color: #fff; }
.btn--amber   { background: var(--am-tint);  color: var(--am);  border: .5px solid rgba(133,79,11,.25); }
.btn--sm      { height: 32px; font-size: 11px; padding: 0 12px; }
.btn--lg      { height: 48px; font-size: 14px; }

/* ─── Inputs ────────────────────────────────── */
.input-demo { display: flex; flex-direction: column; gap: 10px; }
.input {
  width: 100%;
  height: 40px;
  border-radius: var(--rpill);
  background: var(--bg2);
  border: .5px solid var(--bd);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
  color: var(--t3);
  font-size: 13px;
  font-family: var(--font-body);
  transition: border-color .2s;
  cursor: text;
}
.input--focused {
  border-color: var(--tc-mid);
  background: var(--bg0);
  color: var(--t1);
}
.cursor {
  display: inline-block;
  width: 1.5px;
  height: 14px;
  background: var(--tc-mid);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ─── Border demo ───────────────────────────── */
.border-demo { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.border-step { text-align: center; }
.border-swatch {
  width: 72px;
  height: 40px;
  border-radius: var(--r8);
  background: var(--bg1);
  margin-bottom: 6px;
}
.border-label { font-size: 9px; color: var(--t3); }
.border-label.tc { color: var(--tc); }
.border-note {
  font-size: 12px;
  color: var(--t3);
  line-height: 1.7;
}
.border-note code {
  font-family: monospace;
  font-size: 11px;
  background: var(--bg2);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ─── Duration tokens ───────────────────────── */
.dur-stack { display: flex; flex-direction: column; gap: 12px; }
.dur-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: .5px solid var(--bd);
}
.dur-row:last-child { border-bottom: none; }
.dur-name { font-size: 12px; font-weight: 500; color: var(--t1); width: 90px; flex-shrink: 0; }
.dur-bar  { height: 4px; background: var(--tc-mid); border-radius: 2px; }
.dur-ms   { font-size: 11px; color: var(--t3); width: 44px; flex-shrink: 0; }
.dur-use  { font-size: 11px; color: var(--t4); }

/* ─── Easing demo ───────────────────────────── */
.ease-row { display: flex; flex-direction: column; gap: 10px; }
.ease-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--r8);
  transition: background .15s;
}
.ease-item:hover { background: var(--bg2); }

.ease-name { font-size: 11px; color: var(--t2); width: 88px; flex-shrink: 0; }
.ease-track {
  flex: 1;
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  position: relative;
  overflow: visible;
}
.ease-ball {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--tc-mid);
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}
.ease-spec { font-size: 10px; color: var(--t4); width: 160px; flex-shrink: 0; font-family: monospace; }
.ease-note { font-size: 11px; color: var(--t4); margin-top: 10px; line-height: 1.6; }

/* ─── Demo note ─────────────────────────────── */
.demo-note { font-size: 11px; color: var(--t3); line-height: 1.6; margin-top: 12px; }

/* ─── Bookmark ──────────────────────────────── */
.bm-demo { display: flex; align-items: center; gap: 16px; }
.bm-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg2);
  border: .5px solid var(--bd2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--t2);
  transition: color .2s;
}
.bm-btn.saved { color: var(--am-light); }
.bm-label { font-size: 12px; color: var(--t3); }

/* ─── Like ──────────────────────────────────── */
.like-wrap { display: flex; margin-bottom: 4px; }
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--rpill);
  background: var(--bg2);
  border: .5px solid var(--bd2);
  font-size: 13px;
  color: var(--t2);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.like-btn.liked {
  color: var(--am-light);
  background: var(--am-tint);
  border-color: var(--am-light);
}
.like-count {
  font-weight: 500;
  min-width: 18px;
  display: inline-block;
  text-align: center;
}

/* ─── Audio player ──────────────────────────── */
.player {
  background: var(--bg2);
  border-radius: var(--r12);
  padding: 14px;
  border: .5px solid var(--bd);
}
.player__row { display: flex; align-items: center; gap: 12px; }
.player__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--tc-mid);
  background: transparent;
  color: var(--tc-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, transform .15s var(--ease-back);
}
.player__btn.playing {
  background: var(--tc-mid);
  color: #fff;
  border-color: transparent;
}
.player__info { flex: 1; }
.player__track { font-size: 11px; font-weight: 500; color: var(--t1); margin-bottom: 5px; }
.player__bar {
  height: 3px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}
.player__fill {
  height: 100%;
  background: var(--tc-mid);
  border-radius: 2px;
  width: 0%;
  transition: width .3s linear;
}
.player__time { font-size: 10px; color: var(--t3); flex-shrink: 0; }

/* ─── Stream tabs ───────────────────────────── */
.stream-tabs {
  display: flex;
  background: var(--bg2);
  border-radius: var(--r8);
  border: .5px solid var(--bd);
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
}
.stream-tab {
  flex: 1;
  padding: 9px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--t3);
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color .2s;
  user-select: none;
}
.stream-tab.active { color: #fff; }
.stream-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 25%;
  background: var(--tc-mid);
  z-index: 0;
  transition: left .28s var(--ease-back);
}
.stream-content-demo {
  font-size: 12px;
  color: var(--t2);
  line-height: 1.7;
  padding: 2px 2px;
  min-height: 52px;
}
.term {
  color: var(--tl-mid);
  border-bottom: .5px solid rgba(29,158,117,.4);
  cursor: pointer;
}
[data-theme="light"] .term { color: var(--tl); }

/* ─── POI dots ──────────────────────────────── */
.poi-stage {
  background: linear-gradient(145deg, #C8D5C0, #A4B890);
  border-radius: var(--r12);
  height: 160px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.poi {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tc-mid);
  border: 2px solid rgba(253,250,246,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  transform: translate(-50%, -50%);
  z-index: 2;
  cursor: pointer;
}
.poi--dim { opacity: .4; }
.poi__ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(216,90,48,.4);
  animation: poi-pulse 2.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes poi-pulse {
  0%, 100% { transform: scale(.85); opacity: .6; }
  50%       { transform: scale(1.2); opacity: 0; }
}
.poi-card-demo {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg0);
  padding: 12px;
  border-top: .5px solid var(--bd);
  transform: translateY(100%);
  opacity: 0;
  display: none;
}
.poi-card-demo__title { font-size: 12px; font-weight: 500; color: var(--t1); margin-bottom: 3px; }
.poi-card-demo__text  { font-size: 11px; color: var(--t2); line-height: 1.5; }

/* ─── Term tooltip ──────────────────────────── */
.term-demo-wrap {
  padding: 16px;
  background: var(--bg2);
  border-radius: var(--r8);
  font-size: 13px;
  color: var(--t2);
  line-height: 1.7;
  position: relative;
}
.tooltip-wrap { position: relative; display: inline; }
.tooltip-box {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg1);
  border: .5px solid var(--bd2);
  border-radius: var(--r12);
  padding: 12px 14px;
  width: 220px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  font-size: 11px;
  color: var(--t2);
  line-height: 1.6;
  z-index: 10;
}
.tooltip-box__term {
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 4px;
  font-size: 12px;
}

/* ─── Skeleton loader ───────────────────────── */
.skeleton-stage { display: flex; flex-direction: column; gap: 8px; }
.skel { border-radius: var(--r8); overflow: hidden; position: relative; }
.skel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.25) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}
[data-theme="dark"] .skel::after {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.07) 50%, transparent 100%);
  background-size: 200% 100%;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel-img  { height: 90px; background: var(--bg3); }
.skel-line { height: 10px; background: var(--bg3); margin-bottom: 4px; }

/* ─── Pull to refresh ───────────────────────── */
.pull-stage {
  background: var(--bg1);
  border-radius: var(--r12);
  border: .5px solid var(--bd);
  overflow: hidden;
  height: 180px;
  position: relative;
}
.pull-indicator {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  gap: 8px;
}
.pull-frame {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--bd2);
  border-radius: var(--r8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t3);
  transition: border-color .3s, color .3s;
}
.pull-frame.ready {
  border-color: var(--tc-mid);
  color: var(--tc-mid);
}
.pull-hint { font-size: 11px; color: var(--t3); }
.pull-content { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.pull-line { height: 8px; border-radius: 4px; background: var(--bg3); }

/* ─── Screen transition ─────────────────────── */
.trans-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.trans-stage {
  position: relative;
  height: 100px;
  border-radius: var(--r8);
  overflow: hidden;
  border: .5px solid var(--bd);
}
.trans-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.trans-screen--a { background: var(--bg2); color: var(--t2); }
.trans-screen--b { background: var(--tc-tint); color: var(--tc); transform: translateX(100%); }

/* ─── Toggle ────────────────────────────────── */
.toggle-list-demo { display: flex; flex-direction: column; gap: 10px; }
.toggle-demo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--t1);
}
.toggle {
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: var(--bg3);
  position: relative;
  cursor: pointer;
  transition: background .25s;
  border: .5px solid var(--bd2);
  flex-shrink: 0;
}
.toggle.on { background: var(--tc-mid); border-color: transparent; }
.toggle::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  transition: left .22s var(--ease-back);
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.toggle.on::after  { left: 21px; }
.toggle:not(.on)::after { left: 2px; }

/* ─── Chip select ───────────────────────────── */
.chip-demo-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip-sel {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--rpill);
  border: .5px solid var(--bd2);
  background: var(--bg2);
  color: var(--t2);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  user-select: none;
}
.chip-sel.active-chip {
  background: var(--tc-tint);
  color: var(--tc);
  border-color: rgba(153,60,29,.25);
}
.chip-sel--teal.active-chip {
  background: var(--tl-tint);
  color: var(--tl);
  border-color: rgba(15,110,86,.25);
}

/* ─── Hover cards ───────────────────────────── */
.hover-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.art-card {
  border-radius: var(--r12);
  overflow: hidden;
  cursor: pointer;
  border: .5px solid var(--bd);
  background: var(--bg1);
}
.art-card__img { height: 100px; width: 100%; }
.art-card__img--a { background: linear-gradient(145deg, #C8D5C0, #A4B890); }
.art-card__img--b { background: linear-gradient(145deg, #B8C9D8, #8EA8C0); }
.art-card__body { padding: 10px 12px; }
.art-card__title { font-size: 12px; font-weight: 500; color: var(--t1); margin-bottom: 2px; }
.art-card__meta  { font-size: 10px; color: var(--t3); }

/* ─── Golden rules ──────────────────────────── */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.rule__num {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--tc-mid);
  margin-bottom: 5px;
  line-height: 1;
}
.rule__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 5px;
}
.rule__text { font-size: 11px; color: var(--t3); line-height: 1.65; }

/* ─── Footer ────────────────────────────────── */
.foot {
  border-top: .5px solid var(--bd);
  padding: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--t4);
}

/* ─── Responsive ────────────────────────────── */
@media (max-width: 720px) {
  .nav__sub { display: none; }
  .seg__opt { padding: 6px 10px; }
}
