/* ============================================================================
   CFacil marketing site, shared theme.
   One stylesheet for every marketing page (index, pricing, compliance).
   Dark/light variables, glass surfaces and the amber accent are extracted
   from the original self-contained landing page so the look stays identical.
   ========================================================================== */

:root {
  --bg: #0e1116;
  --bg-card: #161b22;
  --accent: #f59e0b;
  --accent-muted: #8b6637;
  --accent-2: #fbbf24;
  --accent-soft: rgba(245, 158, 11, 0.12);
  --accent-line: rgba(245, 158, 11, 0.3);
  --text: #e6edf3;
  --text-muted: #9aa7b4;
  --text-extra-muted: #68717b;
  --border: #2a313a;
  --card-bg: rgba(22, 27, 34, 0.72);
  --card-border: rgba(96, 165, 250, 0.18);
  --surface-2: rgba(22, 27, 34, 0.5);
  --logo-fill: #ffffff;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
  --nav-bg: rgba(14, 17, 22, 0.72);
  --menu-bg: rgba(18, 22, 29, 0.97);
  --ok: #34d399;
}

:root[data-theme='light'] {
  --bg: #f2eee6;
  --bg-card: #fbf8f2;
  --accent: #b45309;
  --accent-muted: #b98b68;
  --accent-2: #d97706;
  --accent-soft: rgba(180, 83, 9, 0.12);
  --accent-line: rgba(180, 83, 9, 0.3);
  --text: #17324d;
  --text-muted: #4f6477;
  --text-extra-muted: #81868b;
  --border: rgba(140, 123, 102, 0.28);
  --card-bg: rgba(251, 248, 242, 0.7);
  --card-border: rgba(140, 123, 102, 0.28);
  --surface-2: rgba(251, 248, 242, 0.55);
  --logo-fill: #17324d;
  --shadow: 0 8px 32px rgba(80, 70, 55, 0.18);
  --shadow-lg: 0 24px 60px rgba(80, 70, 55, 0.22);
  --nav-bg: rgba(242, 238, 230, 0.78);
  --menu-bg: rgba(251, 248, 242, 0.98);
  --ok: #047857;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: transparent;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  transition: color 0.3s ease;
}

/* Animated background canvas, shared by every page. */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: -1;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  #bg-canvas { display: none; }
  html { scroll-behavior: auto; }
}

