/* ==========================================================================
   iFontGenerator design system
   Light-first, colour-coded by section. No webfonts: the system stack keeps
   LCP fast, which matters more here than a bespoke typeface.
   ========================================================================== */

:root {
  --brand-1: #2563eb;
  --brand-2: #7c3aed;
  --brand-grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);

  --bg: #ffffff;
  --bg-soft: #f6f8fd;
  --bg-tint: #eef3ff;
  --card: #ffffff;
  --line: #e6ecf7;
  --line-strong: #d3ddf0;

  --ink: #0f1729;
  --ink-2: #3c4a63;
  --ink-3: #6b7a94;

  --c-blue: #2563eb;    --w-blue: #e7efff;
  --c-violet: #7c3aed;  --w-violet: #f1e9ff;
  --c-pink: #db2777;    --w-pink: #ffe8f3;
  --c-rose: #e11d48;    --w-rose: #ffe6ea;
  --c-amber: #b45309;   --w-amber: #fff1dc;
  --c-lime: #15803d;    --w-lime: #e3f8ea;
  --c-teal: #0d9488;    --w-teal: #d9f6f2;
  --c-cyan: #0369a1;    --w-cyan: #e0f2fe;
  --c-indigo: #4f46e5;  --w-indigo: #e8e9ff;
  --c-slate: #475569;   --w-slate: #eef1f6;

  --accent: var(--c-blue);
  --wash: var(--w-blue);

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 41, .05);
  --shadow: 0 4px 16px rgba(15, 23, 41, .07);
  --shadow-lg: 0 18px 48px rgba(37, 99, 235, .14);
  --shell: 1180px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

[data-accent="blue"]   { --accent: var(--c-blue);   --wash: var(--w-blue); }
[data-accent="violet"] { --accent: var(--c-violet); --wash: var(--w-violet); }
[data-accent="pink"]   { --accent: var(--c-pink);   --wash: var(--w-pink); }
[data-accent="rose"]   { --accent: var(--c-rose);   --wash: var(--w-rose); }
[data-accent="amber"]  { --accent: var(--c-amber);  --wash: var(--w-amber); }
[data-accent="lime"]   { --accent: var(--c-lime);   --wash: var(--w-lime); }
[data-accent="teal"]   { --accent: var(--c-teal);   --wash: var(--w-teal); }
[data-accent="cyan"]   { --accent: var(--c-cyan);   --wash: var(--w-cyan); }
[data-accent="indigo"] { --accent: var(--c-indigo); --wash: var(--w-indigo); }
[data-accent="slate"]  { --accent: var(--c-slate);  --wash: var(--w-slate); }

html[data-theme="dark"] {
  --bg: #0b1020;
  --bg-soft: #111831;
  --bg-tint: #16203c;
  --card: #141c33;
  --line: #24304f;
  --line-strong: #33415f;
  --ink: #eef2fb;
  --ink-2: #b6c2da;
  --ink-3: #8492ad;
  --w-blue: #17233f; --w-violet: #221a3d; --w-pink: #331a2a; --w-rose: #351a22;
  --w-amber: #33270f; --w-lime: #14301f; --w-teal: #0f2e2b; --w-cyan: #10293d;
  --w-indigo: #1d1f42; --w-slate: #1c2437;
  --c-blue: #6b9bff; --c-violet: #a98bff; --c-pink: #ff77b3; --c-rose: #ff7a92;
  --c-amber: #f0a842; --c-lime: #56cc84; --c-teal: #37c8b6; --c-cyan: #4bb5ec;
  --c-indigo: #8b8cf5; --c-slate: #9aabc4;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 4px 18px rgba(0, 0, 0, .4);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .5);
}

/* --------------------------------------------------------------- base ---- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

/* Inline icons carry a viewBox but no width/height attribute. Without an
   explicit default they inherit the container width and blow the layout apart,
   so every icon gets a sane size that specific rules can still override. */
svg { width: 1em; height: 1em; flex-shrink: 0; display: inline-block; vertical-align: middle; }
.chev { width: 16px; height: 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.022em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand-1); color: #fff; }

.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
.section { padding: clamp(2.5rem, 5vw, 4.25rem) 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand-1); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 var(--r) 0;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------- header ---- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; }

