/* ==========================================================================
   NameCrestly design system
   Heraldic navy + gold. One stylesheet, no framework, light and dark.
   ========================================================================== */

:root {
  /* brand */
  --ink-900: #0F1530;
  --ink-800: #161E42;
  --ink-700: #1F2A5C;
  --ink-600: #2B3A78;
  --ink-500: #3A4C99;
  --ink-400: #5A6CBA;
  --ink-300: #8E9BD6;
  --ink-100: #DDE3F7;
  --ink-50:  #EEF1FC;

  --gold-600: #8E6114;
  --gold-500: #D99B2B;
  --gold-400: #E8B155;
  --gold-300: #F3CC8A;
  --gold-100: #FBEFD8;

  /* semantic */
  --bg:          #F6F7FC;
  --bg-elevated: #FFFFFF;
  --bg-sunken:   #EDF0F9;
  --surface-2:   #F9FAFE;
  --border:      #DFE4F2;
  --border-strong: #C6CEE6;

  --text:        #141A33;
  --text-muted:  #5A6383;
  --text-faint:  #69718C;
  --text-invert: #FFFFFF;

  --brand:       var(--ink-600);
  --brand-hover: var(--ink-700);
  --accent:      var(--gold-500);

  --ok:    #1A7450;
  --ok-bg: #E4F5ED;
  --warn:    #9A5C0E;
  --warn-bg: #FCF0DC;
  --info:    #27559B;
  --info-bg: #E6EEFB;
  --rare:    #7A3BA8;
  --rare-bg: #F2E9FA;

  /* chart series — colour-blind safe, works on both themes */
  --c1: #3A4C99;
  --c2: #D99B2B;
  --c3: #2E8B8B;
  --c4: #B5527E;
  --c5: #6B7A3F;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 22, 48, .06), 0 1px 3px rgba(16, 22, 48, .04);
  --shadow:    0 4px 12px rgba(16, 22, 48, .07), 0 2px 4px rgba(16, 22, 48, .04);
  --shadow-lg: 0 18px 44px rgba(16, 22, 48, .14), 0 4px 12px rgba(16, 22, 48, .07);

  --maxw: 1120px;
  --maxw-prose: 760px;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* --------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 1.3rem + 2.9vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 1.02rem + .55vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }

img, svg { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink-700); color: #fff; padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ layout */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 16px; }
.wrap-prose { max-width: var(--maxw-prose); }

section { scroll-margin-top: 84px; }
.section { padding-block: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem); }
.section--tight { padding-block: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); }
.section--sunken { background: var(--bg-sunken); }
.section--elevated { background: var(--bg-elevated); }

.section-head { max-width: 680px; margin-bottom: 2rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--text-muted); margin-bottom: 0; font-size: 1.05rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font);
  font-size: .745rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-600); margin-bottom: .6rem;
}

.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); }

.stack > * + * { margin-top: 1rem; }
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.tnum { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1rem;
  min-height: 64px;
}

.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.16rem; letter-spacing: -.02em;
  color: var(--text); text-decoration: none; flex: none;
}
.brand:hover { color: var(--text); }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__name b { color: var(--ink-600); font-weight: 700; }

.nav { margin-left: auto; display: flex; align-items: center; gap: .15rem; }
.nav a, .nav .dropdown__btn {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .5rem .7rem; border-radius: var(--radius-sm);
  font-size: .925rem; font-weight: 500;
  color: var(--text-muted); text-decoration: none;
  background: none; border: 0; cursor: pointer;
  font-family: inherit;
}
.nav a:hover, .nav .dropdown__btn:hover { background: var(--ink-50); color: var(--text); }
.nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }

