/* Linkify — Design System
   ─────────────────────────────────────────────────────────────── */

/*──────────────────────────────────────────────────────────────────
  Tokens
  ────────────────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  /* Surfaces — very dark navy hierarchy */
  --background: #06070d;
  --surface: #0b0e19;
  --surface-hover: #111527;
  --surface-active: #171c33;
  --surface-raised: #1e2440;

  /* Borders — extremely subtle blue/gray */
  --border: rgba(148, 163, 255, 0.08);
  --border-strong: rgba(148, 163, 255, 0.14);

  /* Text — strict hierarchy */
  --text-primary: #f3f5ff;
  --text-secondary: #9aa3c0;
  --text-muted: #5f6884;

  /* Brand accent — blue/purple, used sparingly */
  --accent: #6f8bff;
  --accent-hover: #8fa6ff;
  --accent-soft: rgba(111, 139, 255, 0.12);
  --accent-strong: rgba(111, 139, 255, 0.20);

  /* Violet — secondary accent for favorites/spot highlights */
  --accent-violet: #8b7cf6;
  --accent-violet-soft: rgba(139, 124, 246, 0.16);

  /* Semantic — status only, never decoration */
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);

  /* Radii */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;

  /* Spacing — 4px base */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Fira Code", ui-monospace, monospace;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 150ms;
  --dur-slow: 250ms;

  /* Layout */
  --max-w: 1120px;
  --gutter: var(--sp-6);
  --header-h: 56px;
}


/*──────────────────────────────────────────────────────────────────
  Reset
  ────────────────────────────────────────────────────────────────── */

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

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--accent-hover); }

img { display: block; max-width: 100%; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

table { border-collapse: collapse; width: 100%; }


/*──────────────────────────────────────────────────────────────────
  Typography
  ────────────────────────────────────────────────────────────────── */

h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 22px; line-height: 1.3; }
h3 { font-size: 17px; line-height: 1.4; }

.muted   { color: var(--text-secondary); }
.small   { font-size: 13px; line-height: 1.5; }
.caption { font-size: 12px; line-height: 1.4; color: var(--text-muted); letter-spacing: 0.02em; }
.label   { font-size: 13px; font-weight: 500; color: var(--text-secondary); letter-spacing: 0.02em; }
.center  { text-align: center; }


/*──────────────────────────────────────────────────────────────────
  Layout
  ────────────────────────────────────────────────────────────────── */

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }


/*──────────────────────────────────────────────────────────────────
  Navigation
  ────────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(9, 9, 11, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

header nav {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--dur) var(--ease);
  letter-spacing: 0.01em;
}
.nav-link:hover { color: var(--text-primary); text-decoration: none; }
.nav-link.active { color: var(--text-primary); }

.user-chip {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Mobile nav toggle — CSS only */
.nav-toggle-input,
.nav-toggle-label {
  display: none;
}
.nav-toggle-label {
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: var(--r-md);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.nav-toggle-label:hover { background: var(--surface-active); }

@media (max-width: 720px) {
  .nav-toggle-label {
    display: flex;
    pointer-events: none;
  }

  /* Invisible but focusable hit area at the label's position */
  .nav-toggle-input {
    display: block;
    position: absolute;
    top: 10px;
    right: var(--gutter);
    width: 36px;
    height: 36px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    border: 0;
    padding: 0;
  }
  .nav-toggle-input:focus-visible ~ .nav-toggle-label {
    box-shadow: 0 0 0 2px var(--accent-strong), inset 0 0 0 1px var(--accent);
  }

  .header-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--sp-3) var(--gutter) var(--sp-4);
  }
  .header-nav { gap: var(--sp-1) !important; flex-direction: column; align-items: stretch; }
  .header-nav .nav-link { padding: var(--sp-2) 0; }
  .header-nav .user-chip { padding: var(--sp-2) 0; }
  .header-nav .btn { text-align: center; }

  .nav-toggle-input:checked ~ .header-nav {
    display: flex;
  }
}


/*──────────────────────────────────────────────────────────────────
  Dashboard — Sidebar (app.html only, scoped via .app-shell)
  ────────────────────────────────────────────────────────────────── */

.app-shell {
  --side-bg: #080a13;
  --side-border: rgba(148, 163, 255, 0.07);
  --side-text: #8f96b3;
  --side-text-hover: #ecefff;
  --side-hover-bg: rgba(148, 163, 255, 0.06);
  --side-active-bg: rgba(111, 139, 255, 0.12);
  --side-accent-a: #6f8bff;
  --side-accent-b: #a78bfa;
  --side-w: 245px;
  --rail-w: 64px;
}

.app-shell .sidebar-scrim {
  display: none;
}

.app-shell .sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 245px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: var(--side-bg);
  border-right: 1px solid var(--side-border);
}

.app-shell .app-main {
  margin-left: 245px;
}

