:root {
  --ink: #15142c;
  --muted: #68677b;
  --paper: #fbfaff;
  --surface: #ffffff;
  --soft: #f1efff;
  --line: #ddd9f0;
  --primary: #6c4cff;
  --primary-dark: #4f31da;
  --lime: #d9ff75;
  --coral: #ff8c79;
  --cyan: #8ee9ff;
  --shadow: 0 24px 70px rgba(44, 30, 102, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }
.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 1000; top: 12px; left: 12px;
  padding: 10px 14px; border-radius: 10px;
  color: #fff; background: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: relative;
  z-index: 40;
  background: rgba(251, 250, 255, .92);
  border-bottom: 1px solid rgba(221, 217, 240, .8);
  backdrop-filter: blur(16px);
}
.header-row { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  width: 45px; height: 45px;
  display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 14px;
  color: #fff; background: var(--primary);
  font-size: 18px; font-weight: 900; letter-spacing: -1px;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-3deg);
}
.brand-copy { display: grid; line-height: 1; font-size: 17px; letter-spacing: -.3px; }
.brand-copy strong { font-weight: 850; }
.brand-copy span { margin-top: 3px; color: var(--muted); font-size: 13px; letter-spacing: 1.7px; text-transform: uppercase; }
.navigation { display: flex; align-items: center; gap: 6px; }
.navigation a {
  padding: 9px 13px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px; font-weight: 700;
  transition: color .2s, background .2s;
}
.navigation a:hover, .navigation a[aria-current="page"] { color: var(--primary-dark); background: var(--soft); }
.navigation .nav-more { margin-left: 5px; color: #fff; background: var(--ink); }
.navigation .nav-more:hover { color: #fff; background: var(--primary-dark); }
.menu-button {
  display: none; align-items: center; gap: 8px;
  border: 0; background: transparent; color: var(--ink); font-weight: 800;
}
.menu-lines, .menu-lines::before, .menu-lines::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; }
.menu-lines { position: relative; }
.menu-lines::before, .menu-lines::after { content: ""; position: absolute; left: 0; }
.menu-lines::before { top: -6px; }
.menu-lines::after { top: 6px; }

.breadcrumbs {
  display: flex; gap: 9px; align-items: center;
  padding-top: 22px;
  color: var(--muted); font-size: 13px;
  overflow: hidden; white-space: nowrap;
}
.breadcrumbs a { color: var(--primary-dark); font-weight: 750; text-decoration: none; }
.breadcrumbs span:last-child { overflow: hidden; text-overflow: ellipsis; }

.hero {
  position: relative;
  padding: 92px 0 72px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 11% 22%, rgba(142, 233, 255, .34), transparent 23%),
    radial-gradient(circle at 83% 18%, rgba(217, 255, 117, .35), transparent 22%),
    linear-gradient(180deg, #fbfaff 0%, #f5f2ff 100%);
  z-index: -2;
}
.hero::after {
  content: ""; position: absolute; z-index: -1;
  width: 420px; height: 420px; right: -260px; top: -220px;
  border: 1px solid rgba(108, 76, 255, .24); border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(108, 76, 255, .035), 0 0 0 140px rgba(108, 76, 255, .025);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); align-items: center; gap: 84px; }
