/* SUNOOCEP.com — shared layout & components */

:root {
  --bg-dark: #070708;
  --bg-elevated: #0f0f12;
  --card-bg: rgba(var(--overlay-rgb), 0.035);
  --card-border: rgba(var(--overlay-rgb), 0.09);
  --text-main: #e8ecf4;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #94e571;
  --accent-soft: rgba(148, 229, 113, 0.12);
  --accent-grad: linear-gradient(135deg, #94e571 0%, #333399 100%);
  --link: #94e571;
  --success: #00e676;
  --accent-text: #cbf3bc;
  --guide-accent: #6ee7b7;
  --info-text: #93c5fd;
  --info-text-hover: #bfdbfe;
  --danger-text: #ffb4b4;
  --success-text: #9ef5b2;
  --warning-text: #ffb866;
  --code-text: #cbd5e1;
  --glass-blur: blur(16px);
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 60px;
  --nav-max: 1320px;
  --nav-scrim: rgba(7, 7, 8, 0.46);
  --max: 1100px;
  --font: "Outfit", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(circle at top center, rgba(148, 229, 113, 0.12), transparent 26%),
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.12), transparent 30%),
    linear-gradient(180deg, #09090b 0%, #070708 45%, #050507 100%);
  color: var(--text-main);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    linear-gradient(rgba(var(--overlay-rgb), 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--overlay-rgb), 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 85%);
}

body::after {
  background: radial-gradient(circle at center, transparent 0%, rgba(7, 7, 8, 0.12) 58%, rgba(7, 7, 8, 0.68) 100%);
}

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

a:hover {
  color: var(--heading);
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--code-text);
}

img,
picture,
svg,
video {
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

/* —— Nav —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition:
    background 0.28s ease,
    border-color 0.28s ease,
    backdrop-filter 0.28s ease;
}

/* After scroll (or mobile menu open): solid bar for contrast */
.site-nav.is-scrolled {
  background: rgba(7, 7, 8, 0.82);
  backdrop-filter: var(--glass-blur);
  border-bottom-color: var(--card-border);
}

.nav-container {
  max-width: var(--nav-max);
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--nav-h);
  min-width: 0;
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 32px;
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: -0.02em;
}

/* Block + fixed box: avoids inline/baseline gaps that differ across browsers & font loads (common dev vs deploy mismatch). */
.logo img {
  display: block;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  align-self: center;
}

.logo span {
  line-height: 1.2;
}

.logo:hover {
  color: var(--heading);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: #fff;
  border-radius: 1px;
}

.nav-links {
  display: flex;
  grid-column: 2;
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  align-items: center;
  align-self: stretch;
  justify-content: center;
  gap: 4px 8px;
  white-space: nowrap;
}

.nav-links > .theme-control {
  position: absolute;
  top: 50%;
  right: 20px;
  margin-left: 0;
  transform: translateY(-50%);
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--heading);
  background: rgba(var(--overlay-rgb), 0.05);
}

/* Temporary Queue Manager launch label; remove after 2026-10-25. */
.nav-links > a[href="/extensions/"]::after {
  content: "New";
  display: inline-flex;
  align-items: center;
  margin-inline-start: 6px;
  padding: 2px 5px;
  border: 1px solid rgba(var(--overlay-rgb), 0.12);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

html[lang^="es"] .nav-links > a[href="/extensions/"]::after { content: "Nuevo"; }
html[lang^="fr"] .nav-links > a[href="/extensions/"]::after { content: "Nouveau"; }
html[lang^="id"] .nav-links > a[href="/extensions/"]::after { content: "Baru"; }
html[lang^="pt"] .nav-links > a[href="/extensions/"]::after { content: "Novo"; }
html[lang^="ru"] .nav-links > a[href="/extensions/"]::after { content: "Новое"; }

/* Static tool directory: links stay in the HTML for crawlers and open on hover/focus. */
.nav-tools {
  position: relative;
  display: flex;
  align-items: center;
  align-self: stretch;
}

.nav-tools__trigger-row {
  display: contents;
}

.nav-tools__toggle {
  display: none;
}

.nav-tools__trigger::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 0 3px 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 1px;
  opacity: 0.78;
  transform: rotate(45deg);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-tools__menu {
  position: fixed;
  top: var(--nav-h);
  left: 50%;
  z-index: 220;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: min(760px, calc(100vw - 32px));
  padding: 12px 10px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 4px);
  pointer-events: none;
  transition: opacity 0.16s ease, visibility 0.16s ease, transform 0.16s ease;
}