.app-shell .brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f2f4ff;
  white-space: nowrap;
}
.app-shell .brand:hover {
  color: #f2f4ff;
  text-decoration: none;
}
.app-shell .brand .brand-tld {
  background: linear-gradient(90deg, var(--side-accent-a), var(--side-accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sidebar-head {
  display: flex;
  align-items: center;
  height: 60px;
  flex-shrink: 0;
  padding: 0 22px;
  border-bottom: 1px solid var(--side-border);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.side-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--side-text);
  transition: background 180ms var(--ease), color 180ms var(--ease);
}
.side-link:hover {
  background: var(--side-hover-bg);
  color: var(--side-text-hover);
  text-decoration: none;
}
.side-link.active {
  background: var(--side-active-bg);
  color: #fff;
  font-weight: 600;
}
.side-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--side-accent-a), var(--side-accent-b));
}
.side-link:focus-visible,
.side-parent:focus-visible {
  outline: 2px solid var(--side-accent-a);
  outline-offset: 1px;
}

.side-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--side-text);
  cursor: pointer;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}
.side-parent:hover {
  background: var(--side-hover-bg);
  color: var(--side-text-hover);
}
.side-parent.active-parent {
  color: #fff;
  font-weight: 600;
}
.side-chevron {
  flex-shrink: 0;
  transition: transform 180ms var(--ease);
}
.side-parent[aria-expanded="false"] .side-chevron {
  transform: rotate(-90deg);
}

.side-sub {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-sub.collapsed {
  display: none;
}
.side-link.side-nested {
  height: 40px;
  padding-left: 26px;
  font-size: 13px;
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--side-border);
}
.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 2px;
}
.side-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(141, 155, 255, 0.14);
  color: #c3cbff;
  font-size: 12px;
  font-weight: 600;
}
.app-shell .user-chip {
  font-size: 13px;
  font-weight: 500;
  color: var(--side-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-shell .drawer-toggle { display: none; }

@media (max-width: 860px) {
  .app-shell .app-main {
    margin-left: 0;
  }
  .app-shell .drawer-toggle { display: inline-flex; }
  .app-shell .sidebar {
    transform: translateX(-102%);
    transition: transform 200ms var(--ease);
  }
  .app-shell .sidebar.open {
    transform: none;
  }
  .app-shell .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 59;
    background: rgba(0, 0, 0, 0.55);
    border: 0;
    padding: 0;
  }
  .app-shell .sidebar-scrim[hidden] {
    display: none;
  }
}


/*──────────────────────────────────────────────────────────────────
  Buttons
  ────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  background: var(--surface-active);
  color: var(--text-secondary);
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { background: var(--surface-raised); color: var(--text-primary); text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--surface-active); color: var(--text-primary); border-color: var(--border-strong); }

.btn-danger {
  background: transparent;
  border: 1px solid var(--danger-soft);
  color: var(--danger);
}
.btn-danger:hover { background: var(--danger-soft); }

.btn-block { display: flex; width: 100%; }

.btn-lg { height: 44px; padding: 0 24px; font-size: 15px; font-weight: 500; border-radius: var(--r-md); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; font-weight: 500; }

.btn:disabled { opacity: 0.4; cursor: default; pointer-events: none; }


/*──────────────────────────────────────────────────────────────────
  Forms
  ────────────────────────────────────────────────────────────────── */

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--sp-1);
  letter-spacing: 0.01em;
}

input, select, textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--background);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

input::placeholder { color: var(--text-muted); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2371717a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 20px;
  margin-top: var(--sp-2);
  line-height: 1.4;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin: var(--sp-4) 0;
}
.field > span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.field select, .field input { height: 40px; }


/*──────────────────────────────────────────────────────────────────
  Cards
  ────────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
}
.card h3 { margin-bottom: var(--sp-2); }
.card p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.card > .btn { margin-top: var(--sp-4); }


/*──────────────────────────────────────────────────────────────────
  Tables
  ────────────────────────────────────────────────────────────────── */

th, td {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
}
th {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
td { font-size: 14px; color: var(--text-secondary); }
td strong { color: var(--text-primary); font-weight: 600; }
td.empty { padding: var(--sp-10) 0; }

td code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 2px 6px;
}


/*──────────────────────────────────────────────────────────────────
  Status Pills
  ────────────────────────────────────────────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  line-height: 1;
  background: var(--surface-active);
  color: var(--text-muted);
}
.pill.active, .pill.confirmed {
  background: var(--success-soft);
  color: var(--success);
}
.pill.disabled, .pill.expired {
  background: var(--danger-soft);
  color: var(--danger);
}
.pill.pending {
  background: var(--warning-soft);
  color: var(--warning);
}
.pill.paid_pending_confirmation {
  background: var(--accent-soft);
  color: var(--accent);
}
.pill.underpaid {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Badges (admin table) */
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  line-height: 1;
}
.badge-ok { background: var(--success-soft); color: var(--success); }
.badge-bad { background: var(--danger-soft); color: var(--danger); }
.badge-dim { background: var(--surface-active); color: var(--text-muted); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }


