/* NameForge — an inspection console.
   The page behaves like a tool that queried something and is showing you the
   response: a prompt, a request line, and findings stamped with a status. Dark
   by default; the toggle in the bar writes a preference. */

:root {
  color-scheme: light;

  --void: #fbfbfc;
  --void-2: #f1f3f6;
  --panel: #ffffff;
  --inset: #f4f6f8;
  --rule: #e2e6ec;
  --rule-hi: #ccd3dd;

  --text: #11151b;
  --text-dim: #4d5765;
  --text-faint: #6f7b8c;

  --heat: #a85405;
  --heat-dim: #c06a12;
  --heat-wash: rgba(168, 84, 5, .08);
  --wire: #0d7ca3;

  --pass: #0f8f5d;
  --caution: #926c00;
  --stop: #c8382b;

  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r: 3px;
}

/* Dark is opt-in through the toggle. Defining it as an attribute on :root
   rather than a media query means there is no flash of the wrong theme before
   the script runs — the document is already correct when it parses. */
:root[data-shade="dark"] {
  color-scheme: dark;
  --void: #0b0d11;
  --void-2: #0e1116;
  --panel: #12161c;
  --inset: #171c24;
  --rule: #222834;
  --rule-hi: #313a49;
  --text: #e3e8ef;
  --text-dim: #93a0b1;
  --text-faint: #64718a;
  --heat: #ff9838;
  --heat-dim: #b8631a;
  --heat-wash: rgba(255, 152, 56, .1);
  --wire: #5ec8f0;
  --pass: #4fd39a;
  --caution: #f0c04a;
  --stop: #ff6b5e;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--void);
  /* A faint engineering grid. Two 1px lines at 32px, almost subliminal —
     enough to read as a technical surface, not enough to fight the text. */
  background-image:
    linear-gradient(var(--void-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--void-2) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.shell { max-width: 900px; margin: 0 auto; padding: 0 20px; }

.jump { position: absolute; left: -9999px; background: var(--heat); color: #fff; padding: 10px 16px; z-index: 300; }
.jump:focus { left: 12px; top: 12px; }

a { color: var(--heat); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--text); }

/* ---------- top bar ---------- */

.topbar {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 60;
}
:root[data-shade="dark"] .topbar { background: rgba(11, 13, 17, .86); }

.topbar__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; min-height: 54px; flex-wrap: wrap;
}
.mark {
  font-family: var(--mono); font-size: 1rem; font-weight: 700;
  letter-spacing: -.03em; text-decoration: none;
  display: inline-flex; align-items: center; padding: 5px 0;
}
.mark__a { color: var(--text); }
.mark__b { color: var(--heat); }
.mark::before {
  content: "\25B8"; color: var(--heat); margin-right: 6px; font-size: .78em;
}
.mark::after {
  content: ""; width: 7px; height: 15px; margin-left: 4px;
  background: var(--heat); opacity: .75;
  animation: blink 1.25s steps(2, start) infinite;
}
@keyframes blink { 0%, 100% { opacity: .75; } 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mark::after { animation: none; } }

.menu { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.menu a {
  font-family: var(--mono); font-size: .8rem; letter-spacing: -.01em;
  color: var(--text-dim); text-decoration: none;
  padding: 6px 9px; border-radius: var(--r); white-space: nowrap;
  border: 1px solid transparent;
}
.menu a:hover { color: var(--text); border-color: var(--rule); }
.menu a[aria-current="page"] {
  color: var(--heat); background: var(--heat-wash); border-color: var(--heat-dim);
}

.shade {
  font-family: var(--mono); font-size: .74rem; cursor: pointer;
  background: transparent; color: var(--text-faint);
  border: 1px solid var(--rule); border-radius: var(--r);
  padding: 5px 8px; margin-left: 6px; line-height: 1;
}
.shade:hover { color: var(--heat); border-color: var(--rule-hi); }

/* ---------- type ---------- */

h1 {
  font-size: clamp(1.65rem, 4.2vw, 2.15rem); line-height: 1.14;
  letter-spacing: -.03em; margin: 32px 0 12px; font-weight: 700;
}
h2 {
  font-size: 1.16rem; line-height: 1.32; letter-spacing: -.015em;
  margin: 40px 0 12px; font-weight: 680;
  padding-left: 15px; position: relative;
}
h2::before {
  content: "##"; position: absolute; left: 0; top: .08em;
  font-family: var(--mono); font-size: .72em; font-weight: 500;
  color: var(--heat); opacity: .58;
}
h3 {
  font-size: 1.01rem; margin: 28px 0 8px; font-weight: 660;
  padding-left: 15px; position: relative;
}
h3::before {
  content: "#"; position: absolute; left: 0; top: .1em;
  font-family: var(--mono); font-size: .78em; font-weight: 500;
  color: var(--text-faint);
}
p { margin: 0 0 15px; }
.lede { font-size: 1.08rem; color: var(--text-dim); margin-bottom: 26px; max-width: 68ch; }

.trail {
  font-family: var(--mono); font-size: .74rem; color: var(--text-faint);
  padding-top: 22px; letter-spacing: -.01em;
}
.trail a { color: var(--text-dim); text-decoration: none; }
.trail a:hover { color: var(--heat); }

.stamped {
  font-family: var(--mono); font-size: .74rem; color: var(--text-faint);
  border-top: 1px dashed var(--rule-hi); padding-top: 13px; margin: 40px 0 40px;
}
.stamped::before { content: "// "; color: var(--heat); opacity: .55; }

ul, ol { margin: 0 0 16px; padding-left: 21px; }
li { margin-bottom: 7px; }
ul li::marker { color: var(--heat); }
ol li::marker { color: var(--text-faint); font-family: var(--mono); font-size: .88em; }

strong { font-weight: 660; color: var(--text); }
em { color: var(--text); }
code, kbd {
  font-family: var(--mono); font-size: .87em;
  background: var(--inset); border: 1px solid var(--rule);
  padding: 1px 5px; border-radius: var(--r); color: var(--wire);
}

/* ---------- the prompt ---------- */

.forge {
  background: var(--panel);
  border: 1px solid var(--rule-hi);
  border-radius: var(--r);
  padding: 0; margin: 10px 0 28px;
  overflow: hidden;
}
.forge::before {
  content: "nameforge \2014 check";
  display: block; font-family: var(--mono); font-size: .7rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint);
  background: var(--inset); border-bottom: 1px solid var(--rule);
  padding: 7px 14px;
}
.forge__row {
  display: flex; gap: 0; flex-wrap: wrap; align-items: stretch; padding: 14px;
}
.field { flex: 1 1 250px; min-width: 0; position: relative; }
.field label {
  position: absolute; left: -9999px;
}
.field input[type="text"] {
  width: 100%; font-family: var(--mono); font-size: 1.02rem;
  background: var(--inset); color: var(--text);
  border: 1px solid var(--rule-hi); border-right: 0;
  border-radius: var(--r) 0 0 var(--r);
  padding: 12px 13px 12px 30px;
}
.field::before {
  content: "\203A"; position: absolute; left: 12px; top: 50%;
  transform: translateY(-52%);
  font-family: var(--mono); font-size: 1.1rem; font-weight: 700;
  color: var(--heat); pointer-events: none; z-index: 2;
}
.field input[type="text"]:focus { outline: none; border-color: var(--heat); }
.field input[type="text"]::placeholder { color: var(--text-faint); }
.forge:focus-within { border-color: var(--heat-dim); }

.hint {
  font-size: .8rem; color: var(--text-faint); margin: 0;
  padding: 0 14px 13px; max-width: 74ch;
}

.press {
  font-family: var(--mono); font-size: .84rem; font-weight: 600;
  letter-spacing: .02em;
  background: var(--inset); color: var(--text);
  border: 1px solid var(--rule-hi); border-radius: var(--r);
  padding: 11px 17px; cursor: pointer; white-space: nowrap;
}
.press:hover { border-color: var(--text-faint); }
.forge .press { border-radius: 0 var(--r) var(--r) 0; }
.press--key {
  background: var(--heat); border-color: var(--heat); color: #fff;
}
:root[data-shade="dark"] .press--key { color: #14100a; }
.press--key:hover { filter: brightness(1.1); border-color: var(--heat); }
.press--tight { padding: 7px 12px; font-size: .78rem; }
.press[disabled] { opacity: .5; cursor: default; }

/* ---------- report ---------- */

.report { margin: 0 0 32px; }
.report:empty { display: none; }

.subject {
  font-family: var(--mono); font-size: clamp(1.25rem, 3.8vw, 1.6rem);
  font-weight: 700; letter-spacing: -.035em; word-break: break-word;
  color: var(--text);
  padding: 18px 0 8px; margin-bottom: 4px;
  border-bottom: 1px solid var(--rule-hi);
}
.subject::before { content: "\203A "; color: var(--heat); }
.subject small {
  display: block; font-family: var(--mono); font-size: .7rem; font-weight: 400;
  color: var(--text-faint); letter-spacing: 0; margin-top: 7px;
  word-break: break-all;
}
.subject small b { color: var(--wire); font-weight: 400; }

.finding {
  display: grid; grid-template-columns: 92px 1fr; gap: 0 14px;
  padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: start;
}
.finding:last-child { border-bottom: 0; }
.chip {
  font-family: var(--mono); font-size: .62rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; text-align: center;
  padding: 4px 0; border-radius: var(--r); white-space: nowrap;
  border: 1px solid currentColor; margin-top: 2px;
}
/* Three states. `judgment` is the one that matters: it is not an absence of
   an answer, it is the answer, so it gets a mark of its own rather than being
   styled as a degraded pass. */
.chip--verified { color: var(--pass); background: rgba(79, 211, 154, .09); }
.chip--attention { color: var(--caution); background: rgba(240, 192, 74, .09); }
.chip--judgment {
  color: var(--wire); background: rgba(94, 200, 240, .08);
  border-style: dashed;
}
.chip--unknown { color: var(--text-faint); background: transparent; }
.chip--pending { color: var(--text-faint); border-style: dotted; }

.chip--verified::before { content: "\25CF  "; }
.chip--attention::before { content: "\25B2  "; }
.chip--judgment::before { content: "\25C7  "; }
.chip--unknown::before { content: "?  "; }
.chip--pending::before { content: "\25CC  "; }
/* Without min-width:0 a grid item refuses to shrink below its content, so a
   wide table inside a finding pushes the whole page sideways instead of
   letting .pan scroll. */
.finding__body { min-width: 0; }
.finding__body > :last-child { margin-bottom: 0; }
.finding__body .pan { max-width: 100%; }
.finding__title { font-weight: 660; margin: 0 0 4px; letter-spacing: -.01em; }
.finding__title code { background: none; border: 0; padding: 0; color: var(--heat); }

/* ---------- TLD matrix ---------- */

.tlds {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 6px; margin: 13px 0 6px; padding: 0; list-style: none;
}
/* Two lines, not one. Side by side the ending and its state compete for width
   and the ending loses, turning ".com" into ".c…" — the one thing the row is
   for. */
.tlds li {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 7px; align-items: center;
  font-family: var(--mono);
  background: var(--panel); border: 1px solid var(--rule);
  border-radius: var(--r); padding: 8px 10px; margin: 0;
}
.tlds li::marker { content: none; }
.tlds .dot {
  width: 6px; height: 6px; border-radius: 1px; flex: none; grid-row: 1;
  background: var(--text-faint);
}
.tlds .dot--free { background: var(--pass); box-shadow: 0 0 7px rgba(79, 211, 154, .55); }
.tlds .dot--taken { background: var(--stop); }
.tlds .name {
  grid-column: 2; grid-row: 1; font-size: .9rem; font-weight: 700;
  color: var(--text); letter-spacing: -.02em;
}
.tlds .state {
  grid-column: 2; grid-row: 2; color: var(--text-faint); font-size: .68rem;
  letter-spacing: .04em; text-transform: uppercase;
}

/* search plan */

table.plan { font-size: .85rem; }
table.plan th[scope="row"] {
  background: transparent; border-bottom-color: var(--rule);
  white-space: nowrap; color: var(--text-faint);
  font-size: .64rem; letter-spacing: .1em; padding-top: 12px;
}
table.plan td code {
  background: transparent; border: 0; padding: 0;
  color: var(--text); font-size: .94em; font-weight: 600;
}
.plan__go { white-space: nowrap; }
.plan__go a {
  font-family: var(--mono); font-size: .72rem; text-decoration: none;
  color: var(--text-dim); border: 1px solid var(--rule);
  border-radius: var(--r); padding: 3px 6px; display: inline-block; margin: 1px 0;
}
.plan__go a:hover { color: var(--heat); border-color: var(--heat-dim); }

/* the status key under the prompt */

.key {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-family: var(--mono); font-size: .72rem; color: var(--text-faint);
  margin: -14px 0 30px; padding: 0 2px;
}
.key b { font-weight: 400; color: var(--text-dim); }
.key span::before { margin-right: 5px; }
.key .k-v::before { content: "\25CF"; color: var(--pass); }
.key .k-a::before { content: "\25B2"; color: var(--caution); }
.key .k-j::before { content: "\25C7"; color: var(--wire); }
.key .k-u::before { content: "?"; color: var(--text-faint); }

/* ---------- panels ---------- */

.panel {
  background: var(--panel); border: 1px solid var(--rule);
  border-left: 2px solid var(--rule-hi);
  border-radius: var(--r); padding: 15px 17px; margin: 24px 0;
}
.panel > :last-child { margin-bottom: 0; }
.panel__tag {
  display: block; font-family: var(--mono); font-size: .66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--text-faint); margin-bottom: 8px;
}
.panel--heat { border-left-color: var(--heat); }
.panel--heat .panel__tag { color: var(--heat); }
.panel--stop { border-left-color: var(--stop); }
.panel--stop .panel__tag { color: var(--stop); }

/* ---------- tables ---------- */

.pan { overflow-x: auto; margin: 20px 0; }
table {
  width: 100%; border-collapse: collapse; font-size: .9rem;
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r);
}
caption {
  caption-side: bottom; text-align: left; font-family: var(--mono);
  font-size: .72rem; color: var(--text-faint); padding-top: 9px;
}
th, td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th {
  font-family: var(--mono); font-size: .68rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-faint); font-weight: 700;
  background: var(--inset); border-bottom-color: var(--rule-hi);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--void-2); }

