/* =========================================================================
   ClaudeCodeNavi — Visual System
   Designed with obsessive restraint: light, type, space, motion.
   ========================================================================= */

/* ----------------------------- Tokens ----------------------------------- */
:root {
  --bg: #faf9f6;
  --bg-grad-1: #f6f3ee;
  --bg-grad-2: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --surface-3: #ece9e2;
  --text: #1b1a17;
  --text-dim: #6c6a63;
  --text-faint: #97948c;
  --border: rgba(27, 26, 23, 0.09);
  --border-strong: rgba(27, 26, 23, 0.14);
  --accent: #c2613b;
  --accent-2: #d98a5f;
  --accent-soft: rgba(194, 97, 59, 0.10);
  --accent-ring: rgba(194, 97, 59, 0.28);
  --shadow-sm: 0 1px 2px rgba(27, 26, 23, 0.04), 0 2px 8px rgba(27, 26, 23, 0.04);
  --shadow-md: 0 4px 16px rgba(27, 26, 23, 0.06), 0 12px 40px rgba(27, 26, 23, 0.07);
  --shadow-lg: 0 8px 30px rgba(27, 26, 23, 0.08), 0 30px 80px rgba(27, 26, 23, 0.10);
  --nav-bg: rgba(250, 249, 246, 0.72);
  --term-bg: #1d1b16;
  --term-text: #e9e6df;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --maxw: 1080px;
}

[data-theme="dark"] {
  --bg: #17150f;
  --bg-grad-1: #1d1a12;
  --bg-grad-2: #141209;
  --surface: #211e16;
  --surface-2: #2a2619;
  --surface-3: #332e1f;
  --text: #f4f1ea;
  --text-dim: #aaa498;
  --text-faint: #79746a;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #e0875c;
  --accent-2: #eda579;
  --accent-soft: rgba(224, 135, 92, 0.14);
  --accent-ring: rgba(224, 135, 92, 0.32);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 50px rgba(0, 0, 0, 0.55);
  --nav-bg: rgba(23, 21, 15, 0.7);
  --term-bg: #0f0e0a;
  --term-text: #e9e6df;
}

/* ----------------------------- Base ------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 78% -8%, var(--accent-soft), transparent 60%),
    linear-gradient(180deg, var(--bg-grad-1), var(--bg-grad-2));
  background-attachment: fixed;
  line-height: 1.7;
  letter-spacing: 0.01em;
  min-height: 100vh;
  transition: background-color 0.5s var(--ease), color 0.4s var(--ease);
}

::selection { background: var(--accent-ring); color: #fff; }

code, .mono { font-family: var(--mono); }

code {
  font-size: 0.86em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.12em 0.42em;
  border-radius: 6px;
  color: var(--accent);
  white-space: nowrap;
}

a { color: inherit; text-decoration: none; }

/* ----------------------------- Nav -------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand__mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 2px 10px var(--accent-ring);
  position: relative;
}
.brand__mark::after {
  content: ""; position: absolute; inset: 6px 6px auto auto;
  width: 6px; height: 6px; border-radius: 2px; background: rgba(255,255,255,0.9);
}
.brand__accent { color: var(--accent); }

.tabs {
  position: relative;
  display: flex;
  gap: 4px;
  margin-left: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 999px;
}
.tab {
  position: relative; z-index: 1;
  border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 0.86rem; font-weight: 500;
  color: var(--text-dim);
  padding: 7px 16px; border-radius: 999px;
  transition: color 0.3s var(--ease);
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: #fff; }
.tabs__ink {
  position: absolute; z-index: 0; top: 4px; left: 4px;
  height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 14px var(--accent-ring);
  transition: transform 0.45s var(--ease), width 0.45s var(--ease);
}

.theme-toggle {
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); cursor: pointer;
  font-size: 1.05rem; display: grid; place-items: center;
  transition: all 0.3s var(--ease);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent-ring); transform: rotate(-18deg); }

/* ----------------------------- Panels ----------------------------------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.panel { padding: 56px 0 80px; }
.panel[hidden] { display: none; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ----------------------------- Hero ------------------------------------- */
.hero { padding: 60px 0 40px; text-align: center; }
.hero__eyebrow {
  display: inline-block;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.22em;
  color: var(--accent);
  padding: 6px 14px; border: 1px solid var(--accent-ring); border-radius: 999px;
  background: var(--accent-soft);
  margin-bottom: 28px;
}
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.08;
  white-space: pre-line;
  background: linear-gradient(180deg, var(--text) 30%, var(--text-dim));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero__lead {
  max-width: 680px; margin: 26px auto 0;
  font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--text-dim); font-weight: 400;
}
.hero__stats {
  display: flex; justify-content: center; gap: clamp(24px, 6vw, 72px);
  margin-top: 52px; flex-wrap: wrap;
}
.stat__value {
  font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.03em;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat__label { font-size: 0.82rem; color: var(--text-faint); margin-top: 2px; }

/* ----------------------------- Section heads ---------------------------- */
.section { margin-top: clamp(64px, 10vw, 120px); }
.section__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700;
  letter-spacing: -0.03em; text-align: center;
}
.section__lead {
  max-width: 640px; margin: 14px auto 0; text-align: center;
  color: var(--text-dim); font-size: 1.02rem;
}