/*──────────────────────────────────────────────────────────────────
  Modal
  ────────────────────────────────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: var(--gutter);
}
.modal.hidden { display: none; }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  width: 100%;
  max-width: 440px;
  position: relative;
}
.modal-box h2 { margin-bottom: var(--sp-1); }

.modal-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.modal-close:hover { background: var(--surface-active); color: var(--text-primary); }


/*──────────────────────────────────────────────────────────────────
  Toast
  ────────────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--text-primary);
  color: var(--background);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  z-index: 200;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/*──────────────────────────────────────────────────────────────────
  Empty state
  ────────────────────────────────────────────────────────────────── */

.empty {
  color: var(--text-muted);
  padding: var(--sp-12) 0;
  text-align: center;
  font-size: 14px;
}


/*──────────────────────────────────────────────────────────────────
  Landing — Hero
  ────────────────────────────────────────────────────────────────── */

.hero {
  padding: var(--sp-24) 0 var(--sp-20);
  text-align: center;
}
.hero h1 {
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: var(--sp-5);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.hero .accent { color: var(--accent); }

.lede {
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto var(--sp-8);
}

.hero-actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
}


/*──────────────────────────────────────────────────────────────────
  Landing — Features
  ────────────────────────────────────────────────────────────────── */

.features {
  padding: 0 0 var(--sp-20);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-12);
}

.feature-item { }

.feature-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-3);
}

.feature-item h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}

.feature-item p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .feature-grid { grid-template-columns: 1fr; gap: var(--sp-8); }
}


/*──────────────────────────────────────────────────────────────────
  Landing — Pricing
  ────────────────────────────────────────────────────────────────── */

.pricing {
  padding: 0 0 var(--sp-24);
}

.pricing > h2 {
  text-align: center;
  margin-bottom: var(--sp-10);
  font-size: 22px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
  max-width: 640px;
  margin: 0 auto;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}
.plan-card h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}
.plan-card .price {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: var(--sp-1) 0;
}
.plan-card .price-note {
  font-size: 14px;
  color: var(--text-muted);
}
.plan-card .btn { margin-top: var(--sp-4); }

.plan-card.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.04) 0%, transparent 100%);
}
.plan-card.featured h3 { color: var(--accent); }

@media (max-width: 720px) {
  .plan-grid { grid-template-columns: 1fr; max-width: 360px; }
}


/*──────────────────────────────────────────────────────────────────
  Landing — Footer
  ────────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-6) 0;
  font-size: 13px;
  color: var(--text-muted);
}


/*──────────────────────────────────────────────────────────────────
  Auth pages
  ────────────────────────────────────────────────────────────────── */

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--gutter);
}

.auth-card {
  width: 100%;
  max-width: 380px;
}
.auth-card .logo {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--sp-8);
}
.auth-card h1 {
  font-size: 24px;
  margin-bottom: var(--sp-1);
}
.auth-card .muted {
  font-size: 14px;
  margin-bottom: var(--sp-6);
}
.auth-card form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.auth-card form .btn { margin-top: var(--sp-1); }
.auth-card .switch-line {
  margin-top: var(--sp-6);
  font-size: 14px;
  color: var(--text-muted);
}


/*──────────────────────────────────────────────────────────────────
  Dashboard — App
  ────────────────────────────────────────────────────────────────── */

.app-main {
  padding: var(--sp-8) 0 var(--sp-16);
}
.app-main h1 {
  margin-bottom: var(--sp-3);
}
.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: var(--sp-6);
}

/* Link rows */
.link-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  margin-bottom: var(--sp-2);
  flex-wrap: wrap;
  transition: border-color var(--dur) var(--ease);
}
.link-row:hover { border-color: var(--border-strong); }

.link-row .grow { flex: 1; min-width: 200px; }
.link-row .code { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: var(--sp-2); }
.link-row .url { color: var(--text-muted); font-size: 13px; word-break: break-all; margin-top: var(--sp-1); }
.link-row .stats {
  display: flex;
  gap: var(--sp-5);
  color: var(--text-muted);
  font-size: 13px;
  margin-top: var(--sp-2);
}
.link-row .stats span { display: flex; align-items: center; gap: var(--sp-1); }
.link-row .actions { display: flex; gap: var(--sp-2); align-items: center; }

.stat-num { color: var(--text-primary); font-weight: 600; }


/*──────────────────────────────────────────────────────────────────
  Dashboard — Create form
  ────────────────────────────────────────────────────────────────── */

.create-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-6);
}
.create-form .full { grid-column: 1 / -1; }
.create-form .form-error { grid-column: 1 / -1; }
.create-form button[type="submit"] { grid-column: 1 / -1; margin-top: var(--sp-2); }


/*──────────────────────────────────────────────────────────────────
  Dashboard — Detail view
  ────────────────────────────────────────────────────────────────── */

