/* NGT信貸
   Order: tokens, base, header and footer, shared components, page sections, responsive.
   One idea runs through it: 清 (clear). White space, ruled sheets, one deep harbour colour. */

:root {
  --harbour: #0b2b36;
  --harbour-deep: #072029;
  --ink: #10272f;
  --slate: #4b5f66;
  --jade: #0e6b5c;
  --jade-deep: #0a5347;
  --sage: #dce8e2;
  --mist: #f3f6f5;
  --paper: #fff;
  --line: #d6dfdc;
  --line-strong: #a9bab6;
  --brass: #c8a766;
  --foam: #cfe6dc;
  --alert: #96401f;
  --alert-tint: #fbf0ea;

  /* Display: a Song face drawn to the Hong Kong glyph standard, so 睇、搵、咗 sit right.
     Body: the reader's own system Hei, which costs nothing to load. */
  --display: "Chiron Sung HK", "Songti TC", "Noto Serif CJK TC", "Segoe UI", "PingFang HK", "Microsoft JhengHei UI", "Microsoft JhengHei", serif;
  --body: "Segoe UI", "PingFang HK", "PingFang TC", "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans HK", "Noto Sans CJK TC", sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --shell: 72rem;
  --header-h: 4.5rem;
  --section: clamp(3.5rem, 8vw, 6.5rem);
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  background: var(--paper);
  font: 400 1rem/1.75 var(--body);
  line-break: strict;
  -webkit-font-smoothing: antialiased;
}
main { display: block; min-height: 60vh; }
img { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, .button, .answer, .chip { touch-action: manipulation; }
::selection { color: var(--harbour); background: var(--foam); }
:focus-visible { outline: 3px solid var(--jade); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible { outline-color: var(--foam); }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3, p, li, dd { overflow-wrap: break-word; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 700; }
h1, h2, h3 { line-height: 1.3; letter-spacing: .01em; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.2rem + 3.6vw, 3.75rem); line-height: 1.2; }
h2 { font-size: clamp(1.75rem, 1.25rem + 1.9vw, 2.625rem); }
h3 { font-size: 1.25rem; }
p { text-wrap: pretty; }

.shell { width: min(var(--shell), 100% - 2 * var(--gutter)); margin-inline: auto; }
.icon { width: 1.125rem; height: 1.125rem; flex: none; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}
.skip {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 30;
  padding: .625rem 1rem;
  border-radius: .5rem;
  background: var(--harbour);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip:not(:focus) { clip-path: inset(50%); pointer-events: none; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(255 255 255 / .92);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  width: max-content;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark { display: block; width: 2.125rem; height: 2.125rem; border-radius: .5rem; }
.brand-name { font-size: 1.3125rem; line-height: 1; letter-spacing: .02em; }
.nav { display: flex; align-self: stretch; gap: .25rem; }
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding-inline: 1rem;
  color: var(--slate);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color .16s ease;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto 1rem -1px;
  height: 2px;
  background: var(--jade);
}
.header-action { justify-self: end; }

/* Buttons. Actions are squared off; choices (chips) are pills. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .5rem 1.125rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.button--lg { min-height: 3.25rem; padding-inline: 1.5rem; font-size: 1rem; }
.button--primary { background: var(--jade); color: #fff; }
.button--primary:hover { background: var(--jade-deep); }
.button--quiet { border-color: var(--line-strong); background: var(--paper); color: var(--ink); }
.button--quiet:hover { border-color: var(--ink); }
.button--light { background: #fff; color: var(--harbour); }
.button--light:hover { background: var(--sage); }
.button--outline-light { border-color: rgb(255 255 255 / .4); color: #fff; }
.button--outline-light:hover { border-color: #fff; background: rgb(255 255 255 / .08); }
.button:disabled { background: var(--line); color: var(--slate); }

.text-button {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  min-height: 2.75rem;
  padding: .25rem .125rem;
  border: 0;
  background: none;
  color: var(--jade);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
}
.text-button:hover { color: var(--jade-deep); }
.text-button:disabled { visibility: hidden; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.lead { color: var(--slate); font-size: clamp(1.0625rem, .98rem + .35vw, 1.1875rem); line-height: 1.8; }
.small-print { color: var(--slate); font-size: .875rem; line-height: 1.65; }

/* A photo that runs from just right of centre to the edge of the window. */
.side-photo { position: absolute; inset-block: 0; right: 0; left: calc(50% + 5rem); background: var(--sage); }
.side-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Section heading in a narrow left column, content on the right. Used down the whole page. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: start;
}
.split-aside > p { margin-top: 1rem; color: var(--slate); max-width: 22em; }
.split-aside > .button { margin-top: 1.75rem; }

/* The sheet: a document on the desk. Only this component carries a shadow. */
.sheet {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: .875rem;
  box-shadow: 0 1px 2px rgb(11 43 54 / .05), 0 28px 56px -30px rgb(11 43 54 / .3);
}
.sheet-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .25rem 1rem;
  padding: 1rem clamp(1.25rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}
.sheet-title { font-size: .9375rem; font-weight: 600; line-height: 1.5; }
.sheet-head h2 { font-size: 1.25rem; }
.sheet-step { color: var(--slate); font-size: .875rem; font-variant-numeric: tabular-nums; }
.sheet-body { padding: clamp(1.25rem, 3vw, 2rem); }

/* Home: hero */

.hero { position: relative; overflow: hidden; overflow: clip; }
.hero-copy { max-width: 38rem; padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 7vw, 8rem); }
.hero h1 { font-size: clamp(3rem, 1rem + 3.9vw, 4.25rem); }
.hero h1 span { display: block; }
.hero .lead { margin-top: 1.5rem; max-width: 26em; }
.hero .actions { margin-top: 2rem; }
.assurances {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.75rem;
  margin-top: 2.25rem;
  padding: 0;
  list-style: none;
  color: var(--slate);
  font-size: .9375rem;
}
.assurances li { display: flex; align-items: center; gap: .5rem; }
.assurances .icon { color: var(--jade); }
.hero .side-photo img { object-position: 82% 28%; }

