:root {
  --paper: #f7f8f5;
  --white: #ffffff;
  --ink: #11243b;
  --ink-soft: #203a5a;
  --muted: #5d6d80;
  --line: #dce3ea;
  --line-strong: #c7d2df;
  --blue: #1358d8;
  --blue-dark: #0d46b4;
  --blue-soft: #edf4ff;
  --navy: #06284d;
  --navy-deep: #041d39;
  --success: #147a56;
  --danger: #a82e39;
  --focus: #ffbf47;
  --shadow-panel: 0 24px 55px rgba(17, 36, 59, 0.12);
  --shadow-menu: 0 18px 44px rgba(17, 36, 59, 0.14);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --container: 1180px;
  --header-height: 78px;
}

:root[data-theme="dark"] {
  --paper: #0b1524;
  --white: #111f31;
  --ink: #f3f7fc;
  --ink-soft: #d7e3f0;
  --muted: #aebed0;
  --line: #2a3d52;
  --line-strong: #3b536d;
  --blue: #6da2ff;
  --blue-dark: #9bc0ff;
  --blue-soft: #162b47;
  --navy: #071a31;
  --navy-deep: #041426;
  --success: #66d2a5;
  --danger: #ff929c;
  --shadow-panel: 0 24px 55px rgba(0, 0, 0, 0.34);
  --shadow-menu: 0 18px 44px rgba(0, 0, 0, 0.4);
}

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

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

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Scroll lock while the mobile menu is open. The body is pinned with
   `position: fixed` (offset by `top`) instead of `overflow: hidden`, which on
   iOS did not reliably stop background scroll and hid menu overflow. */
