/* ============================================================
   SNAPMARKERS — style.css
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --accent:       #f4bd0b;
  --accent-dark:  #d4a009;
  --bg-start:     #f8f5ee;
  --bg-end:       #eee7dc;
  --text:         #171a1e;
  --muted:        #616875;
  --border:       rgba(23,26,30,0.1);
  --radius:       16px;
  --radius-sm:    8px;
  --shadow:       0 2px 16px rgba(23,26,30,0.08), 0 1px 4px rgba(23,26,30,0.06);
  --shadow-lg:    0 8px 40px rgba(23,26,30,0.13), 0 2px 8px rgba(23,26,30,0.08);

  /* SnapMarkers app exact colors (from source) */
  --sm-bg:      #212529;   /* RGB(33,37,41)   — SM_BG   */
  --sm-card:    #2d3238;   /* RGB(45,50,56)   — SM_CARD */
  --sm-card2:   #262b30;   /* RGB(38,43,48)   — SM_CARD2 */
  --sm-border:  #495057;   /* RGB(73,80,87)   — SM_BORDER */
  --sm-sep:     #3a4048;   /* RGB(58,64,72)   — SM_SEP */
  --sm-text:    #f8f9fa;   /* RGB(248,249,250)— SM_TEXT */
  --sm-muted:   #adb5bd;   /* RGB(173,181,189)— SM_MUTED */
  --sm-success: #198754;   /* RGB(25,135,84)  — SM_SUCCESS */
  --sm-danger:  #dc3545;   /* RGB(220,53,69)  — SM_DANGER */
  --sm-accent:  #0a84ff;   /* macOS dark-mode system blue */

  /* Source layout constants */
  --sm-lsep:    330px;     /* Left separator (LSEP) */
  --sm-pad:     12px;      /* Padding (PAD) */
  --sm-gap:     8px;       /* Gap between cards (GAP) */
  --sm-cw:      306px;     /* Card width (CW = LSEP - PAD*2) */
  --sm-row-h:   30px;      /* Snapshot row height */
  --sm-card-h:  108px;     /* Settings card height */
  --sm-state-h: 64px;      /* State card height (MARKER/TRANSPORT/LIST) */
  --sm-mode-h:  32px;      /* Mode segmented control height */
  --sm-seg-h:   26px;      /* State segmented control height */
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

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

/* Skip-to-content link — visually hidden, shown on keyboard focus */
.skip-link {
  position: absolute;
  top: -100%;
  left: 12px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 0 0 8px 8px;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }
img { display: block; max-width: 100%; }
code {
  font-family: 'SF Mono', 'Fira Mono', 'Consolas', monospace;
  font-size: 0.85em;
  background: rgba(23,26,30,0.08);
  padding: 1px 5px;
  border-radius: 4px;
}
strong { font-weight: 600; }

h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4em;
}
.accent { color: var(--accent); }
.section-intro {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 0.5em;
  max-width: 56ch;
}

/* ============================================================
   FIXED HERO TIMELINE
   ============================================================ */
#hero-timeline {
  position: fixed;
  right: 0;
  top: 0;
  width: 58vw;
  height: 100vh;
  z-index: 0;       /* Sections at z-index:2 will naturally cover this */
  overflow: hidden;
  pointer-events: none;
}

#timeline-img {
  height: 100%;
  width: auto;
  min-width: 100%;
  max-width: none;
  object-fit: cover;
  object-position: left top;
  display: block;
  will-change: transform;
}

.timeline-fade-left {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    var(--bg-start) 0%,
    rgba(248,245,238,0.92) 14%,
    rgba(248,245,238,0.4) 34%,
    transparent 52%
  );
}
.timeline-fade-bottom {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    var(--bg-start) 0%,
    rgba(248,245,238,0.5) 10%,
    transparent 25%
  );
}

/* ============================================================
   HERO SECTION
   ============================================================ */
#hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 6vw;
  /* Left side is a warm cream; fades to transparent on right to reveal the fixed timeline */
  background: linear-gradient(
    to right,
    #faf3e6 0%,
    #f9f0e0 30%,
    rgba(250,243,230,0.78) 48%,
    rgba(250,243,230,0.2) 62%,
    transparent 76%
  );
}