/* Home: self-test */

.quiz-section { background: var(--mist); padding-block: var(--section); }
.quiz { position: relative; z-index: 1; scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.privacy-line { display: flex; align-items: flex-start; gap: .5rem; font-size: .9375rem; }
.privacy-line .icon { margin-top: .3em; color: var(--jade); }
.split-aside > .privacy-line { margin-top: 1.5rem; color: var(--ink); }

.quiz-meter { display: flex; gap: .375rem; padding: 0; list-style: none; }
.quiz-meter li { flex: 1; height: .25rem; border-radius: 1rem; background: var(--line); transition: background-color .3s ease; }
.quiz-meter li.is-done, .quiz-meter li.is-current { background: var(--jade); }
.quiz-stage { margin-top: 1.75rem; }
.quiz-stage h3, .quiz-result h3 {
  font-size: clamp(1.375rem, 1.15rem + .9vw, 1.75rem);
  line-height: 1.4;
  scroll-margin-top: calc(var(--header-h) + 5rem);
}
.quiz-stage h3:focus, .quiz-result h3:focus { outline: 0; }
.question-hint { margin-top: .375rem; color: var(--slate); font-size: .9375rem; }
.answers { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: .625rem; overflow: hidden; }
.answer {
  display: flex;
  align-items: center;
  gap: .875rem;
  width: 100%;
  min-height: 3.5rem;
  padding: .625rem 1rem;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--paper);
  font-weight: 500;
  line-height: 1.4;
  text-align: start;
  transition: background-color .14s ease;
}
.answer:first-child { border-top: 0; }
.answer-key {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  color: var(--slate);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}
.answer::after {
  content: "";
  flex: none;
  width: .5rem;
  height: .5rem;
  margin-inline: auto .25rem;
  border-block-start: 1.5px solid var(--line-strong);
  border-inline-end: 1.5px solid var(--line-strong);
  transform: rotate(45deg);
  transition: border-color .14s ease, transform .14s ease;
}
.answer:hover { background: var(--mist); }
.answer:hover .answer-key { border-color: var(--jade); color: var(--jade); }
.answer:hover::after { border-color: var(--jade); transform: translateX(3px) rotate(45deg); }
.answer:focus-visible { outline-offset: -3px; border-radius: .5rem; }
.answer[aria-pressed="true"] { background: var(--sage); }
.answer[aria-pressed="true"] .answer-key { border-color: var(--jade); background: var(--jade); color: #fff; }
.quiz-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: .75rem;
  color: var(--slate);
  font-size: .875rem;
}
.quiz-foot .text-button:disabled + span { margin-inline-start: auto; }