.detail-head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}
.detail-head h1 { margin: 0; }
.back-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.back-link:hover { color: var(--text-primary); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* Subscription plan cards (rendered by app.js) */
.card.plan {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.card.plan h3 { margin-bottom: var(--sp-1); }
.card.plan .price {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary) !important;
  margin: var(--sp-2) 0;
}
.card.plan p { color: var(--text-muted); }
.card.plan .btn { margin-top: var(--sp-6); }
.card.plan .btn + .btn { margin-top: auto; }

.card h3 { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: var(--sp-3); }


/*──────────────────────────────────────────────────────────────────
  Dashboard — Payment modal
  ────────────────────────────────────────────────────────────────── */

.qr-box {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  margin: var(--sp-4) 0;
}
.qr-box code {
  display: block;
  word-break: break-all;
  font-size: 13px;
  font-family: var(--font-mono);
  padding: var(--sp-3) 0;
  color: var(--accent);
}
.qr-box .btn { margin-top: var(--sp-2); }
.payment-status {
  font-size: 14px;
  font-weight: 600;
  margin: var(--sp-3) 0 var(--sp-1);
}
.payment-status.pending  { color: var(--warning); }
.payment-status.received { color: var(--accent); }
.payment-status.ok       { color: var(--success); }
.payment-status.failed   { color: var(--danger); }

.confirmations {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
}


/*──────────────────────────────────────────────────────────────────
  Admin — Layout
  ────────────────────────────────────────────────────────────────── */

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}

.search-box {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.search-box span { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.search-box input { min-width: 240px; }

.card-gate {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-10) var(--sp-8);
  max-width: 440px;
  margin: var(--sp-16) auto;
  text-align: center;
}
.card-gate h1 { font-size: 20px; margin-bottom: var(--sp-2); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.stat-card .stat-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

@media (max-width: 720px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}


/*──────────────────────────────────────────────────────────────────
  Admin — Tabs
  ────────────────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-5);
}

.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: var(--sp-3) var(--sp-4);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  margin-bottom: -1px;
}
.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }

.tab-panel { margin-top: 0; }


/*──────────────────────────────────────────────────────────────────
  Admin — Table wrapper
  ────────────────────────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.table-wrap table { min-width: 720px; }
.table-wrap th { padding: var(--sp-3) var(--sp-4); }
.table-wrap td { padding: var(--sp-3) var(--sp-4); }

.td-actions { white-space: nowrap; display: flex; gap: var(--sp-2); }
.th-actions { width: 1%; }

.th-sort {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
.th-sort:hover { color: var(--text-primary); }
.th-sort.sorted-asc::after { content: ' ↑'; color: var(--accent); }
.th-sort.sorted-desc::after { content: ' ↓'; color: var(--accent); }


/*──────────────────────────────────────────────────────────────────
  Dashboard — Accounts
  ────────────────────────────────────────────────────────────────── */

.acc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}
@media (max-width: 720px) {
  .acc-grid { grid-template-columns: 1fr; }
}

.acc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: rgba(24, 24, 27, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.30), 0 8px 24px rgba(0, 0, 0, 0.20);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.acc-card:hover {
  border-color: var(--accent-violet-soft);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.30), 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 24px var(--accent-violet-soft);
}

.acc-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}
.acc-avatar {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent-strong);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.acc-avatar-text { pointer-events: none; }
.acc-avatar-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.acc-id {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.acc-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acc-email {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acc-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--surface-active); color: var(--text-primary); }
.icon-btn.starred { color: var(--accent-violet); }
.icon-btn.starred:hover { background: var(--accent-violet-soft); color: var(--accent-violet); }
.icon-btn.starred svg { fill: currentColor; }
.icon-btn svg { flex-shrink: 0; }

.acc-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-top: calc(var(--sp-3) * -1 + 2px);
}

.acc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3) 0;
}
.acc-stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  text-align: center;
  min-width: 0;
}
.acc-stat + .acc-stat { border-left: 1px solid var(--border-strong); }
.acc-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.acc-stat-value {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.acc-details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  font-size: 12px;
}
.acc-detail {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.acc-dk { color: var(--text-muted); }
.acc-dv { color: var(--text-secondary); font-weight: 500; }

.acc-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-1);
}
.acc-actions .btn { flex: 1; padding: 0 8px; }
.acc-actions .btn svg { margin-right: 6px; flex-shrink: 0; }

.acc-loading {
  padding: var(--sp-12) 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.acc-loading::after {
  content: '';
  display: block;
  width: 64px;
  height: 2px;
  margin: var(--sp-3) auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-strong), transparent);
  animation: acc-pulse 1.2s ease-in-out infinite;
}
@keyframes acc-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}


/*──────────────────────────────────────────────────────────────────
  Dashboard — Account modal
  ────────────────────────────────────────────────────────────────── */

.modal.modal-account .modal-box {
  max-width: 520px;
}
.account-modal-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  padding-right: 28px;
}
.account-modal-id { min-width: 0; }
.account-modal-id h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-modal-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}
.account-modal-scroll {
  max-height: 60vh;
  overflow-y: auto;
  margin-right: -2px;
  padding-right: 2px;
}