/* The transparent top padding is an intentional hover bridge. The visible panel starts below it. */
.nav-tools__menu::before {
  content: "";
  position: absolute;
  inset: 12px 0 0;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--control-bg);
  box-shadow: var(--soft-shadow);
  backdrop-filter: var(--glass-blur);
}

.nav-tools:hover .nav-tools__menu,
.nav-tools:focus-within .nav-tools__menu,
.nav-tools.is-open .nav-tools__menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.nav-tools:is(:hover, :focus-within, .is-open) .nav-tools__trigger::after {
  opacity: 1;
  transform: translateY(4px) rotate(225deg);
}

.nav-tools__menu > a,
.nav-tools__group a {
  position: relative;
  display: block;
  min-width: 0;
  padding: 9px 10px;
  font-size: 0.82rem;
  line-height: 1.25;
}

.nav-tools__group {
  position: relative;
  min-width: 0;
  padding: 16px 12px 14px;
}

.nav-tools__group + .nav-tools__group {
  border-left: 1px solid rgba(var(--overlay-rgb), 0.09);
}

.nav-tools__heading {
  display: block;
  margin: 0 10px 7px;
  color: var(--accent-text);
  font: 700 0.66rem/1.2 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-tools__group a {
  border-radius: 9px;
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.nav-tools__group a:hover,
.nav-tools__group a:focus-visible {
  color: var(--heading);
  background: var(--control-hover);
}

.nav-tools__group a:active {
  transform: translateY(1px);
}

.nav-tools__group a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.nav-tools__group--featured,
.nav-tools__menu > .nav-tools__featured {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 4px 10px 0;
  padding: 8px;
  border: 1px solid rgba(110, 231, 183, 0.32);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(110, 231, 183, 0.12), rgba(var(--overlay-rgb), 0.035));
  box-shadow: inset 0 1px 0 rgba(var(--overlay-rgb), 0.08);
}

.nav-tools__group--featured {
  border-left: 0;
}

.nav-tools__group--featured .nav-tools__featured,
.nav-tools__menu > .nav-tools__featured {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--heading);
  font-weight: 800;
}

.nav-tools__group--featured .nav-tools__featured:hover,
.nav-tools__group--featured .nav-tools__featured:focus-visible,
.nav-tools__menu > .nav-tools__featured:hover,
.nav-tools__menu > .nav-tools__featured:focus-visible {
  background: rgba(110, 231, 183, 0.12);
  color: var(--heading);
}

.nav-tools__featured-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.nav-tools__featured-copy strong {
  color: inherit;
  font-size: 0.84rem;
  line-height: 1.2;
}

.nav-tools__featured-copy span {
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
}

.nav-backdrop {
  display: none;
}

/* Use the drawer before translated or zoomed desktop labels can compete for one row. */
@media (max-width: 1150px) {
  .nav-container {
    grid-template-columns: minmax(0, 1fr) auto;
    position: relative;
    z-index: 1;
  }

  .nav-toggle {
    display: flex;
    grid-column: 2;
    justify-self: end;
    position: relative;
    z-index: 2;
  }

  .nav-links {
    grid-column: 1 / -1;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    white-space: normal;
    padding: 12px 16px 20px;
    background: var(--nav-mobile);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 18px 42px rgba(var(--shadow-rgb), 0.16);
    gap: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 2;
  }

  .nav-links > .theme-control {
    position: static;
    transform: none;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 14px 12px;
    border-radius: var(--radius-sm);
  }

  .nav-backdrop:not([hidden]) {
    position: fixed;
    inset: var(--nav-h) 0 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--nav-scrim);
    backdrop-filter: blur(10px) saturate(0.92);
    cursor: default;
  }

  .nav-tools {
    display: block;
    align-self: auto;
    width: 100%;
  }

  .nav-tools__trigger-row {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
  }

  .nav-tools__trigger {
    display: block;
    width: auto;
    flex: 1 1 auto;
    box-sizing: border-box;
  }

  .nav-tools__trigger::after {
    display: none;
  }

  .nav-tools__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-muted);
    cursor: pointer;
  }

  .nav-tools__toggle::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.18s ease, color 0.18s ease;
  }

  .nav-tools__toggle:hover,
  .nav-tools__toggle:focus-visible {
    color: var(--heading);
    border-color: rgba(110, 231, 183, 0.55);
  }

  .nav-tools__toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .nav-tools__toggle[aria-expanded="true"]::before {
    transform: translateY(2px) rotate(225deg);
  }

  .nav-tools.is-mobile-ready .nav-tools__menu {
    display: none;
    transform: none;
  }

  .nav-tools.is-mobile-ready.is-open .nav-tools__menu {
    display: block;
  }

  .nav-tools__menu {
    position: static;
    display: block;
    width: auto;
    padding: 4px 0 12px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .nav-tools__menu::before {
    display: none;
  }

  .nav-tools__group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 8px;
    padding: 10px 0 0;
  }

  .nav-tools__group + .nav-tools__group {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--card-border);
    border-left: 0;
  }

  .nav-tools__group--featured,
  .nav-tools__menu > .nav-tools__featured {
    display: none;
  }

  .nav-tools__heading {
    grid-column: 1 / -1;
    margin: 0 8px 4px;
  }

  .nav-tools__group a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 8px;
    font-size: 0.84rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-tools__menu {
    transition: none;
  }

  .nav-tools__toggle::before {
    transition: none;
  }
}

