/* ============================================================
   TerminalTiler — site stylesheet
   Single source of truth for tokens, base, navigation, buttons,
   page chrome, modals, and shared component classes used by
   pro-account.js. Page-specific styles live alongside the page.
   ============================================================ */

/* ── 1. Design tokens ────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg-base: #030303;
  --bg-elevated: #0a0a0c;
  --bg-card: linear-gradient(180deg, rgba(13,13,16,0.98), rgba(7,7,9,0.98));
  --bg-card-hover: linear-gradient(180deg, rgba(20,20,24,1), rgba(11,11,14,1));
  --bg-header: linear-gradient(180deg, rgba(14,14,18,0.92), rgba(8,8,11,0.86));
  --bg-header-glow: radial-gradient(120% 80% at 50% -40%, rgba(240,179,75,0.07), transparent 60%);

  /* Borders */
  --border-subtle: rgba(255,255,255,0.07);
  --border-subtle-hover: rgba(255,255,255,0.13);
  --border-strong: rgba(255,255,255,0.18);
  --border-amber: rgba(240,179,75,0.28);
  --border-amber-strong: rgba(240,179,75,0.6);

  /* Text */
  --text-primary: #f4f4f1;
  --text-secondary: #f7f7f3;
  --text-muted: rgba(255,255,255,0.6);
  --text-faint: rgba(255,255,255,0.4);
  --text-amber: rgba(255,224,163,0.78);

  /* Accents */
  --accent-amber: #f0b34b;
  --accent-amber-bg: rgba(240,179,75,0.16);
  --accent-amber-bg-strong: rgba(240,179,75,0.24);
  --accent-cyan: #59d4e2;
  --accent-cyan-bg: rgba(89,212,226,0.16);
  --accent-violet: #9d7bff;
  --accent-violet-bg: rgba(157,123,255,0.16);
  --accent-rose: #ff7aa2;
  --accent-rose-bg: rgba(255,122,162,0.16);
  --accent-success: #4ade80;

  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.18);
  --shadow-md: 0 10px 28px rgba(0,0,0,0.22);
  --shadow-lg: 0 22px 60px rgba(0,0,0,0.32);
  --shadow-amber-glow: 0 0 0 1px rgba(240,179,75,0.22), 0 0 28px rgba(240,179,75,0.10);

  /* Geometry */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  /* Layout */
  --shell-max: 1120px;
  --shell-pad: 24px;
  --nav-height: 60px;

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 120ms;
  --t-med: 220ms;
}

/* ── 2. Reset + base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Offset native anchor jumps so section headings clear the sticky nav
     (60px at rest / 52px condensed) instead of landing under it. */
  scroll-padding-top: calc(var(--nav-height) + 1.25rem);
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient warmth — pinned, doesn't scroll */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -6%, rgba(240,179,75,0.07), transparent 60%),
    radial-gradient(ellipse 50% 30% at 90% 30%, rgba(89,212,226,0.03), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

::selection { background: rgba(240,179,75,0.28); color: var(--text-primary); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

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

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

/* ── 3. Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font: 700 13px/1 var(--font-sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  transition:
    color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
  white-space: nowrap;
  box-shadow: inset 0 1px rgba(255,255,255,0.05), var(--shadow-sm);
  background: rgba(255,255,255,0.035);
  color: rgba(255,255,255,0.78);
}

.btn:hover {
  color: rgba(255,251,242,0.95);
  background: rgba(255,255,255,0.08);
  border-color: var(--border-amber);
  box-shadow: inset 0 1px rgba(255,255,255,0.06), 0 6px 16px rgba(0,0,0,0.18);
}

.btn:active {
  background: rgba(240,179,75,0.14);
  border-color: rgba(240,179,75,0.34);
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-busy="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(180deg, rgba(240,179,75,0.26), rgba(190,97,45,0.14));
  border-color: rgba(240,179,75,0.36);
  color: #fff8ea;
  box-shadow: inset 0 1px rgba(255,255,255,0.10), 0 6px 14px rgba(190,97,45,0.16);
}

.btn-primary:hover {
  background: linear-gradient(180deg, rgba(255,200,90,0.32), rgba(210,110,50,0.20));
  border-color: rgba(240,179,75,0.5);
  color: #fffbf0;
  box-shadow: inset 0 1px rgba(255,255,255,0.12), 0 10px 24px rgba(190,97,45,0.22);
}

.btn-primary:active {
  background: linear-gradient(180deg, rgba(240,179,75,0.34), rgba(190,97,45,0.24));
}

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg { padding: 12px 22px; font-size: 14px; border-radius: var(--radius-md); }
.btn-block { width: 100%; }

/* Icon-only button — square, centers a single glyph (reuses .btn base). */
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 7px;
  gap: 0;
}

/* ── 4. Navigation ───────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  background-image: var(--bg-header), var(--bg-header-glow);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 6px 22px rgba(0,0,0,0.16);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition:
    box-shadow var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease),
    backdrop-filter var(--t-med) var(--ease);
}

/* Condensed state once the page is scrolled — lifts off the page. */
.site-nav.is-scrolled {
  --nav-height: 52px;
  border-bottom-color: var(--border-subtle-hover);
  box-shadow: 0 10px 30px rgba(0,0,0,0.30);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.nav-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--shell-pad);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: height var(--t-med) var(--ease);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 7px;
  transition: transform var(--t-fast) var(--ease);
}

