/* ===========================================================================
   IMUGA Traveller Declaration — screen styles
   Palette: deep ocean navy, aquamarine, warm sand highlight.
   Layout leans on a single .frame container plus CSS grid; the article page
   adds a sticky outline column at wide widths.
   =========================================================================== */

:root {
  --navy: #0b3a53;
  --navy-deep: #06263a;
  --aqua: #12a5b8;
  --aqua-dark: #0d8496;
  --sand: #f2c14e;
  --coral: #e2725b;

  --paper: #ffffff;
  --paper-tint: #f2f7f9;
  --paper-warm: #faf7f1;
  --rule: #d8e3e8;
  --text: #10262f;
  --text-mute: #4a6069;

  --r-sm: 7px;
  --r-md: 13px;
  --r-lg: 24px;

  --lift-1: 0 1px 2px rgb(11 58 83 / 7%), 0 3px 10px rgb(11 58 83 / 5%);
  --lift-2: 0 10px 34px rgb(11 58 83 / 13%);

  --pad: clamp(1rem, 3vw, 2rem);
  --band: clamp(3rem, 7vw, 5.5rem);

  --stack: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
           Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
html, body { max-width: 100%; overflow-x: clip; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--stack);
  font-size: clamp(1rem, .97rem + .16vw, 1.07rem);
  line-height: 1.66;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.18; font-weight: 700; letter-spacing: -.018em; text-wrap: balance; }
h1 { font-size: clamp(1.95rem, 1.3rem + 2.5vw, 3.05rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.35vw, 2rem); }
h3 { font-size: clamp(1.1rem, 1rem + .55vw, 1.35rem); }

p { margin: 0 0 1.1em; }
a { color: var(--aqua-dark); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
img, svg { max-width: 100%; height: auto; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.6rem 0; }
::selection { background: rgb(18 165 184 / 20%); }

:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; border-radius: 3px; }

.jump { position: absolute; left: -9999px; top: .5rem; z-index: 90; background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: var(--r-sm); }
.jump:focus { left: .5rem; color: #fff; }

/* --- container ----------------------------------------------------------- */

.frame { width: min(100% - 2.5rem, 1180px); margin-inline: auto; }
.frame--column { width: min(100% - 2.5rem, 780px); }

.kicker {
  margin: 0 0 .55rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--aqua-dark);
}
.kicker--light { color: #7fdbe6; }

/* --- buttons ------------------------------------------------------------- */

.button {
  --bg: var(--aqua);
  --fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .74rem 1.4rem;
  border: 2px solid transparent;
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--fg);
  font-weight: 650;
  font-size: .96rem;
  text-decoration: none;
  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.button:hover { color: var(--fg); box-shadow: var(--lift-2); transform: translateY(-1px); }
.button--go { --bg: var(--coral); }
.button--go:hover { --bg: #cf5c45; }
.button--outline { --bg: transparent; --fg: #fff; border-color: rgb(255 255 255 / 45%); }
.button--outline:hover { --bg: rgb(255 255 255 / 12%); }
.button--plain { --bg: transparent; --fg: var(--text); border-color: var(--rule); }
.button--plain:hover { --bg: var(--paper-tint); }
.button--tight { padding: .48rem 1rem; font-size: .88rem; }
.button--big { padding: .92rem 1.75rem; font-size: 1.02rem; }

/* --- masthead ------------------------------------------------------------ */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(255 255 255 / 93%);
  backdrop-filter: saturate(150%) blur(9px);
  border-bottom: 1px solid var(--rule);
}
.masthead__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 70px; padding-block: .55rem; }

.wordmark { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit; min-width: 0; }
.wordmark__mark { flex: none; border-radius: 8px; }
.wordmark__text { display: grid; min-width: 0; }
.wordmark__name { font-weight: 750; font-size: 1rem; line-height: 1.2; letter-spacing: -.02em; }
.wordmark__note { font-size: .74rem; color: var(--text-mute); line-height: 1.3; }

.topnav { display: flex; align-items: center; gap: .4rem 1.05rem; flex-wrap: wrap; justify-content: flex-end; }
.topnav__item { color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; padding: .25rem 0; border-bottom: 2px solid transparent; }
.topnav__item:hover { color: var(--aqua-dark); border-bottom-color: var(--aqua); }

.langpick { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--r-sm); overflow: hidden; }
.langpick__opt { padding: .28rem .62rem; font-size: .77rem; font-weight: 700; letter-spacing: .04em; color: var(--text-mute); text-decoration: none; }
.langpick__opt + .langpick__opt { border-left: 1px solid var(--rule); }
.langpick__opt:hover { background: var(--paper-tint); color: var(--text); }
.langpick__opt.on { background: var(--navy); color: #fff; }

@media (max-width: 760px) { .wordmark__note { display: none; } .topnav__item { display: none; } }
@media (max-width: 480px) {
  .masthead__bar { flex-wrap: wrap; }
  .wordmark { flex: 1 1 100%; }
  .topnav { flex: 1 1 100%; justify-content: space-between; padding-bottom: .2rem; }
}

/* --- opening (home hero) ------------------------------------------------- */

.opening {
  position: relative;
  isolation: isolate;
  color: #fff;
  padding-block: var(--band);
  /* Shows through while the photo decodes, and if it ever fails to load. */
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
}

.opening__photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 58%;   /* favours the lagoon over the treeline in short crops */
  filter: saturate(1.14) contrast(1.04);
}