.result-kicker { display: flex; align-items: center; gap: .5rem; color: var(--jade); font-size: .9375rem; font-weight: 600; }
.quiz-result h3 { margin-top: .5rem; }
.result-detail { margin-top: .75rem; max-width: 34em; }
.recap { margin-top: 1.5rem; border-top: 1px solid var(--ink); font-size: .9375rem; }
.recap div {
  display: grid;
  grid-template-columns: 6.5em minmax(0, 1fr);
  gap: 1rem;
  padding-block: .625rem;
  border-bottom: 1px solid var(--line);
}
.recap dt { color: var(--slate); }
.recap dd { font-weight: 500; }
.quiz-result .actions { margin-top: 1.5rem; gap: .75rem 1rem; }
.quiz-result .small-print { margin-top: 1rem; }
.quiz noscript p { padding: clamp(1.25rem, 3vw, 2rem); }

/* Each question and the result arrive with one short move, in the direction of travel. */
@media (prefers-reduced-motion: no-preference) {
  .is-entering { animation: step-in .32s var(--ease) backwards; }
  .is-entering[data-enter="back"] { animation-name: step-back; }
  @keyframes step-in { from { opacity: 0; transform: translateX(.875rem); } }
  @keyframes step-back { from { opacity: 0; transform: translateX(-.875rem); } }
}

/* Home: guide index */

.topics { padding-block: var(--section); }
.index { padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.index a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.375rem .5rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background-color .16s ease;
}
.index a:hover { background: var(--mist); }
.index-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--jade);
}
.index-icon .icon { width: 1.375rem; height: 1.375rem; }
.index h3 { font-size: clamp(1.1875rem, 1.05rem + .5vw, 1.4375rem); }
.index p { margin-top: .125rem; color: var(--slate); font-size: .9375rem; }
.index-arrow { width: 1.25rem; height: 1.25rem; color: var(--line-strong); transition: color .16s ease, transform .16s ease; }
.index a:hover .index-arrow { color: var(--jade); transform: translateX(4px); }

/* Home: what happens to your information */

.pledge { background: var(--mist); padding-block: var(--section); }
.pledge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.pledge-item { padding-top: 1.125rem; border-top: 1px solid var(--ink); }
.pledge-item h3 { font-size: 1.1875rem; }
.pledge-item p { margin-top: .5rem; color: var(--slate); font-size: .9375rem; }
.pledge-item a { color: var(--jade); text-underline-offset: .22em; }

/* Closing band: WhatsApp */

.reach { position: relative; overflow: hidden; overflow: clip; background: var(--harbour); color: #fff; }
.reach-copy { max-width: 34rem; padding-block: var(--section); }
.reach p { margin-top: 1rem; max-width: 24em; color: #cddadd; }
.reach-number { margin-top: 1.75rem; font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); line-height: 1.2; letter-spacing: .03em; }
.reach-number a { color: var(--brass); text-decoration: none; }
.reach-number a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.reach .actions { margin-top: 1.75rem; }
.reach .side-photo { background: var(--harbour-deep); }
.reach .side-photo img { object-position: 62% 18%; }
.reach--plain .shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem 3rem;
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}
.reach--plain .reach-copy { padding-block: 0; }
.reach--plain .actions { margin-top: 0; }

/* Footer */

.footer { background: var(--harbour-deep); color: #c3d1d4; padding-block: 2.5rem 2rem; font-size: .875rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem; }
.footer .brand { color: #fff; }
.footer .brand-mark { box-shadow: 0 0 0 1px rgb(255 255 255 / .16); }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: #e3ecee;
  font-size: .9375rem;
  text-decoration: none;
}
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: .25em; }
.footer-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / .14);
}
.footer-note p { max-width: 44em; }

/* Inner pages: title band */

.page-hero { position: relative; overflow: hidden; overflow: clip; border-bottom: 1px solid var(--line); }
.page-hero-copy { max-width: 36rem; padding-block: clamp(2.5rem, 6vw, 4.75rem); }
.page-hero .lead { margin-top: .875rem; max-width: 24em; }
.page-meta { margin-top: 1.5rem; color: var(--slate); font-size: .875rem; }
.page-hero .side-photo img { object-position: 60% 20%; }

/* Guide */

.guide-body { padding-block: clamp(2.5rem, 6vw, 5rem) var(--section); }
.guide-layout {
  display: grid;
  grid-template-columns: 13rem minmax(0, 46rem);
  justify-content: space-between;
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: start;
}
.toc { position: sticky; top: calc(var(--header-h) + 2rem); }
.toc-title { color: var(--slate); font-size: .875rem; font-weight: 600; }
.toc ul { margin-top: .75rem; padding: 0; list-style: none; border-inline-start: 1px solid var(--line); }
.toc a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  margin-inline-start: -1px;
  padding: .25rem 1rem;
  border-inline-start: 2px solid transparent;
  color: var(--slate);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .16s ease, border-color .16s ease;
}
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { border-color: var(--jade); color: var(--ink); font-weight: 600; }