.hero-copy { max-width: 760px; }
.eyebrow, .section-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--primary-dark);
  font-size: 12px; font-weight: 850; letter-spacing: 1.3px; text-transform: uppercase;
}
.eyebrow { padding: 8px 12px; border: 1px solid #d7d0ff; border-radius: 999px; background: rgba(255,255,255,.72); }
.hero h1 {
  max-width: 820px;
  margin: 23px 0 20px;
  font-size: clamp(44px, 6.1vw, 78px);
  line-height: .99; letter-spacing: -4.6px; font-weight: 880;
}
.hero-copy > p { max-width: 650px; margin: 0; color: var(--muted); font-size: clamp(18px, 2vw, 22px); line-height: 1.55; }
.hero-cta, .primary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  margin-top: 30px; padding: 14px 20px;
  border: 2px solid var(--ink); border-radius: 13px;
  color: #fff; background: var(--primary);
  box-shadow: 5px 5px 0 var(--ink);
  text-decoration: none; font-weight: 850;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.hero-cta:hover, .primary-button:hover { background: var(--primary-dark); transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
.hero-preview { position: relative; min-height: 300px; }
.hero-preview::before {
  content: ""; position: absolute; inset: 14% 5% 5% 8%;
  border: 2px solid var(--ink); border-radius: 42% 58% 49% 51% / 55% 42% 58% 45%;
  background: var(--lime); transform: rotate(7deg);
  box-shadow: 13px 14px 0 rgba(21, 20, 44, .96);
}
.preview-pill {
  position: absolute; z-index: 2;
  display: block; padding: 13px 18px;
  border: 2px solid var(--ink); border-radius: 12px;
  background: #fff; box-shadow: 5px 5px 0 var(--ink);
  font-family: Georgia, serif; font-size: 25px; line-height: 1.1;
}
.pill-one { top: 43px; left: 7px; transform: rotate(-6deg); }
.pill-two { top: 121px; right: 0; color: #fff; background: var(--primary); transform: rotate(3deg); }
.pill-three { bottom: 27px; left: 38px; background: var(--coral); transform: rotate(-2deg); }
.spark { position: absolute; z-index: 3; font-size: 34px; font-weight: 900; }
.spark-one { top: 12px; right: 37px; color: var(--primary); }
.spark-two { bottom: 1px; right: 28px; color: #e4654f; }

.generator-wrap { position: relative; z-index: 4; margin-top: -24px; }
.tool-card {
  padding: 34px;
  border: 2px solid var(--ink); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: 10px 11px 0 var(--ink), var(--shadow);
}
.tool-heading, .results-tools, .symbol-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.tool-heading > div, .results-tools > div, .symbol-heading { display: flex; align-items: center; gap: 12px; }
.tool-step {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  flex: 0 0 36px;
  border-radius: 50%; color: #fff; background: var(--ink);
  font-size: 11px; font-weight: 900; letter-spacing: .6px;
}
.tool-heading h2, .results-tools h2, .symbol-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.7px; }
.privacy-note { color: #487119; font-size: 12px; font-weight: 800; }
.privacy-note span { color: #70ad2f; }
.input-shell {
  position: relative;
  margin-top: 18px;
  border: 2px solid var(--ink); border-radius: var(--radius-md);
  background: #fff;
  transition: border .2s, box-shadow .2s;
}
.input-shell:focus-within { border-color: var(--primary); box-shadow: 0 0 0 5px rgba(108,76,255,.12); }
#userText {
  display: block; width: 100%; min-height: 112px; resize: vertical;
  padding: 19px 21px 52px;
  border: 0; outline: 0; border-radius: inherit;
  color: var(--ink); background: transparent;
  font-size: clamp(20px, 2.8vw, 28px); line-height: 1.35; font-weight: 650;
}
#userText::placeholder { color: #a09eae; font-weight: 500; }
.input-actions {
  position: absolute; left: 17px; right: 17px; bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.char-count { margin-right: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.text-action {
  padding: 5px 9px; border: 0; border-radius: 8px;
  color: var(--primary-dark); background: var(--soft); cursor: pointer;
  font-size: 12px; font-weight: 800;
}
.text-action:hover { background: #e2ddff; }
.results-tools { margin-top: 32px; }
.style-search {
  width: min(260px, 100%); display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #faf9ff;
}
.style-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,76,255,.1); }
.style-search > span { color: var(--muted); font-size: 20px; line-height: 1; }
.style-search input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.filter-chips { display: flex; gap: 8px; margin-top: 17px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
.filter-chip {
  flex: 0 0 auto; padding: 8px 13px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); background: #fff; cursor: pointer;
  font-size: 12px; font-weight: 800;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.filter-chip[aria-pressed="true"] { border-color: var(--ink); color: #fff; background: var(--ink); }
.results-summary { margin: 18px 0 12px; color: var(--muted); font-size: 13px; }
.output-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.font-card {
  min-width: 0; min-height: 165px;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: 17px;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: #fff;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.font-card:hover { transform: translateY(-2px); border-color: #bdb4f5; box-shadow: 0 12px 28px rgba(43, 29, 102, .09); }
.font-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.font-name { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .9px; text-transform: uppercase; }
.font-category { padding: 3px 7px; border-radius: 999px; color: var(--primary-dark); background: var(--soft); font-size: 10px; font-weight: 800; }
.font-preview {
  max-width: 100%; margin: 14px 0; overflow-wrap: anywhere;
  color: var(--ink); font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif;
  font-size: clamp(19px, 2.1vw, 25px); line-height: 1.35;
}
.copy-btn {
  justify-self: end;
  min-width: 92px; padding: 8px 13px;
  border: 1px solid var(--ink); border-radius: 10px;
  color: var(--ink); background: var(--lime); cursor: pointer;
  font-size: 12px; font-weight: 900;
  transition: transform .15s, background .15s;
}
.copy-btn:hover { transform: translateY(-1px); background: #caff3f; }
.copy-btn.copied { color: #fff; background: var(--primary); }
.copy-btn:disabled { opacity: .55; cursor: wait; }
.empty-results { grid-column: 1 / -1; padding: 42px 20px; border: 1px dashed var(--line); border-radius: var(--radius-md); text-align: center; color: var(--muted); }

.symbol-section { margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--line); }
.symbol-groups { display: grid; gap: 16px; margin-top: 18px; }
.symbol-group { padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #faf9ff; }
.symbol-group h3 { margin: 0 0 11px; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; }
.symbol-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.symbol-button {
  min-width: 42px; min-height: 42px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); background: #fff; cursor: pointer; font-size: 20px;
}
.symbol-button:hover { border-color: var(--ink); background: var(--lime); }

.content-intro { padding: 112px 0 46px; text-align: center; }
.content-intro h2, .faq-heading h2, .related-heading h2 {
  max-width: 800px; margin: 12px auto 17px;
  font-size: clamp(34px, 4.4vw, 55px); line-height: 1.06; letter-spacing: -2.8px;
}
.content-intro > p, .related-heading > p { max-width: 760px; margin: 0 auto; color: var(--muted); font-size: 18px; }
.editorial-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; padding-bottom: 100px; }
.editorial-card {
  position: relative; overflow: hidden;
  padding: 32px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff;
}
.editorial-card:nth-child(even) { background: var(--soft); }
.card-number { color: var(--primary); font-size: 13px; font-weight: 900; letter-spacing: 1.2px; }
.editorial-card h2 { max-width: 470px; margin: 28px 0 13px; font-size: 28px; line-height: 1.18; letter-spacing: -1.2px; }
.editorial-card p { margin: 0; color: var(--muted); }
.editorial-card ul { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin: 24px 0 0; padding: 0; list-style: none; }
.editorial-card li { position: relative; padding-left: 17px; font-size: 14px; font-weight: 700; }
.editorial-card li::before { content: "✦"; position: absolute; left: 0; top: 0; color: var(--primary); }

.faq-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 75px; padding: 95px 0; border-top: 1px solid var(--line); }
.faq-heading h2 { margin-inline: 0; }
.faq-list { display: grid; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 21px 0; cursor: pointer; list-style: none;
  font-weight: 800; line-height: 1.35;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; border: 1px solid var(--line); border-radius: 50%; transition: transform .2s; }
.faq-list details[open] summary span { color: #fff; background: var(--primary); transform: rotate(45deg); }
.faq-list details p { margin: -5px 52px 21px 0; color: var(--muted); }

.related-section { padding: 92px 0 100px; color: #fff; background: var(--ink); }
.related-heading { text-align: center; }
.related-heading .section-kicker { color: var(--lime); }
.related-heading h2 { color: #fff; }
.related-heading > p { color: #b7b5ca; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 40px; }
.related-card {
  position: relative; min-height: 160px; display: grid; align-content: start;
  padding: 20px; border: 1px solid #3b3955; border-radius: var(--radius-md);
  color: #fff; background: #1c1b37; text-decoration: none;
  transition: transform .2s, border-color .2s, background .2s;
}
.related-card:hover { transform: translateY(-3px); border-color: var(--lime); background: #252346; }
.related-card > span { color: var(--lime); font-size: 11px; font-weight: 900; }
.related-card strong { margin-top: 25px; font-size: 18px; }
.related-card small { color: #aaa8be; font-size: 13px; }
.related-card b { position: absolute; right: 17px; top: 17px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #4d4a69; border-radius: 50%; }

.contact-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  margin-bottom: 95px; padding: 34px;
  border: 2px solid var(--ink); border-radius: var(--radius-lg); background: var(--lime); box-shadow: 8px 8px 0 var(--ink);
}
.contact-panel h2 { margin: 8px 0 0; font-size: clamp(23px, 3.4vw, 38px); letter-spacing: -1.5px; overflow-wrap: anywhere; }
.contact-panel p { margin: 7px 0 0; }
.contact-panel .primary-button { flex: 0 0 auto; margin: 0; }

.site-footer { padding: 65px 0 26px; color: #deddea; background: #0e0d21; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 70px; }
.brand-footer { color: #fff; }
.brand-footer .brand-copy span { color: #aaa8be; }
.footer-brand p { max-width: 360px; color: #aaa8be; }
.footer-grid nav { display: grid; align-content: start; gap: 8px; }
.footer-grid nav strong { margin-bottom: 8px; color: #fff; font-size: 13px; letter-spacing: .7px; text-transform: uppercase; }
.footer-grid nav a { width: fit-content; color: #aaa8be; text-decoration: none; font-size: 14px; }
.footer-grid nav a:hover { color: var(--lime); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; padding-top: 22px; border-top: 1px solid #2b2942; color: #77758b; font-size: 12px; }

.toast {
  position: fixed; z-index: 100; left: 50%; bottom: 24px;
  min-width: 150px; padding: 11px 16px;
  border: 2px solid var(--ink); border-radius: 12px;
  color: #fff; background: var(--primary); box-shadow: 4px 4px 0 var(--ink);
  text-align: center; font-weight: 850;
  opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.page-institutional .hero-grid, .page-contact .hero-grid, .page-legal .hero-grid, .page-not-found .hero-grid { grid-template-columns: 1fr; }
.page-institutional .hero-copy, .page-contact .hero-copy, .page-legal .hero-copy, .page-not-found .hero-copy { max-width: 900px; }
.page-institutional .hero h1, .page-contact .hero h1, .page-legal .hero h1, .page-not-found .hero h1 { max-width: 980px; }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (max-width: 900px) {
  .menu-button { display: inline-flex; }
  .navigation {
    position: absolute; top: calc(100% + 1px); left: 20px; right: 20px;
    display: none; align-items: stretch; flex-direction: column; gap: 3px;
    padding: 12px; border: 1px solid var(--line); border-radius: 16px;
    background: #fff; box-shadow: var(--shadow);
  }
  .navigation.is-open { display: flex; }
  .navigation a { padding: 12px 13px; }
  .navigation .nav-more { margin-left: 0; text-align: center; }
  .hero { padding: 70px 0 65px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { text-align: center; margin-inline: auto; }
  .hero-copy > p { margin-inline: auto; }
  .hero-preview { width: min(450px, 100%); margin-inline: auto; }
  .output-grid { grid-template-columns: 1fr; }
  .faq-section { grid-template-columns: 1fr; gap: 32px; }
  .related-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 30px; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .header-row { min-height: 70px; }
  .brand-mark { width: 39px; height: 39px; border-radius: 11px; box-shadow: 3px 3px 0 var(--ink); }
  .brand-copy { font-size: 15px; }
  .brand-copy span { font-size: 10px; }
  .menu-button > span:last-child { display: none; }
  .hero { padding-top: 57px; }
  .hero h1 { letter-spacing: -2.8px; }
  .hero-preview { min-height: 245px; }
  .preview-pill { font-size: 20px; }
  .pill-two { top: 105px; }
  .generator-wrap { margin-top: -18px; }
  .tool-card { padding: 19px; border-radius: 21px; box-shadow: 6px 7px 0 var(--ink); }
  .tool-heading { align-items: flex-start; }
  .privacy-note { display: none; }
  .tool-heading h2, .results-tools h2, .symbol-heading h2 { font-size: 20px; }
  #userText { min-height: 105px; padding-inline: 16px; }
  .results-tools { align-items: flex-start; flex-direction: column; }
  .style-search { width: 100%; }
  .font-card { min-height: 150px; }
  .content-intro { padding: 86px 0 35px; }
  .content-intro h2, .faq-heading h2, .related-heading h2 { letter-spacing: -2px; }
  .editorial-grid { grid-template-columns: 1fr; padding-bottom: 75px; }
  .editorial-card { padding: 24px; }
  .editorial-card ul { grid-template-columns: 1fr; }
  .faq-section { padding: 72px 0; }
  .related-section { padding: 72px 0; }
  .related-grid { grid-template-columns: 1fr; }
  .related-card { min-height: 145px; }
  .contact-panel { align-items: stretch; flex-direction: column; padding: 24px; }
  .contact-panel .primary-button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
}
