/* NameForge — a diagnostic surface.
   The page is a report on a name, so it reads like one: a fixed-width field for
   the name itself, and every finding stamped pass, caution or stop. */

:root {
  color-scheme: dark light;

  --void: #101216;        /* page */
  --panel: #171a20;       /* raised surface */
  --panel-2: #1e222a;     /* inset surface */
  --rule: #2b3038;
  --rule-hi: #3a414c;

  --text: #e6e8ec;
  --text-dim: #9aa3af;
  --text-faint: #6b7480;

  --heat: #f0902c;        /* the forge accent */
  --heat-soft: #3a2a14;
  --pass: #4ec98a;
  --caution: #e8bb4a;
  --stop: #f2685e;

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

  --gap: 22px;
  --radius: 6px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-shade="dark"]) {
    --void: #f6f7f9;
    --panel: #ffffff;
    --panel-2: #f0f2f5;
    --rule: #dfe3e9;
    --rule-hi: #c6ccd6;
    --text: #1a1d23;
    --text-dim: #545c68;
    --text-faint: #7c8593;
    --heat: #b45f09;
    --heat-soft: #fdf0e0;
  }
}
:root[data-shade="light"] {
  --void: #f6f7f9; --panel: #ffffff; --panel-2: #f0f2f5;
  --rule: #dfe3e9; --rule-hi: #c6ccd6;
  --text: #1a1d23; --text-dim: #545c68; --text-faint: #7c8593;
  --heat: #b45f09; --heat-soft: #fdf0e0;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

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

.jump {
  position: absolute; left: -9999px;
  background: var(--heat); color: #10120f; padding: 10px 16px; z-index: 200;
}
.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: var(--panel);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 60;
}
.topbar__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 58px; flex-wrap: wrap;
}
.mark {
  font-family: var(--mono); font-size: 1.06rem; font-weight: 600;
  letter-spacing: -.02em; text-decoration: none; padding: 6px 0;
  display: inline-flex; align-items: baseline;
}
.mark__a { color: var(--text); }
.mark__b { color: var(--heat); }
.mark::after {
  content: "/"; color: var(--text-faint); margin-left: 2px; font-weight: 400;
}
.menu { display: flex; gap: 4px; flex-wrap: wrap; }
.menu a {
  font-size: .87rem; color: var(--text-dim); text-decoration: none;
  padding: 6px 10px; border-radius: var(--radius); white-space: nowrap;
}
.menu a:hover { background: var(--panel-2); color: var(--text); }
.menu a[aria-current="page"] {
  color: var(--heat); background: var(--heat-soft);
}

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

h1 {
  font-size: clamp(1.7rem, 4.4vw, 2.3rem); line-height: 1.16;
  letter-spacing: -.024em; margin: 30px 0 12px; font-weight: 680;
}
h2 {
  font-size: 1.24rem; line-height: 1.3; letter-spacing: -.012em;
  margin: 38px 0 12px; font-weight: 660;
}
h3 { font-size: 1.04rem; margin: 26px 0 8px; font-weight: 640; }
p { margin: 0 0 15px; }
.lede { font-size: 1.1rem; color: var(--text-dim); margin-bottom: 26px; }

.trail {
  font-family: var(--mono); font-size: .78rem; color: var(--text-faint);
  padding-top: 20px; 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: .78rem; color: var(--text-faint);
  border-top: 1px solid var(--rule); padding-top: 14px; margin: 38px 0 40px;
}

ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 7px; }

strong { font-weight: 660; color: var(--text); }
code, kbd {
  font-family: var(--mono); font-size: .88em;
  background: var(--panel-2); border: 1px solid var(--rule);
  padding: 1px 5px; border-radius: 3px;
}

/* ---------- the check form ---------- */

.forge {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px;
  margin: 8px 0 26px;
}
.forge__row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.field { flex: 1 1 260px; min-width: 0; }
.field label {
  display: block; font-size: .74rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--text-faint); margin-bottom: 6px; font-weight: 640;
}
.field input[type="text"], .field select {
  width: 100%; font-family: var(--mono); font-size: 1.04rem;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--rule-hi); border-radius: var(--radius);
  padding: 11px 13px;
}
.field input[type="text"]:focus, .field select:focus {
  outline: 2px solid var(--heat); outline-offset: 1px; border-color: transparent;
}
.hint { font-size: .82rem; color: var(--text-faint); margin: 8px 0 0; }

