/* domainhawk — soft, quiet, lavender. */

@font-face {
  font-family: "Inter";
  src: url("inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #f7f4ff;
  --surface: #ffffff;
  --surface-2: #fbf9ff;
  --surface-3: #f3eeff;

  --ink: #2b2438;
  --ink-soft: #5f5574;
  --ink-mute: #6f6684;
  --ink-faint: #9a91ac;

  --line: #e6def4;
  --line-strong: #d8ccee;

  --accent: #6b4ae8;
  --accent-hover: #5a3bd4;
  --accent-soft: #f0ebff;
  --accent-ink: #5b3fd6;
  --on-accent: #ffffff;

  --available: #1f6b4a;
  --available-bg: #e9f8f0;
  --registered: #8a5410;
  --registered-bg: #fff4e6;
  --pending: #3b55b8;
  --pending-bg: #eef1ff;
  --unknown: #5f5670;
  --unknown-bg: #f1eef7;
  --danger: #b3403a;
  --danger-bg: #fdeceb;
  --focus: #6b4ae8;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;

  --shadow: 0 24px 50px -36px rgba(70, 45, 140, 0.45);
  --shadow-soft: 0 10px 30px -24px rgba(70, 45, 140, 0.4);
  --shadow-button: 0 6px 16px -8px rgba(107, 74, 232, 0.5);

  --bar-bg: rgba(255, 255, 255, 0.9);
  --wrap: 1120px;
  --gutter: 28px;
  --ease: 150ms ease;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #14111c;
    --surface: #1c1726;
    --surface-2: #231d30;
    --surface-3: #2a2140;

    --ink: #f3efff;
    --ink-soft: #c9c0dd;
    --ink-mute: #a79cbd;
    --ink-faint: #7d7392;

    --line: #332b44;
    --line-strong: #443a58;

    --accent: #a98bff;
    --accent-hover: #bda6ff;
    --accent-soft: #2a2140;
    --accent-ink: #cbb8ff;
    --on-accent: #17131f;

    --available: #8fe0ba;
    --available-bg: #18352a;
    --registered: #f3c98b;
    --registered-bg: #3a2a17;
    --pending: #b3c4ff;
    --pending-bg: #202a47;
    --unknown: #c5b9d6;
    --unknown-bg: #2a2437;
    --danger: #f29a93;
    --danger-bg: #3a2222;
    --focus: #bda6ff;

    --shadow: 0 24px 50px -36px rgba(0, 0, 0, 0.75);
    --shadow-soft: 0 12px 32px -26px rgba(0, 0, 0, 0.7);
    --shadow-button: 0 6px 16px -8px rgba(0, 0, 0, 0.6);

    --bar-bg: rgba(20, 17, 28, 0.9);

  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
    --bg: #14111c;
    --surface: #1c1726;
    --surface-2: #231d30;
    --surface-3: #2a2140;

    --ink: #f3efff;
    --ink-soft: #c9c0dd;
    --ink-mute: #a79cbd;
    --ink-faint: #7d7392;

    --line: #332b44;
    --line-strong: #443a58;

    --accent: #a98bff;
    --accent-hover: #bda6ff;
    --accent-soft: #2a2140;
    --accent-ink: #cbb8ff;
    --on-accent: #17131f;

    --available: #8fe0ba;
    --available-bg: #18352a;
    --registered: #f3c98b;
    --registered-bg: #3a2a17;
    --pending: #b3c4ff;
    --pending-bg: #202a47;
    --unknown: #c5b9d6;
    --unknown-bg: #2a2437;
    --danger: #f29a93;
    --danger-bg: #3a2222;
    --focus: #bda6ff;

    --shadow: 0 24px 50px -36px rgba(0, 0, 0, 0.75);
    --shadow-soft: 0 12px 32px -26px rgba(0, 0, 0, 0.7);
    --shadow-button: 0 6px 16px -8px rgba(0, 0, 0, 0.6);

    --bar-bg: rgba(20, 17, 28, 0.9);

}

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

html { -webkit-text-size-adjust: 100%; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--accent-soft); color: var(--ink); }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.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;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bar-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand-mark { color: var(--accent); flex: none; }