.dropdown { position: relative; }
.dropdown__btn svg { width: 14px; height: 14px; transition: transform .18s ease; }
.dropdown[data-open="true"] .dropdown__btn svg { transform: rotate(180deg); }
.dropdown__menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 268px;
  background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: .4rem;
  display: none; max-height: 70vh; overflow-y: auto;
}
.dropdown[data-open="true"] .dropdown__menu { display: block; }
.dropdown__menu a {
  display: block; padding: .5rem .65rem; border-radius: var(--radius-sm);
  font-size: .9rem; color: var(--text); width: 100%;
}
.dropdown__menu a:hover { background: var(--ink-50); }
.dropdown__sep { height: 1px; background: var(--border); margin: .35rem .4rem; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-elevated); color: var(--text-muted); cursor: pointer;
}
.icon-btn:hover { background: var(--ink-50); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

.nav-toggle { display: none; }

@media (max-width: 920px) {
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: .5rem 16px 1rem;
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .site-header[data-nav-open="true"] .nav { display: flex; }
  .nav-toggle { display: inline-grid; margin-left: auto; }
  .dropdown__menu {
    position: static; display: block; box-shadow: none;
    border: 0; border-left: 2px solid var(--border);
    border-radius: 0; margin: 0 0 .4rem .7rem; padding: 0 0 0 .4rem;
    max-height: none;
  }
  .dropdown__btn { width: 100%; justify-content: space-between; }
  .dropdown:not([data-open="true"]) .dropdown__menu { display: none; }
}

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 440px at 78% -8%, rgba(217,155,43,.26), transparent 62%),
    radial-gradient(760px 420px at 8% 6%, rgba(90,108,186,.42), transparent 60%),
    linear-gradient(158deg, var(--ink-800) 0%, var(--ink-700) 44%, var(--ink-600) 100%);
  color: #fff;
  padding-block: clamp(2.75rem, 1.8rem + 4vw, 5rem);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(70% 70% at 50% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 30%, #000 20%, transparent 78%);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 17ch; }
.hero--center { text-align: center; }
.hero--center h1 { margin-inline: auto; }
.hero__sub {
  color: rgba(255,255,255,.84); font-size: clamp(1rem, .95rem + .35vw, 1.17rem);
  max-width: 62ch; margin-bottom: 0;
}
.hero--center .hero__sub { margin-inline: auto; }
.hero .eyebrow { color: var(--gold-300); }

.hero__badges {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem;
}
.hero--center .hero__badges { justify-content: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.92);
  padding: .33rem .7rem; border-radius: var(--radius-pill);
  font-size: .8rem; font-weight: 500;
}
.hero__badge svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------------- cards */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}
.card--pad { padding: clamp(1.35rem, 1rem + 1.6vw, 2.4rem); }
.card--flat { box-shadow: none; }
.card h3 { margin-top: 0; }

.tool-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.4rem, 1rem + 1.8vw, 2.4rem);
  max-width: 660px; margin-inline: auto;
}
.tool-card--overlap { margin-top: -3.5rem; position: relative; z-index: 2; }
.tool-card__title {
  text-align: center; margin-bottom: .3rem;
  font-size: clamp(1.3rem, 1.1rem + .9vw, 1.7rem);
}
.tool-card__hint {
  text-align: center; color: var(--text-muted);
  font-size: .925rem; margin-bottom: 1.4rem;
}

/* ------------------------------------------------------------------- forms */
.field { margin-bottom: 1rem; }
.field label, .label {
  display: block; font-size: .875rem; font-weight: 600;
  margin-bottom: .35rem; color: var(--text);
}
.field__hint { font-size: .8rem; color: var(--text-faint); margin-top: .3rem; }