.articles { min-width: 0; }
.article { padding-block: clamp(2.25rem, 5vw, 3.5rem); border-top: 1px solid var(--line); scroll-margin-top: var(--header-h); }
.article:first-child { padding-top: 0; border-top: 0; scroll-margin-top: calc(var(--header-h) + 2rem); }
.article h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem); line-height: 1.35; }
.article > p { margin-top: 1rem; max-width: 40em; }

.points { margin-top: 1.5rem; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.points li { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 1.25rem; padding-block: .875rem; border-bottom: 1px solid var(--line); }
.points strong { font-weight: 600; }
.points--plain { margin-top: .75rem; border-top-color: var(--line); }
.points--plain li { grid-template-columns: auto minmax(0, 1fr); gap: .875rem; }
.points--plain li::before { content: ""; width: .4375rem; height: .4375rem; margin-top: .68em; border-radius: 50%; background: var(--jade); }

.flags { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem; margin-top: 1.25rem; padding: 0; list-style: none; }
.flags li {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .75rem 1rem;
  border-radius: .5rem;
  background: var(--alert-tint);
  color: var(--alert);
  font-weight: 600;
  line-height: 1.45;
}

.compare { margin-top: 1.5rem; }
.compare-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: .75rem; }
.compare-side { padding: 1rem 1.125rem; border: 1px solid var(--line); border-radius: .625rem; background: var(--mist); }
.compare-label { display: block; color: var(--slate); font-size: .8125rem; font-weight: 600; }
.compare-side strong { display: block; margin-top: .25rem; font-size: 1.125rem; line-height: 1.45; }
.compare-vs {
  align-self: center;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--slate);
  font-size: .875rem;
  font-weight: 600;
}
.compare figcaption { margin-top: .75rem; color: var(--slate); font-size: .9375rem; }

.source { margin-top: 1.5rem; color: var(--slate); font-size: .875rem; }
.source a { display: inline-flex; align-items: center; gap: .3rem; color: var(--jade); font-weight: 600; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.source a:hover { color: var(--jade-deep); }
.source .icon { width: .9375rem; height: .9375rem; }

/* Contact */

.contact-body { background: var(--mist); padding-block: clamp(2rem, 5vw, 4rem) var(--section); }
.contact-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4.4fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.fields { display: grid; gap: 1.5rem; padding: 0; border: 0; }
.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.field-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin-bottom: .5rem; padding: 0; font-weight: 600; }
.field-label span { color: var(--slate); font-size: .8125rem; font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .375rem 1.125rem;
  border: 1px solid var(--line-strong);
  border-radius: 10rem;
  background: var(--paper);
  font-size: .9375rem;
  font-weight: 500;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { border-color: var(--harbour); background: var(--harbour); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--jade); outline-offset: 3px; }
