/* ==========================================================================
   Cute Font Copy and Paste: stylesheet
   Structure: 1 tokens · 2 base · 3 layout · 4 header · 5 buttons & forms
   6 hero · 7 sections · 8 tool · 9 content pages · 10 footer · 11 utilities
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
@font-face {
  font-family: "Lora";
  src: url("/assets/fonts/lora-latin.woff") format("woff");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* colour */
  --bg: #fff9f5;
  --surface: #ffffff;
  --ink: #2b2030;
  --ink-soft: #5e5163;
  --line: #eedfe3;
  --line-strong: #d4c0c8;
  --control: #85748c; /* form-field borders: 3:1 contrast against white */
  --rose: #d6336c;
  --rose-dark: #b52459;
  --rose-soft: #ffe6ee;
  --rose-ink: #8e1d49;
  --violet: #5b3fd0;
  --violet-soft: #eeeaff;
  --butter: #fff0b3;
  --mint: #ddf6ea;
  --mint-ink: #0f6b43;
  --danger: #b3261e;
  --danger-soft: #fde8e6;

  /* type */
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Lora", Georgia, "Times New Roman", serif;
  --font-glyph: system-ui, "Segoe UI Symbol", "Apple Symbols", "Noto Sans Math", "Noto Sans Symbols 2", "Noto Sans Symbols",
    "Noto Sans CJK JP", "Hiragino Sans", "Yu Gothic", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;

  /* shape */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --pill: 999px;

  /* space (4px base) */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4.5rem;

  --container: 70rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 4rem;
  --shadow: 0 1px 2px rgba(43, 32, 48, 0.06), 0 6px 18px rgba(43, 32, 48, 0.05);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* 2. Base ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s3);
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.2rem + 4vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); }
h3 { font-size: 1.25rem; line-height: 1.3; }

p { margin: 0 0 var(--s4); text-wrap: pretty; }
ul, ol { margin: 0 0 var(--s4); padding-left: 1.25rem; }
li { margin-bottom: var(--s2); }
img, svg { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }
strong { font-weight: 650; }

a {
  color: var(--violet);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}
a:hover { color: #4429b0; }

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--rose-soft); color: var(--rose-ink); }

[hidden] { display: none !important; }

/* 3. Layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.container--narrow { max-width: calc(48rem + var(--gutter) * 2); }

.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 40rem; margin-bottom: var(--s6); }
.section-head p { color: var(--ink-soft); font-size: 1.125rem; margin-bottom: 0; }
.eyebrow {
  display: inline-block;
  margin: 0 0 var(--s3);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--rose-ink);
}

.skip-link {
  position: absolute;
  left: var(--s4);
  top: -4rem;
  z-index: 100;
  padding: var(--s3) var(--s4);
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: var(--s3); color: #fff; }

/* 4. Header and navigation ------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 50;
  background: rgba(255, 249, 245, 0.96);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: var(--s4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-mark { flex: none; width: 2.1rem; height: 2.1rem; display: block; }
.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  line-height: 1.1;
  margin-top: 0.12rem;
}
.brand-text { display: block; line-height: 1.05; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.nav-toggle .bar,
.nav-toggle .bar::before,
.nav-toggle .bar::after {
  display: block;
  width: 1.4rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.nav-toggle .bar { position: relative; }
.nav-toggle .bar::before,
.nav-toggle .bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bar::before { top: -7px; }
.nav-toggle .bar::after { top: 7px; }
.site-header.is-open .nav-toggle .bar { background: transparent; }
.site-header.is-open .nav-toggle .bar::before { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .nav-toggle .bar::after { transform: translateY(-7px) rotate(-45deg); }

.nav { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li { margin: 0; }
.nav a {
  display: block;
  padding: 0.85rem var(--s4);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--r-sm);
}
.nav a:hover { background: var(--rose-soft); color: var(--rose-ink); }
.nav a[aria-current="page"] { background: var(--rose-soft); color: var(--rose-ink); }

/* mobile panel */
@media (max-width: 47.99rem) {
  .site-header.is-open .nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: var(--s3) var(--gutter) var(--s5);
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 24px -18px rgba(43, 32, 48, 0.25);
    animation: nav-in 0.2s var(--ease);
  }
  .nav a { padding-block: 0.95rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav li:last-child a { border-bottom: 0; }
}
@keyframes nav-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (min-width: 48rem) {
  .nav-toggle { display: none; }
  .nav { display: block; }
  .nav ul { display: flex; gap: var(--s1); }
  .nav a { padding: 0.5rem 0.9rem; border-radius: var(--pill); font-size: 0.98rem; }
}