input[type="text"], input[type="number"], input[type="date"],
input[type="email"], select, textarea {
  width: 100%; padding: .72rem .9rem;
  font-family: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
input[aria-invalid="true"] { border-color: #C2453C; }

.field-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem;
  font-family: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2;
  border: 1.5px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary {
  background: var(--ink-600); color: #fff; border-color: var(--ink-600);
}
.btn--primary:hover { background: var(--ink-700); border-color: var(--ink-700); color: #fff; }
.btn--gold {
  background: var(--gold-500); color: #2A1C04; border-color: var(--gold-500);
}
.btn--gold:hover { background: var(--gold-400); border-color: var(--gold-400); color: #2A1C04; }
.btn--ghost {
  background: var(--bg-elevated); color: var(--text); border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--ink-50); color: var(--text); }
.btn--block { width: 100%; }
.btn--sm { padding: .45rem .85rem; font-size: .875rem; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .62; pointer-events: none; }

.btn__spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .7s linear infinite; display: none;
}
.btn[aria-busy="true"] .btn__spinner { display: block; }
.btn[aria-busy="true"] .btn__icon { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-error {
  display: none; align-items: center; gap: .5rem;
  background: #FDECEA; color: #96281B;
  border: 1px solid #F3C6C0; border-radius: var(--radius-sm);
  padding: .6rem .8rem; font-size: .9rem; margin-bottom: 1rem;
}
.form-error[data-show="true"] { display: flex; }

/* suggestion dropdown */
.combo { position: relative; }
.combo__list {
  position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  max-height: 232px; overflow-y: auto; padding: .25rem; display: none;
}
.combo__list[data-open="true"] { display: block; }
.combo__opt {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .45rem .6rem; border-radius: 6px; cursor: pointer; font-size: .925rem;
}
.combo__opt:hover, .combo__opt[aria-selected="true"] { background: var(--ink-50); }
.combo__opt span:last-child { color: var(--text-faint); font-size: .82rem; }

/* ----------------------------------------------------------------- results */
.results { margin-top: 2rem; }
.results[hidden] { display: none; }

.result-headline {
  text-align: center; margin-bottom: 1.6rem;
}
.result-headline__name {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem);
  margin-bottom: .4rem;
}
.result-headline p { color: var(--text-muted); margin: 0; }

.bignum {
  background: linear-gradient(150deg, var(--ink-700), var(--ink-500));
  color: #fff; border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.1rem + 1.8vw, 2.4rem) 1.25rem;
  text-align: center; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.bignum::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(520px 200px at 80% 0%, rgba(217,155,43,.3), transparent 70%);
  pointer-events: none;
}
.bignum > * { position: relative; }
.bignum__label {
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.72); font-weight: 600;
}
.bignum__value {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.6rem, 1.5rem + 5.2vw, 4.6rem);
  line-height: 1.05; margin: .18rem 0; font-variant-numeric: tabular-nums;
}
.bignum__sub { color: rgba(255,255,255,.86); font-size: 1.02rem; margin: 0; }
.bignum__odds {
  display: inline-block; margin-top: .85rem;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius-pill); padding: .33rem .95rem;
  font-size: .9rem; color: #fff;
}

.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.15rem;
}
.stat__label {
  font-size: .745rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: .3rem;
}
.stat__value {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
  line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text);
}
.stat__sub { font-size: .875rem; color: var(--text-muted); margin-top: .15rem; }

.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .75rem; border-radius: var(--radius-pill);
  font-size: .82rem; font-weight: 600; line-height: 1.4;
}
.badge--ok   { background: var(--ok-bg);   color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--rare { background: var(--rare-bg); color: var(--rare); }
.badge--lg { font-size: .95rem; padding: .42rem 1rem; }

/* meter */
.meter {
  height: 10px; border-radius: var(--radius-pill);
  background: var(--bg-sunken); overflow: hidden; display: flex;
}
.meter__fill { height: 100%; background: var(--c1); transition: width .5s ease; }
.meter__fill--f { background: var(--c4); }
.meter__fill--m { background: var(--c1); }
.meter-legend {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: .85rem; color: var(--text-muted); margin-top: .5rem;
}
.meter-legend b { color: var(--text); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .35rem; }

/* chart */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart__caption { font-size: .85rem; color: var(--text-muted); margin-top: .6rem; text-align: center; }
.chart-line { fill: none; stroke: var(--c1); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: url(#ncGrad); }
.chart-axis { stroke: var(--border); stroke-width: 1; }
.chart-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; opacity: .7; }
.chart-tick { fill: var(--text-faint); font-size: 11px; font-family: var(--font); }
.chart-peak { fill: var(--gold-500); stroke: var(--bg-elevated); stroke-width: 2; }
.chart-hover { fill: var(--c1); stroke: var(--bg-elevated); stroke-width: 2; opacity: 0; }
.chart-bar { fill: var(--c1); }
.chart-bar--alt { fill: var(--c2); }

.chart-tip {
  position: absolute; pointer-events: none; z-index: 20;
  background: var(--ink-800); color: #fff; font-size: .8rem;
  padding: .35rem .6rem; border-radius: 6px; white-space: nowrap;
  box-shadow: var(--shadow); opacity: 0; transition: opacity .12s ease;
}
.chart-tip[data-show="true"] { opacity: 1; }
.chart-wrap { position: relative; }

/* lists */
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 0; border-bottom: 1px solid var(--border);
}
.rank-list li:last-child { border-bottom: 0; }
.rank-list__pos {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink-50); color: var(--ink-600);
  font-size: .78rem; font-weight: 700;
}
.rank-list__name { font-weight: 600; }
.rank-list__bar { flex: 1; height: 7px; border-radius: 4px; background: var(--bg-sunken); overflow: hidden; }
.rank-list__bar i { display: block; height: 100%; background: var(--c1); border-radius: 4px; }
.rank-list__val { font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: .9rem; flex: none; }