.am-row {
  display: grid;
  grid-template-columns: 110px 1fr 28px;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border);
}
.am-row:last-child { border-bottom: none; }
.am-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.am-value {
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-all;
  min-width: 0;
}
.am-value.mono {
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.am-copy {
  width: 28px;
  height: 28px;
}


/*──────────────────────────────────────────────────────────────────
  Utility
  ────────────────────────────────────────────────────────────────── */

.hidden { display: none !important; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
@media (max-width: 720px) {
  .grid-3 { grid-template-columns: 1fr; }
}


/*──────────────────────────────────────────────────────────────────
  Reduced motion
  ────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/*──────────────────────────────────────────────────────────────────
  Responsive — Global
  ────────────────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  :root {
    --gutter: 16px;
  }
  h1 { font-size: 24px; }
  h2 { font-size: 18px; }
  .hero { padding: var(--sp-16) 0 var(--sp-12); }
  .hero h1 { font-size: 32px; }
  .lede { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 280px; }
  .create-form { grid-template-columns: 1fr; }
  .link-row { padding: var(--sp-3) var(--sp-4); }
  .link-row .stats { flex-wrap: wrap; gap: var(--sp-3); }
}


/*──────────────────────────────────────────────────────────────────
  SaaS Primatives — type scale, focus, buttons, tables, states
  ────────────────────────────────────────────────────────────────── */

h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 15px; }

.num, .stat-num, td.num, .acc-stat-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -48px;
  left: 12px;
  z-index: 300;
  background: var(--surface-raised);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  transition: top 180ms var(--ease);
}
.skip-link:focus { top: 12px; }

/* Page + section headers */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}
.page-head h1 { margin: 0 0 2px; }
.page-head .subtitle { margin: 0; }
.page-actions {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  padding-top: 2px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-3);
}
.section-head h2 { margin: 0; font-size: 15px; }

/* Stat strip — monochrome, tabular, no decorative cards */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  margin-bottom: var(--sp-5);
  overflow: hidden;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-4) var(--sp-5);
  min-width: 0;
}
.stat + .stat { border-left: 1px solid var(--border); }
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.stat-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.stat-sub { font-size: 12px; color: var(--text-muted); }
@media (max-width: 720px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* Buttons — full state coverage */
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}
.btn.is-loading::after {
  content: '';
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Forms — states */
input:disabled, select:disabled, textarea:disabled, button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
input[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--danger);
}
input[aria-invalid="true"]:focus, select[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px var(--danger-soft);
}
.field-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: var(--sp-1);
  line-height: 1.4;
}

/* Tables — density + hover + alignment */
.table-wrap table { min-width: 640px; }
tbody tr { transition: background 150ms var(--ease); }
tbody tr:hover { background: rgba(148, 163, 255, 0.03); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
th {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
td .sub { display: block; font-size: 12px; color: var(--text-muted); }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.filter-bar input[type="search"] { max-width: 280px; }
.filter-bar select { max-width: 180px; }

/* Skeleton loading — matches layout, no spinners */
.skel {
  position: relative;
  overflow: hidden;
  background: var(--surface-hover);
  border-radius: var(--r-sm);
  min-height: 14px;
}
.skel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 255, 0.07), transparent);
  animation: skel-sweep 1.4s ease-in-out infinite;
}
@keyframes skel-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.skel-rows { display: flex; flex-direction: column; gap: var(--sp-2); }
.skel-row {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* Empty + error states */
.empty-state {
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: var(--sp-10) var(--sp-6);
  text-align: center;
  background: var(--surface);
}
.empty-state h3 { margin-bottom: var(--sp-1); }
.empty-state p {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 420px;
  margin: 0 auto var(--sp-4);
}
.error-card {
  border: 1px solid var(--danger-soft);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--sp-6);
  text-align: center;
}
.error-card h3 { margin-bottom: var(--sp-1); }
.error-card p { color: var(--text-secondary); font-size: 14px; margin-bottom: var(--sp-4); }

/* Activity list */
.activity {
  display: flex;
  flex-direction: column;
}
.activity-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  min-width: 0;
}
.activity-row:last-child { border-bottom: none; }
.activity-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}
.activity-dot.ok { background: var(--success); }
.activity-dot.fail { background: var(--danger); }
.activity-text {
  flex: 1;
  min-width: 0;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-text strong { color: var(--text-primary); font-weight: 600; }
.activity-time { flex-shrink: 0; font-size: 12px; color: var(--text-muted); }

/* Modal motion */
.modal-box {
  animation: modal-in 180ms var(--ease);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(6px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

/*──────────────────────────────────────────────────────────────────
  Dashboard — Topbar, command palette, profile menu, icon rail
  ────────────────────────────────────────────────────────────────── */

.app-shell .sidebar { width: var(--side-w); }
.app-shell .app-main { margin-left: var(--side-w); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  height: 57px;
  margin-left: var(--side-w);
  padding: 0 var(--sp-6);
  background: rgba(6, 7, 13, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.palette-trigger {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  max-width: 400px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}
.palette-trigger:hover { border-color: var(--border-strong); color: var(--text-secondary); }
.palette-trigger span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sub-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}
.sub-pill:hover { border-color: var(--border-strong); color: var(--text-primary); text-decoration: none; }
.sub-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); }
.sub-pill.on .dot { background: var(--success); }
.sub-pill.on { color: var(--text-primary); }

.profile { position: relative; }
.profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface-active);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 180ms var(--ease);
}
.profile-btn:hover { border-color: var(--accent); }
.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  animation: modal-in 150ms var(--ease);
}
.profile-head {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.profile-head strong { font-size: 13px; color: var(--text-primary); }
.profile-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}
.profile-item:hover { background: var(--surface-hover); color: var(--text-primary); }
.profile-item.danger:hover { background: var(--danger-soft); color: var(--danger); }