/* —— Layout —— */
/* Pull main under the sticky nav so transparent .site-nav shows page content (not only the dark body fill). */
main {
  flex: 1;
  margin-top: calc(-1 * var(--nav-h));
  padding-top: var(--nav-h);
  position: relative;
  z-index: 0;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.container--narrow {
  max-width: 800px;
}

.container--article {
  max-width: 720px;
}

/* Legacy tool shells that predate the shared tool UI. */
body.ps-page .ps-shell,
body.pl-page .pl-shell {
  width: 100%;
  max-width: none;
}

/* Legacy tool pages: balance intro copy and help content on the wider rail. */
body.ps-page .ps-stage .sub,
body.pl-page .dl-stage .sub {
  max-width: 64ch;
}

body.ps-page .ps-help p {
  width: 100%;
  max-width: none;
}

body.pl-page .dl-help p {
  width: 100%;
  max-width: none;
}

/* Supporting copy for utility pages. Keep it inside the existing help surface
   so the working tool remains the first and clearest part of each page. */
.tool-content-expansion {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid rgba(var(--overlay-rgb), 0.09);
}

.tool-content-expansion > :first-child {
  margin-top: 0;
}

.tool-content-expansion h2 {
  margin: 0 0 10px;
}

.tool-content-expansion h3 {
  margin: 20px 0 7px;
  font-size: 1rem;
}

.tool-content-expansion p,
.tool-content-expansion li {
  color: var(--text-muted);
  line-height: 1.7;
}

.tool-content-expansion ol,
.tool-content-expansion ul {
  margin: 10px 0 6px;
  padding-left: 1.25rem;
}

.tool-content-expansion li + li {
  margin-top: 7px;
}

.tool-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 30px;
  margin-top: 8px;
}

.tool-content-grid > div {
  min-width: 0;
  padding: 14px 0;
  border-top: 1px solid rgba(var(--overlay-rgb), 0.08);
}

.tool-content-grid h3 {
  margin-top: 0;
}

.tool-content-example {
  margin: 14px 0 6px;
  padding: 16px 18px;
  border: 1px solid rgba(142, 240, 101, 0.18);
  border-radius: 12px;
  background: rgba(142, 240, 101, 0.035);
}

.tool-content-example p:last-child {
  margin-bottom: 0;
}

.tool-content-example pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font: inherit;
  line-height: 1.65;
}

@media (max-width: 720px) {
  .tool-content-grid {
    grid-template-columns: 1fr;
  }
}

body.ps-page .ps-form textarea,
body.pl-page .dl-form textarea {
  min-height: 132px;
}

@media (max-width: 760px) {
  body.ps-page .ps-form textarea,
  body.pl-page .dl-form textarea {
    min-height: 120px;
  }
}

.tools-back {
  margin: 0 0 18px;
  font-size: 0.9rem;
}

.tools-back a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.tools-back a:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-header {
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 12px;
}

.page-header .lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0;
}

.page-header .meta {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 12px;
}