.hero-left {
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-icon { width: 42px; height: 42px; }
.hero-brand-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hero-product-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}
.hero-product-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.hero-version {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.hero-headline {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 46ch;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  background: var(--accent);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  box-shadow: 0 2px 12px rgba(244,189,11,0.35);
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(244,189,11,0.45);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(23,26,30,0.18);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
  text-decoration: none;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.8);
  border-color: rgba(23,26,30,0.3);
  transform: translateY(-1px);
}

.hero-platform {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  opacity: 0.8;
  margin-top: -6px;
}

/* ============================================================
   PROGRAM OVERLAY — fixed widget, visible during content sections
   ============================================================ */
#program-overlay {
  position: fixed;
  right: 2.5vw;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  /* vertical offset so it doesn't feel stuck dead-center */
  margin-top: 0;
}

#program-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.sm-caption {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 8px;
  opacity: 0.75;
  font-family: 'Poppins', sans-serif;
}

/* ============================================================
   SM-WIDGET — exact recreation of SnapMarkers macOS panel
   Source: reaper_snapmarkers.mm
   LSEP = 330px, PAD = 12px, GAP = 8px
   Card h = 108px, State card h = 64px, Row h = 30px
   ============================================================ */
.sm-widget {
  width: clamp(480px, 36vw, 580px);
  background: var(--sm-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 24px 80px rgba(0,0,0,0.55),
    0 4px 16px rgba(0,0,0,0.3),
    0 0 0 0.5px rgba(255,255,255,0.06);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  color: var(--sm-text);
  user-select: none;
  /* Dark Aqua appearance */
  -webkit-appearance: none;
}

/* ---- Title bar ---- */
.sm-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  padding: 0 10px;
  background: var(--sm-card);
  border-bottom: 1px solid var(--sm-sep);
}
.sm-traffic { display: flex; gap: 6px; align-items: center; }
.sm-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.sm-red    { background: #ff5f57; }
.sm-yellow { background: #febc2e; }
.sm-green  { background: #28c840; }

.sm-title {
  font-size: 11px;
  font-weight: 500;
  color: rgba(248,249,250,0.75);
  letter-spacing: 0.01em;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.sm-dock-btn {
  background: none;
  border: none;
  font-size: 10px;
  color: var(--sm-muted);
  cursor: default;
  padding: 0;
  font-family: inherit;
}
.sm-dock-btn:hover { color: var(--sm-text); }

/* ---- Body: left panel + right panel side by side ---- */
.sm-body {
  display: flex;
  /* Height is content-driven; left panel determines it */
}

/* ============================================================
   LEFT SETTINGS PANEL — exactly 330px (LSEP from source)
   ============================================================ */
.sm-left {
  width: var(--sm-lsep);      /* exactly 330px */
  flex-shrink: 0;
  padding: var(--sm-pad);
  display: flex;
  flex-direction: column;
  gap: var(--sm-gap);
  background: var(--sm-bg);
  overflow-y: auto;
  scrollbar-width: none;
  /* Height: drives widget height */
}
.sm-left::-webkit-scrollbar { display: none; }

/* MODE section: label + capsule segmented control */
.sm-mode-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sm-section-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sm-muted);
}

/* Capsule segmented control — macOS dark Aqua style */
.sm-seg {
  display: flex;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 2px;
  gap: 0;
}

/* Mode seg control (taller, from source: h=32px) */
.sm-mode-seg {
  height: var(--sm-mode-h);   /* 32px */
}
.sm-mode-seg .sm-seg-btn {
  font-size: 12px;
  padding: 0 14px;
}

/* State seg control (shorter, from source: h=26px) */
.sm-state-seg {
  height: var(--sm-seg-h);    /* 26px */
  border-radius: 6px;         /* slightly less round for the state seg */
}

.sm-seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--sm-muted);
  cursor: default;
  transition: background 0.14s, color 0.14s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.sm-seg-btn.sm-active {
  background: var(--sm-accent);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
}
.sm-seg-btn.sm-seg-disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ---- Settings card (PAD/MIDI, h=108px from source) ---- */
.sm-card {
  background: var(--sm-card);
  border: 1px solid var(--sm-border);
  border-radius: 8px;               /* 8×8 from source */
  padding: 10px;
  height: var(--sm-card-h);         /* 108px from source */
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  position: relative;
}

.sm-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sm-card-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sm-muted);
  margin-bottom: 8px;
}

