/* ==========================================================================
   Nubeli Help — global visual system
   Single stylesheet for the static help site. It follows the look of the
   main site (nubeliny.com, repo nubeli-web-frontend): Inter, the #00773f
   green, white sticky header, the "green line + eyebrow + title" section
   pattern, 10px radii, a dark footer and an automatic dark theme.
   No @import and no external resources: Inter is served from
   assets/fonts (SIL Open Font License, same file the main site ships).
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-var.woff2") format("woff2");
}

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  /* Brand (kept from the original replica; the validator pins them). */
  --green-primary: #00773f;
  --green-action: #067d04;
  --section-bg: #f7f7f7;
  --heading-muted: #6b6b6b;
  --heading-dark: #444444;
  --white: #fff;

  /* Semantic tokens, aligned with app/globals.css of the main site. */
  --bg: #ffffff;
  --fg: #0a0a0a;
  --text: #404040;
  --muted-fg: #6b6b6b;
  --surface: #ffffff;
  --surface-muted: #f7f7f7;
  --border: #e5e5e5;
  --link: #00773f;
  --link-hover: #005c31;
  --green-dark: #005c31;
  --green-soft: #e8f4ed;
  --on-green: #ffffff;
  --footer-bg: #171717;
  --footer-fg: #f5f5f5;
  --footer-muted: #a3a3a3;
  --danger: #c62828;
  --danger-soft: #fdecea;
  --header-bg: rgba(255, 255, 255, 0.9);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(10, 10, 10, 0.04), 0 8px 24px rgba(10, 10, 10, 0.06);
  --shadow-hover: 0 2px 4px rgba(10, 10, 10, 0.05), 0 14px 32px rgba(0, 51, 28, 0.12);
  --header-height: 80px;
  --header-mobile-height: 64px;
  --container-gutter: 24px;
  --transition-fast: 160ms ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --fg: #fafafa;
    --text: #d4d4d4;
    --muted-fg: #a3a3a3;
    --surface: #171717;
    --surface-muted: #121212;
    --border: rgba(255, 255, 255, 0.1);
    /* Lighter green so links keep 4.5:1 on the dark background. */
    --link: #3ccf7f;
    --link-hover: #7be3a8;
    --green-soft: rgba(0, 119, 63, 0.18);
    --footer-bg: #000000;
    --danger: #f28b82;
    --danger-soft: rgba(242, 139, 130, 0.12);
    --header-bg: rgba(10, 10, 10, 0.85);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.5);
  }
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */

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

html {
  scroll-padding-top: calc(var(--header-height) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.5em;
  color: var(--fg);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
}

h3 {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.35rem;
}

li::marker {
  color: var(--green-primary);
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--link-hover);
}

/* External links say so, for the eye and for screen readers. */
main a[target="_blank"]::after {
  content: "\2197";
  display: inline-block;
  margin-left: 2px;
  font-size: 0.8em;
  text-decoration: none;
}

strong,
b {
  color: var(--fg);
}

hr {
  height: 1px;
  margin: 2rem 0;
  border: 0;
  background-color: var(--border);
}

/* Visible keyboard focus on every interactive element. */
:focus-visible {
  outline: 3px solid var(--green-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background-color: var(--surface);
  color: var(--link);
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top var(--transition-fast);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
}

/* --------------------------------------------------------------------------
   3. Global layout
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--container-gutter);
  padding-right: var(--container-gutter);
}

.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* The footer stays at the bottom on short pages. */
.page-shell > main {
  flex: 1 0 auto;
}

.section {
  padding: 64px 0;
}

.section--muted {
  background-color: var(--surface-muted);
}

.section--tight {
  padding: 32px 0;
}

/* Section titles carry the main site's short green line above them. */
.section-title {
  margin-bottom: 1.5rem;
  color: var(--fg);
}

.section-title::before {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  margin-bottom: 16px;
  border-radius: 999px;
  background-color: var(--green-primary);
}

.text-center .section-title::before {
  margin-left: auto;
  margin-right: auto;
}

.section-title--muted {
  color: var(--fg);
}

.lead {
  font-size: 1.0625rem;
  color: var(--muted-fg);
}

/* --------------------------------------------------------------------------
   4. Sticky header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__item {
  margin: 0;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--link);
  background-color: var(--green-soft);
}

/* Active link: green text and a short underline, like the main site. */
.site-nav a.is-active,
.site-nav a[aria-current="page"] {
  color: var(--link);
  font-weight: 600;
}

.site-nav a.is-active::after,
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--green-primary);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  cursor: pointer;
}

