/* quai53 — design tokens & components. Translated from the design handoff. */

:root {
  /* Surfaces / neutrals */
  --canvas: #f4f2ec;
  --card: #fffefb;
  --field: #faf8f1;
  --fill: #f4f2ec;
  --fill-2: #f6f4ed;
  --border: #e6e3d9;
  --border-inner: #efece3;
  --border-dash: #d3cfc3;

  /* Ink */
  --ink: #1d1c17;
  --ink-2: #5a584f;
  --muted: #7a786e;
  --faint: #a4a293;
  --faintest: #b4b2a6;

  /* Status */
  --green-text: #177544;
  --green-dot: #1f9d57;
  --green-chip: #e7f4ec;
  --gold-text: #946312;
  --gold-dot: #d99a26;
  --gold-chip: #fbf0dc;
  --gold-border: #f0dcb0;
  --red-text: #a83a2c;
  --red-dot: #cf4a3a;
  --red-chip: #fbe9e6;
  --money: #177544;

  /* Logo (fixed amber CRT) */
  --crt-tile: #1a1510;
  --crt-stroke: #5a4424;
  --crt-glyph: #ffb454;

  /* Type */
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Schibsted Grotesk', system-ui, sans-serif;

  /* Accent fallback (overridden inline on <body> per user accent) */
  --ac: #bd7a12;
  --acsoft: #f7ecd6;

  --shadow-card: 0 1px 2px rgba(20, 18, 12, .03);
  --shadow-elev: 0 14px 36px rgba(20, 18, 12, .06);
  --shadow-login: 0 1px 2px rgba(20, 18, 12, .04), 0 18px 44px rgba(20, 18, 12, .08);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: var(--canvas);
  font-family: var(--mono);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ac); text-decoration: none; }
input, button { font-family: inherit; }

.sans { font-family: var(--sans); }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--faint); }
.money { color: var(--money); }

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.cur {
  display: inline-block; width: .55ch; height: 1.05em; transform: translateY(2px);
  background: var(--ac); animation: blink 1.1s steps(1) infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 14px; height: 14px; border: 2px solid var(--gold-dot);
  border-top-color: transparent; border-radius: 50%;
  display: inline-block; animation: spin .8s linear infinite;
}

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__tile {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  background: var(--crt-tile); overflow: hidden; flex: none;
  box-shadow: inset 0 0 0 1px var(--crt-stroke), 0 1px 2px rgba(0, 0, 0, .25);
}
.logo__glyph { font-family: 'VT323', monospace; color: var(--crt-glyph); line-height: 1; }
.logo__scan, .logo__glow { position: absolute; inset: 0; pointer-events: none; }
.logo__glow { background: radial-gradient(120% 80% at 50% 0%, rgba(255, 180, 84, .20), transparent 70%); }
.logo__word { font-weight: 800; letter-spacing: -.01em; font-size: 18px; }

.logo--sm .logo__tile { width: 30px; height: 30px; border-radius: 8px; }
.logo--sm .logo__glyph { font-size: 20px; text-shadow: 0 0 5px rgba(255, 180, 84, .55); }
.logo--sm .logo__scan { background: repeating-linear-gradient(to bottom, rgba(255,255,255,0) 0 1.5px, rgba(0,0,0,.30) 1.5px 3px); }

.logo--lg .logo__tile { width: 54px; height: 54px; border-radius: 13px; box-shadow: inset 0 0 0 1px var(--crt-stroke), 0 2px 8px rgba(0,0,0,.25); }
.logo--lg .logo__glyph { font-size: 36px; text-shadow: 0 0 8px rgba(255, 180, 84, .6); }
.logo--lg .logo__scan { background: repeating-linear-gradient(to bottom, rgba(255,255,255,0) 0 2px, rgba(0,0,0,.30) 2px 4px); }