.sm-gear-btn {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--sm-muted);
  cursor: default;
  padding: 0;
  line-height: 1;
  position: absolute;
  right: 10px;
  top: 8px;
}
.sm-gear-btn:hover { color: var(--sm-text); }

/* Field row: label + input */
.sm-field-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.sm-field-lbl {
  font-size: 12px;
  color: var(--sm-text);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Fake input fields (styled to match NSTextField in dark aqua) */
.sm-field-input {
  flex: 1;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--sm-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Mono', monospace;
  color: var(--sm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 22px;           /* From source: NSTextField height 22px */
  display: flex;
  align-items: center;
}
.sm-field-input-sm {
  width: 40px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--sm-border);
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 11px;
  font-family: 'SF Mono', 'Fira Mono', monospace;
  color: var(--sm-text);
  text-align: center;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sm-device-field {
  font-family: inherit;
  font-size: 11px;
  margin-bottom: 4px;
  cursor: default;
  background: rgba(0,0,0,0.25);
  width: 100%;
}
.sm-ip-field { font-size: 11px; }

/* Status text */
.sm-status {
  font-size: 11px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sm-status::before {
  content: '●';
  font-size: 8px;
}
.sm-status-muted  { color: var(--sm-muted); }
.sm-status-muted::before { color: var(--sm-muted); }
.sm-status-success { color: var(--sm-success); }
.sm-status-success::before { color: var(--sm-success); }
.sm-status-danger  { color: var(--sm-danger); }
.sm-status-danger::before { color: var(--sm-danger); }

.sm-device-info {
  font-size: 10px;
  color: var(--sm-muted);
  margin-bottom: 4px;
  line-height: 1.3;
}

.sm-last-lbl {
  font-size: 10px;
  color: var(--sm-muted);
  margin-top: auto;
}

/* Checkbox row */
.sm-checkbox-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--sm-text);
}
.sm-fake-check {
  width: 13px;
  height: 13px;
  border: 1px solid var(--sm-border);
  border-radius: 3px;
  background: rgba(0,0,0,0.25);
  flex-shrink: 0;
  position: relative;
}
.sm-check-on::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--sm-accent);
  font-weight: 700;
}

/* ---- State cards (MARKER / TRANSPORT / LIST) h=64px from source ---- */
.sm-state-card {
  background: var(--sm-card);
  border: 1px solid var(--sm-border);
  border-radius: 8px;
  padding: 10px;
  height: var(--sm-state-h);    /* 64px from source */
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Fader assign card — optional, same height */
.sm-fader-card {
  display: none;               /* shown via JS when mode=PAD and faderLink=true */
}

/* ============================================================
   VERTICAL SEPARATOR — 1px at x=330 (LSEP)
   ============================================================ */
.sm-vsep {
  width: 1px;
  background: var(--sm-sep);
  flex-shrink: 0;
  align-self: stretch;
}

/* ============================================================
   RIGHT SNAPSHOTS PANEL
   ============================================================ */
.sm-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--sm-bg);
}

.sm-right-head {
  padding: var(--sm-pad) var(--sm-pad) 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.sm-discog-row { width: 100%; }
.sm-discog-popup {
  font-family: inherit;
  font-size: 11px;
  cursor: default;
  width: 100%;
}

.sm-tracking-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--sm-text);
}
.sm-tracking-lbl { flex: 1; font-size: 11px; }