/* Scrim shaped to the layout rather than applied flat: heavy behind the copy on
   the left, almost clear over the lagoon on the right so the photo keeps its
   colour. The panel to the right supplies its own contrast. */
.opening__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(96deg,
      rgb(4 24 38 / 92%) 0%,
      rgb(4 24 38 / 80%) 34%,
      rgb(4 24 38 / 34%) 62%,
      rgb(4 24 38 / 0%) 90%),
    linear-gradient(180deg, rgb(4 24 38 / 0%) 62%, rgb(4 24 38 / 34%) 100%);
}

@media (max-width: 899px) {
  /* Single column: the copy sits over the middle of the frame, so the wash has
     to cover the full width rather than fading out to the right. */
  .opening__scrim {
    background: linear-gradient(180deg, rgb(4 24 38 / 70%) 0%, rgb(4 24 38 / 62%) 45%, rgb(4 24 38 / 78%) 100%);
  }
  .opening__photo { object-position: 62% 48%; }
}
.opening__grid { display: grid; gap: clamp(2rem, 4vw, 3.4rem); align-items: center; }
@media (min-width: 900px) { .opening__grid { grid-template-columns: 1.15fr .85fr; } }
/* The copy can overhang the bright sand in the middle of the frame, so the
   type carries a soft shadow as a second line of defence behind the scrim. */
.opening__copy :is(h1, .opening__lead, .kicker) { text-shadow: 0 1px 14px rgb(3 20 32 / 55%); }
.opening__lead { font-size: clamp(1.02rem, .95rem + .4vw, 1.18rem); color: rgb(255 255 255 / 92%); max-width: 32em; }
.opening__buttons { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

.proof { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.proof__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .2rem 1rem;
  align-items: baseline;
  padding: 1rem 1.2rem;
  border-radius: var(--r-md);
  /* Frosted card: it sits over the brightest part of the photo, so it needs to
     carry its own contrast instead of relying on the scrim. */
  background: rgb(5 28 44 / 62%);
  border: 1px solid rgb(255 255 255 / 20%);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 4px 20px rgb(2 16 26 / 22%);
}
.proof__text { color: rgb(255 255 255 / 92%); }
.proof__word { font-weight: 750; color: var(--sand); font-size: .95rem; letter-spacing: .02em; }
.proof__text { font-size: .93rem; color: rgb(255 255 255 / 82%); }

/* --- flow ---------------------------------------------------------------- */

.flow { padding-block: var(--band); }
.flow__title { margin-bottom: 2rem; }
.flow__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--pad); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); counter-reset: none; }
.flow__step { padding: 1.5rem 1.4rem; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--paper-tint); }
.flow__index { display: block; font-size: 2rem; font-weight: 800; color: var(--aqua); line-height: 1; margin-bottom: .5rem; letter-spacing: -.04em; }
.flow__step h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.flow__step p { margin: 0; font-size: .94rem; color: var(--text-mute); }

/* --- snags --------------------------------------------------------------- */