/* ---------- App shell / nav ---------- */
.shell {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 254, 251, .86); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.shell__row {
  max-width: 1180px; margin: 0 auto; display: flex; align-items: center;
  gap: 26px; padding: 13px 24px;
}
.nav { display: flex; gap: 4px; font-size: 13px; font-weight: 500; }
.nav__item {
  color: var(--muted); padding: 7px 13px; cursor: pointer; border-radius: 7px;
  display: flex; align-items: center; gap: 6px; text-decoration: none;
}
.nav__item--active { background: var(--acsoft); color: var(--ac); font-weight: 700; }
.nav__badge {
  background: var(--ac); color: #fffefb; font-size: 11px; font-weight: 700;
  border-radius: 5px; padding: 0 5px;
}
.shell__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #dad6cb, #b6b2a6); cursor: pointer; flex: none;
  display: block; border: none; padding: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--mono); font-size: 13px; font-weight: 700; cursor: pointer;
  border-radius: 9px; padding: 9px 16px; border: 1px solid transparent;
  text-decoration: none; transition: filter .12s ease, border-color .12s ease;
}
.btn:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.btn--primary { background: var(--ac); color: #fffefb; box-shadow: 0 2px 8px color-mix(in srgb, var(--ac) 38%, transparent); }
.btn--primary:hover { filter: brightness(.94); }
.btn--block { width: 100%; padding: 12px; font-size: 14px; }
.btn--outline { background: var(--card); color: var(--ink); border-color: var(--border); font-weight: 600; }
.btn--outline:hover { border-color: var(--ac); }
.btn--fill { background: var(--fill); color: var(--ink-2); font-weight: 600; border: none; }
.btn--fill:hover { filter: brightness(.97); }
.btn--accent-outline { background: var(--card); color: var(--ac); border-color: var(--ac); }
.btn--sm { padding: 8px; font-size: 13px; border-radius: 8px; width: 100%; }
.btn--danger { color: var(--red-text); background: none; border: none; font-weight: 700; }
.term::before { content: '> '; white-space: pre; }

/* ---------- Fields ---------- */
.field-label { font-size: 12px; color: var(--muted); font-family: var(--sans); margin-bottom: 5px; }
.field {
  width: 100%; border: 1px solid var(--border); border-radius: 9px; padding: 11px 12px;
  font-size: 13px; font-family: var(--sans); background: var(--field); color: var(--ink);
  outline: none;
}
.field--mono { font-family: var(--mono); font-size: 14px; }
.field:focus { border-color: var(--ac); }
.field::placeholder { color: var(--faint); }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; box-shadow: var(--shadow-card);
}
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.micro-label {
  font-size: 11px; color: var(--faint); font-weight: 700; letter-spacing: .04em;
  font-family: var(--sans); text-transform: uppercase;
}

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 6px; letter-spacing: .03em;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; }
.chip--active { background: var(--green-chip); color: var(--green-text); }
.chip--active .dot { background: var(--green-dot); }
.chip--pending { background: var(--gold-chip); color: var(--gold-text); }
.chip--pending .dot { background: var(--gold-dot); }
.chip--error { background: var(--gold-chip); color: var(--gold-text); }
.chip--error .dot { background: var(--gold-dot); }
.chip--expired { background: var(--red-chip); color: var(--red-text); }
.chip--expired .dot { background: var(--red-dot); }

/* ---------- Toggle ---------- */
.toggle {
  width: 34px; height: 20px; border-radius: 20px; background: #d8d4c8;
  position: relative; display: inline-block; flex: none; border: none; cursor: pointer; padding: 0;
}
.toggle__knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fffefb; transition: left .15s ease; }
.toggle--on { background: var(--ac); }
.toggle--on .toggle__knob { left: 16px; }
.toggle--lg { width: 36px; height: 21px; }
.toggle--lg .toggle__knob { width: 17px; height: 17px; }
.toggle--lg.toggle--on .toggle__knob { left: 17px; }
.toggle--sm { width: 32px; height: 19px; }
.toggle--sm .toggle__knob { width: 15px; height: 15px; }
.toggle--sm.toggle--on .toggle__knob { left: 15px; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 30px 24px 60px; }
.wrap--narrow { max-width: 560px; padding: 36px 24px 60px; }
.wrap--settings { max-width: 680px; }
.page-title { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.page-sub { font-size: 13px; color: var(--faint); font-family: var(--sans); margin-top: 3px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack { display: flex; flex-direction: column; }

/* ---------- Domain grid + cards ---------- */
.domain-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(316px, 1fr)); gap: 16px; }
.dcard__head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.dcard__name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.dcard__sub { font-size: 12px; color: var(--faint); margin-top: 3px; font-family: var(--sans); }
.dcard__stats { display: flex; gap: 30px; align-items: flex-end; margin-bottom: 16px; }
.stat__num { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat__num--ac { color: var(--ac); }
.stat__cap { font-size: 11px; color: var(--faint); font-family: var(--sans); }
.dcard__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border-inner); margin-bottom: 14px; min-height: 34px; }
.dcard__actions { display: flex; gap: 8px; }
.dns-block { background: var(--field); border: 1px solid var(--border-inner); border-radius: 9px; padding: 12px 14px; font-size: 12px; color: var(--muted); line-height: 1.9; }