.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--brand-grad); display: grid; place-items: center;
  color: #fff; flex-shrink: 0; box-shadow: 0 4px 12px rgba(37, 99, 235, .32);
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.08; }
.brand-name { font-weight: 800; font-size: 1.24rem; letter-spacing: -.03em; }
.brand-name em { font-style: normal; color: var(--brand-1); }
.brand-tag { font-size: .62rem; color: var(--ink-3); letter-spacing: .06em; }

.site-nav { display: flex; gap: .15rem; margin-left: .5rem; }
.site-nav a {
  color: var(--ink-2); font-weight: 600; font-size: .92rem;
  padding: .5rem .7rem; border-radius: var(--r-sm);
}
.site-nav a:hover { background: var(--bg-tint); color: var(--brand-1); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--brand-1); background: var(--bg-tint); }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: .6rem; }

.site-search { position: relative; width: min(280px, 30vw); }
.site-search input {
  width: 100%; padding: .58rem .85rem .58rem 2.3rem;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--bg-soft); color: var(--ink); font: inherit; font-size: .88rem;
}
.site-search input::placeholder { color: var(--ink-3); }
.site-search > svg {
  position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--ink-3); pointer-events: none;
}
.search-results {
  position: absolute; top: calc(100% + .5rem); left: 0; right: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lg); max-height: 330px; overflow-y: auto; padding: .35rem;
}
.search-results:empty { display: none; }
.search-results a { display: block; padding: .5rem .65rem; border-radius: var(--r-sm); color: var(--ink); font-size: .88rem; }
.search-results a:hover, .search-results a.is-active { background: var(--bg-tint); text-decoration: none; }
.search-results small { display: block; color: var(--ink-3); font-size: .74rem; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 11px;
  background: var(--bg-soft); color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-tint); color: var(--brand-1); }
.icon-btn svg { width: 17px; height: 17px; }
.nav-toggle, .search-toggle { display: none; }

/* --------------------------------------------------------------- hero ---- */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 70% at 12% 0%, var(--w-blue) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 88% 10%, var(--w-violet) 0%, transparent 62%),
    var(--bg);
  padding: clamp(2.25rem, 5vw, 4rem) 0 clamp(2.75rem, 5vw, 4.25rem);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }

.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--card); border: 1px solid var(--line-strong);
  color: var(--brand-1); font-weight: 700; font-size: .76rem;
  padding: .4rem .85rem; border-radius: 999px; margin-bottom: 1.15rem;
  box-shadow: var(--shadow-sm);
}
.pill svg { width: 13px; height: 13px; }

.hero h1 { margin-bottom: .65rem; }
.hero h1 .grad {
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: clamp(1rem, 1.5vw, 1.12rem); color: var(--ink-2); max-width: 34rem; margin-bottom: 1.6rem; }

.trust-row { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.trust-row > div { display: flex; align-items: center; gap: .6rem; }
.trust-ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--wash); color: var(--accent); flex-shrink: 0;
}
.trust-ico svg { width: 18px; height: 18px; }
.trust-row b { display: block; font-size: .88rem; }
.trust-row small { color: var(--ink-3); font-size: .76rem; }

.demo-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 1.4rem; box-shadow: var(--shadow-lg);
}
.demo-head { display: flex; align-items: center; gap: .55rem; margin-bottom: .2rem; }
.demo-head svg { width: 20px; height: 20px; color: var(--brand-2); }
.demo-head strong { font-size: 1.08rem; font-weight: 800; }
.demo-card > p { color: var(--ink-3); font-size: .85rem; margin-bottom: 1rem; }