.sm-edit-btn {
  background: var(--sm-card);
  border: 1px solid var(--sm-border);
  border-radius: 4px;
  padding: 1px 10px;
  font-family: inherit;
  font-size: 10px;
  color: var(--sm-text);
  cursor: default;
  height: 22px;
}
.sm-edit-btn:hover { background: rgba(255,255,255,0.06); }

/* Snapshot scroll area */
.sm-snap-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px var(--sm-pad) var(--sm-pad);
  scrollbar-width: thin;
  scrollbar-color: var(--sm-border) transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;                    /* 4px gap between rows, from source */
}
.sm-snap-scroll::-webkit-scrollbar { width: 4px; }
.sm-snap-scroll::-webkit-scrollbar-thumb {
  background: var(--sm-border);
  border-radius: 999px;
}

/* ---- Snapshot row — h=30px, radius=6px, from source ---- */
.sm-row {
  display: flex;
  align-items: center;
  height: var(--sm-row-h);     /* 30px from source */
  border-radius: 6px;          /* 6×6 from source */
  background: var(--row-color);
  /* 1.5px inset border using box-shadow (since CSS border would add to layout) */
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--row-color) 60%, #000);
  flex-shrink: 0;
  overflow: hidden;
  transition: filter 0.12s;
  cursor: default;
  position: relative;
}
.sm-row:hover { filter: brightness(1.12); }
.sm-row.sm-row-hidden {
  height: 0;
  overflow: hidden;
  opacity: 0;
  margin-bottom: 0;
  pointer-events: none;
}

/* Drag handle ☰ — from source: x=5, size 12×14, 9pt, alpha 0.30 */
.sm-row-drag {
  font-size: 9px;
  color: white;
  opacity: 0.30;
  padding: 0 3px 0 5px;
  flex-shrink: 0;
  line-height: 1;
  font-family: -apple-system, sans-serif;
}

/* Cue number — from source: x=20, 34×16, 10pt monospaced, alpha 0.55 */
.sm-row-cue {
  width: 28px;
  font-size: 10px;
  font-family: 'SF Mono', 'Fira Mono', monospace;
  color: white;
  opacity: 0.55;
  text-align: right;
  flex-shrink: 0;
  padding-right: 3px;
  letter-spacing: -0.02em;
}

/* Name — from source: x=58, fills remaining, 12pt medium */
.sm-row-name {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: white;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

/* Delete × — from source: right-aligned, 22×22, 11pt, alpha 0.50 */
.sm-row-del {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  margin-right: 4px;
  border-radius: 3px;
  font-family: -apple-system, sans-serif;
}
.sm-row-del:hover { background: rgba(0,0,0,0.2); color: white; }

/* "New Name" badge on row */
.sm-row.sm-row-newname::after {
  content: 'NEW';
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,0.22);
  color: white;
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 6px;
}

/* Add-row button (dashed outline, from source) */
.sm-add-row {
  height: var(--sm-row-h);
  border-radius: 6px;
  border: 1px dashed var(--sm-border);
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sm-muted);
  font-size: 13px;
  font-weight: 300;
  cursor: default;
  flex-shrink: 0;
  font-family: -apple-system, sans-serif;
}
.sm-add-row:hover { border-color: var(--sm-text); color: var(--sm-text); }

/* ============================================================
   3-COLUMN CONTENT SECTIONS
   Overlay occupies the right — sections reserve that space
   ============================================================ */
.content-section {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
  background-attachment: fixed;
  display: grid;
  grid-template-columns: 264px 1fr;
  gap: 32px;
  padding: 64px 32px;
  /* Right padding reserves space for the fixed overlay widget */
  padding-right: calc(clamp(480px, 36vw, 580px) + 3.5vw + 24px);
  align-items: start;
  border-top: 1px solid var(--border);
}

.content-section-alt {
  background: linear-gradient(180deg, var(--bg-end) 0%, var(--bg-start) 100%);
  background-attachment: fixed;
}

/* Left nav column — sticky */
.col-left {
  position: sticky;
  top: 32px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  scrollbar-width: none;
  padding: 24px 0;
}
.col-left::-webkit-scrollbar { display: none; }

/* Center column — scrolls normally */
.col-center { padding: 24px 0; min-width: 0; }