.field input[type="text"], .field textarea {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: .6875rem .875rem;
  border: 1px solid var(--line-strong);
  border-radius: .5rem;
  background: var(--paper);
  line-height: 1.6;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.field input[type="text"]:hover, .field textarea:hover { border-color: var(--slate); }
.field input[type="text"]:focus, .field textarea:focus { outline: 0; border-color: var(--jade); box-shadow: 0 0 0 3px rgb(14 107 92 / .22); }
.field ::placeholder { color: #6b7d83; opacity: 1; }
.field textarea { min-height: 6.5rem; resize: vertical; }
.field-hint { display: flex; justify-content: space-between; gap: 1rem; margin-top: .375rem; }
.field-hint [data-counter] { flex: none; font-variant-numeric: tabular-nums; }

.preview { margin-top: 1.75rem; padding: 1rem 1.125rem 1.125rem; border-radius: .625rem; background: var(--mist); }
.preview-title { color: var(--slate); font-size: .875rem; font-weight: 600; }
.bubble {
  width: fit-content;
  max-width: min(100%, 30em);
  margin: .625rem 0 0 auto;
  padding: .625rem .875rem;
  border-radius: .875rem .25rem .875rem .875rem;
  background: var(--sage);
  font-size: .9375rem;
  line-height: 1.65;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.bubble .is-pending { color: var(--slate); }
.preview .small-print { margin-top: .625rem; text-align: end; }
.send-button { width: 100%; margin-top: 1.25rem; }
.contact-form noscript p { margin-top: .75rem; }

.contact-side { display: grid; gap: 1.25rem; min-width: 0; }
.channel { overflow: hidden; border-radius: .875rem; background: var(--harbour); color: #fff; }
.channel-photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: 60% 16%; }
.channel-body { padding: 1.5rem; }
.channel h2 { font-size: 1.125rem; }
.channel-number { display: inline-block; margin-top: .375rem; color: var(--brass); font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2rem); line-height: 1.25; letter-spacing: .03em; text-decoration: none; }
.channel-number:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.channel p { margin-top: .5rem; color: #cddadd; font-size: .9375rem; }
.channel .button { width: 100%; margin-top: 1.25rem; }
.privacy-note { padding: 1.25rem 1.5rem 1.375rem; border: 1px solid var(--line); border-radius: .875rem; background: var(--paper); }
.privacy-note h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.0625rem; }
.privacy-note h2 .icon { color: var(--jade); }
.privacy-note p { margin-top: .5rem; color: var(--slate); font-size: .9375rem; }

/* The page opens once: the copy settles in line by line while the photo is drawn open. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: settle .7s var(--ease) backwards; }
  .hero-copy > :nth-child(2) { animation-delay: .07s; }
  .hero-copy > :nth-child(3) { animation-delay: .14s; }
  .hero-copy > :nth-child(4) { animation-delay: .21s; }
  .hero .side-photo { animation: draw-open .9s var(--ease) .05s backwards; }
  @keyframes settle { from { opacity: 0; transform: translateY(.75rem); } }
  @keyframes draw-open { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0); } }
}

/* Desktop only: the self-test sheet rises out of the hero. */
@media (min-width: 56.0625rem) {
  .hero-copy { padding-bottom: clamp(8rem, 4.5rem + 6vw, 9.5rem); }
  .quiz { margin-top: calc(-1 * var(--section) - 4.5rem); }
}

/* Tablet and below: one column. */
@media (max-width: 56rem) {
  :root { --header-h: 3.75rem; }
  .header-inner { display: flex; justify-content: space-between; gap: .75rem; }
  .header-action { display: none; }
  .nav { gap: 0; margin-inline-end: -.5rem; }
  .nav a { padding-inline: .5rem; font-size: .875rem; }
  .nav a[aria-current="page"]::after { inset-inline: .5rem; }
  .brand-mark { width: 1.875rem; height: 1.875rem; }
  .brand-name { font-size: 1.125rem; }

  .side-photo { position: static; }
  .hero h1 { font-size: clamp(2rem, 10.4vw, 2.625rem); }
  .hero-copy { padding-block: 2.5rem 2.25rem; }
  .hero .side-photo { aspect-ratio: 16 / 10; }
  .hero .side-photo img { object-position: 76% 22%; }
  .page-hero .side-photo { aspect-ratio: 16 / 8; }
  .page-hero-copy { padding-block: 2.25rem 2rem; }

  .split, .guide-layout, .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .split-aside > p { max-width: 34em; }
  .pledge-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }

  .reach-copy { padding-block: 3rem 2.5rem; }
  .reach .side-photo { aspect-ratio: 16 / 9; }
  .reach--plain .shell { grid-template-columns: minmax(0, 1fr); }

  .toc { position: static; }
  .toc ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .5rem; }
}

@media (max-width: 40rem) {
  .hero .actions .button { flex: 1 1 100%; }
  .assurances { flex-direction: column; gap: .375rem; margin-top: 1.75rem; }
  .index a { grid-template-columns: auto minmax(0, 1fr); gap: 1rem; padding-inline: 0; }
  .index-arrow { display: none; }
  .points li { grid-template-columns: minmax(0, 1fr); gap: .125rem; }
  .points--plain li { grid-template-columns: auto minmax(0, 1fr); gap: .875rem; }
  .flags { grid-template-columns: minmax(0, 1fr); }
  .compare-row { grid-template-columns: minmax(0, 1fr); }
  .compare-vs { justify-self: center; margin-block: -.25rem; }
  .quiz-result .actions .button { flex: 1 1 100%; }
  .reach .actions .button { flex: 1 1 100%; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 22.4rem) {
  .nav a:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

@media print {
  .site-header, .footer, .reach, .side-photo, .toc { display: none; }
  .sheet { box-shadow: none; }
}