.toggle-label { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.toggle-label span.t { font-size: 12px; font-weight: 600; font-family: var(--sans); color: var(--ink-2); }

/* Inline price control */
.price { display: flex; align-items: center; gap: 9px; }
.price__set { font-size: 12px; font-weight: 700; color: var(--ac); cursor: pointer; font-family: var(--sans); background: none; border: none; padding: 0; }
.price__val { font-size: 18px; font-weight: 800; color: var(--money); font-variant-numeric: tabular-nums; }
.price__hint { font-size: 11px; color: var(--faint); font-family: var(--sans); margin-top: 1px; }
.price__icon { cursor: pointer; color: var(--faint); background: none; border: none; padding: 0; }
.price__edit { display: flex; align-items: center; gap: 6px; }
.price__inputwrap { display: flex; align-items: center; border: 1px solid var(--ac); border-radius: 8px; padding: 4px 8px; background: #fff; }
.price__inputwrap .cur-sign { color: var(--money); font-weight: 800; font-size: 15px; }
.price__input { border: none; outline: none; width: 62px; font-family: var(--mono); font-size: 15px; font-weight: 800; color: var(--money); background: transparent; }
.price__save { cursor: pointer; background: var(--ac); color: #fffefb; border: none; border-radius: 7px; padding: 5px 9px; font-size: 12px; font-weight: 700; }
.price__esc { cursor: pointer; color: var(--faint); background: none; border: none; font-size: 12px; }
.price--detail .price__val { font-size: 26px; }
.price--detail .price__inputwrap { padding: 6px 10px; }
.price--detail .price__inputwrap .cur-sign { font-size: 18px; }
.price--detail .price__input { width: 78px; font-size: 18px; }
.price--detail .price__set { font-size: 14px; }
.pub-status-live { font-size: 12px; color: var(--green-text); font-weight: 700; font-family: var(--sans); }
.pub-status-hidden { font-size: 12px; color: var(--faint); font-weight: 700; font-family: var(--sans); }
.detail-toggle { display: flex; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 9px; padding: 7px 12px; cursor: pointer; background: var(--card); }

.add-card {
  border: 1.5px dashed var(--border-dash); border-radius: 12px; display: flex;
  flex-direction: column; align-items: center; justify-content: center; min-height: 200px;
  color: var(--faint); gap: 10px; cursor: pointer; text-decoration: none;
}
.add-card__plus { width: 40px; height: 40px; border-radius: 10px; background: var(--acsoft); color: var(--ac); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }

/* ---------- Search / filter ---------- */
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; font-size: 13px; color: var(--faint); width: 170px; font-family: var(--sans); }
.search input { border: none; outline: none; background: transparent; width: 100%; font-family: var(--sans); color: var(--ink); }
.filter { background: var(--card); border: 1px solid var(--border); border-radius: 9px; padding: 9px 13px; font-size: 13px; color: var(--ink-2); font-family: var(--mono); }

/* ---------- Login / auth ---------- */
.auth-bg { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(120% 70% at 50% 0%, var(--acsoft) 0%, var(--canvas) 50%); }
.auth-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-login); padding: 34px; }
.auth-head { display: flex; flex-direction: column; align-items: center; margin-bottom: 26px; }
.auth-title { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.auth-sub { font-size: 13px; color: var(--faint); font-family: var(--sans); margin-top: 4px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.divider .line { flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 11px; color: var(--faintest); font-family: var(--sans); }
.errorlist { list-style: none; padding: 0; margin: 0 0 10px; color: var(--red-text); font-size: 12px; font-family: var(--sans); }
.form-error { color: var(--red-text); font-size: 12px; font-family: var(--sans); margin: 4px 0 10px; }
/* Style raw allauth form inputs to match the design without widget classes. */
.auth-form input:not([type=checkbox]) {
  width: 100%; border: 1px solid var(--border); border-radius: 9px; padding: 11px 12px;
  font-size: 13px; font-family: var(--sans); background: var(--field); color: var(--ink);
  outline: none; margin-bottom: 13px;
}
.auth-form input:focus { border-color: var(--ac); }
.auth-remember { display: flex; align-items: center; gap: 8px; font-family: var(--sans); font-size: 12px; color: var(--muted); margin-bottom: 14px; }

/* ---------- Stepper (add domain) ---------- */
.step-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-card), var(--shadow-elev); padding: 28px; }
.step-kicker { font-size: 12px; color: var(--ac); font-weight: 700; margin-bottom: 6px; letter-spacing: .04em; }
.step-title { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.purpose-grid { display: flex; gap: 12px; }
.purpose { flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 14px; cursor: pointer; background: none; text-align: left; font-family: var(--mono); }
.purpose__t { font-weight: 700; font-size: 14px; margin-bottom: 3px; color: var(--ink-2); }
.purpose__d { font-size: 12px; color: var(--faint); font-family: var(--sans); }
.purpose--on { border: 2px solid var(--ac); background: var(--acsoft); }
.purpose--on .purpose__t { color: var(--ink); }
.purpose--on .purpose__d { color: var(--muted); }
.public-row { display: flex; align-items: center; gap: 11px; border: 1px solid var(--border-inner); background: var(--field); border-radius: 10px; padding: 13px 14px; cursor: pointer; }
.dns-table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; font-size: 13px; }
.dns-table__head { display: flex; background: var(--fill-2); padding: 9px 14px; color: var(--faint); font-weight: 700; font-size: 11px; font-family: var(--sans); }
.dns-table__row { display: flex; align-items: center; padding: 11px 14px; border-top: 1px solid var(--border-inner); }
.dns-table .c-type { flex: .8; } .dns-table .c-name { flex: .8; } .dns-table .c-val { flex: 1.8; }
.dns-table .c-copy { flex: 0 0 44px; color: var(--ac); font-weight: 700; text-align: right; cursor: pointer; background: none; border: none; }
.banner-wait { display: flex; align-items: center; gap: 11px; background: var(--gold-chip); border: 1px solid var(--gold-border); border-radius: 10px; padding: 12px 14px; }
.banner-wait span.t { font-size: 13px; color: var(--gold-text); font-weight: 700; font-family: var(--sans); }
.success-disc { width: 60px; height: 60px; border-radius: 50%; background: var(--green-chip); color: var(--green-dot); display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 0 auto 18px; }

