/* Yo Chino — yochino.com
   Type: Fraunces (display serif) + Inter (UI/body), self-hosted via fonts.css.
   Palette: warm cream paper, deep teal-ink, spring-teal brand, warm clay accent. */

:root {
  --paper:   #f8f6f1;
  --paper-2: #f0ebe0;
  --card:    #ffffff;
  --ink:     #16201d;
  --ink-2:   #3c4742;
  --muted:   #6c7772;
  --line:    #e5dfd1;
  --line-2:  #d8d0bd;

  --teal:      #11756a;
  --teal-deep: #0b524a;
  --teal-ink:  #0b1f1b;   /* dark section bg */
  --teal-tint: #e7f1ee;
  --clay:      #b1612e;
  --gold:      #b08a36;
  --good:      #1f7a52;

  --shadow-sm: 0 1px 2px rgba(16,32,28,.06), 0 2px 6px rgba(16,32,28,.05);
  --shadow:    0 2px 4px rgba(16,32,28,.05), 0 12px 30px rgba(16,32,28,.08);
  --shadow-lg: 0 8px 18px rgba(16,32,28,.10), 0 24px 50px rgba(16,32,28,.13);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 74rem;
  --wrap-narrow: 46rem;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:   #0f1614;
    --paper-2: #131d1a;
    --card:    #15201d;
    --ink:     #eef3f1;
    --ink-2:   #c6cfcb;
    --muted:   #93a09b;
    --line:    #243029;
    --line-2:  #2d3a33;
    --teal:      #41b6a4;
    --teal-deep: #8fe2d4;
    --teal-tint: #14211e;
    --clay:      #e08a52;
    --gold:      #d6ab52;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --shadow:    0 2px 4px rgba(0,0,0,.3), 0 12px 30px rgba(0,0,0,.4);
    --shadow-lg: 0 10px 24px rgba(0,0,0,.45), 0 30px 60px rgba(0,0,0,.55);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--teal); color: #fff; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 .5rem;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4rem); font-weight: 600; line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
.lede { font-size: clamp(1.12rem, 1rem + .5vw, 1.32rem); line-height: 1.55; color: var(--ink-2); max-width: 44rem; }

a { color: var(--teal-deep); text-decoration: none; text-underline-offset: 3px; transition: color .15s var(--ease); }
a:hover { color: var(--teal); text-decoration: underline; text-decoration-thickness: 1.5px; }

.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; margin-inline: auto; }
.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; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-sans);
  text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; font-weight: 700;
  color: var(--teal); margin: 0 0 1rem;
}
.eyebrow::before { content: ""; width: 1.8rem; height: 2px; background: currentColor; border-radius: 2px; opacity: .8; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.4rem; }
.wrap-narrow { width: 100%; max-width: var(--wrap-narrow); margin-inline: auto; padding-inline: 1.4rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .7rem 1.1rem; border-radius: 0 0 10px 0; z-index: 200; font-weight: 600; }
.skip:focus { left: 0; }