/* ---- Left nav components ---- */
.section-nav-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 20px;
}
.nav-group { margin-bottom: 28px; }
.nav-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 8px;
}

/* State buttons */
.state-btn-group { display: flex; flex-direction: column; gap: 4px; }
.state-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  background: rgba(255,255,255,0.5);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.state-btn:hover { background: rgba(255,255,255,0.8); color: var(--text); }
.state-btn.active {
  background: white;
  border-color: var(--accent);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(244,189,11,0.2);
}

.state-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.4);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent);
}

/* Mode toggle */
.mode-toggle {
  display: flex;
  gap: 4px;
  background: rgba(23,26,30,0.06);
  border-radius: 999px;
  padding: 3px;
}
.mode-btn {
  flex: 1;
  padding: 6px 12px;
  border: none;
  background: transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.16s;
}
.mode-btn.active {
  background: white;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(23,26,30,0.12);
}

/* Fader link toggle */
.toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: rgba(255,255,255,0.5);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.toggle-btn.on { border-color: var(--accent); color: var(--text); background: rgba(244,189,11,0.08); }
.toggle-track {
  display: inline-flex;
  align-items: center;
  width: 30px; height: 16px;
  background: rgba(23,26,30,0.2);
  border-radius: 999px;
  padding: 2px;
  transition: background 0.16s;
  flex-shrink: 0;
}
.toggle-btn.on .toggle-track { background: var(--accent); }
.toggle-thumb {
  width: 12px; height: 12px;
  background: white;
  border-radius: 50%;
  transition: transform 0.16s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-btn.on .toggle-thumb { transform: translateX(14px); }

/* Step list */
.step-list { display: flex; flex-direction: column; gap: 2px; }
.step-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.83rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.step-btn:hover { background: rgba(255,255,255,0.6); color: var(--text); }
.step-btn.active {
  background: white;
  border-color: var(--accent);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(244,189,11,0.15);
}
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: rgba(23,26,30,0.08);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.15s;
}
.step-btn.active .step-num { background: var(--accent); color: var(--text); }

/* Category nav */
.category-list { display: flex; flex-direction: column; gap: 2px; }
.cat-link {
  display: block;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.15s;
  border: 1.5px solid transparent;
}
.cat-link:hover { background: rgba(255,255,255,0.6); color: var(--text); }
.cat-link.active {
  background: white;
  border-color: var(--accent);
  color: var(--text);
  font-weight: 600;
}

/* ============================================================
   SECTION TITLE + FEATURE CARDS
   ============================================================ */
.section-title-block { margin-bottom: 28px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.wide-card { grid-column: 1 / -1; }

.feature-icon { width: 30px; height: 30px; margin-bottom: 10px; color: var(--accent-dark); }
.feature-icon svg { width: 100%; height: 100%; }
.feature-card h3 { font-size: 0.93rem; }
.feature-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin-top: 4px; }

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.card-header-row h3 { margin-bottom: 0; }

.inline-mode-toggle {
  display: flex;
  gap: 3px;
  background: rgba(23,26,30,0.07);
  border-radius: 999px;
  padding: 2px;
  flex-shrink: 0;
}
.inline-mode-btn {
  padding: 4px 10px;
  border: none;
  background: transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.inline-mode-btn.active { background: white; color: var(--text); box-shadow: 0 1px 4px rgba(23,26,30,0.1); }

/* ============================================================
   SETUP
   ============================================================ */
.setup-step {
  background: white;
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  animation: fadeSlide 0.22s ease;
}
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.setup-step h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  margin-bottom: 12px;
}
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: var(--accent);
  color: var(--text);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}
.setup-step p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 10px;
}
.setup-step p:last-child { margin-bottom: 0; }
.setup-tip {
  font-size: 0.82rem;
  color: var(--muted);
  background: rgba(244,189,11,0.08);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
  margin-top: 12px;
}