.fact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.fact {
  display: flex; gap: .8rem; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .9rem 1rem;
}
.fact__icon {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--ink-50); color: var(--ink-600);
}
.fact__icon svg { width: 18px; height: 18px; }
.fact p { margin: 0; font-size: .94rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: .35rem .85rem;
  font-size: .88rem; color: var(--text); text-decoration: none; cursor: pointer;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip--static { cursor: default; }
.chip--static:hover { border-color: var(--border); color: var(--text); }

/* steps */
.steps { counter-reset: step; display: grid; gap: 1rem; }
.step {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.2rem;
}
.step__num {
  counter-increment: step; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink-600); color: #fff;
  font-weight: 700; font-size: .95rem;
}
.step__num::before { content: counter(step); }
.step h3 { font-size: 1.05rem; margin-bottom: .2rem; font-family: var(--font); font-weight: 650; }
.step p { margin: 0; color: var(--text-muted); font-size: .94rem; }

/* tool cards grid */
.tool-tile {
  display: flex; flex-direction: column; gap: .5rem;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem;
  text-decoration: none; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tool-tile:hover {
  border-color: var(--ink-400); box-shadow: var(--shadow);
  transform: translateY(-2px); color: var(--text);
}
.tool-tile__icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--ink-50); color: var(--ink-600); margin-bottom: .25rem;
}
.tool-tile__icon svg { width: 21px; height: 21px; }
.tool-tile h3 { margin: 0; font-size: 1.03rem; font-family: var(--font); font-weight: 650; }
.tool-tile p { margin: 0; font-size: .9rem; color: var(--text-muted); }

/* popular names grid */
.name-tile {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem;
  text-align: center; text-decoration: none; color: var(--text);
  transition: border-color .15s ease, transform .15s ease;
}
.name-tile:hover { border-color: var(--ink-400); transform: translateY(-2px); color: var(--text); }
.name-tile__name { font-family: var(--font-display); font-size: 1.22rem; font-weight: 600; }
.name-tile__meta { font-size: .82rem; color: var(--text-muted); }
.name-tile__count { font-size: .95rem; font-weight: 600; color: var(--ink-600); font-variant-numeric: tabular-nums; }

/* FAQ */
.faq { border-top: 1px solid var(--border); }
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem .25rem; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.02rem; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 11px; height: 11px;
  border-right: 2px solid var(--text-faint); border-bottom: 2px solid var(--text-faint);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq summary:hover { color: var(--brand); }
.faq__body { padding: 0 .25rem 1.15rem; color: var(--text-muted); }
.faq__body > :last-child { margin-bottom: 0; }

/* prose (legal + blog) */
.prose { max-width: var(--maxw-prose); }
.prose h2 { margin-top: 2.2rem; font-size: 1.5rem; }
.prose h3 { margin-top: 1.6rem; font-size: 1.18rem; font-family: var(--font); font-weight: 650; }
.prose ul, .prose ol { padding-left: 1.3rem; margin-bottom: 1.1rem; }
.prose li { margin-bottom: .45rem; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.3rem; font-size: .93rem; }
.prose th, .prose td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--border); }
.prose th { font-weight: 650; background: var(--bg-sunken); }
.prose blockquote {
  margin: 0 0 1.2rem; padding: .2rem 0 .2rem 1.1rem;
  border-left: 3px solid var(--gold-500); color: var(--text-muted);
}
.prose code {
  font-family: var(--font-mono); font-size: .9em;
  background: var(--bg-sunken); padding: .12em .4em; border-radius: 5px;
}