/* 5. Buttons, chips and forms ---------------------------------------------- */
.btn {
  --btn-bg: var(--rose);
  --btn-fg: #fff;
  --btn-bd: var(--rose);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.65rem 1.4rem;
  border: 2px solid var(--btn-bd);
  border-radius: var(--pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s var(--ease);
}
.btn:hover { --btn-bg: var(--rose-dark); --btn-bd: var(--rose-dark); color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-strong); }
.btn--outline:hover { --btn-bg: var(--rose-soft); --btn-fg: var(--rose-ink); --btn-bd: var(--rose); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink-soft); --btn-bd: transparent; font-weight: 600; }
.btn--ghost:hover { --btn-bg: var(--rose-soft); --btn-fg: var(--rose-ink); --btn-bd: transparent; }
.btn--sm { min-height: 2.5rem; padding: 0.4rem 1rem; font-size: 0.92rem; }
.btn--light { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }
.btn--light:hover { --btn-bg: var(--rose-soft); --btn-fg: var(--rose-ink); --btn-bd: var(--rose-soft); }
.btn.is-copied { --btn-bg: var(--mint-ink); --btn-bd: var(--mint-ink); --btn-fg: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--pill);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s var(--ease);
}
.icon-btn svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.icon-btn:hover { background: var(--rose-soft); color: var(--rose-ink); }
.icon-btn[aria-pressed="true"] { color: var(--rose); }
.icon-btn[aria-pressed="true"] svg { fill: currentColor; }
.icon-btn[aria-pressed="true"]:active { transform: scale(0.88); }

label, .label { display: block; font-weight: 650; font-size: 0.95rem; margin-bottom: var(--s2); }
.hint { font-size: 0.875rem; color: var(--ink-soft); margin: var(--s2) 0 0; }

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--control);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 6rem; }
input::placeholder, textarea::placeholder { color: #7d7082; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-soft); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 4px var(--violet-soft);
}
select {
  appearance: none;
  padding-right: 2.6rem;
  background-image: url("/assets/img/chevron.svg");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 0.9rem;
}
[aria-invalid="true"] { border-color: var(--danger); }
.field { margin-bottom: var(--s5); }
.field-error { margin: var(--s2) 0 0; font-size: 0.9rem; font-weight: 600; color: var(--danger); }

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.35rem 1rem;
  border: 2px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--rose); color: var(--rose-ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.tag {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: var(--pill);
  background: var(--butter);
  color: #5c4500;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* 6. Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(214, 51, 108, 0.16) 1.2px, transparent 1.6px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  pointer-events: none;
}
.hero .container { position: relative; display: grid; gap: var(--s7); align-items: center; }
@media (min-width: 62rem) {
  .hero .container { grid-template-columns: 1.1fr 0.9fr; gap: var(--s8); }
}
.hero-badges { display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0; margin: 0 0 var(--s5); list-style: none; }
.hero-badges li {
  margin: 0;
  padding: 0.3rem 0.85rem;
  border-radius: var(--pill);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.hero h1 { margin-bottom: var(--s4); }
.squiggle {
  color: var(--rose);
  background: url("/assets/img/squiggle.svg") no-repeat left bottom / 100% 0.45em;
  padding-bottom: 0.18em;
}
.lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); color: var(--ink-soft); max-width: 36rem; margin-bottom: var(--s5); }

.demo {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: var(--shadow);
}
.demo-title { margin: 0 0 var(--s3); font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; }
.demo textarea { min-height: 3.2rem; height: 3.2rem; resize: none; font-size: 1.05rem; }
.demo .results { margin-top: var(--s4); gap: var(--s2); }
.demo .result { padding: 0.65rem 0.75rem 0.65rem 1rem; }
.demo .result-text { font-size: 1.15rem; }
.demo-foot { margin: var(--s4) 0 0; font-size: 0.95rem; font-weight: 600; }