.setup-list {
  list-style: none;
  margin: 12px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.setup-list li {
  font-size: 0.92rem;
  color: var(--text);
  padding-left: 18px;
  position: relative;
}
.setup-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ============================================================
   MACRO TABLES
   ============================================================ */
.macro-section { margin-bottom: 38px; }
.macro-section h3 { font-size: 1.05rem; margin-bottom: 8px; }
.macro-section > p { font-size: 0.88rem; color: var(--muted); margin-bottom: 10px; }

.macro-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.macro-table thead tr { background: rgba(23,26,30,0.04); }
.macro-table th {
  padding: 9px 13px;
  text-align: left;
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.macro-table td {
  padding: 9px 13px;
  border-bottom: 1px solid rgba(23,26,30,0.05);
  vertical-align: middle;
}
.macro-table tbody tr:last-child td { border-bottom: none; }
.macro-table tbody tr:hover td { background: rgba(244,189,11,0.04); }

.pad-col, .midi-col { transition: opacity 0.2s; }
body.mode-midi .pad-col  { opacity: 0.3; }
body.mode-pad  .midi-col { opacity: 0.3; }

.macro-note {
  font-size: 0.79rem;
  color: var(--muted);
  margin-top: 8px;
  padding: 7px 11px;
  background: rgba(23,26,30,0.04);
  border-radius: var(--radius-sm);
}

/* ============================================================
   CHANGELOG & SUPPORT
   ============================================================ */
.simple-section {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, var(--bg-end) 0%, var(--bg-start) 100%);
  background-attachment: fixed;
  border-top: 1px solid var(--border);
  padding: 72px 6vw;
}
.simple-inner { max-width: 720px; margin: 0 auto; }
.simple-inner h2 { margin-bottom: 8px; }

.changelog-list { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }
.changelog-entry {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  padding: 22px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.changelog-meta { display: flex; flex-direction: column; gap: 6px; }
.version-pill {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent);
  color: var(--text);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  width: fit-content;
}
.version-old { background: rgba(23,26,30,0.1); }
.changelog-date { font-size: 0.78rem; color: var(--muted); }
.changelog-items { display: flex; flex-direction: column; gap: 7px; }
.changelog-item { display: flex; align-items: baseline; gap: 8px; font-size: 0.88rem; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.tag-new    { background: #d4f5dc; color: #1a6b2a; }
.tag-fix    { background: #fde8d0; color: #8a3a00; }
.tag-change { background: #dde8ff; color: #1a3a8a; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  position: relative;
  z-index: 2;
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 40px 6vw;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }

/* PlainIcon.svg inlined — colored with accent via fill="currentColor" override */
.footer-icon {
  width: 36px;
  height: 36px;
  fill: var(--accent);        /* Overrides the inline CSS class in PlainIcon */
  flex-shrink: 0;
}
.footer-icon .h { fill: var(--accent); } /* Override internal .h style in PlainIcon.svg */

.footer-brand-text { display: flex; flex-direction: column; }
.footer-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  line-height: 1.1;
}
.footer-tagline { font-size: 0.75rem; opacity: 0.45; }

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 0.82rem; color: rgba(255,255,255,0.55); transition: color 0.15s; }
.footer-links a:hover { color: white; }
.footer-copy { font-size: 0.78rem; opacity: 0.35; }

/* ============================================================
   SCROLL FADE-IN
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Below overlay breakpoint: hide overlay, switch to inline layout */
@media (max-width: 1100px) {
  #program-overlay { display: none; }

  .content-section {
    grid-template-columns: 220px 1fr;
    padding-right: 32px;
    gap: 24px;
    padding: 48px 24px;
  }
}

@media (max-width: 900px) {
  #hero-timeline { display: none; }
  #hero {
    background: linear-gradient(180deg, #faf3e6, #f0e5d0);
    padding: 80px 6vw;
  }
  .content-section {
    display: block;
    padding: 40px 20px;
  }
  .col-left {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
    margin-bottom: 24px;
  }
  .feature-grid { grid-template-columns: 1fr; }
  .wide-card { grid-column: 1; }
  .changelog-entry { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 600px) {
  .hero-headline { font-size: 2rem; }
  .simple-section { padding: 48px 16px; }
}