/* ---------- Domain detail ---------- */
.crumb { font-size: 12px; color: var(--faint); font-family: var(--sans); margin-bottom: 10px; }
.crumb a { color: var(--faint); }
.crumb .cur-page { color: var(--ink); font-weight: 700; font-family: var(--mono); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 22px; font-size: 14px; }
.tab { padding-bottom: 11px; color: var(--muted); text-decoration: none; cursor: pointer; }
.tab--active { border-bottom: 2px solid var(--ac); color: var(--ac); font-weight: 700; }
.overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 16px; }
.dns-row { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.dns-row .dot { width: 7px; height: 7px; border-radius: 50%; }
.dns-row .ok { margin-left: auto; font-size: 12px; color: var(--green-text); font-weight: 700; }
.dns-row .bad { margin-left: auto; font-size: 12px; color: var(--gold-text); font-weight: 700; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 46px; margin-top: 12px; }
.bars div { flex: 1; background: var(--border); }
.bars div.peak { background: var(--ac); }
.inq-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; }
.inq-av { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #dad6cb, #b6b2a6); flex: none; }
.offer-chip { background: var(--green-chip); color: var(--green-text); font-weight: 800; padding: 4px 10px; border-radius: 6px; font-variant-numeric: tabular-nums; }

/* ---------- Inbox ---------- */
.inbox { display: flex; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-card); min-height: 520px; }
.inbox__list { flex: 0 0 320px; border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.inbox__listhead { padding: 15px 18px; border-bottom: 1px solid var(--border-inner); display: flex; justify-content: space-between; align-items: center; }
.thread { position: relative; padding: 14px 18px; border-bottom: 1px solid var(--border-inner); cursor: pointer; display: block; text-decoration: none; color: inherit; }
.thread--active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ac); }
.thread--unread .thread__who::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ac); margin-left: 6px; vertical-align: middle; }
.thread__who { font-size: 13px; font-weight: 700; }
.inbox__detail { flex: 1; display: flex; flex-direction: column; }
.composer { padding: 16px 22px; border-top: 1px solid var(--border-inner); display: flex; gap: 10px; align-items: center; }