.nav-toggle:hover {
  background-color: var(--green-soft);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background-color: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Language switcher: globe + current language, opens a two-item menu.
   A <details> element, so it works without JavaScript; js/main.js only
   closes it on an outside click or Escape. */
.lang-menu {
  position: relative;
}

.lang-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.lang-menu__toggle::-webkit-details-marker {
  display: none;
}

.lang-menu__toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--transition-fast);
}

.lang-menu[open] .lang-menu__toggle::after {
  transform: translateY(1px) rotate(-135deg);
}

.lang-menu__toggle:hover,
.lang-menu[open] .lang-menu__toggle {
  background-color: var(--green-soft);
  color: var(--link);
}

.lang-menu__icon {
  flex: 0 0 auto;
}

.lang-menu__list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 110;
  min-width: 140px;
  margin: 0;
  padding: 4px;
  list-style: none;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
}

.lang-menu__list li {
  margin: 0;
}

.lang-menu__list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: calc(var(--radius) - 4px);
  color: var(--fg);
  font-size: 0.9375rem;
  text-decoration: none;
}

.lang-menu__list a:hover,
.lang-menu__list a:focus {
  background-color: var(--green-soft);
  color: var(--link);
}

.lang-menu__list a[aria-current="true"] {
  background-color: var(--green-soft);
  color: var(--link);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   5. Mobile side menu
   -------------------------------------------------------------------------- */

.mobile-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  width: min(320px, 86vw);
  height: 100vh;
  height: 100dvh;
  padding: 20px;
  background-color: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
  transform: translateX(100%);
  visibility: hidden;
  /* Visibility is delayed only when closing, so focus can enter the panel
     as soon as it opens. */
  transition: transform 220ms ease, visibility 0s linear 220ms;
  overflow-y: auto;
}

.mobile-panel.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 220ms ease, visibility 0s linear 0s;
}

.mobile-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.mobile-panel__title {
  margin: 0;
  color: var(--muted-fg);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-panel__close:hover,
.mobile-panel__close:focus {
  background-color: var(--green-soft);
}

.mobile-panel__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-panel__nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 14px;
  color: var(--fg);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
}

.mobile-panel__nav a:hover,
.mobile-panel__nav a:focus {
  background-color: var(--green-soft);
  color: var(--link);
}

.mobile-panel__nav a.is-active,
.mobile-panel__nav a[aria-current="page"] {
  background-color: var(--green-soft);
  color: var(--link);
  font-weight: 600;
}

/* Language links at the bottom of the mobile menu. */
.mobile-panel__lang {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted-fg);
}

.mobile-panel__lang a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  font-weight: 500;
  text-decoration: none;
}

.mobile-panel__lang a[aria-current="true"] {
  border-color: var(--green-primary);
  background-color: var(--green-soft);
  color: var(--link);
}

/* The last entry of the menu is the "Get the app" call to action. */
.mobile-panel__nav a:last-child {
  justify-content: center;
  margin-top: 12px;
  background-color: var(--green-primary);
  color: var(--on-green);
  font-weight: 600;
}