.section { padding-block: clamp(3.2rem, 2rem + 4vw, 5.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-alt { background: var(--paper-2); }
.section-dark { background: var(--teal-ink); color: #e9f1ee; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .lede { color: #c8d8d2; }
.section-dark .muted { color: #93a8a1; }
.section-dark a { color: #8fe2d4; }
.divider { height: 1px; background: var(--line); border: 0; margin: clamp(2rem,4vw,3rem) 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 9px;
  background: linear-gradient(150deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: #fff; font-weight: 800; font-size: .82rem; letter-spacing: .03em;
  box-shadow: var(--shadow-sm);
}
.brand-name { font-family: var(--font-display); font-size: 1.32rem; font-weight: 600; letter-spacing: -.01em; }
.site-nav ul { list-style: none; display: flex; align-items: center; gap: .35rem; margin: 0; padding: 0; }
.site-nav a {
  position: relative; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .96rem;
  padding: .45rem .7rem; border-radius: 8px; transition: color .15s var(--ease), background .15s var(--ease);
}
.site-nav a:hover { color: var(--teal-deep); background: var(--teal-tint); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--teal-deep); }
.site-nav a[aria-current="page"]::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .15rem; height: 2px; background: var(--teal); border-radius: 2px; }
.nav-toggle { display: none; background: var(--card); border: 1px solid var(--line-2); border-radius: 9px; padding: .5rem .9rem; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav ul { position: absolute; right: 1rem; top: 3.6rem; flex-direction: column; align-items: stretch; gap: .1rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .5rem; box-shadow: var(--shadow-lg); display: none; min-width: 13rem; }
  .site-nav ul.open { display: flex; }
  .site-nav a { padding: .65rem .8rem; }
}

/* ---------- Buttons ---------- */
.btn, .btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-weight: 600; font-size: 1rem;
  text-decoration: none; padding: .85rem 1.5rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .12s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease); white-space: nowrap;
}
.btn { background: var(--teal); color: #fff; box-shadow: 0 1px 2px rgba(11,82,74,.25), 0 8px 20px rgba(11,82,74,.22); }
.btn:hover { background: var(--teal-deep); color: #fff; transform: translateY(-2px); text-decoration: none; box-shadow: 0 2px 4px rgba(11,82,74,.3), 0 14px 30px rgba(11,82,74,.3); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-deep); text-decoration: none; transform: translateY(-2px); }
.section-dark .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.section-dark .btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
/* Ghost buttons over the dark image hero: light text + glassy fill so they stay readable on any photo */
.hero-banner .btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.08); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.hero-banner .btn-ghost:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,.16); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* ---------- Hero banner (image-backed) ---------- */
.hero-banner {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(420px, 64vh, 620px);
  display: flex; align-items: flex-end; color: #fff;
}
.hero-banner picture, .hero-banner > img { position: absolute; inset: 0; z-index: -2; }
.hero-banner img { width: 100%; height: 100%; object-fit: cover; }
.hero-banner::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(8,22,18,.20) 0%, rgba(8,22,18,.45) 50%, rgba(8,22,18,.86) 100%),
    linear-gradient(90deg, rgba(8,22,18,.55) 0%, rgba(8,22,18,0) 60%);
}
.hero-banner-inner { padding-block: clamp(2.6rem, 6vw, 4.2rem); width: 100%; }
.hero-banner .eyebrow { color: #a7e6d8; }
.hero-banner h1 { color: #fff; max-width: 19ch; text-shadow: 0 1px 30px rgba(0,0,0,.3); }
.hero-banner .lede { color: #e9f1ee; max-width: 40rem; margin-top: .9rem; }
.hero-banner .crumbs { color: rgba(255,255,255,.78); margin-bottom: 1rem; }
.hero-banner .crumbs a { color: rgba(255,255,255,.85); }
.hero-banner .crumbs a:hover { color: #fff; }

/* Plain (non-image) hero fallback */
.hero { padding-block: clamp(3rem, 2rem + 5vw, 6rem); }
.hero h1 { max-width: 20ch; }
.hero .lede { margin-top: .8rem; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid > * { min-width: 0; }
.cols-2 { display: grid; gap: clamp(1.5rem, 3vw, 2.6rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); align-items: start; }
.cols-2 > * { min-width: 0; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  display: flex; flex-direction: column;
}
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--teal) 40%, var(--line)); text-decoration: none; }
.card h3 { margin-top: 0; }
.card picture { display: block; border-radius: var(--radius-sm); overflow: hidden; margin: -.35rem -.35rem .9rem; }
.card picture img { display: block; width: 100%; height: auto; transition: transform .35s var(--ease); }
a.card:hover picture img { transform: scale(1.05); }

.tag { display: inline-flex; align-items: center; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; padding: .28rem .7rem; border-radius: 999px; }
.tag-operating { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.tag-acquiring { background: color-mix(in srgb, var(--teal) 16%, transparent); color: var(--teal-deep); }
.tag-exploring { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold); }

/* ---------- Buy box (spec card) ---------- */
.buybox {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-top: 1.6rem;
}
.buybox dl { display: grid; grid-template-columns: minmax(0, 12rem) 1fr; gap: 0; margin: 0; }
.buybox dt { font-weight: 700; color: var(--teal-deep); font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; padding: 1rem 1.4rem; background: var(--teal-tint); border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.buybox dd { margin: 0; padding: 1rem 1.4rem; border-bottom: 1px solid var(--line); }
.buybox dt:last-of-type, .buybox dd:last-of-type { border-bottom: 0; }
@media (max-width: 560px) { .buybox dl { grid-template-columns: 1fr; } .buybox dt { border-bottom: 0; padding-bottom: .2rem; background: transparent; } .buybox dd { padding-top: .3rem; } }

.statline { display: flex; flex-wrap: wrap; gap: 2rem; margin: 1.6rem 0; }
.stat { min-width: 0; }
.stat b { display: block; font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: var(--teal-deep); line-height: 1; }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---------- Opportunity blocks ---------- */
.opp {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow-sm); margin-bottom: 1.8rem;
}
.opp-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.opp-head .rank {
  display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: linear-gradient(150deg, var(--teal) 0%, var(--teal-deep) 100%); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; box-shadow: var(--shadow-sm);
}
.opp-head h3 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); }
.opp picture { display: block; border-radius: var(--radius-sm); overflow: hidden; margin: 1rem 0 1.2rem; }
.opp picture img { display: block; width: 100%; height: auto; }
.opp .math {
  background: var(--teal-tint); border: 1px solid color-mix(in srgb, var(--teal) 22%, var(--line));
  border-left: 4px solid var(--teal); border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem; font-size: .97rem; margin: 1rem 0;
}
.opp p { margin-bottom: .8rem; }
.opp p strong { color: var(--ink); }