.callout {
  display: flex; gap: .85rem;
  background: var(--info-bg); border: 1px solid color-mix(in srgb, var(--info) 28%, transparent);
  border-radius: var(--radius); padding: 1rem 1.15rem; margin-bottom: 1.3rem;
}
.callout svg { width: 20px; height: 20px; flex: none; color: var(--info); margin-top: .18rem; }
.callout p { margin: 0; font-size: .94rem; }
.callout--warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.callout--warn svg { color: var(--warn); }

/* name ID card (download) */
.idcard {
  position: relative; overflow: hidden;
  background: linear-gradient(152deg, var(--ink-800), var(--ink-600) 60%, var(--ink-500));
  color: #fff; border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem; box-shadow: var(--shadow-lg);
}
.idcard::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 180px at 88% 4%, rgba(217,155,43,.34), transparent 66%);
}
.idcard > * { position: relative; }
.idcard__top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.66); font-weight: 600; margin-bottom: 1rem;
}
.idcard__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.3rem); line-height: 1.1;
  text-transform: uppercase; letter-spacing: -.01em;
}
.idcard__rarity { margin: .25rem 0 1.1rem; }
.idcard__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: .9rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.18);
}
.idcard__cell small {
  display: block; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.6); font-weight: 600; margin-bottom: .1rem;
}
.idcard__cell b { font-size: 1.02rem; font-weight: 650; }
.idcard__foot {
  margin-top: 1rem; font-size: .72rem; color: rgba(255,255,255,.55);
  display: flex; justify-content: space-between; gap: 1rem;
}

/* recent searches */
.recent { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.2rem; }
.recent__label { font-size: .82rem; color: var(--text-faint); font-weight: 600; }

/* sticky retry bar */
.sticky-bar {
  position: sticky; bottom: 12px; z-index: 50;
  display: flex; justify-content: center; margin-top: 1.5rem;
}
.sticky-bar .btn { box-shadow: var(--shadow-lg); }

/* footer */
.site-footer {
  background: var(--ink-900); color: rgba(255,255,255,.72);
  padding-block: 3rem 1.6rem; margin-top: 3rem;
}
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: minmax(220px, 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
  padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-brand .brand { color: #fff; margin-bottom: .6rem; }
.footer-brand .brand__name b { color: var(--gold-400); }
.footer-brand p { font-size: .9rem; margin: 0; max-width: 34ch; }
.footer-col h4, .footer-col__title {
  color: #fff; font-family: var(--font); font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: .8rem;
  margin-top: 0; line-height: 1.3;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .45rem; font-size: .9rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  align-items: center; padding-top: 1.4rem; font-size: .84rem;
}
.footer-bottom p { margin: 0; }
.footer-disclaimer {
  font-size: .8rem; color: rgba(255,255,255,.5);
  margin-top: .8rem; max-width: 70ch;
}
.social { display: flex; gap: .6rem; }
.social a {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
}
.social a:hover { background: rgba(255,255,255,.16); }
.social svg { width: 17px; height: 17px; }

/* breadcrumb */
.crumbs { font-size: .85rem; color: rgba(255,255,255,.66); margin-bottom: .9rem; }
.crumbs a { color: rgba(255,255,255,.82); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs span { margin-inline: .4rem; opacity: .6; }

/* misc */
.divider { height: 1px; background: var(--border); border: 0; margin-block: 2rem; }
.loading-skeleton {
  background: linear-gradient(90deg, var(--bg-sunken) 25%, var(--surface-2) 50%, var(--bg-sunken) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.fade-in { animation: fadeIn .4s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media print {
  .site-header, .site-footer, .sticky-bar, .btn { display: none !important; }
  body { background: #fff; }
}