.demo-input { position: relative; margin-bottom: .9rem; }
.demo-input input {
  width: 100%; padding: .8rem 4.8rem .8rem 1rem; font: inherit; font-size: .98rem;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--bg-soft); color: var(--ink);
}
.demo-count {
  position: absolute; right: 2.5rem; top: 50%; transform: translateY(-50%);
  font-size: .74rem; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.demo-clear {
  position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: var(--line); color: var(--ink-2); cursor: pointer; line-height: 1;
  display: grid; place-items: center; font-size: .85rem;
}

.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.chip {
  padding: .35rem .8rem; border-radius: 999px; font-size: .79rem; font-weight: 600;
  border: 1px solid var(--line-strong); background: var(--bg-soft);
  color: var(--ink-2); cursor: pointer;
}
.chip:hover { border-color: var(--brand-1); color: var(--brand-1); }
.chip.is-active { background: var(--brand-1); border-color: var(--brand-1); color: #fff; }

.demo-rows { display: grid; gap: .45rem; margin-bottom: 1rem; }
.demo-row {
  display: grid; grid-template-columns: 96px 1fr auto; align-items: center;
  gap: .7rem; padding: .6rem .75rem;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-soft);
}
.demo-row .label { font-size: .74rem; color: var(--ink-3); font-weight: 600; }
.demo-row .out { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-copy {
  display: inline-flex; align-items: center; gap: .3rem;
  border: 1px solid var(--line-strong); background: var(--card);
  color: var(--ink-2); border-radius: 8px; padding: .25rem .55rem;
  font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer;
}
.mini-copy:hover { color: var(--brand-1); border-color: var(--brand-1); }
.mini-copy.copied { background: var(--c-lime); border-color: var(--c-lime); color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: var(--r); border: 0;
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
  background: var(--brand-grad); color: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .28);
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn-block { width: 100%; }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-white { background: #fff; color: var(--brand-1); box-shadow: var(--shadow); }

/* ---------------------------------------------------------- stat strip --- */

.stat-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; margin-top: -1.9rem; position: relative; z-index: 5; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: .85rem .9rem; display: flex; align-items: center; gap: .65rem; box-shadow: var(--shadow);
}
.stat i {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-style: normal; font-weight: 800; font-size: .9rem; flex-shrink: 0;
  background: var(--wash); color: var(--accent);
}
.stat b { display: block; font-size: 1.02rem; font-weight: 800; line-height: 1.2; }
.stat span { font-size: .72rem; color: var(--ink-3); }

/* ------------------------------------------------------------ sections --- */

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-head h2 { display: flex; align-items: center; gap: .55rem; margin-bottom: .25rem; }
.section-head h2 svg { width: 26px; height: 26px; color: var(--accent); flex-shrink: 0; }
.section-head p { color: var(--ink-3); margin: 0; font-size: .95rem; }
.section-link { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.band { background: var(--bg-soft); border-block: 1px solid var(--line); }

.cat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .85rem; }
.cat {
  display: flex; flex-direction: column; padding: 1.1rem; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.cat span { margin-top: auto; }
.cat:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); }
.cat i {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-style: normal; font-weight: 800; font-size: 1rem;
  background: var(--wash); color: var(--accent); margin-bottom: .8rem;
}
.cat i svg { width: 20px; height: 20px; }
.cat b { display: block; font-size: .97rem; font-weight: 800; min-height: 2.5em; }
.cat em { display: block; font-style: normal; color: var(--accent); font-size: .78rem; font-weight: 700; margin-bottom: .45rem; }
.cat span { display: block; color: var(--ink-3); font-size: .82rem; line-height: 1.45; }

.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.tool-card {
  display: flex; align-items: center; gap: .7rem; padding: .8rem .9rem;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  color: var(--ink); box-shadow: var(--shadow-sm);
}
.tool-card:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); }
.tool-card i {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  font-style: normal; font-weight: 800; font-size: .95rem; flex-shrink: 0;
  background: var(--wash); color: var(--accent);
}
.tool-card div { min-width: 0; flex: 1; }
.tool-card b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: .87rem; font-weight: 700; line-height: 1.3;
}
.tool-card small { color: var(--ink-3); font-size: .75rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-card .chev { color: var(--ink-3); flex-shrink: 0; }

.a1 { --accent: var(--c-blue);   --wash: var(--w-blue); }
.a2 { --accent: var(--c-violet); --wash: var(--w-violet); }
.a3 { --accent: var(--c-pink);   --wash: var(--w-pink); }
.a4 { --accent: var(--c-amber);  --wash: var(--w-amber); }
.a5 { --accent: var(--c-lime);   --wash: var(--w-lime); }
.a6 { --accent: var(--c-teal);   --wash: var(--w-teal); }
.a7 { --accent: var(--c-rose);   --wash: var(--w-rose); }
.a8 { --accent: var(--c-indigo); --wash: var(--w-indigo); }

.cta-band {
  background: var(--brand-grad); border-radius: var(--r-xl);
  padding: clamp(1.5rem, 3vw, 2.1rem);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; color: #fff;
}
.cta-band h2 { color: #fff; margin: 0 0 .25rem; font-size: clamp(1.2rem, 2.2vw, 1.55rem); }
.cta-band p { color: rgba(255, 255, 255, .9); margin: 0; font-size: .92rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.why-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.1rem; }
.why-item { display: flex; gap: .7rem; align-items: flex-start; }
.why-item i {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--wash); color: var(--accent); flex-shrink: 0; font-style: normal;
}
.why-item i svg { width: 19px; height: 19px; }
.why-item b { display: block; font-size: .92rem; }
.why-item small { color: var(--ink-3); font-size: .81rem; }

.rank-list { display: grid; gap: .4rem; }
.rank {
  display: flex; align-items: center; gap: .8rem; padding: .65rem .85rem;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  color: var(--ink); font-weight: 600; font-size: .9rem;
}
.rank:hover { text-decoration: none; border-color: var(--accent); }
.rank span {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--wash); color: var(--accent); font-size: .78rem; font-weight: 800; flex-shrink: 0;
}
.rank .chev { margin-left: auto; color: var(--ink-3); }