.nav-brand:hover .brand-logo { transform: scale(1.06); }

/* On desktop the collapse wrapper is transparent to layout, so brand /
   links / actions keep their original space-between arrangement. */
.nav-collapse { display: contents; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

/* Animated amber underline — partial on hover, full on the active section. */
.nav-links a::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-amber);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
}

.nav-links a:hover::after { transform: scaleX(0.45); opacity: 0.55; }

.nav-links a.is-active { color: var(--text-primary); }
.nav-links a.is-active::after { transform: scaleX(1); opacity: 1; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Group the injected auth buttons (Sign in / Start Pro). */
.tt-auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Thin rule separating the GitHub/Download group from auth actions. */
.nav-divider {
  width: 1px;
  height: 18px;
  flex-shrink: 0;
  background: var(--border-subtle);
}

/* Hamburger — hidden on desktop, shown in the mobile media query. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.035);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.nav-toggle:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-amber);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform var(--t-med) var(--ease), opacity var(--t-fast) var(--ease);
}

.site-nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  /* The collapse wrapper becomes a slide-down drawer. */
  .nav-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 14px var(--shell-pad) 18px;
    background: var(--bg-elevated);
    background-image: var(--bg-header), var(--bg-header-glow);
    border-bottom: 1px solid var(--border-subtle-hover);
    box-shadow: 0 18px 40px rgba(0,0,0,0.42);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition:
      opacity var(--t-med) var(--ease),
      transform var(--t-med) var(--ease),
      visibility var(--t-med) var(--ease);
  }

  .site-nav.is-open .nav-collapse {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
  }

  .nav-links a {
    padding: 10px 12px;
    font-size: 15px;
  }

  /* Drawer uses a background highlight instead of the underline. */
  .nav-links a::after { display: none; }
  .nav-links a.is-active {
    background: var(--accent-amber-bg);
    color: var(--accent-amber);
  }

  .nav-divider { display: none; }

  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
  }

  .nav-actions .btn { width: 100%; }

  .btn-icon { width: 100%; height: auto; padding: 9px; }

  .site-nav .tt-auth-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .site-nav .tt-auth-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav,
  .nav-inner,
  .nav-links a,
  .nav-links a::after,
  .nav-toggle span,
  .nav-collapse,
  .brand-logo { transition: none !important; }
}

/* ── 5. Layout shells ────────────────────────────────────── */
.tt-app-shell {
  min-height: 100vh;
  background: var(--bg-base);
  color: var(--text-primary);
  position: relative;
}

.section,
.tt-page-shell {
  position: relative;
  z-index: 1;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--shell-pad) 96px;
}

.tt-page-shell { padding-top: 48px; padding-bottom: 64px; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-eyebrow,
.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-secondary);
  line-height: 1.08;
  margin-bottom: 14px;
  text-wrap: balance;
}

.section-desc {
  font-size: 16.5px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
  text-wrap: pretty;
}