a { color: var(--accent); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
/* Vertical-only padding so the horizontal gutter from .wrap is preserved
   (a `padding: Y 0` shorthand here would zero the left/right gutter and glue
   content to the screen edge on narrow viewports). */
.section { padding-top: 5rem; padding-bottom: 5rem; }
.section-sm { padding-top: 3rem; padding-bottom: 3rem; }

.accent { color: var(--accent); }
.gradient-text {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ----- Eyebrow / badges ----- */
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.25rem;
}
.eyebrow.center {
  display: flex;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.accent {
  color: var(--accent);
}
h4.hero-rotator {
  margin: 12px 0;
}
/* Rotating hero tagline. The eyebrow keeps its badge styling; only the inner
   text swaps. The leaving line fades out and slides up; the next line enters
   from just below and slides up into place, so motion always reads upward.
   The JS rotator skips animation under prefers-reduced-motion, and so does
   this block as a belt-and-braces fallback. */
.hero-rotator-text {
  display: inline-block;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.hero-rotator-text.is-leaving {
  opacity: 0;
  transform: translateY(-0.5em);
}
.hero-rotator-text.is-entering {
  opacity: 0;
  transform: translateY(0.5em);
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero-rotator-text { transition: none; }
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  background: var(--surface-2);
}

/* ----- Headings ----- */
h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
.lead {
  color: var(--text-muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.65;
  max-width: 42rem;
}
.hero .section-head.center .lead { 
  max-width: unset;
}
.section-head { max-width: 44rem; margin-bottom: 2.75rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.98rem;
  font-weight: 600;
  border-radius: 12px;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1304;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.28);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(245, 158, 11, 0.38); }
.btn-ghost {
  background: var(--surface-2);
  border-color: var(--card-border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-line); }
.btn-block { width: 100%; }

/* ----- Top navigation ----- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand .mark {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--logo-fill);
}
.brand .mark svg { width: 36px; height: 36px; display: block; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 9px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--accent); }
.nav-links a.btn { color: #1a1304; }
:root[data-theme='light'] .nav-links a.btn { color: #1a1304; }
/* The generic nav-link hover swaps in a muted surface and text colour, which
   stripped the primary CTA of its amber fill and read as a dark-on-dark
   inversion (worst in dark mode). Keep the gradient and dark label on hover;
   the .btn lift and deeper shadow provide the feedback instead. */
.nav-links a.btn-primary:hover {
  color: #1a1304;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.nav-cta { margin-left: 0.4rem; }
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; fill: currentColor; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem 1.5rem 1.25rem;
    background: var(--menu-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.7rem 0.85rem; }
  .nav-cta { margin: 0.25rem 0 0; }
}

/* ----- Hero ----- */
.hero { padding-top: 4.5rem; padding-bottom: 3.5rem; }
.hero .eyebrow { margin-bottom: 1.5rem; }
.hero h1 { margin-bottom: 1.1rem; }
.hero .section-head:not(.center) h1 { max-width: 18ch; }
.hero .lead { margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero-meta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero .section-head.center .hero-actions,
.hero .section-head.center .hero-meta {
	justify-items: center;
	justify-content: center;
}

/* ----- Generic card ----- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* ----- Feature grid ----- */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.feature .ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  margin-bottom: 1rem;
}
.feature .ico svg { width: 22px; height: 22px; fill: currentColor; }
.feature h3 { margin-bottom: 0.45rem; }
.feature p { color: var(--text-muted); font-size: 0.96rem; }

/* ----- Stat band ----- */
.stat .num {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}
.stat .lbl { color: var(--text-muted); font-size: 0.92rem; }

/* ----- Checklist ----- */
.checklist { list-style: none; }
.checklist li {
  color: var(--text-muted);
  padding-left: 1.75rem;
  position: relative;
  margin-bottom: 0.55rem;
  line-height: 1.55;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.35em;
  width: 1.1rem; height: 1.1rem;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 0.34rem; top: 0.55em;
  width: 0.32rem; height: 0.58rem;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checklist strong { color: var(--text); font-weight: 600; }

/* ----- Split (text + panel) ----- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}
.split.reverse .split-media { order: -1; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: 1.75rem; }
  .split.reverse .split-media { order: 0; }
}

/* ----- Compliance cards ----- */
.reg {
  display: flex;
  flex-direction: column;
}
.reg .tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 7px;
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.9rem;
}
.reg h3 { margin-bottom: 0.5rem; font-size: 1.15rem; }
.reg p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; }
.reg .how {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.reg .how strong { color: var(--text); display: block; margin-bottom: 0.3rem; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* ----- Pricing ----- */
.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.5rem auto 0;
  padding: 0.35rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--surface-2);
}
.billing-toggle button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.billing-toggle button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1304;
}
.billing-toggle .save {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
}
/* On the active (highlighted) button the pill background is amber, so the
   discount text must flip to the dark on-accent colour to stay legible. */
.billing-toggle button.active .save { color: #1a1304; }
/* Comparison table: stack the annual and monthly base fee in one cell. */
.cmp-price { display: flex; flex-direction: column; line-height: 1.3; }
.cmp-price .ann { font-weight: 600; }
.cmp-price .mon { color: var(--text-extra-muted); font-size: 0.8rem; }
.featured-col .cmp-price .mon { color: var(--accent-muted); }

/* The pricing grid is centred and capped so two cards look intentional,
   while auto-fit still lays out three tiers cleanly when a third is added. */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
  max-width: 760px;     /* 2 tiers */
  margin: 2.5rem auto 0;
  align-items: stretch;
}
.pricing-grid.tiers-3 { max-width: 1080px; }   /* room for a third tier */
@media (max-width: 640px) { .pricing-grid { grid-template-columns: 1fr; } }

.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.tier.featured {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--accent-line);
}
.tier .tier-badge {
  position: absolute;
  top: -0.85rem; left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a1304;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  white-space: nowrap;
}
.tier-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.3rem; }
.tier-tagline { color: var(--text-muted); font-size: 0.92rem; min-height: 2.6em; }
.tier-price { display: flex; align-items: baseline; gap: 0.35rem; margin: 1.1rem 0 0.2rem; }
.tier-price .from { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); align-self: flex-end; margin-bottom: 0.45rem; }
.tier-price .amount { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.03em; }
.tier-price .per { color: var(--text-muted); font-size: 0.9rem; }
.tier-sub { color: var(--text-muted); font-size: 0.82rem; min-height: 1.4em; }
.tier .btn { margin: 1.4rem 0 1.5rem; }
.tier-features { list-style: none; }
.tier-features li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.7rem;
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.5;
}
.tier-features li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.18em;
  width: 1.05rem; height: 1.05rem;
  border-radius: 50%;
  background: var(--accent-soft);
}
.tier-features li::after {
  content: "";
  position: absolute;
  left: 0.32rem; top: 0.36em;
  width: 0.3rem; height: 0.55rem;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.tier-features li.muted { color: var(--text-muted); opacity: 0.55; }
.tier-features li.muted::after {
  border-color: var(--text-muted);
  transform: rotate(45deg) scale(0.9);
}
.tier-features .cap {
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 700;
  padding-left: 0;
  margin: 1.1rem 0 0.65rem;
}
.tier-features .cap::before, .tier-features .cap::after { display: none; }

/* Enterprise band (not a tier card, keeps the grid at 2 by default). */
.enterprise {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-top: 1.75rem;
}
.enterprise .ent-actions { display: flex; flex-direction: column; gap: 0.75rem; }
@media (max-width: 760px) { .enterprise { grid-template-columns: 1fr; } }

/* ----- Comparison table ----- */
.table-scroll { overflow-x: auto; border-radius: 14px; border: 1px solid var(--card-border); }
table.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
  background: var(--card-bg);
}
table.compare th, table.compare td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}
table.compare thead th {
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}
table.compare thead th:first-child { text-align: left; }
table.compare tbody th { font-weight: 600; color: var(--text); }
table.compare td { color: var(--text-muted); text-align: center; }
table.compare td:first-child, table.compare th:first-child { text-align: left; }
table.compare tr:last-child td, table.compare tr:last-child th { border-bottom: none; }
/* table.compare .yes { color: var(--ok); font-weight: 700; } */
table.compare .no { color: var(--text-muted); opacity: 0.5; }
table.compare .featured-col { color: var(--accent); }