.snags { padding-block: var(--band); background: var(--paper-warm); }
.snags__title { margin-bottom: 1.8rem; }
.snags__list { margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.snags__row { padding: 1.25rem 1.35rem; background: var(--paper); border-radius: var(--r-md); border-left: 4px solid var(--sand); box-shadow: var(--lift-1); }
.snags__row dt { font-weight: 700; margin-bottom: .35rem; }
.snags__row dd { margin: 0; font-size: .94rem; color: var(--text-mute); }

/* --- long-form copy ------------------------------------------------------ */

.explainer { padding-block: var(--band); }

.copy { font-size: 1.04rem; }
.copy > *:first-child { margin-top: 0; }
.copy h2 { margin-top: 2.5rem; scroll-margin-top: 6rem; }
.copy h3 { margin-top: 2rem; scroll-margin-top: 6rem; }
.copy li { margin-bottom: .45em; }
.copy li::marker { color: var(--aqua); font-weight: 700; }

.copy blockquote {
  margin: 1.9rem 0;
  padding: 1.05rem 1.35rem;
  background: var(--paper-tint);
  border-left: 4px solid var(--aqua);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.copy blockquote p:last-child { margin-bottom: 0; }

.copy figure { margin: 2.1rem 0; }
.copy figure img { width: 100%; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--paper-warm); }
.copy figcaption { margin-top: .5rem; font-size: .85rem; color: var(--text-mute); text-align: center; }

.copy table { width: 100%; border-collapse: collapse; margin: 1.9rem 0; font-size: .93rem; }
.copy :is(th, td) { padding: .65rem .8rem; border: 1px solid var(--rule); text-align: left; vertical-align: top; }
.copy thead th { background: var(--navy); color: #fff; font-weight: 650; border-color: var(--navy); }
.copy tbody tr:nth-child(even) { background: var(--paper-tint); }

.copy code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--paper-tint); padding: .12em .38em; border-radius: 4px; }

/* app.js wraps tables so they scroll in place; the query is the no-JS fallback */
.scrollbox { overflow-x: auto; margin: 1.9rem 0; -webkit-overflow-scrolling: touch; }
.scrollbox table { margin: 0; min-width: 34rem; }
@media (max-width: 640px) { .copy > table { display: block; overflow-x: auto; } }

/* --- panels -------------------------------------------------------------- */

.panel { margin: 2.1rem 0; padding: 1.2rem 1.35rem; border-radius: var(--r-md); background: var(--paper-tint); border: 1px solid var(--rule); }
.panel > *:last-child { margin-bottom: 0; }
.panel strong { display: block; margin-bottom: .35rem; font-size: 1.02rem; }
.panel--tip { border-left: 5px solid var(--sand); background: #fdf8ec; }
.panel--cta {
  border: 0;
  padding: 1.9rem 1.5rem;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, var(--aqua-dark) 100%);
}
.panel--cta a:not(.button) { color: #fff; }
.panel--cta .button { margin-top: .5rem; }

/* --- tiles --------------------------------------------------------------- */

.recent { padding-block: var(--band); background: var(--paper-warm); }
.recent__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.7rem; }
.recent__head h2 { margin: 0; }
.morelink { font-weight: 650; font-size: .94rem; text-decoration: none; }
.morelink:hover { text-decoration: underline; }

.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--pad); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tile { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--lift-1); transition: transform .16s ease, box-shadow .16s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--lift-2); }
.tile__art { display: block; aspect-ratio: 16 / 9; background: var(--paper-tint); }
.tile__art img { width: 100%; height: 100%; object-fit: cover; }
.tile__body { padding: 1.05rem 1.15rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.tile__date { font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; color: var(--text-mute); }
.tile__body :is(h2, h3) { font-size: 1.1rem; margin: .4rem 0 .45rem; }
.tile__body :is(h2, h3) a { color: inherit; text-decoration: none; }
.tile__body :is(h2, h3) a:hover { color: var(--aqua-dark); }
.tile__body p { font-size: .92rem; color: var(--text-mute); margin-bottom: 1rem; }
.tile__go { margin-top: auto; font-size: .87rem; font-weight: 650; color: var(--aqua-dark); }

/* --- hub ----------------------------------------------------------------- */

.hub__top { padding-block: var(--band) 0; }
.hub__lead { font-size: 1.07rem; color: var(--text-mute); }
.hub__body { padding-block: var(--band); }
.hub__foot { padding-bottom: var(--band); }

/* --- answer page --------------------------------------------------------- */

.answer { padding-block: clamp(1.4rem, 4vw, 2.4rem) var(--band); }
.trail { font-size: .84rem; color: var(--text-mute); margin-bottom: 1.3rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.trail a { color: var(--text-mute); text-decoration: none; }
.trail a:hover { color: var(--aqua-dark); text-decoration: underline; }

.answer__top { max-width: 44rem; margin-bottom: 2.4rem; }
.answer__deck { font-size: 1.12rem; color: var(--text-mute); }
.answer__byline { font-size: .84rem; color: var(--text-mute); display: flex; gap: .5rem; flex-wrap: wrap; margin: 0; }

.answer__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 1000px) { .answer__grid { grid-template-columns: 15rem minmax(0, 1fr); } }

.toc { align-self: start; }
@media (min-width: 1000px) { .toc { position: sticky; top: 6rem; max-height: calc(100vh - 8rem); overflow-y: auto; } }
.toc__title { font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; color: var(--text-mute); margin-bottom: .8rem; }
.toc__list { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); display: grid; gap: .1rem; }
.toc__list a { display: block; padding: .35rem .85rem; margin-left: -2px; border-left: 2px solid transparent; font-size: .88rem; line-height: 1.4; color: var(--text-mute); text-decoration: none; }
.toc__list a:hover { color: var(--text); background: var(--paper-tint); }
.toc__list a.here { color: var(--navy); border-left-color: var(--aqua); font-weight: 650; }