.page-header-note {
  margin: 10px 0 0;
  max-width: 62ch;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.content-section-title {
  margin: 48px 0 16px;
  padding-left: 16px;
  border-left: 4px solid var(--accent);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.02em;
}

.content-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.content-faq {
  max-width: none;
  margin: 48px 0 0;
  padding: 0;
}

.content-faq > .content-section-title {
  text-align: left;
}

.search-shell {
  max-width: 480px;
  margin-bottom: 28px;
}

.search-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: #0c0c0f;
  color: var(--heading);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-input:focus {
  border-color: rgba(148, 229, 113, 0.45);
  box-shadow: 0 0 0 3px rgba(148, 229, 113, 0.1);
}

.search-input--mono {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.35);
  font-family: var(--mono);
  font-size: 0.88rem;
}

.legal-links {
  margin-top: 2rem;
}

/* —— Hero (home) —— */
.hero {
  text-align: center;
  padding: 84px 20px 64px;
  padding-top: calc(84px + var(--nav-h));
  margin-top: calc(-1 * var(--nav-h));
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 52% at 50% -18%, rgba(148, 229, 113, 0.18), transparent 56%),
    radial-gradient(circle at 20% 0%, rgba(99, 102, 241, 0.14), transparent 30%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: min(880px, calc(100% - 40px));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(var(--overlay-rgb), 0.16), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
}

.hero-panel {
  position: relative;
  padding: 44px clamp(22px, 4vw, 44px) 34px;
  border: 1px solid rgba(var(--overlay-rgb), 0.08);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(var(--overlay-rgb), 0.055), rgba(var(--overlay-rgb), 0.025));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(var(--overlay-rgb), 0.08), transparent 26%, transparent 72%, rgba(var(--overlay-rgb), 0.05));
  pointer-events: none;
}

.hero-panel > * {
  position: relative;
}

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.35rem);
  font-weight: 800;
  line-height: 1.02;
  margin: 0 0 18px;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, #ffffff 0%, #f5f3ff 32%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.08rem;
  color: var(--text-main);
  margin: 0 auto 22px;
  max-width: 64ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 22px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 28px;
}

.hero-proof .tag {
  background: rgba(var(--overlay-rgb), 0.05);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
  gap: 18px;
  margin-top: 18px;
  text-align: left;
}

.hero-card {
  background: rgba(var(--overlay-rgb), 0.04);
  border: 1px solid rgba(var(--overlay-rgb), 0.08);
  border-radius: 20px;
  padding: 22px;
  box-shadow: inset 0 1px 0 rgba(var(--overlay-rgb), 0.04);
}

.hero-card h2,
.hero-card h3 {
  margin: 0 0 10px;
  color: var(--heading);
  letter-spacing: -0.02em;
}

.hero-card h2 {
  font-size: 1.15rem;
}

.hero-card h3 {
  font-size: 1rem;
}

.hero-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.hero-signal-list,
.hero-outcome-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.hero-signal-list li,
.hero-outcome-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-main);
  font-size: 0.94rem;
  line-height: 1.55;
}

.hero-signal-list li::before,
.hero-outcome-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 0.42rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #94e571, #818cf8);
  box-shadow: 0 0 18px rgba(148, 229, 113, 0.45);
  flex-shrink: 0;
}

.hero-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.hero-metric {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(var(--overlay-rgb), 0.035);
  border: 1px solid rgba(var(--overlay-rgb), 0.08);
}

.hero-metric strong {
  display: block;
  color: var(--heading);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.hero-metric span {
  display: block;
  color: var(--text-dim);
  font-size: 0.83rem;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .hero {
    padding: 72px 20px 56px;
    padding-top: calc(72px + var(--nav-h));
  }

  .hero-panel {
    border-radius: 22px;
    padding: 32px 18px 24px;
  }

  .hero-grid,
  .hero-metric-strip {
    grid-template-columns: 1fr;
  }
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 26px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f5ff 100%);
  color: #09090b;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgba(var(--overlay-rgb), 0.1);
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.15s ease, border-color 0.2s ease;
}

.btn:hover {
  background: #94e571;
  color: #061c07;
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.btn:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: rgba(var(--overlay-rgb), 0.02);
  color: var(--text-main);
  border: 1px solid rgba(var(--overlay-rgb), 0.12);
  box-shadow: none;
}

.btn-secondary:hover {
  border-color: rgba(148, 229, 113, 0.45);
  color: #06230a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.btn-muted {
  background: var(--card-bg);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  box-shadow: none;
}