.brand-name { line-height: 1; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--ink-mute);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-link:hover {
  color: var(--accent-ink);
  text-decoration: none;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.user-email {
  max-width: 210px;
  overflow: hidden;
  color: var(--ink-mute);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .btn {
  min-height: 32px;
  padding: 0 11px;
  font-size: 11.5px;
}

.theme-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-mute);
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.js .theme-toggle { display: inline-flex; }

.theme-toggle:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.theme-toggle svg { width: 15px; height: 15px; }

.theme-icon-sun { display: none; }

:root[data-theme="dark"] .theme-icon-sun { display: block; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }

.auth-body .theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 30;
}

/* ---------- Page shell ---------- */

.page {
  flex: 1;
  display: grid;
  gap: 28px;
  align-content: start;
  padding-block: 48px 76px;
}

.intro {
  display: grid;
  gap: 10px;
  max-width: 720px;
}

.eyebrow {
  color: var(--accent-ink);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro h1 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
}

.intro-link {
  color: var(--ink-mute);
  font-size: 12.5px;
  font-weight: 500;
}

.intro-link a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Stats ---------- */

.stats-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  padding: 14px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

#stats {
  display: flex;
  flex: 1 1 560px;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 92px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.stat:first-child { padding-left: 0; border-left: 0; }

.stat-label {
  color: var(--ink-mute);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-value {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-value.is-available { color: var(--available); }
.stat-value.is-taken { color: var(--registered); }
.stat-value.is-pending { color: var(--pending); }
.stat-value.is-unknown { color: var(--unknown); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-mute);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* ---------- Panels + forms ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 22px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.panel-title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

.poller { display: none; }

.panel-note {
  color: var(--ink-mute);
  font-size: 11px;
  text-align: right;
}

.panel-body { padding: 20px 22px 22px; }

.add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.add-field { flex: 1 1 280px; }

.input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.input::placeholder { color: var(--ink-faint); }

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

.input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

#domain-input {
  font-family: var(--font-mono);
  font-size: 13px;
}

.select { padding-right: 32px; cursor: pointer; }

.textarea {
  min-height: 150px;
  padding: 10px 12px;
  line-height: 1.6;
  resize: vertical;
}

.search-field {
  position: relative;
  display: flex;
  flex: 0 1 220px;
  align-items: center;
  min-width: 150px;
  max-width: 100%;
  transition: flex-basis var(--ease);
}

.search-field:focus-within { flex-basis: 250px; }

.search-icon {
  position: absolute;
  left: 11px;
  width: 14px;
  height: 14px;
  color: var(--ink-mute);
  pointer-events: none;
  transition: color var(--ease);
}

.search-field:focus-within .search-icon { color: var(--accent-ink); }

.search-input {
  min-height: 34px;
  padding: 0 12px 0 31px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 12.5px;
}

.search-input::-webkit-search-cancel-button { opacity: 0.45; cursor: pointer; }
.search-input::-webkit-search-cancel-button:hover { opacity: 0.8; }

.form-hint {
  flex-basis: 100%;
  color: var(--ink-mute);
  font-size: 11.5px;
  line-height: 1.5;
}

.form-error,
.form-ok {
  flex-basis: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}

.form-error { background: var(--danger-bg); color: var(--danger); }
.form-ok { background: var(--available-bg); color: var(--available); }

.flash-stack { display: grid; gap: 8px; }

.flash {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
}

.flash-ok { background: var(--available-bg); color: var(--available); }
.flash-error { background: var(--danger-bg); color: var(--danger); }

.noscript {
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 12px;
}

.check-field {
  display: flex;
  flex-basis: 100%;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
}

.check-field input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.inline-form { display: inline-flex; margin: 0; }

.list-notice {
  margin: 14px 20px 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
}

.list-notice:empty { display: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

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

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-button);
}

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

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn-danger-ghost {
  border-color: transparent;
  color: var(--danger);
}

.btn-danger-ghost:hover {
  background: var(--danger-bg);
  border-color: transparent;
  color: var(--danger);
}

.btn-block { width: 100%; }

/* ---------- Watchlist table ---------- */

.table-panel {
  overflow: hidden;
  min-width: 0;
}

