/* bidbouts design system
   Tokens, layout primitives, components.
   No build step — plain CSS variables. */

:root {
  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Spacing scale (4px) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px;

  /* Radius */
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px; --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(.2,.8,.2,1);
  --dur-fast: 150ms; --dur-med: 250ms;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.12), 0 0 0 1px rgba(255,255,255,.04) inset;
  --shadow-md: 0 8px 24px rgba(0,0,0,.18), 0 0 0 1px rgba(255,255,255,.04) inset;

  /* Dark theme (default) */
  --bg: #0E0F13;
  --bg-elev: #171922;
  --bg-elev-2: #1F2230;
  --line: #2A2E3D;
  --text: #F2F3F5;
  --text-dim: #A4A8B5;
  --text-mute: #6B7080;
  --accent: #7C5CFF;
  --accent-press: #6648E6;
  --accent-soft: rgba(124,92,255,.15);
  --success: #22C55E;
  --warn: #F59E0B;
  --danger: #EF4444;
  --bid-up: #22C55E;
  --focus: 0 0 0 3px rgba(124,92,255,.55);
}

[data-theme="light"] {
  --bg: #FFFFFF;
  --bg-elev: #F4F5F7;
  --bg-elev-2: #ECEEF2;
  --line: #E2E5EC;
  --text: #0E0F13;
  --text-dim: #4A4F5C;
  --text-mute: #6B7080;
  --accent-soft: rgba(124,92,255,.12);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.04) inset;
  --shadow-md: 0 8px 24px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04) inset;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: dark light; }
body {
  font-family: var(--font-sans);
  font-size: 16px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }

/* ====== Layout ====== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--s-5); }
.container-narrow { max-width: 960px; margin: 0 auto; padding: 0 var(--s-5); }
.stack > * + * { margin-top: var(--s-4); }
.row { display: flex; align-items: center; gap: var(--s-3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.muted { color: var(--text-dim); }
.tiny { font-size: 12px; }
.small { font-size: 14px; }
.h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.h2 { font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.h3 { font-size: 18px; line-height: 1.3; font-weight: 600; }
.display { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; font-weight: 800; letter-spacing: -.03em; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ====== Header ====== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-4);
  min-height: 64px;
}
/* Brand block in the top-left: HOME button stacked above the
   bidbouts wordmark + icon. Both links go to the home page. */
.brand-stack {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; line-height: 1;
  padding: 6px 0;
}
.wordmark {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-weight: 800; letter-spacing: -.02em; font-size: 18px;
  color: var(--text);
  text-decoration: none;
}
.wordmark:hover { color: var(--accent); }
/* Left-side header group: auth controls (Log in / Create account) to
   the left of the HOME button + wordmark stack. The .container's
   --s-5 (24px) left padding plus the margin-left here gives the
   auth group 48px of breathing room from the page edge — equal
   to the gap between the auth group and the HOME button. */
.header-left {
  display: flex; align-items: center; gap: var(--s-7);
  margin-left: var(--s-5);
}
.logo {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-weight: 800; letter-spacing: -.02em; font-size: 20px;
}
/* Top-left HOME button. Replaces the logo in the header — a single
   purple wordmark linking to the landing page. */