/* Command palette */
.palette {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18vh 16px 16px;
  background: rgba(3, 4, 8, 0.6);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.palette[hidden] { display: none; }
.palette-box {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: modal-in 150ms var(--ease);
}
.palette-box input {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  height: 52px;
  font-size: 15px;
  background: transparent;
}
.palette-box input:focus { box-shadow: none; border-bottom-color: var(--border-strong); }
.palette-list { max-height: 320px; overflow-y: auto; padding: 6px; }
.palette-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 8px 10px 4px;
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}
.palette-item .hint { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.palette-item.active { background: var(--surface-active); color: var(--text-primary); }
.palette-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* Sidebar — icons + collapse to rail */
.side-link svg, .side-parent svg.side-nav-ic { flex-shrink: 0; }
.side-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark {
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--surface-active);
  border: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--side-accent-a), var(--side-accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.side-collapse {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--side-text);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}
.side-collapse:hover { background: var(--side-hover-bg); color: var(--side-text-hover); border-color: var(--side-border); }
.side-collapse svg { flex-shrink: 0; transition: transform 200ms var(--ease); }

body.rail .app-shell .sidebar { width: var(--rail-w); }
body.rail .topbar, body.rail .app-shell .app-main { margin-left: var(--rail-w); }
body.rail .sidebar-head { padding: 0; justify-content: center; }
body.rail .app-shell .brand-full { display: none; }
body.rail .brand-mark { display: flex; }
body.rail .sidebar-nav { padding: 14px 10px; }
body.rail .side-link, body.rail .side-parent { justify-content: center; padding: 0; }
body.rail .side-label, body.rail .side-parent-label, body.rail .side-chevron { display: none; }
body.rail .side-parent { display: none; }
body.rail .side-link.side-nested { padding: 0; }
body.rail .sidebar-foot { align-items: center; padding: 14px 10px; }
body.rail .side-user, body.rail .sidebar-foot .btn { display: none; }
body.rail .side-collapse { justify-content: center; padding: 0; }
body.rail .side-collapse .collapse-label { display: none; }
body.rail .side-collapse svg { transform: rotate(180deg); }

/* Pre-paint rail (set before first paint, replaced by body.rail on boot) */
html.side-rail-pre .app-shell .sidebar { width: 64px; }
html.side-rail-pre .app-shell .app-main, html.side-rail-pre .topbar { margin-left: 64px; }
html.side-rail-pre .side-label, html.side-rail-pre .side-parent-label,
html.side-rail-pre .side-chevron, html.side-rail-pre .brand-full,
html.side-rail-pre .side-user, html.side-rail-pre .sidebar-foot .btn,
html.side-rail-pre .collapse-label { display: none; }

/* Mobile drawer overrides rail */
@media (max-width: 860px) {
  .topbar { margin-left: 0; padding: 0 16px; }
  .palette-trigger span { display: none; }
  .palette-trigger { max-width: none; width: 34px; justify-content: center; }
  .palette-trigger kbd { display: none; }
  body.rail .topbar, body.rail .app-shell .app-main { margin-left: 0; }
  body.rail .app-shell .sidebar { width: 245px; }
  body.rail .sidebar-head { padding: 0 22px; justify-content: flex-start; }
  body.rail .app-shell .brand-full { display: inline; }
  body.rail .brand-mark { display: none; }
  body.rail .sidebar-nav { padding: 14px 12px; }
  body.rail .side-link { justify-content: flex-start; padding: 0 12px; }
  body.rail .side-label { display: block; }
  body.rail .side-parent { display: flex; padding: 0 12px; }
  body.rail .side-parent-label { display: inline; }
  body.rail .side-chevron { display: block; }
  body.rail .side-link.side-nested { padding-left: 26px; }
  body.rail .sidebar-foot { align-items: stretch; padding: 14px; }
  body.rail .side-user { display: flex; }
  body.rail .side-collapse { justify-content: flex-start; padding: 0 12px; }
  body.rail .side-collapse .collapse-label { display: inline; }
  body.rail .side-collapse svg { transform: none; }
}