.mobile-panel__nav a:last-child:hover,
.mobile-panel__nav a:last-child:focus {
  background-color: var(--green-dark);
  color: var(--on-green);
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  background-color: rgba(10, 10, 10, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.mobile-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   6. Buttons and CTA
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid var(--green-primary);
  border-radius: var(--radius);
  background-color: var(--green-primary);
  color: var(--on-green);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

/* Arrow on primary buttons, as on the main site's "Contact Us". */
.btn::after {
  content: "\2192";
  transition: transform var(--transition-fast);
}

.btn:hover,
.btn:focus {
  background-color: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--on-green);
}

.btn:hover::after {
  transform: translateX(3px);
}

.btn--ghost {
  background-color: transparent;
  color: var(--link);
  border-color: var(--border);
}

.btn--ghost:hover,
.btn--ghost:focus {
  background-color: var(--green-soft);
  border-color: var(--green-primary);
  color: var(--link);
}

/* Header CTA: a compact primary button. */
.btn--light {
  min-height: 40px;
  padding: 8px 18px;
}

.btn--block {
  width: 100%;
}

/* Closing CTA: a full-width green band, like the main site's call band. */
.cta {
  padding: 64px 0;
  background-color: var(--green-primary);
  color: var(--on-green);
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.cta__divider {
  width: 60px;
  height: 4px;
  border: 0;
  margin: 0;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.7);
}

.cta__title {
  margin: 0;
  color: var(--on-green);
}

.cta__text {
  max-width: 640px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.cta .btn {
  background-color: #ffffff;
  border-color: #ffffff;
  color: #00773f;
}

.cta .btn:hover,
.cta .btn:focus {
  background-color: #e8f4ed;
  border-color: #e8f4ed;
  color: #005c31;
}

.cta :focus-visible {
  outline-color: #ffffff;
}

/* --------------------------------------------------------------------------
   7. Breadcrumbs
   -------------------------------------------------------------------------- */

.breadcrumbs {
  padding: 20px 0 0;
  font-size: 0.875rem;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted-fg);
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: "\203A";
  color: var(--muted-fg);
}

.breadcrumbs a {
  color: var(--muted-fg);
  text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus {
  color: var(--link);
  text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
  color: var(--fg);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   8. Page hero
   -------------------------------------------------------------------------- */

.page-hero {
  padding: 32px 0 8px;
}

.page-hero__title {
  margin-bottom: 0.75rem;
}

/* The content right under a page title does not need a full section gap. */
.page-hero + .section {
  padding-top: 32px;
}

.page-hero__subtitle {
  margin: 0;
  color: var(--muted-fg);
  font-size: 1.0625rem;
}

/* When the subtitle comes first it is the section eyebrow: green line above
   and small muted label, the main site's pattern. */
.page-hero__subtitle:first-child {
  margin-bottom: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.page-hero__subtitle:first-child::before {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  margin-bottom: 16px;
  border-radius: 999px;
  background-color: var(--green-primary);
}

.hero-image {
  width: 100%;
  margin: 0;
}

.hero-image img {
  width: 100%;
}

.hero-media {
  margin: 0;
}

.hero-media img {
  width: 100%;
}

/* Two-column hero: text on one side, framed picture on the other. */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}

.hero-split__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Picture with the main site's rotated green square behind it. */
.framed {
  position: relative;
  isolation: isolate;
  padding: 24px;
}

.framed::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  /* Sized by the picture's height, so the rotated square (diagonal ~1.4x)
     barely leaves the frame and never covers the text next to it. */
  height: 78%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background-color: var(--green-primary);
  /* Pushed to the left so it peeks out beside the picture, as on the main
     site's about section. */
  transform: translate(-82%, -50%) rotate(45deg);
}

.framed img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
}

/* --------------------------------------------------------------------------
   9. Grids and cards
   -------------------------------------------------------------------------- */

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

.card-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card-grid--three {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* The whole card is clickable: its link stretches over it. */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.card:hover,
.card:focus-within {
  transform: translateY(-3px);
  border-color: var(--green-primary);
  box-shadow: var(--shadow-hover);
}

.card__media {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: var(--surface-muted);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.card:hover .card__media img {
  transform: scale(1.03);
}

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 8px;
  padding: 20px 22px 22px;
}

.card__title {
  margin: 0;
  font-size: 1.125rem;
  color: var(--fg);
}

.card__text {
  margin: 0;
  color: var(--muted-fg);
}

.card__link {
  margin-top: auto;
  font-weight: 600;
  text-decoration: none;
}

.card__link::after {
  content: " \2192";
}

.card__title .card__link {
  color: var(--fg);
}

.card__title .card__link::after {
  color: var(--link);
}

.card__link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card:hover .card__link {
  color: var(--link);
}

/* Contact cards. */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 22px;
  text-align: center;
  text-decoration: none;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.contact-card:hover,
.contact-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--green-primary);
  box-shadow: var(--shadow-hover);
}