/* ----- FAQ ----- */
.faq details {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.25rem 1.25rem;
  margin-bottom: 0.85rem;
  background: var(--surface-2);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--text-muted); padding-bottom: 1rem; font-size: 0.95rem; }

/* ----- CTA band ----- */
.cta {
  text-align: center;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-2));
  border: 1px solid var(--accent-line);
  border-radius: 22px;
  padding: 3rem 2rem;
  box-shadow: var(--shadow);
}
.cta h2 { margin-bottom: 0.75rem; }
.cta .lead { margin: 0 auto 1.75rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; }

/* ----- Footer ----- */
footer.site {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.foot-links a { color: var(--text-muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot-legal { border-top: 1px solid var(--border); padding-top: 1.25rem; line-height: 1.7; }
.disclaimer { font-size: 0.8rem; opacity: 0.85; max-width: 60rem; }

/* ----- Theme mode selector (in-nav dropdown) ----- */
/* A single trigger button living in the nav bar; clicking opens a dropdown
   menu listing light / dark / system, each with its icon and label. */
.theme-mode-selector {
  position: relative;
  display: inline-flex;
  align-items: center;
}
/* Trigger: a rounded-square control matching the mobile nav toggle. */
.theme-mode-selector-button-current {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--surface-2);
  color: var(--text);
}
.theme-mode-selector-button-current:hover,
.theme-mode-selector-button-current:focus-visible { color: var(--accent); }
.theme-mode-selector-button-current svg { width: 18px; height: 18px; }

/* Shared button reset (trigger + menu rows). */
.theme-mode-selector-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  transition: background-color 0.2s ease, color 0.2s ease;
  outline: none;
}
.theme-mode-selector-button svg { display: block; fill: currentColor; flex: none; }

/* Dropdown panel. */
.theme-mode-selector-flyout {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 176px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--menu-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 30;
}
.theme-mode-selector.is-open .theme-mode-selector-flyout {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* Menu rows: icon + label, full width. */
.theme-mode-selector-flyout .theme-mode-selector-button {
  width: 100%;
  justify-content: flex-start;
  gap: 0.65rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}
.theme-mode-selector-flyout .theme-mode-selector-button svg { width: 1rem; height: 1rem; }
.theme-mode-selector-flyout .theme-mode-selector-button:hover,
.theme-mode-selector-flyout .theme-mode-selector-button:focus-visible {
  background: var(--surface-2);
  color: var(--text);
}
.theme-mode-selector-flyout .theme-mode-selector-button.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

@media (max-width: 820px) {
  .theme-mode-selector { margin-left: auto; }
  .nav-toggle { margin-left: 0.5rem; }
}

/* ----- Contact page ----- */
.contact-split { align-items: start; }

.contact-list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; align-items: center; gap: 0.9rem; }
/* Hidden rows (phone, address) stay in the markup for later; [hidden] keeps
   them out of the layout and the accessibility tree until a value exists. */
.contact-list li[hidden] { display: none; }
.contact-icon {
  flex: none;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.contact-icon svg { width: 18px; height: 18px; }
.contact-text { display: flex; flex-direction: column; gap: 0.1rem; }
.contact-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.contact-text a, .contact-text .accent { font-weight: 600; }

/* Invisible text */
.invisible { visibility: hidden; color: transparent; }

/* ----- Form fields ----- */
.contact-form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--card-border);
  border-radius: 11px;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Honeypot: visually and programmatically hidden, but still submitted. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 0.25rem 0 0; font-size: 0.92rem; }
.form-status.is-error { color: #f87171; }
.form-status.is-ok { color: var(--accent); }