.watchlist {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.watchlist th {
  padding: 10px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.watchlist td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.watchlist tbody tr:last-child td { border-bottom: 0; }

.watch-row { transition: background var(--ease); }
.watch-row:hover { background: var(--surface-2); }

.watch-row td:first-child { box-shadow: inset 3px 0 0 transparent; }
.watch-row.status-available td:first-child { box-shadow: inset 3px 0 0 var(--available); }
.watch-row.status-registered td:first-child { box-shadow: inset 3px 0 0 var(--registered); }
.watch-row.status-pending td:first-child { box-shadow: inset 3px 0 0 var(--pending); }
.watch-row.status-unknown td:first-child { box-shadow: inset 3px 0 0 var(--unknown); }

.cell-domain-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.domain {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.domain-link {
  color: inherit;
  text-decoration: none;
}

.domain-link:hover,
.domain-link:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.buy-link {
  color: var(--accent-ink);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.cell-status { min-width: 210px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
}

.badge .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.badge-available { background: var(--available-bg); color: var(--available); }
.badge-registered { background: var(--registered-bg); color: var(--registered); }
.badge-pending { background: var(--pending-bg); color: var(--pending); }
.badge-unknown { background: var(--unknown-bg); color: var(--unknown); }
.badge-neutral { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-mute); }

.detail,
.row-error {
  display: block;
  max-width: 34ch;
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.45;
}

.detail { color: var(--ink-mute); }
.row-error { margin-top: 6px; color: var(--danger); }

.cell-time {
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.col-actions,
.cell-actions { text-align: right; white-space: nowrap; }

.col-actions { width: 1%; }

.row-actions {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.row-actions .btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.htmx-indicator {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 10px;
  white-space: nowrap;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--ease), visibility var(--ease);
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  visibility: visible;
  opacity: 1;
}

tr.htmx-swapping { opacity: 0.4; }

/* ---------- Empty state ---------- */

.empty-row td {
  padding: 60px 24px;
  border-bottom: 0;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: 380px;
  margin-inline: auto;
  text-align: center;
}

.empty-mark {
  color: var(--accent);
  margin-bottom: 4px;
}

.empty-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.empty-copy {
  color: var(--ink-mute);
  font-size: 12.5px;
  line-height: 1.55;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: auto;
  padding-block: 22px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer p {
  max-width: 66ch;
  color: var(--ink-mute);
  font-size: 11.5px;
}

.foot-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--ink-mute);
  font-size: 10.5px;
}

.foot-link {
  color: var(--ink-mute);
  font-size: 10.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot-link:hover { color: var(--ink); }

.foot-version {
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ---------- Landing ---------- */

.landing-main { flex: 1; }

.landing-body { background: var(--bg); }

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
  padding-block: 80px 56px;
}

.hero-copy {
  display: grid;
  gap: 18px;
  max-width: 610px;
}

.hero-copy h1 {
  max-width: 11ch;
  font-size: clamp(2.7rem, 4.8vw, 3.9rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero-lede {
  max-width: 48ch;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.65;
  text-wrap: pretty;
}

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

.hero-btn {
  min-height: 44px;
  padding-inline: 18px;
  font-size: 13px;
}

.hero-note {
  color: var(--ink-mute);
  font-size: 11.5px;
}

.hero-note strong {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero-note a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-preview {
  min-width: 0;
  margin: 0;
}

.hero-preview .panel {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.preview-table th {
  padding: 9px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.preview-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.preview-table tr:last-child td { border-bottom: 0; }

.preview-table .domain { font-size: 12px; }

.preview-table .badge {
  padding: 2px 8px;
  font-size: 9.5px;
}

.preview-table .cell-time { font-size: 10px; }

.landing-facts { padding-block: 56px 0; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.fact {
  padding: 22px 26px;
  border-left: 1px solid var(--line);
}

.fact:first-child {
  padding-left: 0;
  border-left: 0;
}

.fact-label {
  margin-bottom: 10px;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fact h3 {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.fact p {
  color: var(--ink-mute);
  font-size: 12px;
  line-height: 1.55;
}

.landing-closing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 8px;
  padding-block: 34px 64px;
}

.closing-copy h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.closing-copy p {
  margin-top: 4px;
  color: var(--ink-mute);
  font-size: 12.5px;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Auth ---------- */

.auth-body { background: var(--bg); }

.auth-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 48px 20px;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 34px 32px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 22px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-brand .brand-mark { color: var(--accent); }

.auth-card h1 {
  font-size: clamp(1.7rem, 3.6vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-align: center;
}

.auth-sub {
  margin: 8px 0 20px;
  color: var(--ink-mute);
  font-size: 13px;
  text-align: center;
  overflow-wrap: anywhere;
}

.auth-card .form-error { margin-bottom: 16px; }

.auth-meta {
  margin-top: 10px;
  color: var(--ink-mute);
  font-size: 10.5px;
  text-align: center;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--ink-mute);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.field {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}

.field label {
  color: var(--ink-mute);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-form .btn { margin-top: 4px; }

.auth-empty {
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 12.5px;
  text-align: center;
}

.auth-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: var(--ink-mute);
  font-size: 10.5px;
}

.auth-foot a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-foot a:hover { color: var(--ink); }

.auth-card .form-ok { margin-bottom: 16px; }

.auth-alt {
  margin-top: 16px;
  color: var(--ink-mute);
  font-size: 12px;
  text-align: center;
}

.auth-alt a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 12px;
}

.auth-switch a {
  color: var(--accent-ink);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-form .form-hint {
  margin: 2px 0 8px;
  line-height: 1.5;
}

.label-hint {
  margin-left: 5px;
  color: var(--ink-mute);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.code-input {
  max-width: 190px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.26em;
  text-align: center;
  text-indent: 0.26em;
}

/* ---------- Settings ---------- */

.settings-stack {
  display: grid;
  gap: 20px;
  max-width: 800px;
}

.settings-body { display: grid; gap: 16px; }

.settings-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.settings-label {
  color: var(--ink-mute);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.settings-value {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.settings-copy {
  max-width: 66ch;
  color: var(--ink-soft);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.settings-section-label {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.settings-form { display: grid; }

.settings-form + .settings-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.settings-form .form-hint { margin-top: 8px; }

.settings-pending {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  background: var(--accent-soft);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}

.settings-pending-title {
  color: var(--accent-ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.settings-pending .form-hint { margin: 0; }
.settings-pending .input { background: var(--surface); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.form-grid.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .field { margin-bottom: 0; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 14px;
}

.settings-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.settings-hint {
  color: var(--ink-mute);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

/* ---------- Help ---------- */

.help-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 20px;
  align-items: start;
}

.help-form { display: grid; }

.ticket-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticket {
  display: grid;
  gap: 7px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.ticket:last-child { border-bottom: 0; }

.ticket-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ticket-subject {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ticket-head .badge { flex: none; }

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: var(--ink-mute);
  font-size: 10.5px;
}

.ticket-id {
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.ticket-empty { padding: 36px 22px; }
.ticket-empty .empty-title { font-size: 17px; }
.support-empty { padding: 8px 0 4px; }
.support-fallback { margin: 18px auto 0; text-align: center; }

/* ---------- Error page ---------- */

.error-page {
  display: grid;
  place-items: center;
  align-content: center;
  padding-block: 72px;
}

.error-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  padding: 44px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.error-code {
  color: var(--accent);
  font-size: clamp(3rem, 9vw, 4.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
  opacity: 0.55;
}

.error-card h1 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.error-message {
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 13px;
}

.error-actions { margin-top: 10px; }

/* ---------- API tokens ---------- */

.inline-code {
  padding: 1px 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.token-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px auto;
  align-items: end;
  gap: 14px 18px;
}

.token-form .field { margin-bottom: 0; }
.token-form .btn { min-height: 42px; }
.token-form .form-hint { grid-column: 1 / -1; }
.token-hint { max-width: 82ch; }

.secret-panel {
  position: relative;
  background: var(--accent-soft);
  border-color: var(--line-strong);
}

.secret-panel .panel-head {
  background: transparent;
  border-bottom-color: var(--line-strong);
}

.secret-name {
  margin-left: 9px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}

.secret-body { display: grid; gap: 16px; }

.secret-warning {
  padding: 10px 13px;
  background: var(--registered-bg);
  border-radius: var(--radius-sm);
  color: var(--registered);
  font-size: 12px;
  font-weight: 600;
}

.secret-field { display: grid; gap: 6px; }

.secret-label {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.secret-input {
  background: var(--surface);
  border-color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.secret-example { display: grid; gap: 6px; }

.secret-example-label {
  color: var(--ink-mute);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.code-block {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.65;
}

.tokens-table { font-size: 13px; }
.table-scroll { overflow-x: auto; }

.tokens-table th,
.tokens-table td { padding-inline: 14px; }

.tokens-table .cell-status { min-width: 0; }
.tokens-table .cell-time { white-space: normal; }
.tokens-table .cell-name { min-width: 160px; }

.token-name { font-weight: 500; overflow-wrap: anywhere; }

.token-prefix {
  display: inline-block;
  padding: 2px 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

.token-none { color: var(--ink-mute); }
.token-empty { padding: 48px 24px; }

.token-row td:first-child { box-shadow: inset 3px 0 0 transparent; }
.token-row.is-active td:first-child { box-shadow: inset 3px 0 0 var(--available); }
.token-row.is-expired td:first-child { box-shadow: inset 3px 0 0 var(--registered); }
.token-row.is-inactive td:first-child { box-shadow: inset 3px 0 0 var(--unknown); }

.token-row.is-expired .token-name,
.token-row.is-inactive .token-name {
  color: var(--ink-soft);
  font-weight: 400;
}

.token-row.is-expired .token-prefix,
.token-row.is-inactive .token-prefix { color: var(--ink-mute); }

.badge-active { background: var(--available-bg); color: var(--available); }
.badge-expired { background: var(--registered-bg); color: var(--registered); }
.badge-inactive { background: var(--unknown-bg); color: var(--unknown); }

/* ---------- Docs ---------- */

.docs-page {
  grid-template-columns: minmax(0, 1fr) 232px;
  grid-template-areas: "article nav";
  gap: 28px 48px;
  align-items: start;
  padding-block: 44px 72px;
}

.docs-nav {
  grid-area: nav;
  position: sticky;
  top: 88px;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.docs-nav-heading {
  color: var(--ink-mute);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.docs-nav-body { display: grid; }

.docs-nav-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-nav-link {
  display: block;
  padding: 6px 9px;
  border-radius: var(--radius-xs);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: background var(--ease), color var(--ease);
}

.docs-nav-link.is-sub {
  margin: 1px 0 1px 10px;
  padding: 6px 9px 6px 13px;
  border-left: 1px solid var(--line-strong);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-size: 11.5px;
  font-weight: 400;
}

.docs-nav-link:hover {
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}

.docs-nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}

.docs-nav-link.is-sub.is-active { border-left-color: var(--accent); }

.docs-nav-back {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.4;
}

.docs-article {
  grid-area: article;
  min-width: 0;
  max-width: 72ch;
}

.docs-head {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.docs-head h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.04em;
  overflow-wrap: break-word;
}

.docs-description {
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 14px;
}

.prose {
  font-size: 14px;
  line-height: 1.75;
}

.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.prose p { margin: 0 0 1.1em; }

.prose h2,
.prose h3,
.prose h4 {
  margin: 1.7em 0 0.5em;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.prose h2 {
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--line);
  font-size: 1.35rem;
}

.prose h3 { font-size: 1.12rem; }
.prose h4 { font-size: 0.95rem; letter-spacing: 0; }

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.3em; }
.prose li > ul,
.prose li > ol { margin: 0.4em 0 0.25em; }
.prose li > p { margin-bottom: 0.5em; }

.prose a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover { color: var(--accent-hover); }

.prose strong { font-weight: 600; }

.prose blockquote {
  margin: 0 0 1.1em;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--accent);
  color: var(--ink-soft);
  font-size: 1.02em;
  line-height: 1.6;
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  padding: 1px 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.prose pre {
  max-width: 100%;
  margin: 0 0 1.1em;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
}

.prose pre code {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  font-size: inherit;
  overflow-wrap: normal;
}

.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1.2em;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.5;
}

.prose thead { border-bottom: 1px solid var(--line-strong); }

.prose th {
  padding: 8px 16px 8px 0;
  color: var(--ink-mute);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.prose td {
  padding: 9px 16px 9px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.prose tbody tr:last-child td { border-bottom: 0; }
.prose th:last-child,
.prose td:last-child { padding-right: 0; }

.prose hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.prose :where(h2, h3, h4) { scroll-margin-top: 84px; }

/* ---------- Small interaction fixes ---------- */

.panel-actions { position: relative; }

.add-indicator {
  position: static;
  display: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-mute);
  font-size: 11px;
  white-space: nowrap;
}

.htmx-request .add-indicator { display: inline-flex; }

/* ---------- Motion preferences ---------- */

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

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .landing-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-block: 56px 44px;
  }

  .hero-copy { max-width: 680px; }
  .hero-copy h1 { max-width: 16ch; }
  .hero-preview { width: min(100%, 560px); }

  .docs-page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "nav" "article";
    gap: 24px;
  }

  .docs-nav { position: static; }
  .help-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .user-email { max-width: 120px; }
  .topbar-actions { gap: 12px; }
}

@media (max-width: 780px) {
  .landing-facts { padding-block: 40px 0; }
  .facts { grid-template-columns: minmax(0, 1fr); }

  .fact {
    padding: 16px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .fact:first-child { border-top: 0; }
  .landing-closing { padding-block: 28px 48px; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }

  .page { padding-block: 32px 56px; gap: 22px; }
  .topbar-inner { min-height: 58px; gap: 12px; }
  .topbar-actions { gap: 10px; }
  .user-email { display: none; }
  .topbar .btn { min-height: 30px; }

  .stats-line {
    padding: 12px 16px;
    gap: 14px 20px;
    flex-direction: column;
    align-items: stretch;
  }

  #stats { flex-basis: auto; gap: 14px 20px; }
  .stat { padding-left: 20px; min-width: 78px; }
  .stat-value { font-size: 21px; }
  .chip { align-self: flex-start; margin-left: 0; }

  .panel-head { padding: 13px 16px; }
  .panel-note { font-size: 10.5px; }
  .panel-body { padding: 16px; }

  .add-form .btn { width: 100%; }

  .token-form { grid-template-columns: 1fr; gap: 14px; }
  .token-form .btn { width: 100%; }

  .form-grid,
  .form-grid.is-three { grid-template-columns: 1fr; }
  .form-grid .field { margin-bottom: 14px; }
  .form-grid .field:last-child { margin-bottom: 0; }

  .settings-stack { gap: 18px; }
  .ticket { padding: 12px 16px; }
  .tokens-table td.cell-name { padding-top: 14px; box-shadow: none !important; }
  .token-empty { padding: 40px 18px; }

  .watchlist,
  .watchlist tbody,
  .watchlist tr,
  .watchlist td {
    display: block;
    width: 100%;
  }

  .watchlist thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .watchlist tbody {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .watchlist tr {
    padding: 4px 0 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .watch-row.status-available { border-left: 3px solid var(--available); }
  .watch-row.status-registered { border-left: 3px solid var(--registered); }
  .watch-row.status-pending { border-left: 3px solid var(--pending); }
  .watch-row.status-unknown { border-left: 3px solid var(--unknown); }

  .watchlist td {
    padding: 8px 16px;
    border-bottom: 0;
  }

  .watchlist td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--ink-mute);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .watchlist td.cell-domain {
    padding-top: 14px;
    box-shadow: none !important;
  }

  .watchlist td.cell-domain::before { display: none; }

  .cell-domain-inner .domain { font-size: 15px; }
  .cell-status { min-width: 0; }
  .cell-time { white-space: normal; }
  .cell-actions { text-align: left; }
  .cell-actions::before { margin-bottom: 6px; }
  .row-actions { justify-content: flex-start; }

  .empty-row { padding: 0 !important; border: 0 !important; }
  .empty-row td { padding: 40px 18px; }
  .empty-row td::before { display: none; }

  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .auth-shell { padding: 32px 16px; }
  .auth-card { padding: 28px 22px 26px; border-radius: 14px; }
  .error-card { padding: 36px 22px; }

  .docs-page { padding-block: 30px 52px; gap: 20px; }
  .docs-nav { padding: 14px 16px; gap: 10px; }
  .docs-head { margin-bottom: 22px; padding-bottom: 16px; }
  .docs-head h1 { font-size: 1.85rem; }
  .docs-description { font-size: 13.5px; }
  .prose { font-size: 13.5px; }
  .prose h2 { font-size: 1.25rem; }
  .prose table { font-size: 12.5px; }
}

@media (max-width: 560px) {
  .topbar-inner {
    flex-wrap: wrap;
    gap: 6px 12px;
    padding-block: 10px;
  }

  .topbar-actions {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .topbar-link { font-size: 11.5px; }
  .topbar .btn { min-height: 28px; font-size: 11px; }
  .user-chip { display: none; }
  .topbar-actions a[href="/help"] { display: none; }

  #stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  .stat {
    min-width: 0;
    padding: 10px 16px;
    border-left: 1px solid var(--line);
  }

  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .landing-hero { padding-block: 40px 32px; }
  .hero-copy h1 { max-width: none; font-size: clamp(2.25rem, 10vw, 2.8rem); }
  .hero-lede { font-size: 14.5px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-btn { width: 100%; }

  .preview-table th,
  .preview-table td { padding: 9px 10px; }
  .preview-table .badge { padding: 2px 7px; font-size: 9px; }
  .preview-table .cell-time { font-size: 9.5px; }

  .landing-closing {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .closing-actions { flex-direction: column; }
  .closing-actions .btn { width: 100%; }

  .panel-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .panel-note { text-align: left; }
  .panel-actions { flex-wrap: wrap; width: 100%; margin-top: 10px; gap: 10px 8px; }
  .search-field,
  .search-field:focus-within { flex: 1 1 100%; }
  .panel-actions .inline-form { margin-left: auto; }

  .settings-row { flex-direction: column; align-items: flex-start; }
  .form-actions .btn,
  .settings-inline-form .btn { width: 100%; }
  .settings-inline-form { flex-direction: column; align-items: flex-start; }
  .code-input { max-width: none; }
}

@media (max-width: 380px) {
  .topbar-actions { gap: 8px; }
  .topbar-link { font-size: 11px; }
  .topbar-actions .btn { padding-inline: 9px; }
}

/* ---------- Drop Radar ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-mute);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.filter-chip.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.expiry {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  margin-top: 5px;
  color: var(--ink-mute);
  font-size: 11.5px;
  line-height: 1.45;
}

.expiry time { font-variant-numeric: tabular-nums; }
.expiry.is-expiring { color: var(--registered); }
.expiry.is-expired { color: var(--danger); }
.expiry.is-muted { color: var(--ink-faint); }
.expiry-relative { font-weight: 600; }

.badge-drop { margin-left: 5px; }
.badge-drop.is-pending-delete { background: var(--danger-bg); color: var(--danger); }
.badge-drop.is-redemption { background: var(--registered-bg); color: var(--registered); }

.stat-drop .stat-value.is-drop { color: var(--danger); }

.breadcrumb {
  margin: 0 0 18px;
  color: var(--ink-mute);
  font-size: 12px;
}

.breadcrumb a {
  color: var(--accent-ink);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.detail-hero h1 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-panel { margin-bottom: 18px; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px 24px;
  margin: 0;
}

.detail-grid dt {
  margin: 0 0 4px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.detail-muted { color: var(--ink-faint); }

.detail-block {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-block h3 {
  margin: 0 0 10px;
  color: var(--ink-mute);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-chip {
  display: inline-flex;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 11px;
  text-transform: capitalize;
}

.nameservers {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nameservers code {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
}

.detail-note {
  margin: 20px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink-mute);
  font-size: 12px;
}

.detail-back {
  margin: 24px 0 0;
  font-size: 12px;
}

.detail-back a {
  color: var(--accent-ink);
  text-decoration: none;
}

.preferences-form {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.preferences-form .btn { margin-top: 6px; }

@media (max-width: 720px) {
  .detail-hero { flex-direction: column; }
  .detail-actions { width: 100%; }
  .row-actions { flex-wrap: wrap; }
}