.contact-card__media {
  margin: 0;
}

.contact-card__media img {
  width: auto;
  max-width: 96px;
}

.contact-card__title {
  margin: 0;
  font-size: 1.1rem;
  color: var(--fg);
}

/* Help topics of the landing pages: a grid of tappable rows. */
.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list li {
  margin: 0;
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  height: 100%;
  padding: 14px 18px;
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.link-list a::after {
  content: "\2192";
  flex: 0 0 auto;
  color: var(--link);
  transition: transform var(--transition-fast);
}

.link-list a:hover,
.link-list a:focus {
  border-color: var(--green-primary);
  background-color: var(--green-soft);
  color: var(--link);
}

.link-list a:hover::after {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   10. Accordion
   -------------------------------------------------------------------------- */

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 900px;
}

.accordion__item {
  overflow: hidden;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.accordion__item:has(.accordion-trigger[aria-expanded="true"]) {
  border-color: var(--green-primary);
  box-shadow: var(--shadow);
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 60px;
  padding: 16px 22px;
  background-color: transparent;
  border: 0;
  color: var(--fg);
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.accordion-trigger:hover {
  background-color: var(--green-soft);
}

/* Chevron inside a round badge. */
.accordion-trigger::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid var(--link);
  border-bottom: 2px solid var(--link);
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--transition-fast);
}

.accordion-trigger[aria-expanded="true"] {
  color: var(--link);
}

.accordion-trigger[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(-135deg);
}

.accordion-panel {
  max-width: 75ch;
  padding: 0 22px 22px;
  color: var(--text);
}

.accordion-panel:not([hidden]) {
  display: block;
}

.accordion-panel[hidden] {
  display: none;
}

.accordion-panel > :last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   11. Static form
   -------------------------------------------------------------------------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  max-width: 900px;
  padding: 28px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 600;
}

.field__hint {
  color: var(--muted-fg);
  font-size: 0.875rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 119, 63, 0.2);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--green-primary);
  outline-offset: 2px;
}

.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) {
  border-color: var(--danger);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.form-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
}

.form-status[data-state="success"] {
  background-color: var(--green-soft);
  border-color: var(--green-primary);
  color: var(--link);
}

.form-status[data-state="pending"] {
  background-color: var(--surface-muted);
  border-color: var(--border);
  color: var(--muted-fg);
}

