/* Scales shared by every direction. Colour, type and shape live in src/tokens.css. */
:root {
  --text-xs: 0.75rem;
  --text-s: 0.875rem;
  --text-m: 1rem;
  --text-l: 1.25rem;
  --text-xl: 1.75rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  --border: 1px;
  --page: 76rem;
  --aside: 23rem;
  --measure: 46rem;
}

/* Tokens: "Night desk" (picked 16 Nov 2026 from three directions; reference: the Unstoppable Domains marketplace).
   Near-black, hairline panels, one cold blue for the single action. Rejects decoration of any kind.
   Signature: the second-level name bright and heavy, the TLD dimmed. */
@font-face { font-family: "Geist"; font-weight: 400; font-display: swap; src: url("/assets/fonts/geist-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 600; font-display: swap; src: url("/assets/fonts/geist-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 400; font-display: swap; src: url("/assets/fonts/geist-mono-latin-400-normal.woff2") format("woff2"); }

:root {
  --surface: #0D0D0D;
  --surface-card: #121212;
  --surface-hover: #1A1A1A;
  --ink: #EDEDED;          /* 16.9:1 on surface */
  --ink-muted: #8F8F8F;    /* 6.4:1 on surface */
  --line: #2A2A2A;
  --accent: #6E9EFF;       /* links, 7.3:1 on surface */
  --button: #2563D9;
  --button-ink: #FFFFFF;   /* 5.0:1 on button */
  --tld: #8F8F8F;

  --font-body: "Geist", "Helvetica Neue", Helvetica, sans-serif;
  --font-name: "Geist", "Helvetica Neue", Helvetica, sans-serif;
  --font-data: "Geist Mono", ui-monospace, Menlo, monospace;
  --name-weight: 600;
  --tld-style: normal;
  --name-tracking: -0.01em;
  --label-case: uppercase;

  --radius: 10px;
  --radius-button: 8px;
}

/* Layout and components. Every value comes from tokens-base.css or the direction's token file. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-s);
  line-height: 1.5;
}
a { color: var(--accent); }
.page { max-width: var(--page); margin: 0 auto; padding: 0 var(--space-4) var(--space-7); }

/* header */
.top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: var(--border) solid var(--line); }
.wordmark { font-family: var(--font-name); font-weight: var(--name-weight); font-size: var(--text-m); letter-spacing: var(--name-tracking); color: var(--ink); text-decoration: none; }
.top__link { font-size: var(--text-s); color: var(--ink-muted); text-decoration: none; padding: var(--space-2) var(--space-4); border: var(--border) solid var(--line); border-radius: var(--radius-button); }
.top__link:hover { color: var(--ink); background: var(--surface-hover); }

/* the signature: name and TLD split */
.name { font-family: var(--font-name); font-weight: var(--name-weight); letter-spacing: var(--name-tracking); color: var(--ink); overflow-wrap: anywhere; }
.tld { color: var(--tld); font-style: var(--tld-style); }
.data { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.label { font-size: var(--text-xs); text-transform: var(--label-case); letter-spacing: 0.06em; color: var(--ink-muted); }

.heading { margin: var(--space-7) 0 var(--space-2); font-family: var(--font-name); font-weight: var(--name-weight); font-size: var(--text-xl); letter-spacing: var(--name-tracking); line-height: 1.1; }
.lead { margin: 0 0 var(--space-6); max-width: var(--measure); color: var(--ink-muted); font-size: var(--text-m); }

/* table panel */
.panel { background: var(--surface-card); border: var(--border) solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 400; white-space: nowrap; padding: var(--space-4) var(--space-5); border-bottom: var(--border) solid var(--line); }
.table td { padding: var(--space-5); white-space: nowrap; border-bottom: var(--border) solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-hover); }
.table .num { text-align: right; }
.table__name { font-size: var(--text-m); text-decoration: none; }
.table__name:hover { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.2em; }
/* one line in the table; the full idea is on the domain page */
.table__idea { color: var(--ink-muted); width: 45%; max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.table__action { text-align: right; white-space: nowrap; }

/* buttons */
.button { display: inline-block; padding: var(--space-3) var(--space-5); border-radius: var(--radius-button); background: var(--button); color: var(--button-ink); font-family: var(--font-body); font-weight: 600; font-size: var(--text-s); text-decoration: none; text-align: center; }
.button:hover, .button:focus-visible { filter: brightness(1.1); }
.button--ghost { padding: var(--space-2) var(--space-4); background: transparent; color: var(--ink); border: var(--border) solid var(--line); font-size: var(--text-s); }
.button--ghost:hover { background: var(--surface-hover); filter: none; }
.button--block { display: block; width: 100%; }

/* domain page */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) var(--aside); gap: var(--space-5); align-items: start; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); padding: var(--space-5); }
.stats dd { margin: var(--space-1) 0 0; font-weight: 600; }
.idea { padding: var(--space-5); border-top: var(--border) solid var(--line); }
.idea h2 { margin: 0 0 var(--space-2); font-size: var(--text-m); font-weight: 600; }
.idea p { margin: 0; max-width: var(--measure); font-size: var(--text-m); line-height: 1.6; }
.buy { padding: var(--space-5); }
.buy__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); }
.buy__price { font-family: var(--font-data); font-size: var(--text-l); font-weight: 600; }
.buy__note { margin: var(--space-1) 0 var(--space-5); text-align: right; font-size: var(--text-s); color: var(--ink-muted); }
.buy__terms { margin: var(--space-4) 0 0; font-size: var(--text-s); color: var(--ink-muted); }
.buy__terms a { color: var(--accent); }
.section { margin: var(--space-7) 0 var(--space-4); font-size: var(--text-m); font-weight: 600; }

.terms { margin-top: var(--space-6); max-width: var(--measure); font-size: var(--text-s); color: var(--ink-muted); }
.terms p { margin: 0 0 var(--space-2); }
.foot { margin-top: var(--space-7); padding-top: var(--space-4); border-top: var(--border) solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); font-size: var(--text-s); color: var(--ink-muted); }
.foot a { color: var(--ink-muted); }

@media (max-width: 52rem) {
  .detail { grid-template-columns: 1fr; }
  .buy { order: -1; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table thead { display: none; }
  .table tr { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2) var(--space-4); padding: var(--space-5) var(--space-4); border-bottom: var(--border) solid var(--line); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { padding: 0; border: 0; white-space: normal; }
  .table__idea { width: auto; max-width: none; }
  .table .col-len, .table .col-until { display: none; }
  .table .col-idea { grid-column: 1 / -1; grid-row: 2; }
  .table .col-price { grid-column: 2; grid-row: 1; }
  .table .col-action { grid-column: 1 / -1; text-align: left; }
}