/* 7. Home sections --------------------------------------------------------- */
.families { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.families li { margin: 0; border-bottom: 1px solid var(--line-strong); }
.family {
  display: grid;
  gap: var(--s2) var(--s5);
  align-items: center;
  padding: var(--s4) var(--s3);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s;
}
.family:hover { background: var(--rose-soft); color: var(--ink); }
.family-sample { font-family: var(--font-glyph); font-size: 1.5rem; line-height: 1.3; overflow-wrap: anywhere; }
.family-name { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }
.family-desc { display: block; color: var(--ink-soft); font-size: 0.97rem; line-height: 1.5; }
.family-go { font-weight: 700; color: var(--rose-ink); white-space: nowrap; font-size: 0.95rem; }
@media (min-width: 48rem) {
  .family { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto; padding: var(--s4) var(--s5); }
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s6); counter-reset: step; }
.steps li { position: relative; margin: 0; padding-top: var(--s4); border-top: 2px solid var(--ink); counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--rose);
  margin-bottom: var(--s3);
}
.steps h3 { margin-bottom: var(--s2); }
.steps p { margin: 0; color: var(--ink-soft); }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s6) var(--s7); } }

.platforms { margin: 0; display: grid; border-top: 1px solid var(--line-strong); }
.platforms > div { display: grid; gap: var(--s1) var(--s6); padding: var(--s4) 0; border-bottom: 1px solid var(--line-strong); }
.platforms dt { font-weight: 700; }
.platforms dd { margin: 0; color: var(--ink-soft); }
@media (min-width: 48rem) { .platforms > div { grid-template-columns: 12rem 1fr; } }

.callout {
  padding: var(--s5);
  border-radius: var(--r);
  background: var(--butter);
  border-left: 6px solid var(--rose);
}
.callout h3 { margin-bottom: var(--s2); }
.callout ul { margin-bottom: 0; }
.callout li:last-child { margin-bottom: 0; }