.form-status[data-state="error"] {
  background-color: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.form-status:empty {
  display: none;
}

/* --------------------------------------------------------------------------
   12. Editorial content
   -------------------------------------------------------------------------- */

.prose {
  max-width: 75ch;
}

.prose > :last-child {
  margin-bottom: 0;
}

.see-also {
  max-width: 900px;
  margin-top: 40px;
  padding: 24px 28px;
  background-color: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.see-also__title {
  margin-top: 0;
  font-size: 1.125rem;
  color: var(--fg);
}

.see-also ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.see-also li {
  margin: 0;
}

.see-also a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.see-also a:hover,
.see-also a:focus {
  border-color: var(--green-primary);
  background-color: var(--green-soft);
}

.callout {
  margin: 24px 0;
  padding: 20px 22px;
  background-color: var(--green-soft);
  border-left: 4px solid var(--green-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

/* "Warning ⚠ Policy violation:" on the incident report page reads as an
   alert, not as body copy. #c62828 on white is 5.6:1. */
.policy-warning {
  display: inline-block;
  padding: 6px 12px;
  background-color: var(--danger-soft);
  border-left: 4px solid var(--danger);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--danger);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: auto;
  padding: 56px 0 28px;
  background-color: var(--footer-bg);
  color: var(--footer-muted);
  font-size: 0.9375rem;
}

.site-footer a {
  color: var(--footer-fg);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: #7be3a8;
  text-decoration: underline;
}

.site-footer :focus-visible {
  outline-color: #7be3a8;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px 48px;
}

.site-footer__brand img {
  height: 44px;
  width: auto;
}

.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__nav li {
  margin: 0;
}

.site-footer__nav a {
  font-weight: 500;
}

.site-footer__contact {
  grid-column: 1 / -1;
  margin: 0;
}

.site-footer__bottom {
  grid-column: 1 / -1;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer__copyright {
  margin: 0;
  color: var(--footer-muted);
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   14. Utilities
   -------------------------------------------------------------------------- */

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

.text-center {
  text-align: center;
}

.muted {
  color: var(--muted-fg);
}

.divider-green {
  height: 4px;
  width: 60px;
  max-width: 100%;
  margin: 0 0 16px;
  border: 0;
  border-radius: 999px;
  background-color: var(--green-primary);
}

/* Header logo: green on light, white on dark. */
.logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .logo-light {
    display: none;
  }

  .logo-dark {
    display: block;
  }
}

/* --------------------------------------------------------------------------
   15. Responsive — tablet
   -------------------------------------------------------------------------- */

@media (max-width: 1023px) {
  :root {
    --header-height: var(--header-mobile-height);
    --container-gutter: 16px;
  }

  html {
    scroll-padding-top: calc(var(--header-height) + 16px);
  }

  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-header__actions .lang-menu {
    display: none;
  }

  .site-logo img {
    height: 32px;
  }

  .section {
    padding: 48px 0;
  }

  .hero-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-split .framed {
    max-width: 560px;
  }

  .card-grid,
  .card-grid--two,
  .card-grid--three,
  .contact-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
  }
}

/* --------------------------------------------------------------------------
   16. Responsive — mobile
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .section {
    padding: 40px 0;
  }

  .section--tight {
    padding: 20px 0;
  }

  .page-hero {
    padding-top: 20px;
  }

  .card-grid,
  .card-grid--two,
  .card-grid--three,
  .contact-grid,
  .link-list {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .field--full {
    grid-column: auto;
  }

  .cta {
    padding: 48px 0;
  }

  .cta__actions,
  .hero-split__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .accordion-trigger {
    padding: 14px 16px;
    font-size: 1rem;
  }

  .accordion-panel {
    padding: 0 16px 18px;
  }

  .card__body {
    padding: 18px;
  }

  .contact-card {
    padding: 26px 18px;
  }

  .framed {
    padding: 14px;
  }

  .site-footer {
    padding: 40px 0 24px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .site-footer__nav ul {
    justify-content: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .site-footer__nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }

  .btn {
    width: 100%;
  }

  .site-header__actions .btn {
    width: auto;
  }

  /* Logo, CTA and menu button must fit in 360-414 px in both languages
     ("Descarga la app" is longer than "Get the app"). */
  .site-logo img {
    height: 28px;
  }

  .site-header__actions {
    gap: 8px;
  }

  .site-header__actions .btn {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.875rem;
  }

  .site-header__actions .btn::after {
    display: none;
  }
}

/* On very narrow phones the header CTA is hidden so the 44x44 menu button
   stays inside the viewport. The same link is the last entry of the menu. */
@media (max-width: 360px) {
  .site-header__actions .btn {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   17. User preferences
   -------------------------------------------------------------------------- */

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

  /* Without animation the panel and its children must be visible at once,
     so focus can move to the first link when the menu opens. */
  .mobile-panel,
  .mobile-panel *,
  .mobile-overlay {
    transition: none !important;
  }
}

@media print {
  .site-header,
  .mobile-panel,
  .mobile-overlay,
  .cta {
    display: none !important;
  }

  .accordion-panel[hidden] {
    display: block !important;
  }
}
