  :root {
    /* Modusign brand: primary #FACA65 (gold), base #0A0803 (near-black) */
    --brand-primary: #FACA65;
    --brand-base: #0A0803;

    --bg: #FBF8F1;
    --surface: #FFFFFF;
    --surface-2: #F3ECDC;
    --border: #E8DFC8;
    --ink: #0A0803;
    --ink-2: #34301F;
    --ink-3: #6B6452;
    --accent-tech: #A97913;
    --accent-tech-soft: #A979131A;
    --accent-money: #7A4A0F;
    --accent-money-soft: #7A4A0F1A;
    --grid-line: #E8DFC8;

    /* fixed-look chapter divider panel: intentionally identical in both themes */
    --divider-bg: #0A0803;
    --divider-ink: #FBF6EA;
    --divider-ink-2: #DCD2B8;
    --divider-ink-3: #978C6E;
    --divider-accent: #FACA65;
    --divider-border: #2A2415;

    --font-kr: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
    --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #0A0803;
      --surface: #17140C;
      --surface-2: #201B10;
      --border: #332C1B;
      --ink: #FBF6EA;
      --ink-2: #DCD2B8;
      --ink-3: #978C6E;
      --accent-tech: #FACA65;
      --accent-tech-soft: #FACA6524;
      --accent-money: #E8A93E;
      --accent-money-soft: #E8A93E24;
      --grid-line: #332C1B;
    }
  }
  :root[data-theme="dark"] {
    --bg: #0A0803;
    --surface: #17140C;
    --surface-2: #201B10;
    --border: #332C1B;
    --ink: #FBF6EA;
    --ink-2: #DCD2B8;
    --ink-3: #978C6E;
    --accent-tech: #FACA65;
    --accent-tech-soft: #FACA6524;
    --accent-money: #E8A93E;
    --accent-money-soft: #E8A93E24;
    --grid-line: #332C1B;
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-kr);
    line-height: 1.65;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  a { color: inherit; }
  .num { font-family: var(--font-mono); }
  h1, h2, h3 { text-wrap: balance; margin: 0; }

  #progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--accent-tech), var(--accent-money));
    z-index: 60; transition: width 0.1s linear;
  }

  #navdots {
    position: fixed; right: 20px; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 9px; z-index: 50;
  }
  #navdots a {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--border); display: block; text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    position: relative;
  }
  #navdots a.chapter { width: 8px; height: 16px; border-radius: 4px; }
  #navdots a.active { background: var(--accent-tech); transform: scale(1.3); }
  #navdots a:hover::after {
    content: attr(data-label);
    position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
    font-family: var(--font-mono); font-size: 11px; white-space: nowrap;
    background: var(--surface); color: var(--ink-2); border: 1px solid var(--border);
    padding: 3px 8px; border-radius: 4px;
  }
  @media (max-width: 860px) { #navdots { display: none; } }

  .slide {
    min-height: 100vh;
    min-height: 100svh;
    width: 100%;
    padding: 88px 8vw 64px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--bg);
  }
  .slide:first-of-type { border-top: none; }

  .eyebrow {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--accent-tech);
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 18px;
  }
  .eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent-tech); display: inline-block; }

  .slidefoot {
    position: absolute; bottom: 28px; left: 8vw; right: 8vw;
    display: flex; justify-content: space-between; align-items: center;
    font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  }

  .h2 {
    font-size: clamp(26px, 3.4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.01em;
    max-width: 34ch;
    color: var(--ink);
    margin-bottom: 14px;
  }
  .accent-u { color: var(--accent-tech); }
  .accent-m { color: var(--accent-money); }

  .lede {
    font-size: 15.5px;
    font-weight: 500;
    color: var(--ink-2);
    max-width: 62ch;
    margin: 0 0 8px;
  }

  .body-text {
    font-size: 15px;
    color: var(--ink-2);
    max-width: 66ch;
  }
  .body-text strong { color: var(--ink); font-weight: 800; }
  .body-text .step { display: block; margin: 0 0 10px; }
  .body-text .step b { color: var(--ink); font-weight: 800; }

  .callout {
    margin-top: 16px; padding: 12px 16px; border-radius: 8px;
    background: var(--accent-tech-soft); border: 1px solid var(--accent-tech);
    font-size: 13.5px; color: var(--ink); font-weight: 600; max-width: 60ch;
  }

  .statrow { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
  .stat {
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    padding: 16px 18px; min-width: 150px; flex: 1 1 150px;
  }
  .stat .v { font-family: var(--font-mono); font-size: 24px; font-weight: 800; color: var(--accent-tech); }
  .stat .v.money { color: var(--accent-money); }
  .stat .l { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-top: 4px; }

  .grid2 { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
  @media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; gap: 28px; } }

  .card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }

  .trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
  @media (max-width: 900px) { .trio { grid-template-columns: 1fr; } }
  .trio .card .tag { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--accent-tech); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
  .trio .card h3 { font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
  .trio .card p { font-size: 13.5px; color: var(--ink-2); margin: 0; }
  .trio .card .metric { font-family: var(--font-mono); font-size: 19px; font-weight: 800; color: var(--ink); margin: 6px 0 10px; }

  /* ---- chapter divider (fixed dark look in both themes) ---- */
  .slide--divider {
    background: var(--divider-bg); color: var(--divider-ink);
    justify-content: center; align-items: flex-start;
    border-top-color: var(--divider-border);
  }
  .slide--divider .eyebrow { color: var(--divider-accent); }
  .slide--divider .eyebrow::before { background: var(--divider-accent); }
  .chnum {
    font-family: var(--font-mono); font-weight: 800;
    font-size: clamp(90px, 14vw, 200px); line-height: 1;
    color: var(--divider-ink); opacity: 0.07; position: absolute; right: 6vw; top: 50%; transform: translateY(-50%);
    letter-spacing: -0.04em;
  }
  .slide--divider .h2 { color: var(--divider-ink); max-width: 28ch; font-size: clamp(28px, 4.2vw, 50px); }
  .slide--divider .lede { color: var(--divider-ink-2); max-width: 54ch; font-size: 16px; font-weight: 500; }
  .slide--divider .metarow { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
  .slide--divider .metarow div { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--divider-accent); }
  .slide--divider .metarow span { display: block; color: var(--divider-ink-3); font-size: 11px; font-weight: 500; margin-top: 3px; }
  .slide--divider .slidefoot { color: var(--divider-ink-3); }
  .slide--divider .stat { background: rgba(255,255,255,0.05); border-color: var(--divider-border); }
  .slide--divider .stat .l { color: var(--divider-ink-3); }
  .slide--divider .chartbox { background: rgba(255,255,255,0.04); border-color: var(--divider-border); }
  .slide--divider .charttitle { color: var(--divider-ink-3); }
  .slide--divider .body-text { color: var(--divider-ink-2); }
  .slide--divider .body-text strong { color: var(--divider-ink); }

  /* ---- chapter-marker on a regular (non-inverted) content slide ---- */
  .chapnum-mini {
    position: absolute; right: 6vw; top: 18px;
    font-family: var(--font-mono); font-weight: 800; font-size: 15vw;
    line-height: 1; color: var(--ink); opacity: 0.045; letter-spacing: -0.04em;
    pointer-events: none;
  }

  .split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
  @media (max-width: 900px) { .split2 { grid-template-columns: 1fr; } }
  .split2 .card h3 { font-size: 14.5px; font-weight: 800; color: var(--ink); margin: 0 0 10px; display:flex; align-items:center; gap:8px;}
  .split2 .card h3::before { content:"→"; color: var(--accent-tech); font-family: var(--font-mono); }
  .split2 .card p { font-size: 13.5px; color: var(--ink-2); }
  .split2 .ministat { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
  .split2 .ministat b { font-family: var(--font-mono); display:block; font-size: 16px; font-weight: 800; color: var(--accent-tech); }
  .split2 .ministat.money b { color: var(--accent-money); }
  .split2 .ministat span { font-size: 11px; font-weight: 600; color: var(--ink-3); }

  .legend { display: flex; gap: 16px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); margin-top: 10px; font-family: var(--font-mono); }
  .legend .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
  .sw.tech { background: var(--accent-tech); }
  .sw.money { background: var(--accent-money); }
  .sw.base { background: var(--ink-3); opacity: 0.5; }

  .phasegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
  @media (max-width: 900px) { .phasegrid { grid-template-columns: 1fr; } }
  .phasecard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 7px; }
  .phaseimg { background: var(--surface-2); border-radius: 8px; overflow: hidden; height: 132px; display: flex; align-items: center; justify-content: center; }
  .phaseimg img { width: 100%; height: 100%; object-fit: contain; display: block; }
  .phasetag { font-family: var(--font-mono); font-size: 10px; font-weight: 800; color: var(--accent-tech); text-transform: uppercase; letter-spacing: 0.03em; }
  .phasecard h3 { font-size: 13.5px; font-weight: 800; color: var(--ink); margin: 0; line-height: 1.3; }
  .phasecard ul { margin: 0; padding-left: 15px; font-size: 11.5px; line-height: 1.45; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; }
  .phasecard ul li::marker { color: var(--accent-tech); }
  .phasecard p { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--ink-2); }
  .phasearrow { display: none; }
  @media (min-width: 901px) {
    .phasegrid { position: relative; }
    .phasegrid > .phasecard:not(:last-child)::after {
      content: "→"; position: absolute; top: 66px; right: -20px; transform: translateX(50%);
      font-family: var(--font-mono); font-size: 15px; font-weight: 800; color: var(--accent-tech); z-index: 1;
    }
  }

  .chartbox { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px 14px; }
  .chartbox .charttitle { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 10px; }
  svg text { font-family: var(--font-mono); }

  .flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
  .flow .step {
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    padding: 14px 16px; font-size: 12.5px; color: var(--ink-2); max-width: 190px;
  }
  .flow .step b { display:block; color: var(--ink); font-weight: 800; font-size: 13px; margin-bottom: 3px; }
  .flow .arrow { color: var(--accent-tech); font-family: var(--font-mono); font-size: 16px; }
  @media (max-width: 900px){ .flow { flex-direction: column; align-items: stretch;} .flow .arrow{ transform: rotate(90deg); align-self:center;} .flow .step{max-width:none;} }

  .chipsrow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
  .chip {
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    padding: 9px 16px; font-size: 12.5px; font-weight: 700; color: var(--ink-2);
    display: flex; align-items: center; gap: 8px;
  }
  .chip::before { content: "✓"; color: var(--accent-tech); font-weight: 800; }

  .jline { display: flex; flex-direction: column; gap: 0; margin-top: 30px; max-width: 680px; }
  .jstep { display: grid; grid-template-columns: 28px 1fr; gap: 16px; padding-bottom: 30px; position: relative; }
  .jstep:last-child { padding-bottom: 0; }
  .jstep .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent-tech); margin-top: 4px; position: relative; z-index: 1; }
  .jstep::before { content: ""; position: absolute; left: 5px; top: 18px; bottom: 0; width: 1px; background: var(--border); }
  .jstep:last-child::before { display: none; }
  .jstep h4 { margin: 0 0 4px; font-size: 15px; font-weight: 800; color: var(--ink); }
  .jstep .role { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--accent-tech); margin-bottom: 6px; }
  .jstep p { margin: 0; font-size: 13.5px; color: var(--ink-2); max-width: 56ch; }

  .cover { justify-content: center; }
  .cover .kicker { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--accent-tech); letter-spacing: 0.08em; margin-bottom: 22px; }
  .cover h1 { font-size: clamp(34px, 5.6vw, 68px); font-weight: 800; letter-spacing: -0.02em; max-width: 16ch; line-height: 1.12; color: var(--ink); }
  .cover .sub1 { font-size: clamp(15px, 1.6vw, 19px); color: var(--ink); margin-top: 20px; max-width: 46ch; font-weight: 700;}
  .cover .sub2 { font-size: 14.5px; color: var(--ink-2); margin-top: 10px; max-width: 50ch; font-weight: 500; }
  .cover .coverstats { display:flex; gap: 30px; margin-top: 46px; flex-wrap: wrap; }
  .cover .coverstats div b { display:block; font-family: var(--font-mono); font-size: 22px; font-weight: 800; color: var(--accent-tech); }
  .cover .coverstats div:nth-child(2) b { color: var(--accent-money); }
  .cover .coverstats div:nth-child(3) b { color: var(--ink); }
  .cover .coverstats div span { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }

  .badge {
    display: inline-flex; align-items: center; gap: 8px; width: fit-content;
    margin-top: 24px; padding: 8px 16px; border-radius: 999px;
    background: var(--accent-tech-soft); border: 1px solid var(--accent-tech);
    font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--accent-tech);
  }
  .badge::before { content: "◆"; font-size: 8px; }

  .core-tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: 6px;
    background: var(--accent-tech); color: var(--brand-base);
    font-family: var(--font-mono); font-size: 11px; font-weight: 800; letter-spacing: 0.03em;
    margin-left: 10px; vertical-align: middle;
  }

  .connect-box {
    margin-top: 18px; padding: 16px 20px; border-radius: 10px;
    background: var(--accent-money-soft); border: 1px solid var(--accent-money);
    font-size: 13.5px; color: var(--ink); font-weight: 600; max-width: 62ch;
  }
  .connect-box b { color: var(--accent-money); }

  .slide--core { background: linear-gradient(180deg, var(--accent-tech-soft) 0%, transparent 46%); }
  .slide--core .callout { background: var(--accent-tech); color: var(--brand-base); border-color: var(--accent-tech); font-weight: 800; }

  .closing-msg { font-size: 16px; color: var(--ink-2); max-width: 62ch; line-height: 1.9; margin-top: 6px; }
  .closing-msg strong { color: var(--ink); font-weight: 800; }
  .signature { margin-top: 40px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--ink-3); }

  ::selection { background: var(--accent-tech-soft); }