/* ── 6. Eyebrow chip (used in hero, pro card) ────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: var(--accent-amber-bg);
  border: 1px solid rgba(240,179,75,0.24);
  color: var(--accent-amber);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-amber);
  box-shadow: 0 0 0 3px rgba(240,179,75,0.18);
  animation: dotPulse 2.4s var(--ease) infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(240,179,75,0.18); }
  50%      { box-shadow: 0 0 0 5px rgba(240,179,75,0.06); }
}

/* ── 7. Footer ───────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(6,6,7,0.6), rgba(3,3,3,0.95));
}

.footer-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 44px var(--shell-pad) 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 10px;
}

.footer-brand .brand-logo { width: 24px; height: 24px; border-radius: 6px; }

.footer-copy {
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.6;
  max-width: 320px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px 44px;
}

.footer-col h4 {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-faint);
  text-decoration: none;
  padding: 3px 0;
  transition: color var(--t-fast) var(--ease);
}

.footer-col a:hover { color: var(--accent-amber); }

.footer-bottom {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 14px var(--shell-pad);
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-faint);
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom a { color: var(--text-faint); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent-amber); }

/* Compact single-row footer used on auxiliary pages */
.site-footer.is-slim .footer-inner {
  grid-template-columns: 1fr auto;
  padding: 28px var(--shell-pad);
}
.site-footer.is-slim .footer-links {
  grid-template-columns: minmax(0, max-content);
  gap: 0;
  align-items: center;
}
.site-footer.is-slim .footer-col h4 { display: none; }
.site-footer.is-slim .footer-col {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
}
.site-footer.is-slim .footer-col a {
  display: inline-flex;
  align-items: center;
  padding: 4px 2px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.site-footer.is-slim .footer-col a:not(:last-child)::after {
  content: "·";
  color: var(--text-faint);
  opacity: 0.5;
  margin: 0 24px;
}

@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-links { grid-template-columns: repeat(2, auto); gap: 16px 32px; }
  .site-footer.is-slim .footer-col { gap: 6px 24px; }
  .site-footer.is-slim .footer-col a:not(:last-child)::after { content: none; }
}

/* ── 8. Account pages — page card + form patterns ────────── */
.tt-page-shell-narrow { max-width: 980px; padding: 48px var(--shell-pad) 64px; }

.tt-page-card {
  border: 1px solid var(--border-subtle-hover);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(240,179,75,0.06);
  padding: 28px;
  position: relative;
  z-index: 1;
}

.tt-page-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% -10%, rgba(240,179,75,0.06), transparent 60%);
}

.tt-page-card > * { position: relative; }

.tt-page-card h1 {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 10px;
}

.tt-page-card h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.tt-page-copy {
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.7;
}

.tt-auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tt-link {
  color: var(--accent-amber);
  text-decoration: none;
  font-weight: 600;
}
.tt-link:hover { text-decoration: underline; }

/* ── 9. Modal ────────────────────────────────────────────── */
.tt-modal[hidden] { display: none; }
.tt-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}
.tt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn var(--t-med) var(--ease);
}
.tt-modal-card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(780px, 92vh);
  overflow: auto;
  border: 1px solid var(--border-subtle-hover);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  box-shadow: 0 30px 90px rgba(0,0,0,0.52), var(--shadow-amber-glow);
  animation: modalIn var(--t-med) var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tt-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.tt-modal-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.tt-modal-copy {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-top: 4px;
}

.tt-modal-close {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.tt-modal-close:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border-color: var(--border-amber);
}

.tt-modal-body { padding: 22px 24px 24px; }

/* Modal section / step header (amber eyebrow like the index page) */
.tt-modal-section { display: grid; gap: 12px; }
.tt-modal-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-amber);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tt-modal-eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--border-amber-strong);
}

/* Reusable notice / callout box */
.tt-callout {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-left: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}
.tt-callout strong { color: var(--text-primary); font-weight: 700; }
.tt-callout.is-warn {
  border-left-color: var(--accent-amber);
  background: rgba(240,179,75,0.06);
  color: var(--text-amber);
}
.tt-callout.is-info {
  border-left-color: var(--accent-cyan);
  background: rgba(89,212,226,0.06);
}

/* Toolbar of small ghost actions (Copy / Download / Reveal) */
.tt-toolbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