.btn-muted:hover {
  color: var(--heading);
  border-color: rgba(148, 229, 113, 0.35);
}

/* —— Cards & grids —— */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent-soft);
  border: 1px solid rgba(148, 229, 113, 0.28);
  color: var(--accent);
  margin-bottom: 16px;
}

.card {
  background: linear-gradient(180deg, rgba(var(--overlay-rgb), 0.05), rgba(var(--overlay-rgb), 0.025));
  border: 1px solid rgba(var(--overlay-rgb), 0.1);
  border-radius: 18px;
  padding: 28px;
  box-shadow: inset 0 1px 0 rgba(var(--overlay-rgb), 0.04);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

a.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.card h3,
.card-link h3 {
  color: var(--heading);
  font-size: 1.25rem;
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card p,
.card-link p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.98rem;
}

.card:hover,
.card-link:hover .card {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  border-color: rgba(148, 229, 113, 0.28);
  background: linear-gradient(180deg, rgba(var(--overlay-rgb), 0.06), rgba(var(--overlay-rgb), 0.03));
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* Homepage Resources — cards same height within each row */
.home-resources-grid {
  align-items: stretch;
}

.home-resources-grid > .card-link {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.home-resources-grid .card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--heading);
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-head p {
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 560px;
}

.section-block {
  margin: 72px 0;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--overlay-rgb), 0.08);
  background: rgba(var(--overlay-rgb), 0.03);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-persona-grid .card,
.home-resource-grid .card,
.home-cta-card {
  position: relative;
  overflow: hidden;
}

.home-persona-grid .card::before,
.home-resource-grid .card::before,
.home-cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--overlay-rgb), 0.06), transparent 40%);
  pointer-events: none;
}

.home-persona-grid .card > *,
.home-resource-grid .card > *,
.home-cta-card > * {
  position: relative;
}

.home-persona-grid .card h3,
.home-resource-grid .card h3,
.home-cta-card h3 {
  margin-bottom: 12px;
}

.home-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--heading);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.home-card-link::after {
  content: "→";
  transition: transform 0.15s ease;
}

.home-card-link:hover::after {
  transform: translateX(2px);
}

.home-resource-grid {
  gap: 20px;
}

.home-resource-grid .card {
  min-height: 100%;
}

/* Homepage tools grid — mirrors tools hub cards */
.home-tools-section {
  margin-top: 48px;
  padding-top: 24px;
}

.home-tools-section .section-head {
  margin-bottom: 32px;
}

.home-tools-section .section-head h2 {
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.home-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(180px, auto);
  gap: 16px;
  align-items: stretch;
}

.home-tools-grid > .card-link {
  grid-column: span 1;
}

@media (max-width: 1024px) {
  .home-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-tools-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.home-tools-grid > .card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.home-tools-grid .card {
  position: relative;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 180px;
  padding: 20px 18px 22px;
  border-radius: 16px;
}

.home-tools-grid .card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--overlay-rgb), 0.06), transparent 40%);
  pointer-events: none;
}

.home-tools-grid .card > * {
  position: relative;
}

.home-tools-grid .badge {
  align-self: flex-start;
  width: fit-content;
  margin-bottom: 14px;
  padding: 4px 7px;
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.home-tools-grid .card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.home-tools-grid .card p {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-muted);
  flex: 1;
  margin: 0;
}

.home-tools-grid > .home-tool-card--primary .card {
  border-color: color-mix(in srgb, var(--accent) 27%, var(--card-border));
  background:
    linear-gradient(145deg, var(--accent-soft), transparent 48%),
    linear-gradient(180deg, rgba(var(--overlay-rgb), 0.055), rgba(var(--overlay-rgb), 0.025));
}

.home-tools-grid .card-link:hover .card {
  transform: translateY(-2px);
}

.home-tools-grid .card-link:focus-visible {
  outline: none;
}