/* ---------- accordion ---------- */

.qa details {
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--panel); margin-bottom: 6px;
}
.qa details[open] { border-color: var(--rule-hi); }
.qa summary {
  cursor: pointer; padding: 11px 14px; font-weight: 620; font-size: .95rem;
  list-style: none; display: flex; gap: 9px; align-items: baseline;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before {
  content: "[+]"; font-family: var(--mono); font-size: .78rem;
  color: var(--heat); flex: none;
}
.qa details[open] summary::before { content: "[\2212]"; }
.qa details[open] summary { border-bottom: 1px solid var(--rule); }
.qa details > :not(summary) { padding: 0 14px 0 37px; }
.qa details > p:first-of-type { padding-top: 12px; }
.qa details > :last-child { padding-bottom: 13px; margin-bottom: 0; }

/* ---------- onward ---------- */

.onward { list-style: none; padding: 0; margin: 18px 0 0; }
.onward li { margin: 0 0 6px; }
.onward a {
  display: block; text-decoration: none; padding: 12px 14px;
  background: var(--panel); border: 1px solid var(--rule);
  border-radius: var(--r); color: var(--text);
  position: relative; padding-left: 32px;
}
.onward a::before {
  content: "\2192"; position: absolute; left: 13px; top: 12px;
  font-family: var(--mono); color: var(--heat);
}
.onward a:hover { border-color: var(--heat-dim); background: var(--inset); }
.onward strong { display: block; color: var(--heat); font-weight: 640; }
.onward span { display: block; font-size: .86rem; color: var(--text-dim); margin-top: 1px; }

/* ---------- references ---------- */

.refs {
  margin: 44px 0 8px; padding: 17px 19px;
  background: var(--panel); border: 1px solid var(--rule-hi);
  border-radius: var(--r);
}
.refs h2 {
  margin: 0 0 6px; padding: 0; font-family: var(--mono); font-size: .7rem;
  text-transform: uppercase; letter-spacing: .16em; color: var(--heat); font-weight: 700;
}
.refs h2::before { content: none; }
.refs p { font-size: .85rem; color: var(--text-dim); margin-bottom: 11px; }
.refs ul { list-style: none; padding: 0; margin: 0; }
.refs li {
  font-family: var(--mono); font-size: .8rem; margin-bottom: 5px;
  padding-left: 18px; position: relative; letter-spacing: -.01em;
}
.refs li::before { content: "\2197"; position: absolute; left: 0; color: var(--wire); }
.refs a { color: var(--text-dim); text-decoration: none; }
.refs a:hover { color: var(--heat); text-decoration: underline; }

/* ---------- footer ---------- */

.endmatter {
  border-top: 1px solid var(--rule); background: var(--void-2);
  margin-top: 56px; padding: 32px 0 24px;
}
.endmatter__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 22px 20px; margin-bottom: 26px;
}
.endmatter h2 {
  font-family: var(--mono); font-size: .68rem; text-transform: uppercase;
  letter-spacing: .14em; color: var(--heat); margin: 0 0 9px;
  font-weight: 700; padding: 0;
}
.endmatter h2::before { content: none; }
.endmatter ul { list-style: none; padding: 0; margin: 0; }
.endmatter li { margin-bottom: 5px; }
.endmatter a { font-size: .86rem; color: var(--text-dim); text-decoration: none; }
.endmatter a:hover { color: var(--heat); }
.endmatter__line {
  font-size: .79rem; color: var(--text-faint);
  border-top: 1px solid var(--rule); padding-top: 14px; margin: 0 0 6px;
}
.endmatter__line + .endmatter__line { border-top: 0; padding-top: 0; }