/* -------------------------------------------------------- page headers --- */

.breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .82rem; color: var(--ink-3); padding: 1rem 0 0; }
.breadcrumbs a { color: var(--ink-3); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current] { color: var(--ink-2); font-weight: 600; }

.page-hero {
  background: radial-gradient(ellipse 55% 100% at 20% 0%, var(--wash) 0%, transparent 65%), var(--bg);
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.page-head { padding-top: 1.1rem; }
.page-head h1 { margin-bottom: .5rem; }
.lead { font-size: 1.05rem; color: var(--ink-2); max-width: 62ch; margin: 0; }

/* -------------------------------------------------------------- tools ---- */

.tool-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: clamp(1rem, 2.5vw, 1.6rem); box-shadow: var(--shadow); margin-top: 1.5rem;
}
.tool-panel label { display: block; font-weight: 700; font-size: .86rem; margin-bottom: .45rem; }
.tool-panel textarea {
  width: 100%; padding: .85rem 1rem; font: inherit; font-size: 1rem;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--bg-soft); color: var(--ink); resize: vertical;
}
.tool-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: .6rem 0 1rem; flex-wrap: wrap; }
.tool-meta > span { font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tool-meta div { display: flex; gap: .45rem; }
.tool-meta button {
  border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--ink-2);
  border-radius: var(--r-sm); padding: .4rem .8rem; font: inherit; font-size: .82rem;
  font-weight: 600; cursor: pointer;
}
.tool-meta button:hover { border-color: var(--accent); color: var(--accent); }

.generator-toolbar { display: flex; gap: .5rem; margin-bottom: .7rem; flex-wrap: wrap; align-items: center; }
.generator-toolbar input {
  flex: 1; min-width: 150px; padding: .5rem .85rem; font: inherit; font-size: .85rem;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg-soft); color: var(--ink);
}
.generator-toolbar button {
  border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--ink-2);
  border-radius: 999px; padding: .45rem .95rem; font: inherit; font-size: .82rem;
  font-weight: 600; cursor: pointer;
}
.generator-toolbar button:hover, .generator-toolbar button.is-active { border-color: var(--accent); color: var(--accent); }
.style-count { font-size: .78rem; color: var(--ink-3); margin-left: auto; }

.style-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.style-filters button {
  border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--ink-2);
  border-radius: 999px; padding: .38rem .9rem; font: inherit; font-size: .81rem;
  font-weight: 600; cursor: pointer; text-transform: capitalize;
}
.style-filters button:hover { border-color: var(--accent); color: var(--accent); }
.style-filters button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.results { display: grid; gap: .55rem; }
.result-card {
  position: relative; display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: .75rem; padding: .75rem 1rem .75rem 2.4rem;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-soft);
}
.result-card:hover { border-color: var(--accent); }
.result-card .style-name { display: block; font-size: .72rem; color: var(--ink-3); font-weight: 700; margin-bottom: .1rem; }
.result-card .generated { font-size: 1.12rem; line-height: 1.5; word-break: break-word; overflow-wrap: anywhere; }
.result-card .favorite {
  position: absolute; left: .65rem; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--c-amber); font-size: 1.05rem;
  cursor: pointer; padding: .2rem; line-height: 1;
}
.copy-btn {
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink-2);
  border-radius: var(--r-sm); padding: .45rem .9rem; font: inherit; font-size: .82rem;
  font-weight: 700; cursor: pointer; white-space: nowrap;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { background: var(--c-lime); border-color: var(--c-lime); color: #fff; }

.utility-controls { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0; }
.utility-controls button {
  border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--ink-2);
  border-radius: var(--r-sm); padding: .42rem .85rem; font: inherit; font-size: .82rem;
  font-weight: 600; cursor: pointer;
}
.utility-controls button:hover { border-color: var(--accent); color: var(--accent); }
.utility-controls input {
  padding: .45rem .8rem; font: inherit; font-size: .85rem; flex: 1; min-width: 140px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg-soft); color: var(--ink);
}
.stats-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; margin: 1rem 0; }
.stats-grid > div { background: var(--wash); border-radius: var(--r-sm); padding: .7rem .5rem; text-align: center; }
.stats-grid b { display: block; font-size: 1.15rem; font-weight: 800; color: var(--accent); }
.stats-grid span { font-size: .7rem; color: var(--ink-3); }