.home-tools-grid .card-link:focus-visible .card {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.home-tools-more {
  margin: 24px 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.home-tools-more a {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
}

.home-tools-more a:hover {
  color: var(--heading);
}

.home-feature-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.home-feature-band .tag {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-align: center;
  font-size: 0.82rem;
}

.home-extension-layout {
  align-items: center;
  gap: 28px;
}

.home-extension-notes {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.home-extension-notes li {
  display: flex;
  gap: 10px;
  color: var(--text-muted);
}

.home-extension-notes li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #94e571, #f1f38a);
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .home-feature-band {
    grid-template-columns: 1fr;
  }
}

/* —— CTA banner —— */
.cta-banner {
  background: linear-gradient(135deg, rgba(148, 229, 113, 0.08) 0%, rgba(51, 51, 153, 0.12) 100%);
  border: 1px solid rgba(148, 229, 113, 0.2);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 48px 0 0;
}

.cta-banner p {
  margin: 0;
  color: var(--text-muted);
  flex: 1;
  min-width: 200px;
}

.cta-banner strong {
  color: var(--heading);
}

/* —— FAQ —— */
.faq-section {
  width: 100%;
  max-width: none;
  margin: 48px 0 0;
  padding: 0;
}

/*
 * Content FAQs inherit the width of their immediate parent. Guide articles
 * remain inside their readable article column, while hubs, reference pages,
 * and individual tool surfaces use their full parent width. The tools hub and
 * legacy parser/downloader-family pages retain the centered 800px treatment.
 */
body.tools-page .faq-section,
body.pl-page .faq-section,
body.ps-page .faq-section,
body.dl-page .faq-section {
  width: auto;
  max-width: 800px;
  margin: 48px auto 0;
  padding: 0 20px;
}

.faq-section > h2 {
  text-align: center;
  color: var(--heading);
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item details {
  padding: 20px 22px;
  cursor: pointer;
}

.faq-item details:hover {
  background: rgba(var(--overlay-rgb), 0.02);
}

.faq-item summary {
  font-weight: 700;
  color: var(--heading);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
}

.faq-item summary h3 {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
  color: inherit;
  line-height: inherit;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.35rem;
  color: var(--accent);
  font-weight: 300;
  margin-left: 12px;
}

.faq-item details[open] summary::after {
  content: "−";
}

.faq-answer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
  color: var(--text-muted);
  line-height: 1.6;
}

/* Feature article blocks */
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 12px;
}

.feature-card h3 {
  color: var(--heading);
  font-size: 1.15rem;
  margin: 16px 0 8px;
}

.feature-card h3:first-child {
  margin-top: 0;
}

.feature-card p:last-child {
  margin-bottom: 0;
}

.feature-card ul {
  margin: 0 0 1em;
  padding-left: 1.2em;
  color: var(--text-muted);
}

.feature-card li {
  margin-bottom: 0.4em;
}

.tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(var(--overlay-rgb), 0.06);
  border: 1px solid var(--card-border);
  color: var(--code-text);
}

/* Contextual guide ↔ tool links */
.cross-link-module {
  padding-top: 0;
}

.cross-link-module__panel {
  padding: 28px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(143, 223, 110, 0.06), rgba(0, 0, 0, 0.12));
}

.cross-link-module__panel h2 {
  margin: 6px 0 18px;
  color: var(--heading);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.cross-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cross-link-card {
  display: block;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

.cross-link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 229, 113, 0.4);
  background: rgba(var(--overlay-rgb), 0.04);
}

.cross-link-card strong,
.cross-link-card span {
  display: block;
}

.cross-link-card strong {
  color: var(--heading);
  margin-bottom: 7px;
}