/* ---------- Lists ---------- */
.checklist { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .7rem; }
.checklist li { padding-left: 2rem; position: relative; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: .05rem; width: 1.35rem; height: 1.35rem;
  display: grid; place-items: center; background: var(--teal-tint); color: var(--teal-deep);
  border-radius: 50%; font-size: .8rem; font-weight: 800;
}

/* ---------- Prose ---------- */
.prose { font-size: 1.08rem; line-height: 1.72; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li { margin: .35rem 0; }
.prose blockquote {
  margin: 1.6rem 0; padding: .9rem 1.4rem; border-left: 3px solid var(--teal);
  background: var(--paper-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-2); font-style: italic;
}
.prose blockquote p { margin: 0; }
.prose code { background: var(--paper-2); padding: .12rem .4rem; border-radius: 5px; font-size: .9em; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--teal) 45%, transparent); text-underline-offset: 3px; }

details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .4rem 1rem; background: var(--card); margin-top: 1rem; }
summary { cursor: pointer; font-weight: 600; padding: .5rem 0; color: var(--teal-deep); }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: .6rem; }

/* ---------- Blog post ---------- */
.post-head { padding-block: clamp(2.2rem,5vw,3.4rem) 1.2rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1.2rem; }
.crumbs a { color: var(--muted); }
.eyebrow + h1 { margin-top: 0; }
.dek { font-size: clamp(1.15rem,1rem+.6vw,1.4rem); color: var(--ink-2); line-height: 1.5; }
.post-meta { color: var(--muted); font-size: .92rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.post .prose img, .post picture img { border-radius: var(--radius-sm); }
.crosslinks, .factcheck { margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.crosslinks ul { padding-left: 1.1rem; }
.factcheck { font-size: .92rem; color: var(--muted); }
.post-cta { margin-top: 2.2rem; }

/* ---------- Forms ---------- */
.form-card { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem,3vw,2rem); box-shadow: var(--shadow); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; padding: .75rem .9rem; border: 1.5px solid var(--line-2);
  border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 22%, transparent); }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-ink); color: #c8d8d2; padding-block: clamp(2.4rem,4vw,3.4rem); margin-top: 0; }