/* Recovery phrase grid — fixes the double-numbered list, premium chips */
.tt-phrase-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  counter-reset: none;
}
.tt-phrase-word {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.tt-phrase-word:hover {
  border-color: var(--border-amber);
  background: rgba(240,179,75,0.05);
}
.tt-phrase-num {
  flex: 0 0 1.4em;
  text-align: right;
  font: 12px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}
.tt-phrase-text {
  font: 600 14px/1.2 var(--font-mono);
  color: var(--text-primary);
  word-break: break-all;
}
.tt-phrase-grid.is-blurred .tt-phrase-text {
  filter: blur(6px);
  user-select: none;
}

/* "or" label centered on the auth divider */
.tt-divider-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tt-divider-label::before,
.tt-divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ── 10. Form primitives ─────────────────────────────────── */
.tt-form-grid { display: grid; gap: 12px; }
.tt-field { display: grid; gap: 6px; }
.tt-field span {
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tt-field input,
.tt-field select,
.tt-inline-form input,
.seat-control input {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font: 14px/1.2 var(--font-sans);
  padding: 11px 12px;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.tt-field input:focus,
.tt-field select:focus,
.tt-inline-form input:focus,
.seat-control input:focus {
  border-color: var(--border-amber-strong);
  background: rgba(255,255,255,0.06);
  outline: none;
  box-shadow: 0 0 0 3px rgba(240,179,75,0.14);
}

.tt-turnstile-wrap {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.025);
}

.tt-turnstile-label {
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tt-turnstile-widget {
  min-height: 66px;
  display: grid;
  align-items: center;
}

.tt-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tt-row-space { justify-content: space-between; }
.tt-stack { display: grid; gap: 16px; }
.tt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

.tt-status {
  min-height: 20px;
  color: var(--text-amber);
  font-size: 13px;
  line-height: 1.5;
}
.tt-error { color: var(--accent-rose); }

/* Account/list patterns */
.tt-card-list { display: grid; gap: 10px; }

.tt-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tt-list-row:last-child { border-bottom: 0; padding-bottom: 0; }

.tt-account-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.025);
  padding: 18px;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.tt-account-card:hover { border-color: var(--border-subtle-hover); }
.tt-account-card h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.tt-account-card h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }

/* ── Tabbed account panel ─────────────────────────────────── */
.tt-account { display: grid; gap: 18px; }

/* Persistent identity + billing hero */
.tt-account-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.025);
}
.tt-account-hero-id { flex: 1 1 280px; min-width: 0; }
.tt-account-hero-id h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}
.tt-account-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Segmented tab strip */
.tt-account-tabs {
  position: relative;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  border-bottom: 1px solid var(--border-subtle);
}
.tt-account-tabs::-webkit-scrollbar { display: none; }

/* Pin the tabs while scrolling a long panel — only inside the modal, whose
   card is the scroll container (the standalone page scrolls under the site nav). */
.tt-modal .tt-account-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tt-account-tab {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: start;
  transition: color var(--t-fast) var(--ease);
}
.tt-account-tab:hover { color: var(--text-primary); }
.tt-account-tab.is-active { color: var(--text-amber); }
.tt-account-tab:focus-visible {
  outline: 2px solid var(--border-amber-strong);
  outline-offset: -3px;
  border-radius: var(--radius-sm);
}

.tt-account-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}
.tt-account-tab.is-active .tt-account-tab-count {
  background: var(--accent-amber-bg);
  color: var(--text-amber);
}
.tt-account-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--accent-amber);
  box-shadow: 0 0 0 3px rgba(240, 179, 75, 0.18);
}

/* Sliding active-tab underline (positioned by JS) */
.tt-account-tab-indicator {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--accent-amber);
  border-radius: 2px 2px 0 0;
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--t-med) var(--ease),
    width var(--t-med) var(--ease),
    opacity var(--t-fast) var(--ease);
}

