/*
 * Mojify product site.
 * Follows the OS colour scheme (no toggle): light tokens by default, dark tokens
 * under prefers-color-scheme. Mint accent, matching the picker. Plain CSS, no build step.
 */

:root {
  color-scheme: light;

  /* Brand: a solid mint fill carries dark ink text; a deeper teal-mint is used for text. */
  --accent: #2fbf8a;
  --accent-hover: #26b07e;
  --accent-ink: #06261b;
  --accent-text: #0b6f55;
  --accent-text-hover: #085a45;
  --accent-soft: rgba(11, 111, 85, 0.1);
  --accent-softer: rgba(11, 111, 85, 0.05);
  --accent-line: rgba(11, 111, 85, 0.3);
  --accent-glow: rgba(47, 191, 138, 0.14);

  /* Surfaces */
  --bg: #fcfcfc;
  --surface: #ffffff;
  --surface-2: #f5f7f6;
  --code-bg: #f6f8f7;
  --topbar-bg: rgba(252, 252, 252, 0.86);
  --stage-bg: #eef3f1;
  --stage-line: rgba(15, 26, 22, 0.06);

  /* Text */
  --ink: #0f1a16;
  --text: #24302b;
  --muted: #5f6d66;

  /* Lines */
  --border: #dde5e1;
  --border-strong: #c9d4cf;

  /* States */
  --bad: #b42318;
  --bad-soft: rgba(180, 35, 24, 0.08);

  /* Picker mock: the app's own palettes (mojify/colors-light.css and colors-dark.css). */
  --pk-bg: #fcfcfc;
  --pk-surface: #ffffff;
  --pk-hover: #ecf7f2;
  --pk-select: #d3efe2;
  --pk-line: #dce3de;
  --pk-line-soft: #e6ebe7;
  --pk-mint: #0d7a5a;
  --pk-text: #0f1a14;
  --pk-grey: #4b5a52;
  --pk-muted: #78857d;
  --pk-icon: #0f1a14;
  --pk-thumb: rgba(13, 122, 90, 0.4);

  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 26, 22, 0.05);
  --shadow: 0 1px 2px rgba(15, 26, 22, 0.04), 0 8px 24px -12px rgba(15, 26, 22, 0.12);
  --shadow-lg: 0 2px 4px rgba(15, 26, 22, 0.04), 0 24px 48px -20px rgba(15, 26, 22, 0.22);
  --shadow-picker: 0 2px 6px rgba(15, 26, 20, 0.08), 0 30px 60px -24px rgba(15, 26, 20, 0.3);

  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --emoji: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", "Twemoji Mozilla", sans-serif;
  --wrap: 1260px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Neutral charcoal surfaces; the bright mint becomes both fill and text accent. */
    color-scheme: dark;

    --accent: #7fe0b0;
    --accent-hover: #98e8c2;
    --accent-ink: #06261b;
    --accent-text: #7fe0b0;
    --accent-text-hover: #a6edc9;
    --accent-soft: rgba(127, 224, 176, 0.14);
    --accent-softer: rgba(127, 224, 176, 0.07);
    --accent-line: rgba(127, 224, 176, 0.34);
    --accent-glow: rgba(127, 224, 176, 0.1);

    --bg: #161719;
    --surface: #1e1f22;
    --surface-2: #25262a;
    --code-bg: #1a1b1e;
    --topbar-bg: rgba(22, 23, 25, 0.86);
    --stage-bg: #1a1b1e;
    --stage-line: rgba(255, 255, 255, 0.04);

    --ink: #f3f4f5;
    --text: #d9dbde;
    --muted: #9095a0;

    --border: #3a3c41;
    --border-strong: #55585f;

    --bad: #ff8f85;
    --bad-soft: rgba(255, 143, 133, 0.1);

    --pk-bg: #161719;
    --pk-surface: #1e1f22;
    --pk-hover: #1b2d25;
    --pk-select: #2e6b51;
    --pk-line: #3a3c41;
    --pk-line-soft: #2a2b2f;
    --pk-mint: #7fe0b0;
    --pk-text: #f3f4f5;
    --pk-grey: #b0b4ba;
    --pk-muted: #9095a0;
    --pk-icon: #f3f4f5;
    --pk-thumb: #3f7d63;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.35), 0 24px 48px -20px rgba(0, 0, 0, 0.7);
    --shadow-picker: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 30px 60px -24px rgba(0, 0, 0, 0.8);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent-text-hover); }