.site-footer .footer-grid { display: grid; gap: 1.8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.site-footer .footer-grid > * { min-width: 0; }
.footer-brand { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; margin: 0 0 .4rem; color: #fff; }
.site-footer .muted { color: #93a8a1; }
.footer-nav { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; }
/* Default (used on LIGHT sections like "Towns I cover" / "Nearby towns"): readable link color */
.footer-nav a { text-decoration: none; color: var(--teal-deep); font-weight: 500; font-size: .95rem; }
.footer-nav a:hover { color: var(--teal); text-decoration: underline; }
.site-footer a { color: #8fe2d4; }
/* Inside the dark footer only, keep the muted light color */
.site-footer .footer-nav a { color: #c8d8d2; font-weight: 400; }
.site-footer .footer-nav a:hover { color: #fff; text-decoration: none; }

/* ---------- Focus + misc ---------- */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
img { max-width: 100%; }

/* ============ Manual dark theme + accessibility + floating widgets ============ */

/* Manual dark (overrides system; system auto handled by the media query above) */
:root[data-theme="dark"]{
  --paper:#0f1614; --paper-2:#131d1a; --card:#15201d; --ink:#eef3f1; --ink-2:#c6cfcb; --muted:#93a09b;
  --line:#243029; --line-2:#2d3a33; --teal:#41b6a4; --teal-deep:#8fe2d4; --teal-ink:#0b1f1b; --teal-tint:#14211e; --clay:#e08a52; --gold:#d6ab52;
  --shadow-sm:0 1px 2px rgba(0,0,0,.3); --shadow:0 2px 4px rgba(0,0,0,.3),0 12px 30px rgba(0,0,0,.4); --shadow-lg:0 10px 24px rgba(0,0,0,.45),0 30px 60px rgba(0,0,0,.55);
}

/* Accessibility: text scaling, underline, reduced motion, high contrast */
html[data-fontscale="1"]{ font-size:112.5%; }
html[data-fontscale="2"]{ font-size:125%; }
html.a11y-underline a{ text-decoration:underline !important; text-underline-offset:3px; }
html.a11y-rmotion *, html.a11y-rmotion *::before, html.a11y-rmotion *::after{ animation:none !important; transition:none !important; scroll-behavior:auto !important; }
html.a11y-contrast{
  --paper:#fff !important; --paper-2:#f3f3f3 !important; --card:#fff !important;
  --ink:#000 !important; --ink-2:#141414 !important; --muted:#2b2b2b !important;
  --line:#000 !important; --line-2:#000 !important;
  --teal:#005c4f !important; --teal-deep:#00352d !important; --teal-tint:#e6f0ee !important;
}
html.a11y-contrast a{ text-decoration:underline; }
html.a11y-contrast .card, html.a11y-contrast .opp, html.a11y-contrast .buybox, html.a11y-contrast .form-card, html.a11y-contrast .field input, html.a11y-contrast .field select, html.a11y-contrast .field textarea{ border-width:2px; }

/* Header theme toggle */
.header-right{ display:flex; align-items:center; gap:.45rem; }
.theme-toggle{ display:grid; place-items:center; width:2.3rem; height:2.3rem; border-radius:9px; background:transparent; border:1px solid var(--line-2); color:var(--ink-2); cursor:pointer; padding:0; transition:color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease); }
.theme-toggle:hover{ color:var(--teal-deep); border-color:var(--teal); background:var(--teal-tint); }
.theme-toggle svg{ width:1.15rem; height:1.15rem; }
.theme-toggle .i-sun{ display:none; }
.theme-toggle .i-moon{ display:block; }
:root[data-theme="dark"] .theme-toggle .i-sun{ display:block; }
:root[data-theme="dark"] .theme-toggle .i-moon{ display:none; }
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) .theme-toggle .i-sun{ display:block; } :root:not([data-theme="light"]) .theme-toggle .i-moon{ display:none; } }

/* Shared floating action button */
.fab{ display:grid; place-items:center; width:3.1rem; height:3.1rem; border-radius:50%; border:none; cursor:pointer; box-shadow:var(--shadow-lg); transition:transform .15s var(--ease), background .18s var(--ease); padding:0; }
.fab svg{ width:1.4rem; height:1.4rem; }
.fab:hover{ transform:translateY(-2px); }

/* Bottom-right stack: back-to-top + chat */
.fab-stack{ position:fixed; right:1.1rem; bottom:1.1rem; z-index:95; display:flex; flex-direction:column; align-items:center; gap:.7rem; }
.fab-top{ background:var(--card); color:var(--teal-deep); border:1px solid var(--line-2); width:2.8rem; height:2.8rem; }
.fab-top:hover{ background:var(--teal-tint); }
.fab-top[hidden]{ display:none; }
.fab-chat{ background:linear-gradient(150deg,var(--teal),var(--teal-deep)); color:#fff; }

/* Chat popover */
.chat{ position:relative; }
.chat-panel{ position:absolute; right:0; bottom:3.9rem; width:min(20rem,calc(100vw - 2.2rem)); background:var(--card); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow-lg); padding:1.1rem; animation:fab-pop .18s var(--ease); }
.chat-panel[hidden]{ display:none; }
.chat-title{ font-family:var(--font-display); font-weight:600; font-size:1.18rem; margin:0 0 .2rem; }
.chat-sub{ color:var(--muted); font-size:.9rem; margin:0 0 .9rem; }
.chat-action{ display:block; padding:.65rem .9rem; margin-bottom:.5rem; border-radius:10px; text-decoration:none; background:var(--teal-tint); color:var(--teal-deep); font-weight:600; border:1px solid transparent; transition:border-color .15s var(--ease); }
.chat-action:hover{ border-color:var(--teal); text-decoration:none; }
.chat-action:last-child{ margin-bottom:0; }
@keyframes fab-pop{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:none; } }

/* Accessibility widget (bottom-left) */
.a11y{ position:fixed; left:1.1rem; bottom:1.1rem; z-index:95; }
.a11y-btn{ background:var(--card); color:var(--teal-deep); border:1px solid var(--line-2); width:2.8rem; height:2.8rem; }
.a11y-btn:hover{ background:var(--teal-tint); }
.a11y-panel{ position:absolute; left:0; bottom:3.6rem; width:min(17rem,calc(100vw - 2.2rem)); background:var(--card); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow-lg); padding:1.1rem; animation:fab-pop .18s var(--ease); }
.a11y-panel[hidden]{ display:none; }
.a11y-panel h2{ font-size:.8rem; margin:0 0 .8rem; font-family:var(--font-sans); text-transform:uppercase; letter-spacing:.1em; color:var(--muted); }
.a11y-row{ display:flex; align-items:center; justify-content:space-between; margin-bottom:.7rem; font-size:.92rem; font-weight:600; }
.a11y-seg{ display:flex; border:1px solid var(--line-2); border-radius:8px; overflow:hidden; }
.a11y-seg button{ border:none; background:var(--card); color:var(--ink-2); padding:.32rem .62rem; cursor:pointer; font:inherit; font-weight:700; border-left:1px solid var(--line); }
.a11y-seg button:first-child{ border-left:none; }
.a11y-seg button[aria-pressed="true"]{ background:var(--teal); color:#fff; }
.a11y-opt{ display:flex; align-items:center; justify-content:space-between; width:100%; text-align:left; padding:.6rem .8rem; margin-bottom:.45rem; border:1px solid var(--line-2); border-radius:10px; background:var(--card); color:var(--ink); font:inherit; font-weight:600; cursor:pointer; }
.a11y-opt::after{ content:"Off"; font-size:.78rem; color:var(--muted); font-weight:700; }
.a11y-opt[aria-pressed="true"]{ background:var(--teal-tint); border-color:var(--teal); color:var(--teal-deep); }
.a11y-opt[aria-pressed="true"]::after{ content:"On"; color:var(--teal-deep); }
.a11y-reset{ width:100%; padding:.55rem; border:none; background:transparent; color:var(--muted); cursor:pointer; font:inherit; text-decoration:underline; margin-top:.2rem; }

@media print{ .fab-stack, .a11y, .theme-toggle{ display:none !important; } }