.logo .brand-tld {
  background: linear-gradient(90deg, var(--accent), var(--accent-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/*──────────────────────────────────────────────────────────────────
  Landing — linkify.wtf
  ────────────────────────────────────────────────────────────────── */

html { scroll-behavior: smooth; }

body.landing {
  background: var(--background);
  overflow-x: clip;
}

/* Navbar */
.nav-landing {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(6, 7, 13, 0.7);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.nav-landing.scrolled {
  background: rgba(6, 7, 13, 0.88);
  border-bottom-color: var(--border);
}
.nav-landing-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  height: 60px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.nav-landing-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
}
.nav-landing-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 12px;
  border-radius: var(--r-md);
  transition: color 150ms var(--ease), background 150ms var(--ease);
}
.nav-landing-links a:hover { color: var(--text-primary); background: var(--surface-hover); text-decoration: none; }
.nav-landing-cta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-left: auto;
}
.nav-login {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 150ms var(--ease);
}
.nav-login:hover { color: var(--text-primary); text-decoration: none; }

/* Sections */
.section { padding: 96px 0; }
.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section h2 {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-3);
  max-width: 640px;
}
.section-lede {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: var(--sp-10);
}
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}

/* Hero */
.hero-l { padding: 104px 0 88px; text-align: center; }
.hero-l h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.06;
  max-width: 720px;
  margin: 0 auto var(--sp-5);
}
.hero-l h1 .accent { color: var(--accent); }
.hero-l .lede { margin-bottom: var(--sp-8); }
.hero-l .hero-actions { margin-bottom: var(--sp-5); }
.hero-note { font-size: 13px; color: var(--text-muted); }

/* Product preview */
.preview {
  margin-top: var(--sp-16);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.preview-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-hover);
}
.preview-dots { display: flex; gap: 6px; }
.preview-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-raised); border: 1px solid var(--border-strong); }
.preview-url {
  flex: 1;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 0;
}
.preview-main { padding: var(--sp-6); border-right: 1px solid var(--border); }
.preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: var(--sp-5);
}
.preview-stats > div { display: flex; flex-direction: column; gap: 2px; }
.preview-stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.preview-stat-value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); }
.preview-link {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--background);
  padding: var(--sp-4) var(--sp-5);
}
.preview-link-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.preview-link-top strong { font-size: 15px; }
.preview-link-url { font-size: 12.5px; color: var(--text-muted); font-family: var(--font-mono); margin: 2px 0 var(--sp-3); }
.preview-link-stats { display: flex; gap: var(--sp-5); font-size: 13px; color: var(--text-muted); margin-bottom: var(--sp-3); }
.preview-link-stats b { color: var(--text-primary); font-weight: 600; }
.preview-side { padding: var(--sp-6); background: var(--surface-hover); display: flex; flex-direction: column; gap: var(--sp-2); }
.preview-side-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.preview-amount { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.preview-amount span { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.preview-addr { font-size: 12.5px; font-family: var(--font-mono); color: var(--accent); word-break: break-all; }
.preview-conf-bar { height: 5px; border-radius: 3px; background: var(--surface-raised); overflow: hidden; margin: var(--sp-3) 0 var(--sp-2); }
.preview-conf-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: var(--success);
  animation: conf-fill 1.6s var(--ease) 0.4s forwards;
}
@keyframes conf-fill { to { width: var(--w, 100%); } }
.preview-conf p { display: flex; align-items: center; gap: var(--sp-2); font-size: 13px; color: var(--text-secondary); margin: 0; }
.pulse { animation: dot-pulse 2.4s ease-in-out infinite; }
@keyframes dot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Bento */
.bento {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--sp-4);
}
.bento-wide { grid-column: 1 / -1; }
.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: var(--sp-8) var(--sp-6);
  transition: border-color 180ms var(--ease), transform 180ms var(--ease);
}
.bento-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.bento-card h3 { font-size: 17px; margin-bottom: var(--sp-2); }
.bento-card > p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; margin-bottom: var(--sp-5); max-width: 560px; }

/* UI mocks */
.mock {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--background);
  padding: var(--sp-4);
  font-size: 13px;
}
.mock-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.mock-form span { display: flex; flex-direction: column; gap: 2px; }
.mock-form label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin: 0; }
.mock-form b { font-weight: 600; color: var(--text-primary); }
.mock-events { display: flex; flex-direction: column; gap: var(--sp-2); }
.mock-events span { display: flex; align-items: center; gap: var(--sp-2); color: var(--text-secondary); }
.mock-events b { color: var(--text-primary); }
.mock-events em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--text-muted); }
.mock-conf { display: flex; align-items: center; gap: var(--sp-3); }
.mock-conf em { font-style: normal; font-size: 12.5px; color: var(--text-muted); }
.mock-rows { display: flex; flex-direction: column; }
.mock-rows span {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 600;
}
.mock-rows span:last-child { border-bottom: none; }
.mock-rows b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-active);
  color: var(--accent);
  font-size: 10px;
}
.mock-rows em { margin-left: auto; font-style: normal; font-weight: 500; font-size: 12px; color: var(--text-muted); }
.mock-bars { display: flex; align-items: flex-end; gap: 6px; height: 76px; }
.mock-bars i {
  flex: 1;
  height: 8px;
  border-radius: 3px 3px 0 0;
  background: var(--surface-raised);
}
.in .mock-bars i { animation: bar-grow 0.9s var(--ease) both; }
.in .mock-bars i:nth-child(1) { animation-delay: 0.05s; }
.in .mock-bars i:nth-child(2) { animation-delay: 0.1s; }
.in .mock-bars i:nth-child(3) { animation-delay: 0.15s; }
.in .mock-bars i:nth-child(4) { animation-delay: 0.2s; }
.in .mock-bars i:nth-child(5) { animation-delay: 0.25s; }
.in .mock-bars i:nth-child(6) { animation-delay: 0.3s; }
.in .mock-bars i:nth-child(7) { animation-delay: 0.35s; background: var(--accent); }
@keyframes bar-grow { from { height: 8px; } to { height: var(--h); } }
.mock-steps { display: flex; align-items: center; gap: 6px; }
.mock-steps span {
  flex: 1;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 4px;
}
.mock-steps .done { color: var(--text-secondary); }
.mock-steps .now { color: var(--success); border-color: var(--success-soft); background: var(--success-soft); }
.mock-plan { display: flex; align-items: baseline; justify-content: space-between; }
.mock-plan b { font-size: 15px; }
.mock-plan em { font-style: normal; font-size: 12.5px; color: var(--text-muted); }