b { color: var(--ink); font-weight: 600; }
code, pre, kbd { font-family: var(--mono); font-variant-ligatures: none; }
:not(pre) > code {
  font-size: 0.86em;
  padding: 0.12em 0.4em;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-text);
  word-break: break-word;
}
kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.05em 0.45em;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82em;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  vertical-align: 0.08em;
}
.emoji { font-family: var(--emoji); font-variant-emoji: emoji; line-height: 1; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; display: block; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Sprite icons: <svg class="ic"><use href="assets/icons.svg#i-name" /></svg> */
.ic {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 12px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--accent-ink); }

/* ---- Top bar ---------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--topbar-bg);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: var(--radius);
  color: var(--text); font-size: 15px; font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent-text); background: var(--accent-softer); }
.nav .nav-gh { margin-left: 8px; border: 1px solid var(--border); background: var(--surface); }
.nav .nav-gh:hover { border-color: var(--border-strong); }
.nav-toggle {
  display: none; margin-left: auto;
  width: 40px; height: 40px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle .ic { width: 20px; height: 20px; }
.nav-toggle .i-close { display: none; }
.topbar.open .nav-toggle .i-menu { display: none; }
.topbar.open .nav-toggle .i-close { display: block; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border-radius: var(--radius); border: 1px solid transparent;
  font: 600 15px/1.2 var(--font); cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(6, 38, 27, 0.18); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--border-strong); color: var(--ink); background: var(--surface-2); }
.btn .ic { width: 17px; height: 17px; }

/* ---- Type helpers ----------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-text); font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-sm);
}
.pill b { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 12px; }

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section + .section { border-top: 1px solid var(--border); }
.section.tint { background: var(--surface); }
.section-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head h2 { margin-top: 12px; font-size: clamp(28px, 4vw, 40px); }
.section-head > p { margin-top: 14px; color: var(--muted); font-size: 18px; }

/* ---- Hero ------------------------------------------------------------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 96px); position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 85% 10%, var(--accent-glow), transparent 70%),
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 100% 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 70%);
  opacity: 0.6;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { margin-top: 20px; font-size: clamp(36px, 5.6vw, 60px); line-height: 1.04; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.hero .lede { margin-top: 20px; font-size: clamp(17px, 1.6vw, 19px); color: var(--text); max-width: 540px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-cmd { margin-top: 16px; max-width: 420px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 24px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; font-weight: 500; }
.checks li { display: inline-flex; align-items: center; gap: 6px; }
.checks .ic { width: 16px; height: 16px; color: var(--accent-text); stroke-width: 2.4; }

/* ---- Product mock: the picker on a desktop stage ---------------------- */
.stage {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(40px, 6vw, 64px) clamp(14px, 3vw, 36px) 20px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 60% at 20% 0%, var(--accent-glow), transparent 70%),
    radial-gradient(50% 50% at 100% 100%, var(--accent-softer), transparent 70%),
    linear-gradient(var(--stage-line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--stage-line) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--stage-bg);
  box-shadow: var(--shadow);
}
.stage-hint {
  position: absolute; top: 14px; left: 16px;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.stage-caption { margin-top: 18px; color: var(--muted); font-size: 13px; text-align: center; }

.picker {
  width: 100%; max-width: 500px; min-width: 0;
  border: 1px solid var(--pk-line); border-radius: 10px;
  background: var(--pk-bg); color: var(--pk-text);
  box-shadow: var(--shadow-picker);
  overflow: hidden;
  font-family: var(--font);
}
.pk-tabs {
  display: flex; gap: 2px;
  padding: 8px 9px;
  border-bottom: 1px solid var(--pk-line-soft);
  overflow-x: auto; scrollbar-width: none;
}
.pk-tabs::-webkit-scrollbar { display: none; }
.pk-tab {
  position: relative;
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 7px; background: transparent;
  color: var(--pk-icon); opacity: 0.5; cursor: pointer;
  transition: background-color 0.12s ease, opacity 0.12s ease;
}
.pk-tab .ic { width: 19px; height: 19px; stroke-width: 1.6; }
.pk-tab:hover { opacity: 0.9; background: var(--pk-hover); }
.pk-tab.on { opacity: 1; box-shadow: inset 0 -2px 0 0 var(--pk-mint); border-radius: 7px 7px 2px 2px; }
.pk-tab:focus-visible { outline-color: var(--pk-mint); }

.pk-search {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  margin: 12px 12px 8px; height: 40px; padding: 0 10px;
  border: 1px solid var(--pk-line); border-radius: 8px;
  background: var(--pk-surface); color: var(--pk-grey);
  cursor: text;
}
.pk-search:focus-within { border-color: var(--pk-mint); box-shadow: 0 0 0 1px var(--pk-mint); }
.pk-search .ic { width: 16px; height: 16px; }
.pk-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  color: var(--pk-text); caret-color: var(--pk-mint);
  font: 400 15px var(--font);
}
.pk-search input::placeholder { color: var(--pk-muted); }
.pk-search input::-webkit-search-cancel-button { display: none; }
.pk-search input:focus-visible { outline: 0; }