/* ---------- storage notice ---------- */

/* The author `display` below outranks the UA sheet's `[hidden] { display:none }`,
   so this rule has to exist or the bar can never be dismissed. It could not be,
   until it did. */
.notice[hidden] { display: none !important; }

.notice {
  position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 90;
  background: var(--panel); border: 1px solid var(--rule-hi);
  border-left: 2px solid var(--heat);
  border-radius: var(--r); padding: 13px 15px;
  box-shadow: 0 12px 38px rgba(0, 0, 0, .5);
  display: flex; gap: 15px; align-items: center; flex-wrap: wrap;
  max-width: 740px; margin: 0 auto;
}
.notice p { margin: 0; font-size: .83rem; color: var(--text-dim); flex: 1 1 290px; }
.notice__acts { display: flex; gap: 7px; }

/* ---------- narrow ---------- */

@media (max-width: 640px) {
  body { font-size: 16px; background-size: 26px 26px; }
  .topbar__row { min-height: 0; padding: 8px 0; }
  .menu { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .field input[type="text"] { border-right: 1px solid var(--rule-hi); border-radius: var(--r); }
  .forge .press { border-radius: var(--r); margin-top: 8px; width: 100%; }
  .forge__row { display: block; }
  .finding { grid-template-columns: 1fr; gap: 7px; }
  .chip { justify-self: start; padding: 4px 9px; }
  .qa details > :not(summary) { padding-left: 14px; }
}

@media print {
  .topbar, .menu, .notice, .endmatter, .jump, .refs, .press, .shade { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .forge, .panel, table, .tlds li { border-color: #999; background: #fff; }
  h2::before, h3::before, .stamped::before { content: none; }
}

/* ---------- comparison matrix ---------- */

table.matrix { font-size: .86rem; }
table.matrix th[scope="row"] {
  background: var(--inset); white-space: nowrap;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em;
  position: sticky; left: 0; z-index: 1;
}
table.matrix thead th { vertical-align: bottom; text-transform: none; letter-spacing: 0; }
table.matrix td { text-align: center; }
table.matrix td small { color: var(--text-faint); font-size: .72rem; font-family: var(--mono); }
table.matrix .chip { display: inline-block; }
.cand {
  display: block; font-family: var(--mono); font-size: .92rem; font-weight: 700;
  color: var(--text); letter-spacing: -.02em; text-transform: none; margin-bottom: 4px;
  word-break: break-all; max-width: 15ch;
}
.drop {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .06em;
  background: transparent; color: var(--text-faint); cursor: pointer;
  border: 1px solid var(--rule); border-radius: var(--r); padding: 2px 6px;
  text-transform: uppercase; font-weight: 600;
}
.drop:hover { color: var(--stop); border-color: var(--stop); }

/* ---------- checklist tracker ---------- */

.tracker {
  background: var(--panel); border: 1px solid var(--rule-hi);
  border-left: 2px solid var(--heat);
  border-radius: var(--r); padding: 14px 16px; margin: 24px 0 30px;
}
.progress {
  font-family: var(--mono); font-size: 1.05rem; font-weight: 700;
  letter-spacing: -.01em; color: var(--heat); margin: 0 0 6px;
}
.progress[data-complete="yes"] { color: var(--pass); }
.tracker__note { font-size: .84rem; color: var(--text-dim); margin: 0; }
.tracker__note .press { margin-left: 4px; vertical-align: baseline; }

ul.steps { list-style: none; padding: 0; margin: 0 0 16px; }
ul.steps li {
  margin: 0 0 2px; border: 1px solid transparent; border-radius: var(--r);
}
ul.steps li.ticked { opacity: .55; }
ul.steps li.ticked span { text-decoration: line-through; text-decoration-thickness: 1px; }
ul.steps label {
  display: grid; grid-template-columns: auto 1fr; gap: 11px;
  align-items: start; cursor: pointer; padding: 8px 10px;
}
ul.steps label:hover { background: var(--inset); border-radius: var(--r); }
ul.steps input[type="checkbox"] {
  width: 15px; height: 15px; margin: 4px 0 0; accent-color: var(--heat); cursor: pointer;
}