.cross-link-card span {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .cross-link-grid { grid-template-columns: 1fr; }
  .cross-link-module__panel { padding: 22px; }
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 40px 20px 48px;
  margin-top: auto;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer a:hover {
  color: var(--heading);
}

.footer-nav {
  max-width: var(--max);
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 28px;
  text-align: left;
}

.footer-nav__title {
  margin: 0 0 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.footer-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav__list li {
  margin: 0 0 8px;
}

.footer-nav__list li:last-child {
  margin-bottom: 0;
}

.footer-nav__list a {
  font-size: 0.88rem;
  line-height: 1.45;
}

.footer-badge {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 auto 20px;
}

.footer-badge img {
  display: block;
}

.site-footer .footer-note {
  text-align: center;
  font-size: 0.8rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.5;
  padding-top: 8px;
  border-top: 1px solid rgba(var(--overlay-rgb), 0.06);
}

.site-footer .footer-updated {
  display: block;
  color: var(--text-dim);
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .footer-nav {
    grid-template-columns: 1fr;
  }
}

/* —— Toast —— */
.toast {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--success);
  color: #000;
  width: max-content;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.25s, transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* —— Extension showcase placeholder —— */
.extension-visual {
  aspect-ratio: 16 / 10;
  max-height: 320px;
  border-radius: var(--radius);
  border: 1px dashed var(--card-border);
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.extension-visual--media {
  margin: 0 auto;
  max-width: min(1280px, 100%);
  width: 100%;
  max-height: none;
  padding: 0;
  border-style: solid;
  overflow: hidden;
  display: block;
}

.extension-visual--media img {
  width: 100%;
  height: auto;
  max-height: min(800px, 85vh);
  object-fit: contain;
  display: block;
}

/* —— Legal prose —— */
.legal-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 16px 0;
}

.legal-box strong {
  color: var(--text-main);
}

.prose h2 {
  font-size: 1.2rem;
  color: var(--heading);
  margin: 2rem 0 0.75rem;
}

.prose > h2:first-of-type {
  margin-top: 0;
}

.prose h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  margin: 1.25rem 0 0.5rem;
  line-height: 1.35;
}

.prose h2 + h3 {
  margin-top: 0.5rem;
}

.prose p,
.prose li {
  color: var(--text-muted);
  margin-bottom: 0.85em;
}

.prose ul {
  padding-left: 1.25em;
}

/* —— Tabs (styles page) —— */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-tabs button {
  font-family: inherit;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.filter-tabs button:hover {
  color: var(--heading);
  border-color: rgba(148, 229, 113, 0.35);
}

.filter-tabs button.is-active {
  background: var(--accent-soft);
  border-color: rgba(148, 229, 113, 0.4);
  color: var(--heading);
}

/* ==========================================================================
   SUNOOCEP — Comprehensive Mobile UI Enhancements
   ========================================================================== */

/* 1. Global Touch & Viewport Stability */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
  -webkit-tap-highlight-color: rgba(148, 229, 113, 0.15);
}

/* 2. Prevent iOS Safari auto-zoom on form controls */
@media (max-width: 768px) {
  input[type="text"],
  input[type="search"],
  input[type="url"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* 3. Smooth Animated Hamburger Icon (Transforms into 'X' when open) */
.nav-toggle {
  touch-action: manipulation;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.nav-toggle:active {
  transform: scale(0.94);
}

.nav-toggle-bar {
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s ease,
              background-color 0.2s ease;
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 4. Enhanced Mobile Navigation Drawer & Items */
@media (max-width: 1150px) {
  .nav-links {
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    border-bottom: 1px solid rgba(var(--overlay-rgb), 0.14);
  }

  .nav-links.is-open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease, color 0.15s ease;
  }

  .nav-links a:hover,
  .nav-links a:active {
    background: rgba(var(--overlay-rgb), 0.06);
  }

  .nav-tools__toggle {
    min-height: 44px;
    min-width: 44px;
  }

  /* Clean Theme Control in Drawer */
  .nav-links > .theme-control {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .nav-links > .theme-control::before {
    content: "Appearance";
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
  }
}

@media (max-width: 520px) {
  .nav-tools__group {
    grid-template-columns: 1fr;
    row-gap: 4px;
  }
  .nav-tools__group a {
    padding: 10px 12px;
    font-size: 0.88rem;
  }
}

/* 5. Mobile Home & Hero Improvements */
@media (max-width: 560px) {
  .hero {
    padding: 56px 14px 38px;
    padding-top: calc(56px + var(--nav-h));
  }

  .hero-panel {
    padding: 24px 14px 20px;
    border-radius: 20px;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 7.5vw, 2.3rem);
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 14px;
  }

  .hero h1 br {
    display: none;
  }

  .hero p {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 20px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
    margin-bottom: 20px;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
    font-size: 0.95rem;
  }

  .hero-proof {
    gap: 6px;
    margin-bottom: 20px;
  }

  .hero-proof .tag {
    font-size: 0.72rem;
    padding: 4px 10px;
  }

  .hero-grid {
    gap: 14px;
    margin-top: 14px;
  }

  .hero-card {
    padding: 16px;
    border-radius: 16px;
  }

  .hero-signal-list,
  .hero-outcome-list {
    padding-left: 18px;
    font-size: 0.88rem;
  }

  .hero-metric-strip {
    gap: 10px;
  }

  .hero-metric {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .home-tools-section {
    margin-top: 36px;
  }

  .home-tools-grid .card {
    padding: 18px 16px;
    min-height: 160px;
  }

  .footer-nav {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .site-footer {
    padding: 32px 16px 40px;
  }
}