.home-btn {
  display: inline-flex; align-items: center;
  font-weight: 900; letter-spacing: -.02em;
  font-size: 28px; line-height: 1;
  color: var(--accent);
  padding: 4px 2px;
  text-decoration: none;
}
.home-btn:hover, .home-btn[aria-current="page"] { color: #B58CFF; }
/* Mark wrapper around the bidbouts logo-mark.svg <img>. The image is
   self-styled (its own background, padding, etc.) so the wrapper is
   just a sized box. Width/height match the <img> attrs in app.js
   (24×24 for header, 24×24 for footer). */
.logo-mark {
  display: inline-block;
  width: 24px; height: 24px;
  line-height: 0;
}
.logo-mark img {
  display: block; width: 100%; height: 100%;
}
.search {
  display: flex; align-items: center; gap: var(--s-2);
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 6px 12px;
}
.search input {
  background: transparent; border: 0; outline: 0; color: inherit; flex: 1;
  font: inherit; min-width: 0;
}
.search .kbd {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-mute);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px;
}
.nav { display: flex; align-items: center; gap: var(--s-2); }
.nav-link {
  padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--text-dim);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--text); background: var(--bg-elev); }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: var(--r-sm); border: 1px solid transparent; background: transparent;
  color: var(--text-dim);
}
.icon-btn:hover { color: var(--text); background: var(--bg-elev); }
.avatar-btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 4px 10px 4px 4px; border-radius: var(--r-pill);
  background: var(--bg-elev); border: 1px solid var(--line);
  color: var(--text); cursor: pointer; font: inherit;
}
.avatar-btn:hover { background: var(--bg-elev-2); }
.avatar-btn[aria-expanded="true"] { background: var(--bg-elev-2); border-color: var(--accent); }
.avatar-btn .caret { font-size: 10px; opacity: 0.6; margin-left: 2px; transition: transform var(--dur-fast) var(--ease); }
.avatar-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: white; font-size: 12px; }

/* User dropdown menu. Anchored under the avatar button. */
.user-menu-wrap { position: relative; }
.user-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 220px; z-index: 60;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.05);
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
/* The HTML `hidden` attribute sets `display: none` via the user-agent
   stylesheet, but our class rule above (display: flex) has equal
   specificity and wins. Force display: none whenever the menu is
   hidden so the dropdown doesn't render on initial page load. */
.user-menu[hidden] { display: none; }
.user-menu-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--text); text-decoration: none;
  background: transparent; border: 0; cursor: pointer;
  font: inherit; text-align: left; width: 100%;
}
.user-menu-item:hover, .user-menu-item:focus-visible { background: var(--bg-elev-2); outline: 0; }
.user-menu-item .umi-icon { width: 18px; display: inline-grid; place-items: center; opacity: 0.85; font-size: 14px; }
.user-menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.user-menu-item:disabled { opacity: 0.6; cursor: default; }

/* Mobile-only elements: hidden on desktop, shown via media query below. */
.search-toggle { display: none; }
.nav-menu-btn { display: none; }
.nav-menu {
  display: flex; flex-direction: column; gap: var(--s-1);
  padding: var(--s-2) var(--s-5);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
}
.nav-menu[hidden] { display: none; }
.nav-menu .nav-link { padding: 12px; }
.nav-menu .icon-btn { justify-content: flex-start; padding: 12px; width: 100%; height: auto; gap: var(--s-2); color: var(--text-dim); }
.nav-menu .icon-btn span { font-size: 14px; font-weight: 600; }

