:root {
  --ink: #17213d;
  --muted: #61708a;
  --paper: #f7f8f3;
  --surface: #ffffff;
  --line: #dfe4df;
  --violet: #5b4bd8;
  --violet-dark: #3b2cb2;
  --coral: #f26b5e;
  --teal: #0f8c84;
  --yellow: #ffd66b;
  --shadow: 0 14px 40px rgba(23, 33, 61, 0.09);
  --radius: 22px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
button, select, input { font: inherit; }
a { color: inherit; }
img, svg { max-width: 100%; }
.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 100;
  padding: 10px 14px; border-radius: 10px; color: white; background: var(--ink);
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid rgba(223, 228, 223, .88);
  background: rgba(247, 248, 243, .95);
  backdrop-filter: blur(16px);
}
.nav-wrap, .page-shell { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.nav-wrap { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; text-decoration: none; letter-spacing: -.03em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--violet); box-shadow: 4px 4px 0 var(--yellow); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .94rem; font-weight: 700; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: white; }
.menu-button { display: none; border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 10px; padding: 8px 12px; font-weight: 750; }

.hero { padding: 72px 0 38px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 220px; height: 220px; border: 34px solid var(--yellow); border-radius: 50%; right: -95px; top: 16px; opacity: .7; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 64px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--violet-dark); font-size: .83rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--coral); }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.045em; }
h1 { margin: 0; max-width: 790px; font-size: clamp(2.75rem, 6vw, 5.45rem); }
.hero .accent { color: var(--violet); }
.lede { max-width: 700px; margin: 22px 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.24rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 0; border-radius: 13px; font-weight: 850; text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: white; background: var(--violet); box-shadow: 0 9px 0 rgba(59, 44, 178, .15); }
.button.primary:hover { background: var(--violet-dark); }
.button.secondary { color: var(--ink); background: white; border: 1px solid var(--line); }
.button.ghost { min-height: 40px; padding: 0 14px; color: var(--violet-dark); background: #eeecff; }
.hero-card { position: relative; min-height: 360px; padding: 28px; border: 1px solid var(--line); border-radius: 32px; background: var(--surface); box-shadow: var(--shadow); transform: rotate(2deg); }
.hero-card::after { content: ""; position: absolute; right: 24px; bottom: 20px; width: 88px; height: 12px; border-radius: 99px; background: var(--coral); transform: rotate(-8deg); }
.specimen { border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-bottom: 14px; background: #fbfcf9; }
.specimen:nth-child(2) { margin-left: 28px; border-left: 5px solid var(--teal); }
.specimen strong { display: block; font-size: 1.17rem; letter-spacing: -.02em; }
.specimen span { color: var(--muted); font-size: .85rem; }

.section { padding: 72px 0; }
.section.compact { padding: 44px 0; }
.section.white { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 30px; }
.section-head h2 { margin: 0; max-width: 680px; font-size: clamp(2rem, 4vw, 3.25rem); }
.section-head p { max-width: 500px; margin: 0; color: var(--muted); }
.kicker { margin: 0 0 9px; color: var(--teal); text-transform: uppercase; letter-spacing: .09em; font-weight: 850; font-size: .78rem; }

.generator-shell { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: 26px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.controls { padding: 26px; position: sticky; top: 96px; }
.controls h2, .results-head h2 { margin: 0 0 8px; font-size: 1.55rem; }
.controls-intro { margin: 0 0 22px; color: var(--muted); font-size: .93rem; }
.field { margin-bottom: 17px; }
.field label { display: block; margin-bottom: 7px; font-weight: 800; font-size: .9rem; }
.field select, .field input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #cdd5d0; border-radius: 11px; color: var(--ink); background: #fff; }
.controls .button { width: 100%; margin-top: 6px; }
.microcopy { margin: 14px 0 0; color: var(--muted); font-size: .78rem; }
.results-panel { padding: 26px; min-height: 500px; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.results-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.name-card { position: relative; padding: 18px; min-height: 190px; border: 1px solid var(--line); border-radius: 16px; background: #fbfcf9; }
.name-card h3 { margin: 5px 44px 13px 0; font-size: 1.24rem; }
.name-card .tag { display: inline-flex; padding: 4px 8px; border-radius: 99px; color: var(--violet-dark); background: #eeecff; font-weight: 800; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.copy-button { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; cursor: pointer; }
.name-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.name-meta span { color: var(--muted); font-size: .76rem; }
.name-meta strong { display: block; color: var(--ink); font-size: .86rem; }
.result-note { margin: 12px 0 0; color: var(--muted); font-size: .78rem; }
.empty-state { grid-column: 1 / -1; padding: 70px 20px; text-align: center; color: var(--muted); }

.theme-grid, .card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.directory-tools { display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(200px, .8fr) auto; gap: 14px; align-items: end; margin: -4px 0 24px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.directory-field label { display: block; margin-bottom: 6px; font-size: .82rem; font-weight: 800; }
.directory-field input, .directory-field select { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #cdd5d0; border-radius: 11px; color: var(--ink); background: #fff; }
.directory-count { margin: 0; padding: 11px 2px; color: var(--muted); font-size: .88rem; white-space: nowrap; }
.directory-empty { margin: 22px 0 0; padding: 34px; border: 1px dashed #bdc7c1; border-radius: 16px; color: var(--muted); text-align: center; background: white; }
.theme-card, .content-card { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.theme-card:hover, .content-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.theme-card .icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 35px; border-radius: 13px; color: white; background: var(--violet); font-weight: 900; }
.theme-card:nth-child(2n) .icon { background: var(--teal); }
.theme-card:nth-child(3n) .icon { color: var(--ink); background: var(--yellow); }
.theme-card h3, .content-card h3 { margin: 0 0 8px; font-size: 1.35rem; }
.theme-card p, .content-card p { margin: 0; color: var(--muted); }
.theme-card .arrow { display: inline-block; margin-top: 22px; color: var(--violet); font-weight: 850; }

.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: method; }
.method-step { padding: 25px; border-top: 4px solid var(--coral); background: white; counter-increment: method; }
.method-step::before { content: "0" counter(method); display: block; color: var(--violet); font-size: .76rem; font-weight: 900; letter-spacing: .08em; }
.method-step h3 { margin: 10px 0 8px; }
.method-step p { margin: 0; color: var(--muted); }

.article-hero { padding: 64px 0 36px; border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 24px; color: var(--muted); font-size: .86rem; }
.breadcrumbs a { color: var(--violet-dark); }
.article-hero h1 { max-width: 880px; font-size: clamp(2.5rem, 5vw, 4.6rem); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 60px; align-items: start; }
.prose { max-width: 760px; }
.prose h2 { margin: 54px 0 16px; font-size: clamp(1.65rem, 3vw, 2.35rem); }
.prose h3 { margin: 30px 0 10px; font-size: 1.25rem; }
.prose p, .prose li { color: #42506a; }
.prose a { color: var(--violet-dark); }
.prose blockquote { margin: 26px 0; padding: 18px 22px; border-left: 5px solid var(--coral); background: white; font-size: 1.08rem; }
.aside-card { position: sticky; top: 100px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.aside-card h2 { margin: 0 0 14px; font-size: 1.2rem; }
.aside-card a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); text-decoration: none; font-weight: 700; font-size: .9rem; }
.aside-card a:hover { color: var(--violet); }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.metric { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.metric span { display: block; color: var(--muted); font-size: .77rem; }
.metric strong { font-size: 1.12rem; }
.risk-bar { height: 10px; margin-top: 12px; border-radius: 99px; background: #e8ece8; overflow: hidden; }
.risk-bar > span { display: block; height: 100%; background: var(--teal); }
.source-box { padding: 24px; border: 1px solid #d7d2ff; border-radius: 17px; background: #f1efff; }
.source-box h3 { margin-top: 0; }
.source-box p:last-child { margin-bottom: 0; }
.notice { padding: 18px 20px; border: 1px solid #efd28a; border-radius: 15px; background: #fff8df; color: #6f5410; }

.site-footer { margin-top: 72px; padding: 50px 0 26px; color: #d6dced; background: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 40px; }
.footer-brand { color: white; font-size: 1.3rem; font-weight: 850; }
.footer-grid h2 { margin: 0 0 12px; color: white; font-size: .95rem; letter-spacing: 0; }
.footer-grid p { max-width: 450px; color: #aeb9d2; }
.footer-links a { display: block; margin: 8px 0; color: #c7d0e3; text-decoration: none; }
.footer-links a:hover { color: white; text-decoration: underline; }
.footer-bottom { margin-top: 38px; padding-top: 20px; border-top: 1px solid #34405c; color: #9eabc6; font-size: .82rem; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; padding: 11px 16px; border-radius: 12px; color: white; background: var(--ink); box-shadow: var(--shadow); transform: translateY(90px); opacity: 0; transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 900px) {
  .hero-grid, .generator-shell, .article-layout { grid-template-columns: 1fr; }
  .hero-card { max-width: 560px; transform: none; }
  .controls { position: static; }
  .theme-grid, .card-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { gap: 20px; }
  .aside-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .directory-tools { grid-template-columns: 1fr 1fr; }
  .directory-count { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .nav-wrap, .page-shell { width: min(100% - 28px, var(--max)); }
  .menu-button { display: inline-flex; }
  .nav-links { display: none; position: absolute; left: 14px; right: 14px; top: 64px; padding: 12px; flex-direction: column; align-items: stretch; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .hero { padding-top: 48px; }
  h1 { font-size: 2.75rem; }
  .section { padding: 52px 0; }
  .section-head { align-items: start; flex-direction: column; gap: 12px; }
  .results-grid, .theme-grid, .card-grid, .method-grid, .metric-row { grid-template-columns: 1fr; }
  .results-panel, .controls { padding: 19px; }
  .results-head { align-items: start; flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: auto; }
  .directory-tools { grid-template-columns: 1fr; }
  .directory-count { grid-column: auto; }
}

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