.symbol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; }
.symbol-tile {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .25rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--card); cursor: pointer; color: var(--ink); font: inherit;
}
.symbol-tile:hover { border-color: var(--accent); background: var(--wash); text-decoration: none; }
.symbol-tile > span { font-size: 1.6rem; line-height: 1; }
.symbol-tile small { font-size: .62rem; color: var(--ink-3); font-family: var(--mono); }
.symbol-tile.copied { background: var(--c-lime); border-color: var(--c-lime); color: #fff; }
.symbol-tile.copied small { color: rgba(255, 255, 255, .85); }

/* ------------------------------------------------------------- content --- */

.prose { max-width: 74ch; }
.prose h2 { margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-2); }
.prose ul, .prose ol { color: var(--ink-2); padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }

.answer-box {
  background: var(--wash); border-left: 4px solid var(--accent);
  border-radius: var(--r); padding: 1rem 1.25rem; font-size: 1.02rem;
  color: var(--ink); margin: 0 0 1.5rem;
}

.example-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .6rem; margin: 1.25rem 0; }
.example-strip figure { margin: 0; padding: .8rem 1rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r); }
.example-strip figcaption { font-size: .72rem; color: var(--ink-3); font-weight: 700; margin-bottom: .25rem; }
.example-strip p { margin: 0; font-size: 1.1rem; color: var(--ink); word-break: break-word; }

table.data { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .89rem; }
table.data caption { text-align: left; color: var(--ink-3); font-size: .82rem; padding-bottom: .6rem; }
table.data th, table.data td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
table.data th { font-weight: 700; color: var(--ink); background: var(--bg-soft); }
table.data td { color: var(--ink-2); }
table.data tbody tr:hover td { background: var(--bg-soft); }
.cov-full, .cov-partial, .cov-none { display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.cov-full { background: var(--w-lime); color: var(--c-lime); }
.cov-partial { background: var(--w-amber); color: var(--c-amber); }
.cov-none { background: var(--w-slate); color: var(--c-slate); }
.block-cell { font-family: var(--mono); font-size: .76rem; color: var(--ink-3); }

.faq { display: grid; gap: .5rem; max-width: 74ch; }
.faq details { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.faq summary {
  padding: .9rem 1.1rem; font-weight: 700; cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .95rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.25rem; font-weight: 400; line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .faq-body { padding: .9rem 1.1rem; color: var(--ink-2); font-size: .93rem; }
.faq .faq-body p { margin: 0; }

.related { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .5rem; }
.related a {
  border: 1px solid var(--line-strong); background: var(--bg-soft);
  border-radius: 999px; padding: .42rem .95rem; font-size: .84rem; font-weight: 600; color: var(--ink-2);
}
.related a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.notice { background: var(--w-amber); border: 1px solid var(--line); border-radius: var(--r); padding: .75rem 1rem; font-size: .87rem; color: var(--ink-2); margin: 1rem 0; }
.reviewed { font-size: .82rem; color: var(--ink-3); }

.article { max-width: 74ch; padding-bottom: 2rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .7rem; }
.card {
  display: block; padding: 1rem 1.1rem; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm);
}
.card:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); }
.card strong { display: block; font-size: .94rem; margin-bottom: .2rem; }
.card span { display: block; font-size: .81rem; color: var(--ink-3); line-height: 1.45; }
.card .card-sample { font-size: 1.05rem; color: var(--accent); margin-bottom: .35rem; display: block; }