/* Tour */
.tour-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.tour-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: border-color 180ms var(--ease), transform 180ms var(--ease);
}
.tour-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.tour-card h3 { font-size: 14.5px; margin: 0; }
.tour-card > p { font-size: 13px; color: var(--text-secondary); line-height: 1.55; margin: 0; }

/* Steps */
.steps {
  position: relative;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  margin-top: var(--sp-8);
}
.steps::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--border-strong);
}
.steps li { position: relative; }
.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}
.steps h3 { font-size: 16px; margin-bottom: var(--sp-1); }
.steps p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* Pricing */
.plan-grid-l { max-width: 720px; }
.plan-flag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: var(--sp-3);
}
.plan-list {
  list-style: none;
  text-align: left;
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: var(--sp-2) 0 var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plan-list li { padding-left: 22px; position: relative; }
.plan-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}
.pricing-note { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: var(--sp-8); }

/* Trust */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); }
.trust-grid h3 { font-size: 15px; margin-bottom: var(--sp-2); }
.trust-grid p { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }

/* Closing CTA */
.section-cta { border-top: 1px solid var(--border); }
.section-cta h2 { margin-left: auto; margin-right: auto; }
.section-cta .hero-actions { justify-content: center; }

/* Footer */
.footer-l {
  border-top: 1px solid var(--border);
  padding: var(--sp-12) 0 var(--sp-8);
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--sp-8);
  margin-bottom: var(--sp-10);
}
.footer-brand p { font-size: 13.5px; color: var(--text-muted); margin-top: var(--sp-3); max-width: 300px; line-height: 1.6; }
.footer-l nav { display: flex; flex-direction: column; gap: 10px; }
.footer-l nav p { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 2px; }
.footer-l nav a { font-size: 13.5px; color: var(--text-secondary); width: fit-content; transition: color 150ms var(--ease); }
.footer-l nav a:hover { color: var(--text-primary); text-decoration: none; }
.footer-base {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Reveal */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* Landing responsive */
@media (max-width: 1024px) {
  .tour-grid { grid-template-columns: repeat(2, 1fr); }
}
.nav-drop { display: flex; align-items: center; flex: 1; }
@media (max-width: 760px) {
  .nav-drop { display: none; }
  .nav-landing-inner { gap: var(--sp-4); }
  .nav-landing-inner .nav-toggle-label { display: flex; margin-left: auto; }
  .nav-landing-inner .nav-toggle-input { display: block; position: absolute; top: 12px; right: var(--gutter); width: 36px; height: 36px; margin: 0; opacity: 0; cursor: pointer; z-index: 2; border: 0; padding: 0; }
  .nav-toggle-input:checked ~ .nav-drop {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--sp-3) var(--gutter) var(--sp-4);
  }
  .nav-landing-links { flex-direction: column; align-items: stretch; gap: 2px; margin: 0 0 var(--sp-2); }
  .nav-landing-links a { padding: 10px 12px; font-size: 14px; }
  .nav-landing-cta { flex-direction: column; align-items: stretch; margin: 0; }
  .nav-landing-cta .btn { width: 100%; }
  .nav-landing-cta .nav-login { padding: 10px 12px; }
  .section { padding: 64px 0; }
  .hero-l { padding: 72px 0 64px; }
  .preview-grid { grid-template-columns: 1fr; }
  .preview-main { border-right: none; border-bottom: 1px solid var(--border); }
  .bento { grid-template-columns: 1fr; }
  .bento-wide { grid-column: auto; }
  .mock-form { grid-template-columns: 1fr 1fr; }
  .tour-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .trust-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .hero-l .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-l .hero-actions .btn { width: 100%; }
}

/* kbd */
kbd {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-active);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
  line-height: 1.4;
  white-space: nowrap;
}