.cta-band { background: var(--ink); color: #fff; text-align: center; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.cta-band h2 { color: #fff; margin-bottom: var(--s3); }
.cta-band p { color: #e9dfec; max-width: 34rem; margin: 0 auto var(--s5); font-size: 1.1rem; }
.cta-band .btn-row { justify-content: center; }
.cta-band :focus-visible { outline-color: #fff; }

/* 8. Tool ------------------------------------------------------------------ */
.tool-intro { padding-block: var(--s6) var(--s5); }
.tool-intro h1 { margin-bottom: var(--s3); }
.tool-intro .lead { margin-bottom: 0; }

.tool {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: clamp(1rem, 3vw, 1.75rem);
  box-shadow: var(--shadow);
  scroll-margin-top: 1rem;
}
.tool textarea { font-size: 1.15rem; min-height: 4.25rem; height: 4.25rem; resize: none; }
.input-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s2); }
.count { font-size: 0.875rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.count.is-full { color: var(--danger); font-weight: 700; }
.input-actions { display: flex; gap: var(--s1); margin-right: -0.5rem; }

.tabs {
  display: flex;
  gap: var(--s1);
  margin: var(--s5) 0 var(--s4);
  border-bottom: 2px solid var(--line);
  overflow-x: auto;
}
.tab {
  flex: none;
  min-height: 2.9rem;
  padding: 0.5rem 1.1rem;
  margin-bottom: -2px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.tab:hover { color: var(--rose-ink); background: var(--rose-soft); }
@media (max-width: 30rem) { .tabs { gap: 0; } .tab { flex: 1 1 auto; padding-inline: 0.4rem; font-size: 0.93rem; } }
.tab[aria-selected="true"] { color: var(--rose-ink); border-bottom-color: var(--rose); }
.tabpanel:focus-visible { outline-offset: 6px; }

.chips {
  display: flex;
  gap: var(--s2);
  margin: 0 calc(var(--gutter) * -1 / 2) var(--s3) 0;
  padding: 0 0 var(--s2);
  overflow-x: auto;
  scrollbar-width: thin;
}
@media (min-width: 48rem) { .chips { flex-wrap: wrap; overflow: visible; margin-right: 0; } }

.status { margin: 0 0 var(--s3); font-size: 0.92rem; color: var(--ink-soft); }
.empty-note {
  padding: var(--s5);
  border: 2px dashed var(--line-strong);
  border-radius: var(--r);
  text-align: center;
  color: var(--ink-soft);
}

.results { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.results:empty { min-height: 40rem; }
.result {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: 0;
  padding: 0.8rem 0.9rem 0.8rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.result:hover { border-color: var(--rose); box-shadow: 0 2px 10px rgba(214, 51, 108, 0.1); }
.result-main { flex: 1; min-width: 0; }
.result-top { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); margin-bottom: 0.15rem; }
.result-name { font-size: 0.8125rem; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.02em; }
.result-text {
  margin: 0;
  font-family: var(--font-glyph);
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}
.is-empty .result-text { opacity: 0.35; }
.result-actions { flex: none; display: flex; align-items: center; gap: var(--s1); }
.result .btn { min-width: 5.4rem; }
@media (max-width: 30rem) {
  .result { flex-wrap: wrap; padding-right: 0.7rem; }
  .result-main { flex-basis: 100%; }
  .result-actions { margin-left: auto; }
}

.tool-options { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s4); margin-bottom: var(--s4); }
.tool-options .field { margin: 0; flex: 1 1 14rem; }

.segmented { display: inline-flex; margin: 0; padding: 3px; border: 2px solid var(--line-strong); border-radius: var(--pill); }
.segmented legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.segmented label { position: relative; margin: 0; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: block;
  padding: 0.4rem 1rem;
  border-radius: var(--pill);
  font-size: 0.93rem;
  font-weight: 650;
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
}
.segmented input:checked + span { background: var(--ink); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: 2px; }

.symbol-group { margin-bottom: var(--s5); }
.symbol-group h3 { font-family: var(--font-body); font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: var(--s2); }
.symbol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(3rem, 1fr)); gap: var(--s2); }
.symbol-grid--wide { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.symbol {
  min-height: 3rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-glyph);
  font-size: 1.35rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.12s var(--ease);
}
.symbol-grid--wide .symbol { font-size: 1rem; white-space: nowrap; }
.symbol:hover { background: var(--rose-soft); border-color: var(--rose); }
.symbol:active { transform: scale(0.94); }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  z-index: 90;
  max-width: calc(100vw - 2rem);
  padding: 0.7rem 1.3rem;
  border-radius: var(--pill);
  background: var(--ink);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 8px 24px rgba(43, 32, 48, 0.3);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Below the tool: reference content */
.content-block { max-width: 48rem; }
.content-block > h2 { margin-top: 0; }
.how-list { padding-left: 1.4rem; }
.how-list li { padding-left: 0.3rem; margin-bottom: var(--s3); }

.table-wrap { overflow-x: auto; margin: 0 0 var(--s5); }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; background: var(--surface); }
caption { text-align: left; font-weight: 700; padding-bottom: var(--s2); }
th, td { padding: 0.75rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-strong); }
thead th { background: var(--ink); color: #fff; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }
tbody th { font-weight: 700; white-space: nowrap; }
.glyph-cell { font-family: var(--font-glyph); font-size: 1.1rem; }
@media (max-width: 47.99rem) {
  .stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack-table, .stack-table tbody, .stack-table tr, .stack-table th, .stack-table td { display: block; width: 100%; }
  .stack-table tr { padding: var(--s3) 0; border-bottom: 1px solid var(--line-strong); }
  .stack-table th, .stack-table td { padding: 0.2rem 0.2rem; border: 0; }
  .stack-table td::before { content: attr(data-label) ": "; font-weight: 700; color: var(--ink-soft); }
  .stack-table .glyph-cell::before { content: ""; }
}

.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  position: relative;
  padding: var(--s4) 2.5rem var(--s4) 0;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2.5px solid var(--rose);
  border-bottom: 2.5px solid var(--rose);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--rose-ink); }
.faq details > div { padding: 0 0 var(--s4); color: var(--ink-soft); }
.faq details > div p:last-child { margin-bottom: 0; }

/* 9. Content pages (about, contact, legal, 404) ---------------------------- */
.breadcrumb { margin: 0 0 var(--s4); font-size: 0.9rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; gap: 0.35rem; }
.breadcrumb li { display: flex; align-items: center; gap: 0.35rem; margin: 0; color: var(--ink-soft); }
.breadcrumb li + li::before { content: "\203A"; color: var(--line-strong); font-size: 1.1em; }
.breadcrumb a { color: var(--ink-soft); display: inline-block; padding: 0.35rem 0.15rem; margin: -0.35rem -0.15rem; }
.breadcrumb a:hover { color: var(--rose-ink); }