.pk-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-content: start; gap: 2px;
  height: 236px; padding: 4px 8px 6px 10px;
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--pk-thumb) transparent;
}
.pk-cell {
  display: grid; place-items: center;
  aspect-ratio: 1; min-width: 0; padding: 0;
  border: 0; border-radius: 10px; background: transparent;
  font-size: clamp(22px, 4.2vw, 30px); cursor: pointer;
  transition: background-color 0.12s ease;
}
.pk-cell:hover { background: var(--pk-hover); }
.pk-cell.sel { background: var(--pk-select); }
.pk-cell:focus-visible { outline-color: var(--pk-mint); }
.pk-empty { grid-column: 1 / -1; padding: 28px 8px; color: var(--pk-muted); font-size: 13px; text-align: center; }
.pk-footer {
  min-height: 46px; padding: 12px 16px;
  border-top: 1px solid var(--pk-line-soft);
  color: var(--pk-text); font-size: 15px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* The desktop notification Mojify sends after a copy */
.toast {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 10px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: none; }
.toast-emoji { font-size: 24px; }
.toast b { display: block; font-size: 14px; line-height: 1.2; }
.toast small { display: block; color: var(--muted); font-size: 12px; }

/* ---- Command blocks --------------------------------------------------- */
.cmd {
  position: relative;
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--code-bg);
  min-width: 0;
}
.cmd pre {
  flex: 1; min-width: 0; margin: 0;
  padding: 13px 0 13px 14px;
  font-size: 13.5px; line-height: 1.65; color: var(--ink);
}
.cmd pre code { white-space: pre-wrap; overflow-wrap: break-word; }
.cmd .prompt { color: var(--accent-text); user-select: none; -webkit-user-select: none; }
.copy-btn {
  flex: 0 0 auto; margin: 7px 7px 0 0;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 10px;
  border-radius: 6px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: 600 12.5px var(--font); cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.copy-btn:hover { border-color: var(--border-strong); color: var(--ink); }
.copy-btn .ic { width: 15px; height: 15px; }
.copy-btn .i-check { display: none; }
.copy-btn.done { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-softer); }
.copy-btn.done .i-copy { display: none; }
.copy-btn.done .i-check { display: block; stroke-width: 2.4; }

/* ---- Why: comparison -------------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.split .section-head { margin-bottom: 0; }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; min-width: 0; }
.compare-card {
  display: flex; flex-direction: column;
  padding: 24px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); min-width: 0;
}
.compare-card.good { border-color: var(--accent-line); background: linear-gradient(var(--accent-softer), var(--accent-softer)), var(--surface); box-shadow: var(--shadow); }
.compare-label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.compare-card h3 { margin-top: 10px; font-size: 19px; }
.compare-card p { margin-top: 8px; color: var(--muted); font-size: 15px; flex: 1; }
.verdict {
  align-self: flex-start; margin-top: 18px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
}
.verdict .ic { width: 15px; height: 15px; stroke-width: 2.4; }
.bad .verdict { background: var(--bad-soft); color: var(--bad); }
.good .verdict { background: var(--accent-soft); color: var(--accent-text); }

/* ---- Steps and notes -------------------------------------------------- */
.steps { display: grid; gap: 16px; counter-reset: step; }
.step {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 18px;
  padding: 22px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step; content: counter(step);
  grid-row: span 3;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 700;
}
.step h3 { font-size: 18px; }
.step p { color: var(--muted); margin-top: 4px; }
.step .cmd { margin-top: 14px; }
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.note { padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.note h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.note h3 .ic { color: var(--accent-text); }
.note p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.note .cmd { margin-top: 12px; }
.note .cmd pre { font-size: 12.5px; }
.reqs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; color: var(--text); font-size: 15px; }
.reqs li { display: flex; align-items: center; gap: 10px; }
.reqs li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }

/* ---- Features --------------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  padding: 24px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.card .icon {
  width: 38px; height: 38px; border-radius: var(--radius);
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text);
}
.card .icon .ic { width: 20px; height: 20px; }
.card h3 { margin-top: 16px; font-size: 17px; letter-spacing: -0.01em; }
.card p { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* ---- How it works ----------------------------------------------------- */
.beats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.beat { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.beat-visual {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 104px; margin-bottom: 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background:
    radial-gradient(60% 80% at 50% 0%, var(--accent-softer), transparent 70%),
    var(--surface-2);
  color: var(--muted); font-weight: 600;
}
.beat-visual kbd { font-size: 16px; padding: 0.2em 0.6em; }
.beat-visual .emoji { font-size: 32px; margin-right: 8px; }
.beat-visual.typing { justify-content: flex-start; padding: 0 22px; }
.beat-visual.typing .ic { color: var(--muted); }
.beat-visual.typing b { font: 500 17px var(--mono); color: var(--ink); }
.beat-visual.typing i { width: 2px; height: 22px; margin-left: -6px; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.beat-step { color: var(--accent-text); font: 600 12px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.beat h3 { margin-top: 6px; font-size: 18px; }
.beat p { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* ---- Shortcut --------------------------------------------------------- */
.howto { list-style: none; counter-reset: howto; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.howto li { display: flex; gap: 12px; align-items: flex-start; counter-increment: howto; }
.howto li::before {
  content: counter(howto); flex: 0 0 auto;
  width: 24px; height: 24px; margin-top: 1px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 700;
}
.crumbs { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.crumbs .ic { width: 14px; height: 14px; color: var(--muted); }

.dialog { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); box-shadow: var(--shadow-lg); overflow: hidden; min-width: 0; }
.dialog-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2);
  font-size: 14px;
}
.dialog-head .ic { width: 16px; height: 16px; color: var(--accent-text); }
.dialog-body { padding: 18px 16px; display: grid; gap: 12px; }
.field {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 12px;
  min-height: 44px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.field small { color: var(--muted); font-size: 13px; font-weight: 600; }
.field span { color: var(--ink); font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field .mono { font-family: var(--mono); font-size: 14px; }
.field .keys { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.field:nth-child(3) { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-softer); }
.dialog-note { display: flex; gap: 10px; align-items: flex-start; padding: 2px 2px 0; color: var(--muted); font-size: 14px; }
.dialog-note .ic { width: 16px; height: 16px; margin-top: 3px; color: var(--accent-text); }

/* ---- CTA -------------------------------------------------------------- */
.cta {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--accent-line); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-softer) 60%, transparent), var(--surface);
}
.cta h2 { font-size: clamp(24px, 3vw, 32px); }
.cta p { margin-top: 8px; color: var(--muted); }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Footer ----------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 40px 0; }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px; }
.footer .brand { font-size: 16px; }
.footer .brand img { width: 26px; height: 26px; }
.footer p { margin-top: 8px; color: var(--muted); font-size: 14px; max-width: 360px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.footer-links a { display: inline-flex; align-items: center; gap: 7px; color: var(--text); }
.footer-links a:hover { color: var(--accent-text); }
.footer-links .ic { width: 15px; height: 15px; color: var(--muted); }

/* ---- 404 -------------------------------------------------------------- */
.notfound { min-height: calc(100vh - 64px - 140px); display: grid; place-items: center; text-align: center; padding: 64px 0; }
.notfound .code404 { font: 700 clamp(72px, 14vw, 128px)/1 var(--mono); color: var(--accent-text); letter-spacing: -0.04em; }
.notfound h1 { margin-top: 12px; font-size: clamp(24px, 4vw, 32px); }
.notfound p { margin-top: 10px; color: var(--muted); }
.notfound .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }

.hidden, [hidden] { display: none !important; }

/* ---- Scroll reveal ---------------------------------------------------- */
.js [data-reveal] { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .beat-visual.typing i { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 1020px) {
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); }
  .hero .lede { max-width: 640px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px var(--gutter) 16px;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .topbar.open .nav { display: flex; }
  .nav a { padding: 11px 12px; }
  .nav .nav-gh { margin: 6px 0 0; justify-content: center; }
  .notes, .beats { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .features, .compare { grid-template-columns: minmax(0, 1fr); }
  .hero .actions .btn, .cta .actions .btn { flex: 1 1 auto; }
  .step { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .step::before { grid-row: auto; }
  .copy-btn span { display: none; }
  .copy-btn { padding: 0 8px; }
  .stage { padding-top: 48px; }
  .pk-grid { height: 212px; padding: 4px 6px 6px; }
  .pk-search { margin: 10px 10px 6px; }
  .field { grid-template-columns: 80px minmax(0, 1fr); }
}