body.menu-open {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

/* Short viewports (landscape phones): let the menu use the full height. */
@media (max-width: 880px) and (max-height: 520px) {
  .site-nav {
    top: calc(var(--header-height) + 6px);
    max-height: calc(100dvh - var(--header-height) - 16px);
    padding: 10px;
  }

  .nav-link {
    min-height: 42px;
    padding: 8px 12px;
  }
}

[hidden] {
  display: none !important;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  border: 0;
}

::selection {
  background: #cfe0ff;
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.page-main {
  overflow: clip;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--white);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

:root[data-theme="dark"] .site-header {
  background: rgba(11, 21, 36, 0.96);
}

.header-inner {
  width: min(var(--container), calc(100% - 48px));
  min-height: var(--header-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.header-inner.container {
  width: min(var(--container), calc(100% - 48px));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 1.03rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.brand .brand-dot,
.brand > span > span {
  color: var(--blue);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 2vw, 30px);
  margin-left: auto;
}

.theme-toggle {
  min-height: 44px;
  margin-left: auto;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

.theme-toggle + .menu-toggle + .site-nav,
.theme-toggle + .site-nav {
  margin-left: 0;
}

:root[data-theme="dark"] .home-hero::after {
  background: linear-gradient(90deg, rgba(17, 31, 49, 0.96) 0%, rgba(17, 31, 49, 0.78) 52%, rgba(17, 31, 49, 0.9) 100%);
}

:root[data-theme="dark"] .consultation-ready {
  border-color: #376650;
  background: #122b24;
}

:root[data-theme="dark"] .process-band,
:root[data-theme="dark"] .guide-band {
  background: #0d1b2b;
}

:root[data-theme="dark"] .source-scope-note,
:root[data-theme="dark"] .scope-warning,
:root[data-theme="dark"] .legal-notice {
  background: #2b2318;
  border-color: #7a5b2c;
}

:root[data-theme="dark"] .source-toolbar,
:root[data-theme="dark"] .independence-note {
  background: var(--white);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select {
  background: #0d1a2a;
}

:root[data-theme="dark"] ::selection {
  background: #315b98;
  color: #ffffff;
}

:root[data-theme="dark"] .section--ink,
:root[data-theme="dark"] .cta-band,
:root[data-theme="dark"] .section--ink .info-card,
:root[data-theme="dark"] .section--ink .scope-card,
:root[data-theme="dark"] .button-link-on-dark,
:root[data-theme="dark"] .text-link--light {
  color: #f3f7fc;
}

:root[data-theme="dark"] .button-on-dark,
:root[data-theme="dark"] .button-light {
  border-color: #f3f7fc;
  background: #f3f7fc;
  color: #041d39;
}

:root[data-theme="dark"] .button-quiet:hover {
  background: #1a2b3f;
}

/* Dark theme: surfaces that were declared with fixed light backgrounds.
   Without these, light text landed on a light surface and became unreadable. */
:root[data-theme="dark"] .section--tinted {
  background: #0e1c2e;
}

:root[data-theme="dark"] .limit-panel,
:root[data-theme="dark"] .disclaimer-card {
  background: #2b2318;
  border-left-color: #7a5b2c;
}

:root[data-theme="dark"] .source-preview-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-link {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--blue-dark);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}

.menu-toggle span {
  width: 21px;
  height: 2px;
  border-radius: 10px;
  background: var(--blue);
  transition: transform 160ms ease, opacity 160ms ease;
}

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

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

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

.menu-toggle:has(.menu-toggle-icon) {
  width: auto;
  padding-inline: 12px;
  flex-direction: row;
  gap: 8px;
}

.menu-toggle:has(.menu-toggle-icon) > span:not(.menu-toggle-icon) {
  width: auto;
  height: auto;
  background: transparent;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.menu-toggle .menu-toggle-icon {
  width: 18px;
  height: 14px;
  background:
    linear-gradient(var(--blue), var(--blue)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 0 6px / 100% 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 0 12px / 100% 2px no-repeat;
}

.menu-toggle:has(.menu-toggle-icon)[aria-expanded="true"] > span {
  opacity: 1;
  transform: none;
}

/* Buttons and links */
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease,
    transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary,
.nav-cta {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.button-primary:hover,
.nav-cta:hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  box-shadow: 0 10px 24px rgba(19, 88, 216, 0.2);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--white);
  color: var(--blue-dark);
}

.button-secondary:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
}

.button-quiet:hover {
  background: #eef1f4;
}

.button-on-dark {
  border-color: var(--white);
  background: var(--white);
  color: var(--navy);
}

.button-on-dark:hover {
  background: var(--blue-soft);
}

.button-link-on-dark {
  border-color: transparent;
  background: transparent;
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.button-small {
  min-height: 44px;
  padding: 10px 17px;
  font-size: 0.88rem;
}

.button-full {
  width: 100%;
}

.text-link {
  display: inline-flex;
  align-items: center;
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.text-link:hover {
  color: var(--blue);
  text-decoration-thickness: 2px;
}

/* Home hero */
.home-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-color: var(--white);
  background-image:
    linear-gradient(72deg, transparent 0 18%, rgba(19, 88, 216, 0.035) 18.1% 18.25%, transparent 18.35% 100%),
    linear-gradient(108deg, transparent 0 66%, rgba(19, 88, 216, 0.035) 66.1% 66.25%, transparent 66.35% 100%),
    linear-gradient(0deg, rgba(19, 88, 216, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 88, 216, 0.025) 1px, transparent 1px);
  background-size: auto, auto, 96px 96px, 96px 96px;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.64) 52%, rgba(255, 255, 255, 0.78) 100%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  gap: clamp(46px, 6vw, 84px);
  align-items: start;
  padding-block: clamp(58px, 7vw, 96px);
}

.hero-copy h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(3.15rem, 4.8vw, 4.65rem);
  line-height: 0.99;
  letter-spacing: -0.065em;
}

.hero-copy {
  padding-top: clamp(42px, 5vw, 72px);
}

.hero-lead,
.hero-summary {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 1.35vw, 1.25rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.review-panel {
  padding: clamp(24px, 3.4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-panel);
}

.panel-heading {
  margin-bottom: 25px;
}

.panel-heading h2,
.consultation-ready h3 {
  margin: 0;
  font-size: clamp(1.7rem, 2.2vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.panel-heading p,
.consultation-ready > p {
  margin: 10px 0 0;
  color: var(--muted);
}

.review-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.operation-fieldset legend {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

.field label span,
.operation-fieldset legend span {
  color: var(--danger);
}

.field input,
.field select,
.field textarea,
.source-search-field input,
.followup-form input,
.followup-form textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field textarea,
.followup-form textarea {
  min-height: 108px;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.source-search-field input:hover,
.followup-form input:hover,
.followup-form textarea:hover {
  border-color: #9dadbf;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.source-search-field input:focus,
.followup-form input:focus,
.followup-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(19, 88, 216, 0.16);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(168, 46, 57, 0.1);
}

.field-help,
.privacy-note {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.field-error {
  min-height: 1.2em;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 700;
}

.operation-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.operation-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 9px;
}

.operation-option {
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink-soft);
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.operation-option:hover {
  border-color: var(--blue);
}

.operation-option:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.operation-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.operation-option:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.optional-details {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 12px;
}

.optional-details summary {
  color: var(--blue-dark);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.optional-details .field {
  margin-top: 14px;
}

.privacy-note {
  margin: -4px 0 0;
  text-align: center;
}

.consultation-ready {
  padding: 22px;
  border: 1px solid #a9d5c1;
  border-radius: var(--radius);
  background: #f1faf6;
}

.consultation-ready:focus {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.ready-label {
  margin: 0 0 8px !important;
  color: var(--success) !important;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prepared-summary {
  display: grid;
  gap: 0;
  margin: 20px 0;
  border-top: 1px solid #cce4d8;
}

.prepared-summary div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #cce4d8;
}

.prepared-summary dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.prepared-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  font-weight: 800;
}

.ready-actions {
  display: grid;
  gap: 8px;
}

.independence-strip {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.independence-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px 24px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
}

.independence-inner strong {
  color: var(--ink);
}

/* Shared sections */
.section {
  padding-block: clamp(72px, 8vw, 112px);
}

.section--compact {
  padding-top: 24px;
}

.section--tinted {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f1f5f9;
}

.section--ink {
  background: var(--navy);
  color: var(--white);
}

.section-header {
  max-width: 780px;
  margin-bottom: 42px;
}

.section-header--split {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-header--light p {
  color: #ccdae9 !important;
}

.section-header h2,
.section-intro h2,
.cta-band h2,
.source-method h2,
.source-sequence h2,
.source-faq h2 {
  margin: 0;
  font-size: clamp(2.05rem, 3.5vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.section-header p,
.section-intro p,
.source-method p,
.source-sequence p,
.source-faq p {
  max-width: 690px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.eyebrow {
  margin: 0 0 10px !important;
  color: var(--blue-dark) !important;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 68px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principles-grid article {
  position: relative;
  padding: 30px 32px 32px;
}

.principles-grid article + article {
  border-left: 1px solid var(--line);
}

.principle-number,
.guide-preview .guide-index,
.source-step {
  display: block;
  margin-bottom: 20px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.principles-grid h3,
.review-row h3,
.process-list h3,
.guide-preview h3,
.method-step h3,
.scope-card h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.principles-grid p,
.review-row p,
.process-list p,
.guide-preview p,
.method-step p,
.scope-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.72;
}

.review-list {
  border-top: 1px solid var(--line);
}

.review-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(180px, auto);
  gap: 26px;
  align-items: center;
  padding: 25px 8px;
  border-bottom: 1px solid var(--line);
}

.review-row img {
  width: 48px;
  height: 48px;
}

.row-scope {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: right;
}

.process-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 38px;
  padding: 0;
  list-style: none;
}

.process-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 16px;
  padding: 14px 34px 18px 0;
}

.process-list li + li {
  padding-left: 34px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.process-list li > span {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #5b9cff;
  border-radius: 50%;
  color: #9bc1ff;
  font-weight: 800;
}

.process-list p {
  color: #ccdae9;
}

.source-preview-list {
  border-top: 1px solid var(--line-strong);
}

.source-preview-row {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 18px 6px;
  border-bottom: 1px solid var(--line-strong);
}

.source-preview-row:hover {
  background: rgba(255, 255, 255, 0.55);
}

.source-preview-row strong,
.source-preview-row small {
  display: block;
}

.source-preview-row strong {
  color: var(--ink);
  font-size: 1.02rem;
}

.source-preview-row small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.external-label {
  flex: 0 0 auto;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.source-disclaimer {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(48px, 8vw, 112px);
  align-items: start;
}

.faq-list {
  border-top: 1px solid var(--line-strong);
}

.faq-list details,
.source-faq details {
  border-bottom: 1px solid var(--line-strong);
}

.faq-list summary,
.source-faq summary {
  position: relative;
  padding: 22px 48px 22px 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker,
.source-faq summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after,
.source-faq summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 8px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 160ms ease;
}

.faq-list details[open] summary::after,
.source-faq details[open] summary::after {
  transform: translateY(-20%) rotate(225deg);
}

.faq-list details p,
.source-faq details p {
  max-width: 760px;
  margin: -6px 44px 24px 0;
  color: var(--muted);
  line-height: 1.72;
}

.guide-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.guide-preview {
  padding: 32px 34px 36px 0;
}

.guide-preview + .guide-preview {
  padding-left: 34px;
  border-left: 1px solid var(--line);
}

.guide-preview .text-link {
  margin-top: 20px;
}

.cta-band {
  padding-block: 42px;
  background: var(--navy);
  color: var(--white);
}

.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.cta-band h2 {
  max-width: 790px;
  font-size: clamp(1.9rem, 3.3vw, 3rem);
}

.cta-band p {
  margin: 12px 0 0;
  color: #ccdae9;
}

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

/* Internal page hero */
.inner-hero {
  padding-block: clamp(46px, 6vw, 82px);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.breadcrumb a {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inner-hero h1,
.article-hero h1 {
  max-width: 1040px;
  margin: 0;
  font-size: clamp(2.65rem, 5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.062em;
}

.inner-hero div.hero-lead {
  max-width: none;
  margin-top: 0;
}

.inner-hero div.hero-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: clamp(38px, 6vw, 78px);
  align-items: end;
}

.hero-lead-copy .hero-summary {
  max-width: 790px;
}

.hero-summary {
  color: var(--ink-soft);
}

.independence-note {
  padding: 24px 26px;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
}

/* Short scope/disclaimer line placed directly under the hero actions, so the
   limits of the service are visible before the visitor reads further. */
.hero-note {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.hero-note .text-link {
  display: inline-block;
  margin-left: 4px;
}

.independence-note strong {
  display: block;
  margin-bottom: 8px;
}

.independence-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.68;
}

.source-review-date {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.source-review-date span {
  color: var(--success);
  font-size: 0.62rem;
}

/* Source directory */
.source-directory {
  padding-block: clamp(68px, 7vw, 96px);
}

.section-intro {
  max-width: 760px;
  margin-bottom: 34px;
}

.source-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 360px) auto;
  gap: 20px;
  align-items: end;
  margin-bottom: 48px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.toolbar-label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.source-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-filter {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.source-filter:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

.source-filter.is-active,
.source-filter[aria-pressed="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.source-search-field {
  position: relative;
}

.source-search-field > span {
  position: absolute;
  top: 50%;
  left: 15px;
  z-index: 1;
  color: var(--muted);
  transform: translateY(-50%);
}

.source-search-field input {
  padding-left: 40px;
}

.source-count {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.source-group {
  margin-bottom: 54px;
}

.source-group-header {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: 32px;
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}

.source-group-header > div {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.source-group-header .source-step {
  margin: 0;
}

.source-group-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  letter-spacing: -0.04em;
}

.source-group-header p {
  margin: 0;
  color: var(--muted);
}

.source-row {
  display: grid;
  grid-template-columns: 44px minmax(220px, 0.9fr) minmax(300px, 1.35fr) auto;
  gap: 22px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.source-index {
  color: var(--blue);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 800;
}

.source-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.source-owner,
.source-external {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.source-external {
  color: var(--blue-dark);
}

.source-main h3 {
  margin: 0;
  font-size: 1.04rem;
  letter-spacing: -0.025em;
}

.source-main p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.source-scope {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
}

.source-scope div {
  padding-left: 14px;
  border-left: 2px solid var(--line-strong);
}

.source-scope .scope-warning {
  border-left-color: #d69b3c;
}

.source-scope dt {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
}

.source-scope dd {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.source-link {
  white-space: nowrap;
}

.source-empty {
  padding: 44px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  text-align: center;
}

.source-empty h2 {
  margin: 0;
}

.source-empty p {
  margin: 10px 0 0;
  color: var(--muted);
}

.source-method,
.source-sequence,
.source-faq {
  padding-block: clamp(70px, 8vw, 110px);
}

.section-intro-compact {
  max-width: 680px;
  margin-bottom: 28px;
}

.source-scope-note {
  margin-top: 18px;
  padding: 20px 22px;
  border-left: 3px solid #c77824;
  background: #fff8ee;
}

.source-scope-note p {
  margin: 8px 0 0;
  color: var(--muted);
}

.source-cta {
  padding-block: 64px;
}

.source-cta .cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 32px;
  border-radius: var(--radius);
}

.source-method {
  border-block: 1px solid var(--line);
  background: var(--white);
}

.source-method-grid,
.method-grid,
.scope-grid,
.legal-grid,
.followup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.source-sequence-list,
.method-steps,
.numbered-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 38px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.source-sequence-list li,
.method-step,
.numbered-list li {
  padding: 28px;
}

.source-sequence-list li + li,
.method-step + .method-step,
.numbered-list li + li {
  border-left: 1px solid var(--line);
}

/* Internal content systems */
.content-grid,
.article-layout,
.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 330px);
  gap: clamp(46px, 7vw, 96px);
  align-items: start;
}

.article-layout {
  grid-template-columns: minmax(0, 760px) minmax(240px, 320px);
  justify-content: space-between;
}

.prose {
  max-width: 760px;
}

.prose h2,
.legal-content h2,
.article-content h2 {
  margin: 2.3em 0 0.65em;
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.prose h2:first-child,
.legal-content h2:first-child,
.article-content h2:first-child {
  margin-top: 0;
}

.prose h3,
.legal-content h3,
.article-content h3 {
  margin: 1.8em 0 0.55em;
  font-size: 1.16rem;
  letter-spacing: -0.025em;
}

.prose p,
.legal-content p,
.article-content p,
.prose li,
.legal-content li,
.article-content li {
  color: var(--ink-soft);
  line-height: 1.8;
}

.prose a,
.legal-content a,
.article-content a {
  color: var(--blue-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.prose ul,
.prose ol,
.legal-content ul,
.legal-content ol,
.article-content ul,
.article-content ol {
  padding-left: 1.25rem;
}

.content-aside,
.article-aside,
.legal-nav,
.followup-panel {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.content-aside h2,
.article-aside h2,
.legal-nav h2,
.followup-panel h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.content-aside ul,
.article-aside ul,
.legal-nav ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.content-aside a,
.article-aside a,
.legal-nav a {
  color: var(--blue-dark);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.callout,
.article-callout,
.scope-card,
.method-card,
.legal-note {
  padding: 24px;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
}

.callout h3,
.article-callout h3,
.legal-note h3 {
  margin-top: 0;
}

.check-list,
.plain-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 0.58em;
  left: 3px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--blue);
  border-radius: 50%;
}

.guide-list {
  border-top: 1px solid var(--line);
}

.guide-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.guide-row h2,
.guide-row h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  letter-spacing: -0.04em;
}

.guide-row p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.article-sources {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.followup-form {
  display: grid;
  gap: 16px;
}

/* Supporting page components */
.split-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(44px, 7vw, 92px);
  align-items: start;
}

.split-layout--center {
  align-items: center;
}

.card-grid,
.process-grid,
.comparison-grid {
  display: grid;
  gap: 20px;
}

.card-grid--3,
.process-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.comparison-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card,
.process-card,
.scope-card,
.action-card,
.callout-card,
.key-takeaway,
.question-prompt,
.disclaimer-card,
.limit-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.info-card h3,
.process-card h3,
.scope-card h3,
.action-card h3,
.key-takeaway h2,
.question-prompt h3,
.disclaimer-card h2,
.limit-panel h3 {
  margin: 0;
  letter-spacing: -0.035em;
}

.info-card p,
.process-card p,
.scope-card p,
.action-card p,
.callout-card p,
.key-takeaway p,
.question-prompt p,
.disclaimer-card p,
.limit-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.72;
}

.scope-card--yes {
  border-top: 3px solid var(--success);
}

.scope-card--no {
  border-top: 3px solid #c77824;
}

.action-card {
  box-shadow: var(--shadow-panel);
}

.action-card .button {
  margin-top: 22px;
}

.button-accent {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.button-accent:hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
}

.button-light {
  border-color: var(--white);
  background: var(--white);
  color: var(--navy);
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.microcopy,
.card-kicker,
.guide-index-meta {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.card-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--blue-dark);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-number,
.step-number {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
}

.compact-steps,
.numbered-checklist {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.compact-steps li,
.checklist-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.compact-steps li > span,
.checklist-number {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
}

.compact-steps strong,
.checklist-item strong {
  display: block;
  margin-bottom: 5px;
}

.compact-steps p,
.checklist-item p {
  margin: 0;
  color: var(--muted);
}

.deliverable-note,
.key-takeaway {
  border-color: #bdd1f5;
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
}

.limit-panel,
.disclaimer-card {
  border-left: 4px solid #c77824;
  background: #fff8ee;
}

.section--ink .eyebrow {
  color: #9fc2ff !important;
}

.section--ink .section-header p,
.section--ink .process-card p,
.section--ink .info-card p,
.section--ink .scope-card p,
.section--ink .plain-list,
.section--ink .plain-list li {
  color: #ccdae9;
}

.section--ink .process-card,
.section--ink .info-card,
.section--ink .scope-card {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.guide-index {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.guide-index-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.guide-index-number {
  color: var(--blue);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 800;
}

.guide-index-copy h2,
.guide-index-copy h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.95rem);
  letter-spacing: -0.04em;
}

.guide-index-copy p {
  max-width: 720px;
  margin: 9px 0 0;
  color: var(--muted);
}

.topic-list,
.plain-list,
.pause-list,
.source-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-list li,
.plain-list li,
.pause-list li,
.source-list li {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.guide-article {
  padding-block: clamp(68px, 8vw, 106px);
}

.guide-article .article-layout {
  align-items: start;
}

.article-body h2 {
  margin: 2.2em 0 0.6em;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  margin: 1.8em 0 0.5em;
  font-size: 1.2rem;
}

.article-body p,
.article-body li {
  color: var(--ink-soft);
  line-height: 1.82;
}

.article-body a,
.source-list a {
  color: var(--blue-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-aside .button {
  width: 100%;
  margin-top: 18px;
}

.question-prompt,
.key-takeaway,
.disclaimer-card {
  margin-block: 34px;
}

.evidence-list {
  margin-top: 20px;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin-block: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.reading-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.reading-table th,
.reading-table td {
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.reading-table th {
  background: var(--blue-soft);
  color: var(--ink);
  font-size: 0.8rem;
}

.reading-table td {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.text-link--light {
  color: var(--white);
}

/* Footer */
.site-footer {
  padding-top: 54px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.footer-grid {
  display: grid;
  /* marca | navegacion | contacto | redes | aviso legal */
  grid-template-columns:
    minmax(220px, 1.1fr)
    minmax(130px, 0.55fr)
    minmax(250px, 1fr)
    minmax(150px, 0.6fr)
    minmax(220px, 1fr);
  gap: 28px;
  padding-bottom: 44px;
}

/* Social links */
.footer-social {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-social strong {
  font-size: 0.86rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

/* The icon files are monochrome SVGs drawn with `currentColor`, but an <img>
   does not inherit the page colour, so the icon would always render in one
   fixed tone and disappear on the opposite theme. Using the file as a CSS mask
   paints it with the surrounding `color` instead, so it follows the light and
   dark themes on its own. */
.social-link img {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.social-link img[src$="tiktok.svg"] {
  -webkit-mask-image: url("./assets/social/tiktok.svg");
  mask-image: url("./assets/social/tiktok.svg");
}

.social-link img[src$="instagram.svg"] {
  -webkit-mask-image: url("./assets/social/instagram.svg");
  mask-image: url("./assets/social/instagram.svg");
}

.social-link:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
  transform: translateY(-2px);
}


.footer-brand p {
  max-width: 360px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-nav {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-nav a,
.footer-contact a {
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 700;
  /* A long email address must be able to wrap instead of being clipped. */
  overflow-wrap: anywhere;
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-contact {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-contact strong {
  font-size: 0.86rem;
}

.footer-disclosure {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.footer-bottom {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
}

/* Responsive */
@media (max-width: 1080px) {
  .site-nav {
    gap: 15px;
  }

  .nav-link {
    font-size: 0.84rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr);
    gap: 42px;
  }

  .hero-copy h1 {
    font-size: clamp(3rem, 5.6vw, 4.6rem);
  }

  .source-row {
    grid-template-columns: 38px minmax(190px, 0.8fr) minmax(280px, 1.3fr);
  }

  .source-row .source-link {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 0.7fr 0.9fr;
  }

  .footer-disclosure {
    grid-column: 1 / -1;
    max-width: 720px;
  }
}

@media (max-width: 880px) {
  :root {
    --header-height: 70px;
  }

  .container,
  .header-inner,
  .header-inner.container {
    width: min(var(--container), calc(100% - 36px));
  }

  .header-inner,
  .header-inner.container {
    gap: 8px;
  }

  .theme-toggle {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  .theme-toggle span:last-child {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: 0;
  }

  .site-nav {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    right: 18px;
    left: 18px;
    width: auto;
    /* Viewport units: `vh` on mobile Safari/Chrome resolves to the LARGEST
       viewport (browser chrome hidden), so the menu used to extend below the
       visible area and, with `body.menu-open { overflow: hidden }`, the last
       options could not be reached. `dvh` tracks the real visible height. */
    max-height: calc(100vh - var(--header-height) - 28px);
    max-height: calc(100dvh - var(--header-height) - 28px);
    display: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    /* Reset the desktop auto margins, which pushed the panel off-screen. */
    margin: 0;
    padding: 14px;
    /* Keep the last option clear of the iOS home indicator. */
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-menu);
    /* Constrain to the visible width so nothing can overflow horizontally. */
    max-width: calc(100vw - 36px);
  }

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

  .nav-link {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.96rem;
    /* The base rule sets `white-space: nowrap` for the single-row desktop bar.
       In the stacked mobile panel a long label could then overflow sideways. */
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .nav-link:hover,
  .nav-link[aria-current="page"] {
    background: var(--blue-soft);
  }

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

  .site-nav .button {
    width: 100%;
    margin-top: 6px;
    flex: 0 0 auto;
  }

  .hero-grid,
  .inner-hero div.hero-lead,
  .two-column-section,
  .content-grid,
  .article-layout,
  .legal-layout,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 42px;
    padding-block: 58px 70px;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .hero-copy {
    padding-top: 0;
  }

  .review-panel {
    max-width: 650px;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .principles-grid article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .review-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .row-scope {
    grid-column: 2;
    text-align: left;
  }

  .process-list {
    grid-template-columns: 1fr;
  }

  .process-list li,
  .process-list li + li {
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 0;
  }

  .section-header--split,
  .cta-band-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .source-count {
    grid-column: 1 / -1;
    margin: 0;
  }

  .source-group-header {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .source-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .source-scope {
    grid-column: 2;
  }

  .source-row .source-link {
    grid-column: 2;
  }

  .content-aside,
  .article-aside,
  .legal-nav,
  .followup-panel {
    position: static;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-disclosure,
  .footer-social {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .container,
  .header-inner,
  .header-inner.container {
    width: min(var(--container), calc(100% - 32px));
  }

  .brand {
    gap: 8px;
    font-size: 0.91rem;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .menu-toggle {
    width: 46px;
    height: 46px;
  }

  .home-hero::after {
    background: rgba(255, 255, 255, 0.68);
  }

  .hero-grid {
    padding-block: 48px 54px;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: clamp(2.55rem, 12vw, 3.45rem);
    line-height: 1.02;
  }

  .hero-lead,
  .hero-summary {
    margin-top: 20px;
    font-size: 1.02rem;
    line-height: 1.68;
  }

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

  .hero-actions .button,
  .cta-actions .button {
    width: 100%;
  }

  .review-panel {
    padding: 24px 18px;
    border-radius: var(--radius);
  }

  .operation-options {
    grid-template-columns: 1fr;
  }

  .independence-inner {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    padding-block: 18px;
    text-align: left;
  }

  .section,
  .source-method,
  .source-sequence,
  .source-faq {
    padding-block: 68px;
  }

  .section--compact {
    padding-top: 8px;
  }

  .section-header {
    margin-bottom: 30px;
  }

  .section-header h2,
  .section-intro h2,
  .source-method h2,
  .source-sequence h2,
  .source-faq h2 {
    font-size: 2rem;
  }

  .principles-grid {
    margin-bottom: 48px;
  }

  .principles-grid article {
    padding: 24px 8px;
  }

  .review-row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 16px;
    padding-block: 22px;
  }

  .review-row img {
    width: 40px;
    height: 40px;
  }

  .source-preview-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-block: 20px;
  }

  .guide-preview-grid,
  .source-method-grid,
  .method-grid,
  .scope-grid,
  .legal-grid,
  .followup-grid,
  .card-grid--3,
  .process-grid--3,
  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .guide-index-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
  }

  .guide-index-card .button,
  .guide-index-card .text-link {
    grid-column: 2;
    justify-self: start;
  }

  .guide-preview,
  .guide-preview + .guide-preview {
    padding: 26px 6px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .guide-preview:first-child {
    border-top: 0;
  }

  .cta-band {
    padding-block: 38px;
  }

  .source-cta .cta-band {
    align-items: stretch;
    flex-direction: column;
    padding: 26px 20px;
  }

  .source-cta .button {
    width: 100%;
  }

  .inner-hero {
    padding-block: 36px 52px;
  }

  .inner-hero h1,
  .article-hero h1 {
    font-size: clamp(2.35rem, 11vw, 3.3rem);
  }

  .inner-hero div.hero-lead {
    gap: 28px;
  }

  .independence-note {
    padding: 20px;
  }

  .source-toolbar {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .source-count {
    grid-column: auto;
  }

  .source-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-filter {
    border-radius: 8px;
  }

  .source-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .source-index {
    display: none;
  }

  .source-scope,
  .source-row .source-link {
    grid-column: 1;
  }

  .source-scope {
    grid-template-columns: 1fr;
  }

  .source-link {
    width: 100%;
  }

  .source-sequence-list,
  .method-steps,
  .numbered-list {
    grid-template-columns: 1fr;
  }

  .source-sequence-list li + li,
  .method-step + .method-step,
  .numbered-list li + li {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .guide-row {
    grid-template-columns: 1fr;
  }

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

  .footer-disclosure {
    grid-column: auto;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .cta-band,
  .hero-actions,
  .menu-toggle,
  .source-toolbar {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .section,
  .inner-hero,
  .source-directory {
    padding-block: 24px;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}

/* ============================================================
   React-driven animations & micro-interactions
   (enhancements; the site remains fully usable without JS)
   ============================================================ */

html {
  scroll-behavior: smooth;
}

/* Page-leave transition, triggered by React when navigating via the header */
.page-main {
  transition: opacity 170ms ease, transform 170ms ease;
}

html.is-leaving .page-main {
  opacity: 0;
  transform: translateY(10px);
}

html.is-leaving .site-header {
  opacity: 0.6;
}

/* Header animated indicator (sliding highlight) */
/* Desktop only: on mobile the nav is a fixed dropdown, and forcing
   `position: relative` here used to override it (this rule appears after the
   media query), pushing the menu off-screen to the right. */
@media (min-width: 881px) {
  .site-nav {
    position: relative;
  }
}

/* Replace the default per-link underline when the React indicator is active */
.site-nav:has(.nav-indicator) .nav-link::after {
  display: none;
}

.nav-indicator {
  position: absolute;
  bottom: 4px;
  left: 0;
  height: 2px;
  border-radius: 10px;
  background: var(--blue);
  pointer-events: none;
  opacity: 1;
  transition:
    transform 340ms cubic-bezier(0.22, 1, 0.36, 1),
    width 340ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease;
}

.nav-indicator.is-travelling {
  transition:
    transform 220ms cubic-bezier(0.32, 0.72, 0, 1),
    width 220ms cubic-bezier(0.32, 0.72, 0, 1),
    opacity 180ms ease;
}

@media (max-width: 880px) {
  .nav-indicator {
    display: none;
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  will-change: opacity, transform;
  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card / row hover lift */
.review-row,
.guide-preview,
.info-card,
.scope-card,
.source-preview-row {
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.review-row:hover,
.guide-preview:hover,
.info-card:hover,
.scope-card:hover,
.source-preview-row:hover {
  transform: translateY(-3px);
}

/* Button press feedback */
.button:active {
  transform: translateY(0) scale(0.98);
}
