/* namemakers.tools — a stack of name tags on a desk: warm paper, violet ink, coral for favourites. */
:root {
  --bg: #f5f2ec;
  --surface: #fffefb;
  --surface-2: #f6f2ea;
  --ink: #1f1a2e;
  --muted: #615a72;
  --line: #e1dacd;
  --accent: #5b35c9;
  --accent-ink: #ffffff;
  --accent-soft: #ebe4fb;
  --signal: #d4492c;
  --signal-soft: #fbe4dd;
  --good: #2f7a4a;
  --bad: #b3261e;

  --f-display: "Young Serif", "Iowan Old Style", Georgia, serif;
  --f-body: "Instrument Sans", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Martian Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --r: 14px;
  --r-sm: 9px;
  --step--1: 0.84rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 4.5vw, 2.6rem);
  --step-4: clamp(2.2rem, 6vw, 3.2rem);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15121d; --surface: #1e1a29; --surface-2: #262133; --ink: #efeaf7; --muted: #aaa2bb;
    --line: #362f47; --accent: #a68bff; --accent-ink: #15121d; --accent-soft: #2e2550;
    --signal: #ff8a6e; --signal-soft: #3a2019; --good: #74cf97; --bad: #ff8a80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15121d; --surface: #1e1a29; --surface-2: #262133; --ink: #efeaf7; --muted: #aaa2bb;
  --line: #362f47; --accent: #a68bff; --accent-ink: #15121d; --accent-soft: #2e2550;
  --signal: #ff8a6e; --signal-soft: #3a2019; --good: #74cf97; --bad: #ff8a80;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
}
a { color: var(--accent); }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 980px; margin: 0 auto; padding-inline: 16px; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand .dot { color: var(--signal); }
.head-link { font-size: var(--step--1); font-weight: 600; text-decoration: none; color: var(--muted); }
.head-link:hover { color: var(--accent); }

/* Page intro */
.intro { padding-block: 36px 20px; display: grid; gap: 10px; }
.eyebrow { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal); margin: 0; }
h1, h2, h3 { font-family: var(--f-display); letter-spacing: -0.02em; text-wrap: balance; margin: 0; line-height: 1.12; }
h1 { font-size: var(--step-3); font-weight: 700; }
.lede { margin: 0; color: var(--muted); max-width: 62ch; font-size: var(--step-1); line-height: 1.45; }

/* Home grid */
.home-intro { padding-block: 48px 28px; }
.home-intro h1 { font-size: var(--step-4); max-width: 16ch; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-bottom: 56px; }
.tile {
  display: grid; gap: 8px; align-content: start;
  padding: 20px; min-height: 168px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; color: var(--ink);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 22px -14px var(--accent); }