.detail-grid { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 1rem 0; }
.detail-grid dt { font-weight: 700; font-size: .84rem; color: var(--ink-3); }
.detail-grid dd { margin: 0; font-family: var(--mono); font-size: .86rem; }
.unicode-char { font-size: 4.5rem; line-height: 1.2; text-align: center; padding: 1rem; background: var(--wash); border-radius: var(--r-lg); margin-bottom: 1rem; }

.error-page { text-align: center; padding: clamp(3rem, 9vw, 6rem) 0; }
.error-code {
  font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; line-height: 1;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; margin-bottom: .5rem;
}

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

.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: clamp(2rem, 4vw, 3rem) 0 1.5rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: 1.75rem; margin-bottom: 1.75rem; }
.footer-grid h3 { font-size: .85rem; margin-bottom: .7rem; }
.footer-grid nav { display: grid; gap: .35rem; }
.footer-grid nav a { color: var(--ink-3); font-size: .85rem; }
.footer-grid nav a:hover { color: var(--brand-1); }
.footer-about p { color: var(--ink-3); font-size: .85rem; max-width: 32ch; margin: .75rem 0 0; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--ink-3); font-size: .81rem; }
.footer-bottom nav { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --------------------------------------------------------- responsive ---- */

@media (max-width: 1080px) {
  .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.5rem; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-search { width: 200px; }
}

@media (max-width: 900px) {
  .nav-toggle, .search-toggle { display: grid; }
  .site-nav {
    position: fixed; inset: 68px 0 auto; margin: 0; flex-direction: column;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .75rem 1.25rem 1.25rem; gap: .1rem; display: none;
    box-shadow: var(--shadow-lg); max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .7rem .5rem; font-size: 1rem; }
  .site-search { display: none; }
  .site-search.open { display: block; position: fixed; left: 1.25rem; right: 1.25rem; top: 78px; width: auto; z-index: 70; }
  .hero-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 1.75rem, var(--shell)); }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .why-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .brand-tag { display: none; }
  .result-card { grid-template-columns: 1fr; padding-left: 2.3rem; }
  .result-card .copy-btn { justify-self: start; }
  .demo-row { grid-template-columns: 1fr auto; }
  .demo-row .label { grid-column: 1 / -1; }
  .example-strip { grid-template-columns: 1fr; }
  table.data { font-size: .82rem; }
  table.data th, table.data td { padding: .5rem .45rem; }
  .block-cell, table.data th:nth-child(5) { display: none; }
}

@media (max-width: 430px) {
  .stat-strip, .cat-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-row { gap: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .site-header, .site-footer, .tool-panel, .related, .cta-band { display: none; }
  body { color: #000; background: #fff; }
}

/* ==========================================================================
   Admin panel
   The admin views predate the current design system and use their own class
   names. Rather than rewriting every form, these rules adopt them.
   ========================================================================== */

.site-header nav:not(.site-nav) { display: flex; flex-wrap: wrap; gap: .15rem; margin-left: auto; }
.site-header nav:not(.site-nav) a {
  color: var(--ink-2); font-weight: 600; font-size: .88rem;
  padding: .45rem .65rem; border-radius: var(--r-sm);
}
.site-header nav:not(.site-nav) a:hover { background: var(--bg-tint); color: var(--brand-1); text-decoration: none; }

.big-input,
.admin-form input[type="text"], .admin-form input[type="email"],
.admin-form input[type="password"], .admin-form input[type="url"],
.admin-form input[type="number"], .admin-form input[type="date"],
.admin-form select, .admin-form textarea,
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; padding: .65rem .9rem; font: inherit; font-size: .95rem;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--bg-soft); color: var(--ink); margin-bottom: .9rem;
}
.admin-form textarea, .form-grid textarea { min-height: 140px; resize: vertical; }