/* ----------------------------- Pillars ---------------------------------- */
.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-top: 48px;
}
.pillar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.4s var(--ease);
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.pillar__icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: var(--accent-soft); margin-bottom: 20px;
}
.pillar__title { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.pillar__body { margin-top: 10px; color: var(--text-dim); font-size: 0.95rem; }

/* ----------------------------- Compare table ---------------------------- */
.compare {
  margin-top: 44px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td {
  padding: 16px 20px; text-align: left; font-size: 0.92rem;
  border-bottom: 1px solid var(--border);
}
.compare thead th {
  font-weight: 600; color: var(--text-dim); font-size: 0.8rem;
  letter-spacing: 0.04em; text-transform: uppercase; background: var(--surface-2);
}
.compare th.col-cc, .compare td.col-cc {
  background: var(--accent-soft); color: var(--text); font-weight: 500;
}
.compare thead .col-cc { color: var(--accent); }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 600; color: var(--text); }

/* ----------------------------- How steps -------------------------------- */
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.how-step {
  position: relative; padding: 30px 26px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.how-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.how-step__n {
  font-family: var(--mono); font-size: 2.2rem; font-weight: 500;
  letter-spacing: -0.04em; color: var(--accent); opacity: 0.85;
}
.how-step__title { font-size: 1.1rem; font-weight: 600; margin-top: 6px; }
.how-step__body { color: var(--text-dim); font-size: 0.93rem; margin-top: 8px; }
.how-note {
  text-align: center; margin-top: 32px; color: var(--text-dim);
  font-size: 0.96rem; max-width: 600px; margin-inline: auto;
}

/* ----------------------------- CTA -------------------------------------- */
.cta {
  margin-top: clamp(64px, 10vw, 120px);
  text-align: center; padding: clamp(48px, 7vw, 72px) 32px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(700px 300px at 50% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.cta__title { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 700; letter-spacing: -0.03em; }
.cta__body { color: var(--text-dim); margin: 14px auto 0; max-width: 520px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 30px; cursor: pointer;
  font-family: inherit; font-size: 0.98rem; font-weight: 600;
  color: #fff; border: 0;
  padding: 14px 30px; border-radius: 999px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 22px var(--accent-ring);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 32px var(--accent-ring); }
.btn__arrow { transition: transform 0.35s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ----------------------------- Page head -------------------------------- */
.page-head { text-align: center; margin-bottom: 44px; }
.page-head__badge {
  display: inline-block; font-size: 0.76rem; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--accent-ring); border-radius: 999px;
  padding: 5px 14px; margin-bottom: 18px; letter-spacing: 0.04em;
}
.page-head__title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; letter-spacing: -0.035em; }
.page-head__sub { color: var(--text-dim); margin-top: 12px; font-size: 1.05rem; }

/* ----------------------------- Anatomy / terminal ----------------------- */
.anatomy { margin-bottom: 72px; }
.anatomy__lead { text-align: center; color: var(--text-dim); margin-bottom: 28px; }
.term-wrap { position: relative; max-width: 820px; margin: 0 auto; }
.term {
  position: relative;
  background: var(--term-bg); color: var(--term-text);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.06);
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.85;
}
.term__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.term__dot { width: 12px; height: 12px; border-radius: 50%; }
.term__dot--r { background: #ff5f57; }
.term__dot--y { background: #febc2e; }
.term__dot--g { background: #28c840; }
.term__title { margin-left: 10px; font-size: 0.72rem; color: rgba(255,255,255,0.4); }
.term__body { padding: 20px 22px; min-height: 320px; }
.term .c-dim { color: rgba(233,230,223,0.45); }
.term .c-accent { color: var(--accent-2); }
.term .c-green { color: #6bd089; }
.term .c-blue { color: #6fa8e6; }
.term__line { white-space: pre-wrap; }
.term__prompt-box {
  margin-top: 14px; border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px; padding: 10px 14px; color: rgba(233,230,223,0.6);
  display: flex; align-items: center; gap: 8px;
}
.term__caret { width: 8px; height: 16px; background: var(--accent-2); display: inline-block; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term__status {
  display: flex; gap: 16px; padding: 8px 16px;
  background: rgba(0,0,0,0.25); font-size: 0.68rem; color: rgba(233,230,223,0.5);
  border-top: 1px solid rgba(255,255,255,0.06); flex-wrap: wrap;
}

.hotspot {
  position: absolute; z-index: 5;
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; font-size: 0.85rem;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 0 0 6px var(--accent-soft), 0 4px 14px var(--accent-ring);
  transition: transform 0.3s var(--ease);
}
.hotspot::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0.6;
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(0.8); opacity: 0.7; } 100% { transform: scale(1.7); opacity: 0; } }
.hotspot:hover { transform: scale(1.18); }
.hotspot__tip {
  position: absolute; left: 50%; bottom: calc(100% + 14px); transform: translateX(-50%) translateY(8px);
  width: 240px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 14px 16px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); z-index: 20;
}
.hotspot__tip h4 { font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.hotspot__tip p { font-size: 0.82rem; color: var(--text-dim); margin-top: 6px; line-height: 1.6; font-family: var(--font); }
.hotspot:hover .hotspot__tip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ----------------------------- Steps (beginner) ------------------------- */
.steps { display: flex; flex-direction: column; gap: 18px; position: relative; }
.step {
  display: grid; grid-template-columns: 64px 1fr; gap: 22px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.4s var(--ease);
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.step__num {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.5rem; font-weight: 700;
  color: #fff; background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px var(--accent-ring);
}
.step__time {
  font-size: 0.72rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 3px 10px; border-radius: 999px;
  margin-bottom: 8px; display: inline-block;
}
.step__title { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
.step__body { color: var(--text-dim); margin-top: 8px; font-size: 0.96rem; }
.step__try {
  margin-top: 16px; display: flex; align-items: center; gap: 12px;
  background: var(--term-bg); color: var(--term-text);
  border-radius: 12px; padding: 12px 16px; font-family: var(--mono);
  font-size: 0.85rem; position: relative;
}
.step__try-label { color: var(--accent-2); font-weight: 500; flex-shrink: 0; }
.step__try-text { color: var(--term-text); }
.step__copy {
  margin-left: auto; flex-shrink: 0; cursor: pointer;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(233,230,223,0.7); border-radius: 8px; padding: 5px 10px;
  font-family: var(--font); font-size: 0.72rem; transition: all 0.25s var(--ease);
}
.step__copy:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.step__tip {
  margin-top: 14px; font-size: 0.86rem; color: var(--text-faint);
  padding-left: 16px; border-left: 2px solid var(--accent-ring);
}
.step__tip b { color: var(--text-dim); }

.graduation {
  margin-top: 40px; text-align: center; padding: 48px 32px;
  border-radius: var(--radius-xl);
  background: radial-gradient(600px 260px at 50% 0%, var(--accent-soft), transparent 70%), var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.graduation h3 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.graduation p { color: var(--text-dim); margin: 12px auto 0; max-width: 540px; }

/* ----------------------------- Tools (search/chips) --------------------- */
.toolbar { display: flex; flex-direction: column; gap: 16px; margin-bottom: 36px; align-items: center; }
.search {
  width: 100%; max-width: 520px; position: relative;
}
.search input {
  width: 100%; font-family: inherit; font-size: 0.98rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 14px 20px 14px 48px;
  box-shadow: var(--shadow-sm); transition: all 0.3s var(--ease);
}
.search input:focus { outline: none; border-color: var(--accent-ring); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input::placeholder { color: var(--text-faint); }
.search__icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  cursor: pointer; font-family: inherit; font-size: 0.84rem; font-weight: 500;
  color: var(--text-dim); background: var(--surface); border: 1px solid var(--border);
  padding: 7px 16px; border-radius: 999px; transition: all 0.25s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.is-active { color: #fff; background: linear-gradient(140deg, var(--accent), var(--accent-2)); border-color: transparent; box-shadow: 0 4px 12px var(--accent-ring); }

/* ----------------------------- Tip cards -------------------------------- */
.tip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tip-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px 28px; cursor: pointer;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.4s var(--ease);
}
.tip-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.tip-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.tip-card:hover::before { opacity: 1; }
.tip-card.is-featured { border-color: var(--accent-ring); }
.tip-card__head { display: flex; align-items: flex-start; gap: 14px; }
.tip-card__icon {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.35rem; background: var(--accent-soft);
}
.tip-card__title { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.4; }
.tip-card__summary { color: var(--text-dim); font-size: 0.92rem; margin-top: 12px; }
.tip-card__meta { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.badge {
  font-size: 0.72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border);
}
.badge--cat { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-ring); }
.tip-card__diff { font-size: 0.78rem; color: var(--accent); letter-spacing: 0.1em; margin-left: auto; }
.tip-card__featured-tag {
  position: absolute; top: 16px; right: 16px; font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.08em; color: var(--accent); text-transform: uppercase;
}
.tip-card__body {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.5s var(--ease), opacity 0.4s var(--ease), margin 0.4s var(--ease);
  color: var(--text-dim); font-size: 0.92rem;
}
.tip-card__body p { margin-top: 12px; }
.tip-card__body ul { margin: 12px 0 0 18px; }
.tip-card__body li { margin-top: 6px; }
.tip-card.is-open .tip-card__body { max-height: 640px; opacity: 1; margin-top: 18px; }
.tip-card__hint {
  margin-top: 16px; font-size: 0.84rem; color: var(--text-faint);
  padding: 12px 14px; background: var(--surface-2); border-radius: 10px;
  border-left: 2px solid var(--accent-ring);
}
.tip-card__hint b { color: var(--accent); }
.tip-card__more { margin-top: 14px; font-size: 0.8rem; color: var(--accent); font-weight: 500; }

/* ----------------------------- Command tables --------------------------- */
.ref-section { margin-top: 56px; }
.ref-section:first-of-type { margin-top: 0; }
.ref-title { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.ref-title span { font-size: 0.8rem; font-weight: 500; color: var(--text-faint); }
.ref-list {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin-top: 16px;
}
.cmd-row {
  display: grid; grid-template-columns: 200px 1fr auto; align-items: center; gap: 16px;
  padding: 14px 22px; border-bottom: 1px solid var(--border);
  transition: background 0.2s var(--ease);
}
.cmd-row:last-child { border-bottom: 0; }
.cmd-row:hover { background: var(--surface-2); }
.cmd-row__name { font-family: var(--mono); font-size: 0.9rem; color: var(--accent); font-weight: 500; }
.cmd-row__desc { color: var(--text-dim); font-size: 0.92rem; }
.cmd-row__cat { font-size: 0.72rem; color: var(--text-faint); }
.cmd-row__copy {
  cursor: pointer; background: transparent; border: 1px solid var(--border);
  color: var(--text-faint); border-radius: 8px; padding: 5px 8px; font-size: 0.72rem;
  font-family: var(--font); transition: all 0.25s var(--ease); opacity: 0;
}
.cmd-row:hover .cmd-row__copy { opacity: 1; }
.cmd-row__copy:hover { color: var(--accent); border-color: var(--accent-ring); }
.cmd-row--cli { grid-template-columns: minmax(0, 340px) 1fr auto; }
.cmd-row--cli .cmd-row__name { white-space: normal; word-break: break-word; }

.kbd-row {
  display: grid; grid-template-columns: 220px 1fr auto; align-items: center; gap: 16px;
  padding: 14px 22px; border-bottom: 1px solid var(--border);
}
.kbd-row:last-child { border-bottom: 0; }
.kbd-row:hover { background: var(--surface-2); }
.kbd-keys { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kbd {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-bottom-width: 2px; border-radius: 7px; padding: 4px 9px; color: var(--text);
  min-width: 26px; text-align: center;
}
.kbd-plus { color: var(--text-faint); font-size: 0.8rem; }
.kbd-row__desc { color: var(--text-dim); font-size: 0.92rem; }
.kbd-row__cat { font-size: 0.72rem; color: var(--text-faint); }

.empty { text-align: center; color: var(--text-faint); padding: 60px 0; font-size: 0.95rem; }

/* ----------------------------- Terminal 101 ----------------------------- */
.legend { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.legend li { display: flex; align-items: baseline; gap: 12px; font-size: 0.9rem; color: var(--text-dim); }
.legend li code { flex-shrink: 0; min-width: 56px; text-align: center; }

.prompt-demo { margin-top: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 28px; box-shadow: var(--shadow-sm); max-width: 620px; margin-inline: auto; }
.prompt-demo__line {
  font-family: var(--mono); font-size: 1.05rem; color: var(--term-text);
  background: var(--term-bg); border-radius: 12px; padding: 16px 20px; text-align: center; letter-spacing: 0.04em;
}
.prompt-demo .legend { margin-top: 20px; }

.loc-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; margin-top: 28px; align-items: start; }
.tree {
  background: var(--term-bg); color: var(--term-text);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-md);
  font-family: var(--mono); font-size: 0.85rem; line-height: 2.1; overflow-x: auto; margin: 0;
  white-space: pre;
}
.tree__here { color: #fff; font-weight: 600; background: linear-gradient(140deg, var(--accent), var(--accent-2)); border-radius: 6px; padding: 2px 8px; }
.tree__note { color: rgba(233, 230, 223, 0.4); font-size: 0.78rem; }
.loc-side { padding-top: 4px; }
.loc-pwd { font-size: 0.92rem; color: var(--text-dim); background: var(--accent-soft); border: 1px solid var(--accent-ring); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }

.cmd-parts { display: flex; align-items: stretch; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 36px; }
.cmd-part {
  position: relative; font-family: var(--mono); font-weight: 600; font-size: 1.25rem;
  padding: 16px 22px 14px; border-radius: 14px; text-align: center; min-width: 96px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.cmd-part small { font-family: var(--font); font-weight: 500; font-size: 0.7rem; line-height: 1.4; color: var(--text-dim); }
.cmd-part--cmd { background: var(--accent-soft); border: 1px solid var(--accent-ring); color: var(--accent); }
.cmd-part--opt { background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text); }
.cmd-part--arg { background: rgba(111, 168, 230, 0.12); border: 1px solid rgba(111, 168, 230, 0.4); color: #4f86c6; }
[data-theme="dark"] .cmd-part--arg { color: #8fbef0; }
.cmd-part__plus { align-self: center; color: var(--text-faint); font-size: 1.2rem; font-weight: 300; }

.lesson__syntax { margin-top: 14px; font-size: 0.9rem; color: var(--text-dim); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lesson__syntax span { font-size: 0.72rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; }
.lesson__syntax code { white-space: normal; }
.demo {
  margin-top: 14px; background: var(--term-bg); color: var(--term-text);
  border-radius: 12px; padding: 14px 18px; font-family: var(--mono); font-size: 0.82rem; line-height: 1.9; overflow-x: auto;
}
.demo__in { color: var(--term-text); }
.demo__in::before { content: "$ "; color: var(--accent-2); font-weight: 600; }
.demo__out { color: rgba(233, 230, 223, 0.55); white-space: pre; margin-bottom: 8px; }
.demo__out:last-child { margin-bottom: 0; }

.callout { margin-top: clamp(48px, 8vw, 90px); background: radial-gradient(600px 240px at 50% 0%, var(--accent-soft), transparent 70%), var(--surface); border: 1px solid var(--accent-ring); border-radius: var(--radius-xl); padding: 36px 38px; box-shadow: var(--shadow-sm); }
.callout h4 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; text-align: center; }
.callout ul { list-style: none; margin-top: 22px; display: grid; gap: 14px; max-width: 640px; margin-inline: auto; }
.callout li { position: relative; padding-left: 30px; color: var(--text-dim); font-size: 0.96rem; }
.callout li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #fff; font-size: 0.7rem; font-weight: 700; display: grid; place-items: center; }

@media (max-width: 760px) {
  .loc-grid { grid-template-columns: 1fr; }
}

/* ----------------------------- Progress (learning) ---------------------- */
.progress-ring {
  position: relative; width: 40px; height: 40px; flex-shrink: 0;
  border: 0; background: transparent; cursor: pointer; display: grid; place-items: center;
}
.progress-ring svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.progress-ring .ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 3; }
.progress-ring .ring-fill {
  fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 100 100; stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.7s var(--ease);
}
.progress-ring__pct { position: absolute; font-size: 0.58rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.progress-ring:hover .ring-fill { stroke: var(--accent-2); }

.nav-bar { height: 3px; width: 100%; background: transparent; overflow: hidden; }
.nav-bar__fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px var(--accent-ring);
  transition: width 0.7s var(--ease);
}

.dash {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 30px; box-shadow: var(--shadow-sm);
  margin-bottom: 44px;
}
.dash__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dash__title { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.dash__msg { color: var(--text-dim); font-size: 0.9rem; margin-top: 6px; max-width: 460px; }
.dash__pct {
  font-size: clamp(2.2rem, 5vw, 2.8rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.dash__bar { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: 18px; }
.dash__bar-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.8s var(--ease);
}
.dash__meta { display: flex; gap: 26px; margin-top: 16px; color: var(--text-dim); font-size: 0.9rem; flex-wrap: wrap; }
.dash__meta b { color: var(--text); font-weight: 600; }
.dash__actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.dash__btn {
  cursor: pointer; font-family: inherit; font-size: 0.85rem; font-weight: 600;
  color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border);
  padding: 9px 18px; border-radius: 999px; transition: all 0.25s var(--ease);
}
.dash__btn:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.dash__btn--primary { color: #fff; background: linear-gradient(140deg, var(--accent), var(--accent-2)); border-color: transparent; box-shadow: 0 4px 14px var(--accent-ring); }
.dash__btn--primary:hover { color: #fff; box-shadow: 0 8px 22px var(--accent-ring); }
.dash__btn--ghost { color: var(--text-faint); background: transparent; }
.dash__btn--ghost:hover { color: var(--accent); }

/* step completion */
.step.is-done { border-color: var(--accent-ring); }
.step.is-target { animation: targetPulse 1.4s var(--ease); }
@keyframes targetPulse {
  0% { box-shadow: 0 0 0 0 var(--accent-ring); }
  40% { box-shadow: 0 0 0 8px var(--accent-soft); }
  100% { box-shadow: var(--shadow-sm); }
}
.step__check {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: inherit; font-size: 0.84rem; font-weight: 600; color: var(--text-dim);
  background: var(--surface-2); border: 1px solid var(--border); padding: 9px 18px; border-radius: 999px;
  transition: all 0.25s var(--ease);
}
.step__check:hover { color: var(--text); border-color: var(--accent-ring); transform: translateY(-1px); }
.step__check-box {
  width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid var(--text-faint);
  display: grid; place-items: center; font-size: 0.68rem; color: transparent; transition: all 0.25s var(--ease);
}
.step__check.is-done { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-ring); }
.step__check.is-done .step__check-box {
  background: linear-gradient(140deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff;
}

/* tip learned */
.learn-toggle {
  margin-left: auto; cursor: pointer; font-family: inherit; font-size: 0.76rem; font-weight: 600;
  color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border);
  padding: 5px 13px; border-radius: 999px; transition: all 0.25s var(--ease);
}
.learn-toggle:hover { color: var(--text); border-color: var(--accent-ring); }
.learn-toggle.is-on { color: #fff; background: linear-gradient(140deg, var(--accent), var(--accent-2)); border-color: transparent; }
.tip-card.is-learned { border-color: var(--accent-ring); }
.tip-card.is-learned .tip-card__featured-tag { display: none; }
.tip-card.is-learned::after {
  content: "✓"; position: absolute; top: 18px; right: 18px;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 700; color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-2)); box-shadow: 0 2px 8px var(--accent-ring);
}
.tip-card__diff { margin-left: 0 !important; }

/* confetti */
.confetti { position: fixed; top: -16px; width: 9px; height: 15px; border-radius: 2px; z-index: 300; pointer-events: none; will-change: transform; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { to { transform: translateY(110vh) rotate(720deg); opacity: 0.15; } }

/* ----------------------------- Footer ----------------------------------- */
.footer { margin-top: 80px; border-top: 1px solid var(--border); }
.footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 48px 24px; text-align: center; }
.footer__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1rem; }
.footer__note { color: var(--text-dim); font-size: 0.9rem; margin-top: 14px; line-height: 1.7; }
.footer__meta { color: var(--text-faint); font-size: 0.78rem; margin-top: 18px; letter-spacing: 0.04em; }

/* ----------------------------- Toast ------------------------------------ */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); font-size: 0.86rem; font-weight: 500;
  padding: 12px 22px; border-radius: 999px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 200;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ----------------------------- Responsive ------------------------------- */
@media (max-width: 860px) {
  .pillars, .how-steps { grid-template-columns: 1fr; }
  .tip-grid { grid-template-columns: 1fr; }
  .nav__inner { gap: 12px; }
  .brand__text { display: none; }
  .tabs { margin-left: 0; }
  .tab { padding: 7px 11px; font-size: 0.8rem; }
  .cmd-row, .kbd-row { grid-template-columns: 1fr; gap: 6px; }
  .cmd-row__cat, .kbd-row__cat { display: none; }
  .cmd-row__copy { display: none; }
}
@media (max-width: 560px) {
  .tabs { overflow-x: auto; max-width: 60vw; }
  .step { grid-template-columns: 1fr; }
  .hotspot__tip { width: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