/* ====== Buttons ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 10px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--text);
  font-weight: 600; font-size: 14px; line-height: 1;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--bg-elev-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-press); border-color: var(--accent-press); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--bg-elev); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: white; }
.btn-lg { padding: 14px 20px; font-size: 16px; border-radius: var(--r-md); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ====== Auth nav + tabs ====== */
.auth-nav { display: flex; align-items: center; gap: var(--s-2); }
.auth-tabs { display: flex; gap: var(--s-2); border-bottom: 1px solid var(--line); padding-bottom: var(--s-2); }
.auth-tab {
  background: transparent; border: 0; color: var(--text-dim); font-weight: 600;
  padding: 8px 16px; border-radius: var(--r-pill); cursor: pointer;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.active { background: var(--accent-soft); color: var(--accent); }
.auth-panel[hidden] { display: none !important; }

/* ====== Verification banner ====== */
.verify-banner {
  background: var(--warn); color: #1a0f00;
  padding: 10px 14px; border-radius: var(--r-sm); font-weight: 500;
  display: inline-flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
}
[data-theme="light"] .verify-banner { color: #3d2400; }
.verify-banner a { color: inherit; text-decoration: underline; }
.verify-banner button { background: rgba(255,255,255,.85); color: #1a0f00; border: 0; border-radius: var(--r-sm); padding: 4px 10px; font-weight: 600; }
.verify-banner button:hover { background: #fff; }
[data-theme="light"] .verify-banner button { background: #fff; }

/* Spinner for async state */
.spinner { width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== Inputs ====== */
.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--line);
  font: inherit;
}
.input:focus, .select:focus, .textarea:focus { box-shadow: var(--focus); border-color: var(--accent); }
.textarea { min-height: 96px; resize: vertical; }
.label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.field + .field { margin-top: var(--s-4); }
/* Two-up row used by the registration form (prefix+first, middle+last+suffix,
   city+state+ZIP). The "field-row" wraps so .field + .field's margin-top
   doesn't double up. */
.field-row { display: flex; gap: var(--s-3); align-items: flex-end; }
.field-row + .field-row,
.field-row + .field,
.field + .field-row { margin-top: var(--s-4); }
.field-row .field { flex: 1; min-width: 0; margin-top: 0; }
/* The dotted section dividers in the registration form. Pure typography
   so they sit on the rhythm of the existing design. */
.auth-section-title {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-mute);
  margin: var(--s-5) 0 0;
  padding-top: var(--s-4); border-top: 1px solid var(--line);
}
.auth-section-title:first-of-type { margin-top: var(--s-4); padding-top: 0; border-top: 0; }

/* ====== Card ====== */
.card {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.card:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); }
/* Cards holding form controls should not lift on hover — the shift
   moves the focus target and makes the input feel "stuck" while the
   user is typing. The lift is meant for navigable lot cards, not
   form shells. */
.card:has(form):hover, .card:has(input):hover, .card:has(button):hover, .card:has(textarea):hover, .card:has(select):hover,
.card:has(.field):hover {
  transform: none;
  border-color: var(--line);
}
.card-body { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); }
.card-media { aspect-ratio: 4/3; background: var(--bg-elev-2); display: grid; place-items: center; }
.card-title { font-weight: 600; line-height: 1.3; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); color: var(--text-dim); font-size: 13px; }
.card-price { font-size: 20px; font-weight: 700; }
.card-countdown { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.card-countdown.ending { color: var(--warn); }
.card-countdown.critical { color: var(--danger); }
.card-countdown.sold { color: var(--text-mute); }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent);
}
.badge-warn { background: rgba(245,158,11,.15); color: var(--warn); }
.badge-danger { background: rgba(239,68,68,.15); color: var(--danger); }
.badge-success { background: rgba(34,197,94,.15); color: var(--success); }
.badge-mute { background: var(--bg-elev-2); color: var(--text-dim); }

/* ====== Grid ====== */
.grid-cards {
  display: grid; gap: var(--s-4);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.strip {
  display: grid; gap: var(--s-4);
  grid-auto-flow: column; grid-auto-columns: 260px;
  overflow-x: auto; padding-bottom: var(--s-3);
  scroll-snap-type: x mandatory;
}
.strip > * { scroll-snap-align: start; }

/* ====== Tabs ====== */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: var(--s-5); }
.tab {
  padding: 10px 14px; border: 0; background: transparent; color: var(--text-dim);
  font-weight: 600; border-bottom: 2px solid transparent;
}
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab:hover { color: var(--text); }

/* ====== Toast ====== */
.toast-host {
  position: fixed; bottom: 24px; right: 24px; z-index: 80;
  display: flex; flex-direction: column; gap: var(--s-2);
}
.toast {
  background: var(--bg-elev); border: 1px solid var(--line);
  padding: 12px 14px; border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  min-width: 240px;
  display: flex; align-items: center; gap: var(--s-2);
  animation: toast-in var(--dur-med) var(--ease);
}
.toast.success { border-color: color-mix(in oklab, var(--success) 50%, var(--line)); }
.toast.danger  { border-color: color-mix(in oklab, var(--danger)  50%, var(--line)); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ====== Modal ====== */
.modal-host { position: fixed; inset: 0; z-index: 90; display: none; }
.modal-host.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.modal {
  position: relative; margin: 10vh auto; max-width: 480px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-md);
  padding: var(--s-5);
}
.modal h3 { margin: 0 0 var(--s-2); }
.modal-row { display: flex; gap: var(--s-2); justify-content: flex-end; margin-top: var(--s-5); }