.page-head { padding-block: var(--s6) var(--s5); border-bottom: 1px solid var(--line); background: var(--surface); }
.page-head h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.1rem); margin-bottom: var(--s3); }
.page-head .lead { margin-bottom: 0; }
.updated { display: inline-block; margin: var(--s4) 0 0; padding: 0.25rem 0.8rem; border-radius: var(--pill); background: var(--rose-soft); color: var(--rose-ink); font-size: 0.85rem; font-weight: 700; }

.page-body { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }
.prose { max-width: 46rem; }
.prose h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.85rem); margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.prose h2:first-child, .prose .toc + h2 { margin-top: var(--s6); }
.prose h3 { margin-top: var(--s5); }
.prose li { margin-bottom: var(--s2); }

.toc { margin: 0 0 var(--s5); padding: var(--s4) var(--s5); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); }
.toc p { margin: 0 0 var(--s2); font-weight: 700; }
.toc ol { margin: 0; columns: 1; }
.toc li { margin-bottom: var(--s1); }
@media (min-width: 40rem) { .toc ol { columns: 2; column-gap: var(--s6); } }

.two-col { display: grid; gap: var(--s7); }
@media (min-width: 62rem) { .two-col { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--s8); } }
.aside-box { padding: var(--s5); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); }
.aside-box h2, .aside-box h3 { font-size: 1.2rem; }
.aside-box ul { padding-left: 1.1rem; }

.form-card { padding: clamp(1.25rem, 3vw, 2rem); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.form-summary { margin-bottom: var(--s5); padding: var(--s4); border-radius: var(--r); background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.form-summary p { margin: 0; }
.form-success { padding: var(--s5); border-radius: var(--r); background: var(--mint); color: #0b4f31; }
.form-success h2 { font-size: 1.4rem; color: #0b4f31; }
.form-success p:last-child { margin-bottom: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.spinner {
  width: 1rem; height: 1rem; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.notfound { text-align: center; padding-block: clamp(3rem, 10vw, 7rem); }
.notfound .big { font-family: var(--font-head); font-weight: 700; font-size: clamp(5rem, 22vw, 11rem); line-height: 1; color: var(--rose); margin: 0 0 var(--s3); }
.notfound .lead { margin-inline: auto; }
.notfound .btn-row { justify-content: center; }

/* 10. Footer --------------------------------------------------------------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line-strong); padding-top: var(--s7); font-size: 0.97rem; }
.footer-grid { display: grid; gap: var(--s6); padding-bottom: var(--s6); }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: var(--s7); } }
.footer-about p { color: var(--ink-soft); max-width: 24rem; margin-top: var(--s3); }
.site-footer h2 { font-family: var(--font-body); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: var(--s3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--s2); }
.site-footer li a { color: var(--ink); text-decoration: none; }
.site-footer li a:hover { color: var(--rose-ink); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s5); padding-block: var(--s4); border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.875rem; }
.footer-bottom p { margin: 0; }

/* 11. Utilities ------------------------------------------------------------ */
.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; }
.sr-copy { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; font-size: 16px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }

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

@media print {
  .site-header, .site-footer, .toast, .cta-band, .skip-link, .nav-toggle { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  a { color: inherit; }
}

/* Resilience: tiny screens, large text, short landscape phones */
@media (max-width: 22.5rem) {
  :root { --gutter: 0.875rem; }
  .brand small { display: none; }
  .brand { font-size: 1.1rem; }
  .btn { padding-inline: 1.1rem; }
  .btn-row .btn { flex: 1 1 100%; }
  .result-text { font-size: 1.2rem; }
}
@media (max-height: 30rem) and (orientation: landscape) {
  .hero { padding-block: var(--s5); }
  .notfound { padding-block: var(--s6); }
}
@media (min-width: 100rem) {
  :root { --container: 78rem; }
  body { font-size: 1.125rem; }
}
.tag--warn { background: #ffd9d4; color: #7a1a12; }

/* Foldable cover screens (about 280px wide) */
@media (max-width: 20rem) {
  .tool { padding: 0.75rem; }
  .tab { font-size: 0.88rem; padding-inline: 0.3rem; }
  .chip { padding-inline: 0.8rem; }
}

/* Large-text safety: let grid and flex children shrink and wrap */
.two-col { grid-template-columns: minmax(0, 1fr); }
.two-col > * { min-width: 0; }
.input-meta { flex-wrap: wrap; }
.aside-box a, .footer-bottom a, .prose a { overflow-wrap: anywhere; }
@media (min-width: 62rem) { .two-col { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