.press {
  font: inherit; font-size: .9rem; font-weight: 600;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--rule-hi); border-radius: var(--radius);
  padding: 11px 18px; cursor: pointer; white-space: nowrap;
}
.press:hover { border-color: var(--text-faint); }
.press--key { background: var(--heat); border-color: var(--heat); color: #16120b; }
.press--key:hover { filter: brightness(1.08); }
.press--tight { padding: 7px 13px; font-size: .84rem; }
.press[disabled] { opacity: .55; cursor: default; }

/* ---------- findings ---------- */

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

.subject {
  font-family: var(--mono); font-size: clamp(1.3rem, 4vw, 1.75rem);
  font-weight: 600; letter-spacing: -.02em; word-break: break-word;
  padding: 16px 0 6px; border-bottom: 2px solid var(--rule-hi); margin-bottom: 18px;
}
.subject small {
  display: block; font-family: var(--sans); font-size: .8rem; font-weight: 400;
  color: var(--text-faint); letter-spacing: 0; margin-top: 4px;
}

.finding {
  display: grid; grid-template-columns: auto 1fr; gap: 0 14px;
  padding: 13px 0; border-bottom: 1px solid var(--rule); align-items: start;
}
.finding:last-child { border-bottom: 0; }
.chip {
  font-family: var(--mono); font-size: .66rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 3px; white-space: nowrap;
  border: 1px solid currentColor; margin-top: 3px;
}
.chip--pass { color: var(--pass); }
.chip--caution { color: var(--caution); }
.chip--stop { color: var(--stop); }
.chip--info { color: var(--text-faint); }
.chip--wait { color: var(--text-faint); opacity: .7; }
.finding__body > :last-child { margin-bottom: 0; }
.finding__title { font-weight: 640; margin: 0 0 3px; }
.finding__title code { background: none; border: 0; padding: 0; color: var(--heat); }

/* domain grid */

.tlds {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
  gap: 8px; margin: 12px 0 4px; padding: 0; list-style: none;
}
/* Two lines rather than one. On a single line the ending and its state compete
   for width and the ending loses, which turns ".com" into ".c…" — the one piece
   of information the row exists to carry. */
.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-2); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 8px 11px; margin: 0;
}
.tlds .dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--text-faint); grid-row: 1;
}
.tlds .dot--free { background: var(--pass); }
.tlds .dot--taken { background: var(--stop); }
.tlds .dot--restricted { background: var(--caution); }
.tlds .name {
  grid-column: 2; grid-row: 1; font-size: .92rem; font-weight: 600;
  color: var(--text); letter-spacing: -.01em;
}
.tlds .state {
  grid-column: 2; grid-row: 2; color: var(--text-faint); font-size: .72rem;
  letter-spacing: .02em;
}

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

.panel {
  background: var(--panel); border: 1px solid var(--rule);
  border-left: 3px solid var(--rule-hi);
  border-radius: var(--radius); padding: 16px 18px; margin: 22px 0;
}
.panel > :last-child { margin-bottom: 0; }
.panel__tag {
  display: block; font-family: var(--mono); font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .13em;
  color: var(--text-faint); margin-bottom: 7px;
}
.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: 18px 0; }
table {
  width: 100%; border-collapse: collapse; font-size: .92rem;
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius);
}
caption {
  caption-side: bottom; text-align: left; font-size: .8rem;
  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-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-faint); font-weight: 700; background: var(--panel-2);
}
tbody tr:last-child td { border-bottom: 0; }
td code { font-size: .86em; }

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

.qa details {
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--panel); margin-bottom: 8px;
}
.qa summary {
  cursor: pointer; padding: 12px 15px; font-weight: 620; font-size: .96rem;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before { content: "+ "; color: var(--heat); font-family: var(--mono); }
.qa details[open] summary::before { content: "\2212 "; }
.qa details[open] summary { border-bottom: 1px solid var(--rule); }
.qa details > :not(summary) { padding: 0 15px; }
.qa details > p:first-of-type { padding-top: 12px; }
.qa details > :last-child { padding-bottom: 13px; margin-bottom: 0; }

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

.onward { list-style: none; padding: 0; margin: 16px 0 0; }
.onward li { margin: 0 0 8px; }
.onward a {
  display: block; text-decoration: none; padding: 13px 15px;
  background: var(--panel); border: 1px solid var(--rule);
  border-radius: var(--radius); color: var(--text);
}
.onward a:hover { border-color: var(--heat); }
.onward strong { display: block; color: var(--heat); font-weight: 640; }
.onward span { display: block; font-size: .87rem; color: var(--text-dim); margin-top: 2px; }

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

.refs {
  margin: 40px 0 8px; padding: 18px 20px;
  background: var(--panel-2); border: 1px dashed var(--rule-hi);
  border-radius: var(--radius);
}
.refs h2 {
  margin: 0 0 5px; font-family: var(--mono); font-size: .74rem;
  text-transform: uppercase; letter-spacing: .14em; color: var(--heat); font-weight: 700;
}
.refs p { font-size: .87rem; color: var(--text-dim); margin-bottom: 10px; }
.refs ul { list-style: none; padding: 0; margin: 0; }
.refs li { font-size: .9rem; margin-bottom: 5px; padding-left: 16px; position: relative; }
.refs li::before {
  content: "\203A"; position: absolute; left: 0; color: var(--heat);
}

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

.endmatter {
  border-top: 1px solid var(--rule); background: var(--panel);
  margin-top: 54px; padding: 32px 0 26px;
}
.endmatter__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 24px; margin-bottom: 26px;
}
.endmatter h2 {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-faint); margin: 0 0 9px; font-weight: 700;
}
.endmatter ul { list-style: none; padding: 0; margin: 0; }
.endmatter li { margin-bottom: 5px; }
.endmatter a { font-size: .89rem; color: var(--text-dim); text-decoration: none; }
.endmatter a:hover { color: var(--heat); }
.endmatter__line {
  font-size: .82rem; 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 ---------- */

.notice {
  position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 90;
  background: var(--panel); border: 1px solid var(--rule-hi);
  border-left: 3px solid var(--heat);
  border-radius: var(--radius); padding: 14px 16px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .42);
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  max-width: 720px; margin: 0 auto;
}
.notice p { margin: 0; font-size: .85rem; color: var(--text-dim); flex: 1 1 300px; }
.notice__acts { display: flex; gap: 8px; }

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

@media (max-width: 620px) {
  body { font-size: 16px; }
  .topbar__row { min-height: 0; padding-top: 9px; padding-bottom: 9px; }
  .menu { width: 100%; overflow-x: auto; }
  .finding { grid-template-columns: 1fr; gap: 6px; }
  .chip { justify-self: start; margin-top: 0; }
  .forge { padding: 16px; }
}

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