.admin-form label, .form-grid label {
  display: block; font-weight: 700; font-size: .85rem; margin-bottom: .35rem;
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.form-grid .block { grid-column: 1 / -1; }

.check { display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; font-weight: 600; font-size: .88rem; }
.check input { width: auto; margin: 0; }

button[type="submit"], .admin-form button, .table-wrap button {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .65rem 1.25rem; border: 0; border-radius: var(--r);
  font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer;
  background: var(--brand-grad); color: #fff;
}
button[type="submit"]:hover { filter: brightness(1.06); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); margin: 1.25rem 0; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .89rem; min-width: 620px; }
.table-wrap th, .table-wrap td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); }
.table-wrap th { background: var(--bg-soft); font-weight: 700; white-space: nowrap; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td code { font-family: var(--mono); font-size: .82rem; }

@media (max-width: 680px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .site-header nav:not(.site-nav) { width: 100%; margin-left: 0; }
}

/* --------------------------------------------------- task-profile UI ----- */

.suggest-strip {
  background: var(--wash); border: 1px solid var(--line);
  border-radius: var(--r); padding: .85rem 1rem; margin: 0 0 1rem;
}
.suggest-head { margin: 0 0 .6rem; font-size: .84rem; }
.suggest-head strong { display: block; color: var(--ink); }
.suggest-head span { color: var(--ink-3); font-size: .8rem; }
.suggest-items { display: flex; flex-wrap: wrap; gap: .4rem; }
.suggest-chip {
  min-width: 40px; height: 38px; padding: 0 .6rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink); font: inherit; font-size: 1.05rem;
  cursor: pointer; line-height: 1;
}
.suggest-chip:hover { border-color: var(--accent); background: var(--bg-tint); }
.suggest-chip.added { background: var(--c-lime); border-color: var(--c-lime); color: #fff; }

.callout {
  background: var(--wash); border-left: 4px solid var(--accent);
  border-radius: var(--r); padding: 1rem 1.25rem; margin: 1.5rem 0;
}
.callout h2 { font-size: 1.02rem; margin: 0 0 .4rem; }
.callout p { margin: 0; color: var(--ink-2); font-size: .94rem; }

.cost-badge { font-variant-numeric: tabular-nums; }

/* ------------------------------------------- 2.4 browse & convert views -- */

.browse-bar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.browse-sample { flex: 1; min-width: 220px; }
.browse-sample input {
  width: 100%; padding: .7rem 1rem; font: inherit; font-size: 1rem;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--bg-soft); color: var(--ink);
}
.browse-meta { display: flex; align-items: center; gap: .6rem; }
.browse-meta span { font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.browse-meta button {
  border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--ink-2);
  border-radius: var(--r-sm); padding: .45rem .9rem; font: inherit; font-size: .82rem;
  font-weight: 600; cursor: pointer;
}
.browse-meta button:hover { border-color: var(--accent); color: var(--accent); }

.style-gallery { display: grid; gap: 1.75rem; }
.gallery-group { scroll-margin-top: 84px; }
.gallery-group h2 {
  font-size: 1.02rem; margin: 0 0 .7rem; display: flex; align-items: center; gap: .5rem;
}
.gallery-group h2::before {
  content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--accent);
}
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .6rem;
}
.style-card {
  display: flex; flex-direction: column; gap: .4rem;
  padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--card); box-shadow: var(--shadow-sm);
}
.style-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.style-card .generated {
  font-size: 1.1rem; line-height: 1.45; word-break: break-word; overflow-wrap: anywhere;
  min-height: 1.6em; color: var(--ink);
}
.style-card .copy-btn { align-self: flex-start; }

.convert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: .9rem; }
.convert-side { display: flex; flex-direction: column; }
.convert-side textarea {
  width: 100%; padding: .85rem 1rem; font: inherit; font-size: 1rem;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--bg-soft); color: var(--ink); resize: vertical;
}
.convert-output {
  flex: 1; min-height: 8.5rem; padding: .85rem 1rem; font-size: 1.05rem; line-height: 1.55;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--wash); color: var(--ink); word-break: break-word; overflow-wrap: anywhere;
}
.convert-style { font-weight: 600; color: var(--accent); font-size: .8rem; margin-left: .35rem; }
.convert-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: .6rem; margin-top: .5rem;
}
.convert-meta span { font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.convert-meta button {
  border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--ink-2);
  border-radius: var(--r-sm); padding: .45rem .9rem; font: inherit; font-size: .82rem;
  font-weight: 600; cursor: pointer;
}
.convert-meta button:hover { border-color: var(--accent); color: var(--accent); }
.convert-protect { margin: 0 0 1rem; font-size: .87rem; }
.convert-hint { font-size: .86rem; color: var(--ink-3); margin: 0 0 .6rem; }
.convert-styles .result-card.is-active { border-color: var(--accent); background: var(--wash); }

@media (max-width: 900px) {
  .convert-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .browse-bar { flex-direction: column; align-items: stretch; }
  .browse-meta { justify-content: space-between; }
}