/* ====== Auction room ====== */
.listing { display: grid; gap: var(--s-6); grid-template-columns: 1.2fr 1fr; align-items: start; }
@media (max-width: 900px) { .listing { grid-template-columns: 1fr; } }
.listing-media { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.listing-media .main { aspect-ratio: 4/3; }
.listing-thumbs { display: flex; gap: var(--s-2); padding: var(--s-3); }
.listing-thumbs .thumb { width: 64px; height: 64px; border-radius: var(--r-sm); border: 1px solid var(--line); cursor: pointer; }
.listing-thumbs .thumb.active { border-color: var(--accent); }
.listing-side { display: flex; flex-direction: column; gap: var(--s-4); }
.price-big { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.countdown-big {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 22px; font-weight: 700;
  display: inline-flex; align-items: center; gap: var(--s-2);
}
.countdown-big .seg { display: inline-flex; flex-direction: column; align-items: center; }
.countdown-big .num { font-size: 28px; }
.countdown-big .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-dim); }
.bid-form { display: flex; gap: var(--s-2); }
.bid-form .input { font-variant-numeric: tabular-nums; font-weight: 600; }
.bid-stream {
  display: flex; flex-direction: column; gap: var(--s-1);
  max-height: 320px; overflow: auto; padding-right: var(--s-2);
}
.bid-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: var(--s-3);
  padding: 8px 10px; border-radius: var(--r-sm);
  font-variant-numeric: tabular-nums; font-size: 14px;
}
.bid-row.you { background: var(--accent-soft); }
.bid-row .who { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); }
.bid-row .when { color: var(--text-mute); font-size: 12px; }
.bid-row .amt { font-weight: 700; color: var(--bid-up); }
.seller-dna { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
.dna-stat { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-3); }
.dna-stat .v { font-size: 20px; font-weight: 700; }
.dna-stat .k { font-size: 12px; color: var(--text-dim); }
.promise-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.promise { padding: var(--s-3); background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-md); }
@media (max-width: 700px) {
  .seller-dna { grid-template-columns: repeat(2, 1fr); }
  .promise-row { grid-template-columns: 1fr; }

  /* Header: collapse to a single row. Auth controls (Log in / Create
     account) and HOME button + wordmark stay visible. Search becomes
     an icon, and the right-side nav (Browse, Sell, ★, theme, clock)
     moves into a hamburger menu that drops down. */
  .header-inner {
    grid-template-columns: auto auto auto auto;
    gap: var(--s-2);
  }
  .header-left { margin-left: 0; gap: var(--s-3); }
  .brand-stack { padding: 2px 0; }
  .home-btn { font-size: 22px; }
  .wordmark { font-size: 14px; }
  .auth-nav { gap: var(--s-1); }
  .auth-nav .nav-link { padding: 6px 8px; font-size: 13px; }
  .auth-nav .btn-sm { padding: 6px 10px; font-size: 13px; }
  .header-inner > .search { display: none; }
  .header-inner > .search.is-open {
    display: flex; grid-column: 1 / -1; margin-top: var(--s-2);
  }
  .search-toggle { display: grid; }
  .nav .nav-link,
  .nav > #nav-watch,
  .nav > #theme-btn,
  .nav > #clock-btn { display: none; }
  .nav-menu-btn { display: grid; }
}

/* ====== Hero ====== */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  background:
    radial-gradient(900px 400px at 80% 20%, rgba(124,92,255,.35), transparent 60%),
    radial-gradient(600px 300px at 10% 90%, rgba(34,197,94,.18), transparent 60%),
    linear-gradient(180deg, var(--bg-elev), var(--bg));
  border: 1px solid var(--line);
  padding: var(--s-7);
}
.hero h1 { margin: 0 0 var(--s-3); }
.hero p { color: var(--text-dim); font-size: 18px; max-width: 56ch; margin: 0 0 var(--s-5); }
.hero .row { gap: var(--s-3); }