/* One panel visible at a time, fading in on switch */
.tt-account-panel { padding-top: 2px; }
.tt-account-panel[hidden] { display: none; }
.tt-account-panel:not([hidden]) { animation: panelIn var(--t-med) var(--ease) both; }
.tt-account-panel:focus-visible { outline: none; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tt-muted { color: var(--text-muted); }
.tt-small { font-size: 13px; }

.tt-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 999px;
  color: var(--text-amber);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


.tt-subsection {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.tt-license-key {
  display: block;
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.32);
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.tt-activation-steps {
  margin: 10px 0 0 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}
.tt-activation-steps li { padding: 2px 0; }

.tt-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 16px;
}

.tt-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.tt-team-summary {
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.025);
  color: var(--text-primary);
  padding: 14px;
  cursor: pointer;
  font: inherit;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.tt-team-summary:hover {
  border-color: var(--border-subtle-hover);
  background: rgba(255,255,255,0.04);
}
.tt-team-summary span { color: var(--text-muted); font-size: 13px; }
.tt-team-summary.is-selected {
  border-color: rgba(240,179,75,0.5);
  box-shadow: var(--shadow-amber-glow);
}

.tt-team-detail { margin-top: 18px; }

.tt-success-note {
  background: rgba(240,179,75,0.07);
  border: 1px solid rgba(240,179,75,0.18);
  border-radius: var(--radius-md);
  padding: 14px;
}

.tt-divider { height: 1px; background: var(--border-subtle); margin: 4px 0; }

.tt-oauth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.tt-pricing-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.tt-pricing-toggle .btn {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.tt-pricing-toggle .btn:hover {
  background: rgba(255,255,255,0.04);
  border-color: transparent;
  box-shadow: none;
}
.tt-pricing-toggle .btn.is-selected {
  background: linear-gradient(180deg, rgba(240,179,75,0.24), rgba(190,97,45,0.14));
  border-color: rgba(240,179,75,0.36);
  color: #fff8ea;
  box-shadow: inset 0 1px rgba(255,255,255,0.08);
}

@media (max-width: 640px) {
  .tt-oauth-grid { grid-template-columns: 1fr; }
  .tt-list-row { align-items: flex-start; flex-direction: column; }
  .tt-pricing-toggle { grid-template-columns: 1fr; }
  .tt-inline-form { grid-template-columns: 1fr; }

  /* Hero stacks; actions go full-width for comfortable touch targets */
  .tt-account-hero { flex-direction: column; }
  .tt-account-hero-actions { width: 100%; }
  .tt-account-hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .tt-account-tab { padding: 12px 13px; }
}

/* ── 11. Animation utilities ─────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeUp 0.55s var(--ease) both; }
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .animate-in,
  .eyebrow .dot,
  .tt-modal-card,
  .tt-modal-backdrop,
  .tt-account-panel:not([hidden]) { animation: none !important; }
  .tt-account-tab-indicator { transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ── 12. Mobile refinements ──────────────────────────────── */

/* Tablet & below — tighten horizontal padding, drop section weight */
@media (max-width: 760px) {
  :root { --shell-pad: 20px; }

  .nav-inner { gap: 12px; height: 56px; }
  .nav-actions { gap: 6px; }
  .nav-brand { font-size: 14.5px; }

  .section,
  .pro-section,
  .preview-section { padding-bottom: 72px; }

  .section-header { margin-bottom: 40px; }

  .tt-page-shell { padding-top: 36px; padding-bottom: 48px; }

  .footer-inner { padding: 32px var(--shell-pad) 22px; gap: 28px; }
  .footer-bottom { padding: 12px var(--shell-pad); justify-content: center; text-align: center; }

  .tt-modal { padding: 16px; }
  .tt-modal-header { padding: 18px 20px 14px; }
  .tt-modal-body { padding: 18px 20px 22px; }

  .tt-page-card { padding: 22px; border-radius: var(--radius-lg); }
  .tt-account-card { padding: 16px; }
}

/* Phones — drop padding further, simplify chrome */
@media (max-width: 480px) {
  :root { --shell-pad: 16px; }

  /* Keep nav compact; show essentials only */
  .nav-inner { gap: 8px; height: 54px; }
  .nav-brand { gap: 8px; font-size: 14px; }
  .nav-brand .brand-logo { width: 24px; height: 24px; }

  .section-header { margin-bottom: 32px; }
  .section-desc { font-size: 15px; }
  .section-label { letter-spacing: 0.18em; }

  .section,
  .pro-section,
  .preview-section { padding-bottom: 56px; }

  /* Modal becomes full-bleed on phones */
  .tt-modal { padding: 0; align-items: stretch; }
  .tt-modal-card {
    border-radius: 0;
    max-height: 100vh;
    width: 100%;
  }

  /* Touch targets — bump small interactive elements */
  .btn-sm { padding: 8px 12px; font-size: 12px; }

  /* Forms */
  .tt-field input,
  .tt-field select,
  .tt-inline-form input,
  .seat-control input { padding: 12px; font-size: 15px; }

  .tt-pricing-toggle .btn { padding: 10px 12px; }
}