@media (max-width: 999px) {
  .toc { border: 1px solid var(--rule); border-radius: var(--r-md); padding: 1rem 1.1rem; background: var(--paper-tint); }
  .toc__list { max-height: 15rem; overflow-y: auto; }
}

.answer__end { margin-top: 2.8rem; padding-top: 1.7rem; border-top: 1px solid var(--rule); display: flex; gap: .8rem; flex-wrap: wrap; }

/* --- disclosure Q&A ------------------------------------------------------ */

.quickfaq { padding-block: var(--band); background: var(--paper-warm); }
.qa { display: grid; gap: .65rem; }
.qa__item { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; }
.qa__q { cursor: pointer; list-style: none; padding: .95rem 3rem .95rem 1.15rem; font-weight: 650; position: relative; }
.qa__q::-webkit-details-marker { display: none; }
.qa__q::after {
  content: "+";
  position: absolute;
  right: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  color: var(--aqua);
}
.qa__item[open] .qa__q::after { content: "–"; }
.qa__q:hover { background: var(--paper-tint); }
.qa__a { padding: 0 1.15rem 1.05rem; color: var(--text-mute); }
.qa__a p:last-child { margin-bottom: 0; }

/* --- embedded form pages ------------------------------------------------- */

.formtop { padding-block: var(--band) 1.4rem; background: var(--paper-tint); text-align: center; }
.formtop p { color: var(--text-mute); }
.formhost { padding-block: 2rem var(--band); }
.formhost .frame { max-width: 900px; }

/* --- colophon ------------------------------------------------------------ */

.colophon { background: var(--navy-deep); color: rgb(255 255 255 / 76%); padding-block: var(--band) 2rem; font-size: .92rem; }
.colophon a { color: rgb(255 255 255 / 82%); text-decoration: none; }
.colophon a:hover { color: #fff; text-decoration: underline; }
.colophon__cols { display: grid; gap: 2.2rem; }
@media (min-width: 760px) { .colophon__cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .colophon__cols { grid-template-columns: 1.7fr .75fr .75fr 1.4fr; } }

.wordmark--foot .wordmark__name { color: #fff; }
.wordmark--foot .wordmark__note { color: rgb(255 255 255 / 58%); display: block; }

.colophon__secure { display: flex; gap: .6rem; align-items: flex-start; margin: 1.3rem 0 1.2rem; font-size: .84rem; color: rgb(255 255 255 / 66%); }
.colophon__lock { width: 1.4rem; height: 1.4rem; flex: none; color: var(--aqua); }

.paylist__label { font-size: .73rem; text-transform: uppercase; letter-spacing: .11em; color: rgb(255 255 255 / 48%); margin-bottom: .5rem; }
.paylist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.paylist img { display: block; border-radius: 5px; box-shadow: 0 0 0 1px rgb(255 255 255 / 12%); }

.colophon__col h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .13em; color: #fff; margin-bottom: .85rem; }
.colophon__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .48rem; }
.colophon__support p { font-size: .86rem; }
.colophon__disclaimer { font-size: .78rem; color: rgb(255 255 255 / 58%); line-height: 1.6; }
.colophon__disclaimer a { text-decoration: underline; }

.colophon__base { margin: 2.4rem 0 0; padding-top: 1.4rem; border-top: 1px solid rgb(255 255 255 / 12%); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.colophon__base small { font-size: .76rem; color: rgb(255 255 255 / 48%); max-width: 70ch; }

/* --- print --------------------------------------------------------------- */

@media print {
  .masthead, .colophon, .toc, .answer__end, .panel--cta, .jump { display: none !important; }
  body { color: #000; font-size: 11pt; }
  .copy a::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
}