/* ====== Grace-period banner (under header) ====== */
.grace-banner {
  background: var(--warn);
  color: #1a0f00;
  border-bottom: 1px solid color-mix(in oklab, var(--warn) 70%, #000 30%);
}
[data-theme="light"] .grace-banner { color: #3d2400; }
.grace-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); padding: 10px 0; flex-wrap: wrap;
  font-size: 14px;
}
.grace-banner .grace-days { font-weight: 600; opacity: 0.9; }
.grace-banner .btn {
  background: rgba(255,255,255,.92); color: #1a0f00;
  border: 0; font-weight: 600;
}
.grace-banner .btn:hover { background: #fff; }
[data-theme="light"] .grace-banner .btn { background: #fff; }

/* ====== Footer ====== */
.footer { border-top: 1px solid var(--line); margin-top: var(--s-8); padding: var(--s-6) 0; color: var(--text-dim); font-size: 14px; }
.footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s-5); }
@media (max-width: 700px) { .footer .cols { grid-template-columns: 1fr 1fr; } }

/* ====== Utilities ====== */
.hide { display: none !important; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); margin: var(--s-5) 0; }
.kbd-key { font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; padding: 2px 6px; border-radius: 6px; color: var(--text-dim); }
.helper { font-size: 12px; line-height: 1.4; }

/* ====== Account hub tiles ======
   The Amazon-style "Your Account" hub on profile.html. Three columns
   on desktop (matching Amazon's tile grid), two on tablet, one on
   mobile. Tiles are `.card` elements — the lift-on-hover only fires
   when there's no form/input inside, so this is safe. */
.hub-grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(3, 1fr);
  /* The hub sits inside a .container (max-width 1280px). Without this
     cap the grid would stretch to fill the whole container, which
     makes each tile ~410px wide — much wider than the short text
     inside needs, and the cards end up as long horizontal strips
     with empty space trailing off to the right. Capping at 720px
     gives ~240px per tile, similar to Amazon's hub density, and
     the leftover horizontal space is intentional page whitespace
     rather than empty card. */
  max-width: 720px;
  margin: 0 auto;
}
@media (max-width: 900px) { .hub-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .hub-grid { grid-template-columns: 1fr; } }
/* Hub tiles are clickable text-only cards (no media, no .card-body
   wrapper in the JS). Two overrides relative to .card:
   1. Padding: the JS doesn't wrap the tile content in .card-body,
      so without explicit padding the text sits flush against the
      1px border and feels cramped. Match .card-body's 16px.
   2. overflow: visible: .card's default `overflow: hidden` clips
      content against the 20px border-radius, which truncates the
      top/bottom of the badge pill at the right edge of the tile
      (the "letters being cut off" the user reported). Hub tiles
      have no image to round-corner, so the clip serves no purpose
      here. The hover-lift still works — the visible 2px shift
      against the page background is barely perceptible. */
.hub-grid .card {
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  overflow: visible;
}

/* ====== Auth extras ====== */
.strength {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 8px;
  height: 4px;
}
.strength .seg {
  background: var(--bg-elev-2);
  border-radius: 2px;
  transition: background 150ms ease;
}
.strength .seg.s1 { background: var(--danger); }
.strength .seg.s2 { background: var(--warn); }
.strength .seg.s3 { background: var(--accent); }
.strength .seg.s4 { background: var(--success); }

/* ====== Verify phone (6-digit code) ====== */
.code-input {
  display: flex; gap: 8px; justify-content: center;
  margin: var(--s-3) auto var(--s-2);
  max-width: 320px;
}
.code-box {
  width: 44px; height: 56px;
  text-align: center;
  font-size: 24px; font-weight: 700;
  font-family: var(--font-mono);
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0;
  -moz-appearance: textfield;
}
.code-box::-webkit-outer-spin-button,
.code-box::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.code-box:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.dev-code-hint {
  background: var(--accent-soft); color: var(--accent);
  border-radius: var(--r-sm);
  padding: 8px 12px; margin: var(--s-3) auto 0;
  display: inline-block;
  font-family: var(--font-mono);
  max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