.tile svg { width: 40px; height: 40px; color: var(--accent); }
.tile .t-name { font-family: var(--f-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.01em; line-height: 1.2; }
.tile .t-desc { color: var(--muted); font-size: var(--step--1); line-height: 1.4; }
.tile .t-cat { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) {
  .tool-grid { gap: 10px; }
  .tile { padding: 14px 10px; min-height: 0; justify-items: center; text-align: center; }
  .tile .t-desc, .tile .t-cat { display: none; }
  .tile .t-name { font-size: 0.95rem; }
  .tile svg { width: 34px; height: 34px; }
}

.promise { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 4px 0 0; list-style: none; color: var(--muted); font-size: var(--step--1); }
.promise li::before { content: "● "; color: var(--signal); font-size: 0.7em; vertical-align: 2px; }

/* Tool panel */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(16px, 4vw, 28px); display: grid; gap: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.spread { justify-content: space-between; }
.stack { display: grid; gap: 8px; }
.label { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.readout { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.readout.xl { font-size: clamp(3.4rem, 15vw, 6.2rem); }
.readout.lg { font-size: clamp(2rem, 8vw, 3rem); }
.sub { color: var(--muted); font-size: var(--step--1); }

.btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  border-radius: var(--r-sm); padding: 10px 16px; font-weight: 600; cursor: pointer; line-height: 1.1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary.live { background: var(--signal); border-color: var(--signal); }
.btn.big { font-size: 1.1rem; padding: 14px 28px; min-width: 140px; }
.btn.sq { width: 44px; padding: 0; font-family: var(--f-mono); font-size: 1.2rem; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font-size: var(--step--1); font-weight: 600; cursor: pointer; min-height: 36px;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

input[type="number"], input[type="text"], select, textarea {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 12px; min-height: 44px; max-width: 100%;
}
input[type="number"] { width: 7.5em; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
textarea { width: 100%; font-family: var(--f-mono); font-size: 0.86rem; line-height: 1.6; resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 32px; }
select { padding-right: 32px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td.num { font-family: var(--f-mono); font-size: 0.88rem; }
tr.hl td { background: var(--accent-soft); }
.copyable { cursor: pointer; }
.copyable:hover { color: var(--accent); }

.notice { background: var(--signal-soft); border-radius: var(--r-sm); padding: 10px 14px; font-size: var(--step--1); }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 999px; font-size: var(--step--1); font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.toast.show { opacity: 1; }

/* Article / SEO text */
.article { padding-block: 36px 8px; display: grid; gap: 14px; max-width: 68ch; }
.article h2 { font-size: var(--step-2); margin-top: 10px; }
.article h3 { font-size: var(--step-1); margin-top: 4px; }
.article p, .article ul, .article ol { margin: 0; }
.article ul, .article ol { padding-left: 1.2em; display: grid; gap: 4px; }

/* More tools */
.more { padding-block: 32px 48px; display: grid; gap: 14px; }
.more h2 { font-size: var(--step-1); }
.more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.more-grid a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.92rem; }
.more-grid a:hover { border-color: var(--accent); }
.more-grid svg { width: 24px; height: 24px; color: var(--accent); flex: none; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: var(--step--1); }
.site-foot .wrap { padding-block: 22px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
[hidden] { display: none !important; }


/* Banner under the grid */
.banner {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 24px; align-items: center;
  margin: -32px 0 56px; padding: 22px 24px; border-radius: var(--r); text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, transform .15s;
}
.banner:hover { border-color: var(--accent); transform: translateY(-2px); }
.b-text { display: grid; gap: 4px; }
.b-title { font-family: var(--f-display); font-weight: 700; font-size: var(--step-2); letter-spacing: -0.02em; }
.b-desc { color: var(--muted); font-size: var(--step--1); }
.b-go { font-weight: 700; color: var(--accent); white-space: nowrap; }
.b-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.b-chips i { font-style: normal; font-size: 0.84rem; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
@media (max-width: 640px) {
  .banner { grid-template-columns: 1fr; gap: 14px; margin-top: -40px; }
  .b-go { justify-self: start; }
}
@media (max-width: 560px) {
  .site-head .wrap { flex-wrap: wrap; gap: 8px; padding-block: 10px; }
  .site-head nav { width: 100%; justify-content: space-between; gap: 8px !important; }
}

/* Shared converter bits */
.big-answer { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.6rem, 5vw, 2.4rem); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.big-answer em { font-style: normal; color: var(--signal); }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.res { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; text-align: left; font: inherit; color: inherit; }
.res:hover { border-color: var(--accent); }
.res .v { font-family: var(--f-mono); font-size: 1.15rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.res .u { color: var(--muted); font-size: 0.8rem; }
.res.main { border-color: var(--signal); background: var(--signal-soft); }
.field-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.field-row .stack { min-width: 0; }
.grow { flex: 1 1 220px; }
.grow select, .grow input { width: 100%; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }
.crumbs { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.crumbs a { color: var(--signal); text-decoration: none; }
.banner .t-cat { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 560px) {
  .field-row > .stack { flex: 1 1 100%; }
  .field-row input, .field-row select { width: 100%; }
}

h1, h2, h3 { font-weight: 400; letter-spacing: -0.01em; }
/* Compact hub */
.hub-intro { padding-block: 28px 18px; display: grid; gap: 6px; }
.hub-intro h1 { font-size: var(--step-4); }
.hub-group { display: grid; gap: 10px; margin-bottom: 26px; }
.hub-group h2 { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gen { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.gen:hover { border-color: var(--accent); transform: translateY(-2px); }
.gen svg { width: 34px; height: 34px; color: var(--accent); grid-row: span 2; }
.gen .g-name { font-family: var(--f-display); font-size: 1.12rem; line-height: 1.2; }
.gen .g-desc { color: var(--muted); font-size: 0.8rem; }
.gen.ext .g-name::after { content: " ↗"; color: var(--muted); font-size: .8em; }
/* Generator */
.nm-ctrl { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; justify-content: space-between; }
.nm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.nm-card { position: relative; display: grid; gap: 10px; align-content: space-between; padding: 26px 14px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); min-height: 108px; animation: nmIn .26s ease both; overflow: hidden; }
.nm-card::before { content: "HELLO, MY NAME IS"; position: absolute; top: 0; left: 0; right: 0; padding: 4px 14px; font-family: var(--f-mono); font-size: .58rem; letter-spacing: .14em; color: var(--accent-ink); background: var(--accent); }
.nm-card:hover { border-color: var(--accent); }
.nm-name { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.2; overflow-wrap: anywhere; }
.nm-acts { display: flex; gap: 4px; align-items: center; }
.nm-acts button { appearance: none; border: 1px solid transparent; background: none; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 600; padding: 4px 8px; border-radius: 99px; cursor: pointer; min-height: 30px; }
.nm-acts button:hover { color: var(--accent); border-color: var(--line); }
.nm-acts .fav { margin-right: auto; font-size: 1.05rem; }
.nm-acts .fav[aria-pressed="true"] { color: var(--signal); }
.nm-saved { display: grid; gap: 10px; }
.nm-saved ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.nm-saved li { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-weight: 600; }
.nm-saved li button { appearance: none; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; width: 26px; height: 26px; border-radius: 99px; }
.article .nm-list { display: block; columns: 3 200px; column-gap: 28px; margin: 0; padding: 0; list-style: none; }
.nm-list li { break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.links a { text-decoration: none; display: inline-flex; align-items: center; }
.links a[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@keyframes nmIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  .site-head .wrap { flex-wrap: wrap; gap: 8px; padding-block: 10px; }
  .site-head nav { width: 100%; justify-content: space-between; gap: 8px !important; }
  .nm-card { min-height: 0; }
  .hub-grid { grid-template-columns: 1fr 1fr; }
  .gen { grid-template-columns: 1fr; padding: 12px; }
  .gen svg { grid-row: auto; width: 28px; height: 28px; }
  .gen .g-desc { display: none; }
}