/* ---------- Settings ---------- */
.set-row { display: flex; justify-content: space-between; align-items: center; }

/* ---------- Messages (toasts) ---------- */
.messages { max-width: 1180px; margin: 12px auto 0; padding: 0 24px; }
.toast { background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--ac); border-radius: 8px; padding: 10px 14px; font-size: 13px; font-family: var(--sans); margin-bottom: 8px; }
.toast--error { border-left-color: var(--red-dot); color: var(--red-text); }

/* ---------- Public listing pages ---------- */
.pub-bg { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; background: radial-gradient(120% 70% at 50% 0%, var(--acsoft) 0%, var(--canvas) 50%); }
.pub-card { width: 100%; max-width: 460px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-login); padding: 40px 36px; }
.pub-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--acsoft); color: var(--ac); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px; letter-spacing: .04em; text-transform: uppercase; }
.pub-headline { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 16px 0 6px; word-break: break-all; }
.pub-price { font-size: 34px; font-weight: 800; color: var(--money); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pub-price--open { font-size: 22px; font-weight: 800; color: var(--ink); }
.pub-desc { font-size: 14px; color: var(--muted); font-family: var(--sans); line-height: 1.6; }
.pub-foot { margin-top: 28px; font-size: 12px; color: var(--faintest); font-family: var(--sans); text-align: center; }
.pub-foot a { color: var(--faint); }
.pub-offer { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.pub-success { background: var(--green-chip); color: var(--green-text); border-radius: 12px; padding: 18px; text-align: center; font-family: var(--sans); }

/* ---------- Responsive: nav -> bottom tab bar ---------- */
.tabbar { display: none; }
@media (max-width: 640px) {
  .wrap { padding: 20px 16px 90px; }
  .shell { display: none; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: rgba(255, 254, 251, .96); backdrop-filter: blur(8px);
    border-top: 1px solid var(--border); padding: 6px 4px env(safe-area-inset-bottom);
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 0; font-size: 11px; color: var(--muted); text-decoration: none; min-height: 44px;
  }
  .tabbar a.active { color: var(--ac); }
  .tabbar .ico { font-size: 18px; line-height: 1; }
  .domain-grid { grid-template-columns: 1fr; }
  .inbox { flex-direction: column; }
  .inbox__list { flex: none; border-right: none; border-bottom: 1px solid var(--border); }
}

/* ============ Directory — public for-sale marketplace (quai53.com/directory) ============ */
[x-cloak] { display: none !important; }

.dir-bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--card) 86%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.dir-bar__row { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 13px 24px; }
.dir-bar__crumb { font-size: 14px; color: var(--muted); font-weight: 600; }
.dir-bar__right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.dir-bar__login { font-size: 13px; color: var(--muted); font-family: var(--sans); font-weight: 600; text-decoration: none; }
.dir-bar__login:hover { color: var(--ink-2); }
.dir-bar__cta { background: var(--ac); color: #fffefb; border-radius: 9px; padding: 9px 15px; font-size: 13px;
  font-weight: 700; text-decoration: none; box-shadow: 0 2px 8px color-mix(in srgb, var(--ac) 34%, transparent); white-space: nowrap; }
.dir-bar__cta:hover { filter: brightness(.94); }

.dir-wrap { max-width: 1080px; margin: 0 auto; padding: 38px 24px 72px; }
.dir-mast { margin-bottom: 30px; }
.dir-mast__title { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.dir-mast__sub { font-size: 15px; color: var(--muted); font-family: var(--sans); max-width: 560px; line-height: 1.55; }
.dir-cur { display: inline-block; width: .55ch; height: 1em; transform: translateY(2px); margin-left: 2px;
  background: var(--ac); animation: dir-blink 1.1s steps(1) infinite; }
@keyframes dir-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.dir-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.dir-searchbox { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 12px; font-size: 13px; width: 230px; }
.dir-searchbox input { border: none; outline: none; background: transparent; font-family: var(--mono); font-size: 13px; color: var(--ink); width: 100%; }
.dir-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dir-chip { padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--card); color: var(--ink-2); border: 1px solid var(--border); font-family: var(--mono); }
.dir-chip.is-on { background: var(--acsoft); color: var(--ac); border-color: var(--ac); }
.dir-chip__n { opacity: .55; font-weight: 500; }
.dir-seg { margin-left: auto; display: flex; gap: 0; background: var(--border-inner); border-radius: 9px; padding: 3px; }
.dir-seg__b { padding: 6px 12px; border-radius: 7px; font-size: 12px; font-weight: 700; font-family: var(--sans);
  cursor: pointer; background: transparent; color: var(--muted); border: none; }
.dir-seg__b.is-on { background: var(--card); color: var(--ac); box-shadow: 0 1px 2px rgba(20, 18, 12, .12); }

.dir-count { font-size: 12px; color: var(--faint); font-family: var(--sans); margin-bottom: 10px; }

.dir-table { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.dir-row { display: grid; grid-template-columns: minmax(0, 1.5fr) 96px minmax(0, 150px) 108px 128px; gap: 16px;
  align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--border-inner); }
.dir-row:not(.dir-row--head) { cursor: pointer; }
.dir-row:not(.dir-row--head):hover { background: var(--field); }
.dir-row--head { padding: 12px 20px; background: var(--fill-2); border-bottom: 1px solid var(--border); order: -1; }
.dir-th { background: none; border: none; padding: 0; font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: .05em; color: var(--faint); text-transform: uppercase; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.dir-th.ta-r { justify-content: flex-end; }
.dir-th:hover { color: var(--muted); }
.dir-th.is-active { color: var(--ink-2); }
.dir-ind { color: var(--ac); font-weight: 700; }
.dir-row .ta-r { text-align: right; }
.dir-dom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-dom a { text-decoration: none; }
.dir-dom__sld { font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.dir-dom__tld { font-size: 16px; font-weight: 500; color: var(--faint); }
.dir-len { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.dir-row.is-shortest .dir-len { color: var(--ac); }
.dir-unit { font-size: 11px; color: var(--faintest); font-weight: 500; font-family: var(--sans); }
.dir-price { font-size: 15px; font-weight: 800; color: var(--money); font-variant-numeric: tabular-nums; }
.dir-offers { font-size: 12px; font-weight: 600; color: var(--faint); font-family: var(--sans); }
.dir-visits { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.dir-contact { border: 1px solid var(--ac); color: var(--ac); border-radius: 8px; padding: 6px 11px; font-size: 12px;
  font-weight: 700; text-decoration: none; white-space: nowrap; }
.dir-contact:hover { background: var(--acsoft); }

.dir-empty { padding: 54px 20px; text-align: center; color: var(--faint); font-family: var(--sans); }
.dir-empty__t { font-size: 15px; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }
.dir-empty__s { font-size: 13px; }

@media (max-width: 720px) {
  .dir-row { grid-template-columns: minmax(0, 1.4fr) 66px minmax(0, 96px) 96px; }
  .dir-row > :nth-child(4) { display: none; }       /* hide VISITS column */
  .dir-th.ta-r + .dir-th.ta-r + .dir-th.ta-r { display: none; }
  .dir-bar__crumb { display: none; }
  .dir-seg { margin-left: 0; }
}

/* "browse the directory" link on public parked pages */
.pub-dirlink { color: var(--muted); font-family: var(--sans); font-size: 13px; font-weight: 600; text-decoration: none; }
.pub-dirlink:hover { color: var(--ac); }

summary::-webkit-details-marker { display: none; }

/* Global brand footer (tagline + deployed commit sha) */
.site-foot { text-align: center; font-family: var(--sans); font-size: 12px; color: var(--faint);
  line-height: 1.7; padding: 34px 16px 30px; }
.site-foot strong { color: var(--muted); font-weight: 700; }
.site-foot__sha { font-family: var(--mono); font-size: 10px; letter-spacing: .06em;
  color: var(--faintest); margin-left: 8px; user-select: all; }
