/* Narrow Sea — platform foundations v1.0 (Figma XMtuvYmA9LqYySkZX9sA9Y, "UI foundations and static states").
   Shared by every page. Page-group styles live in assets/css/<group>.css; do not fork tokens there. */

:root {
  --navy: #071c2b;      /* Deep Navy */
  --ocean: #123a4d;     /* Ocean Blue */
  --gold: #c5a46d;      /* Champagne Gold */
  --off: #f4f6f7;       /* Off White */
  --slate: #647681;     /* Slate */
  --ink: #273f4c;       /* body text */
  --line: #d8e0e4;      /* borders, dividers, disabled */
  --mist: #bccbd2;      /* text on navy */
  --sand: #f1eadd;      /* notice / active stage */
  --err: #a13f3f;
  --err-bg: #f9eeee;
  --ok: #286652;
  --white: #fff;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --margin: 80px;       /* desktop 1440 */
  --gutter: 24px;
  --radius: 4px;
  --maxw: 1440px;
}
@media (max-width: 1100px) { :root { --margin: 40px; } }   /* tablet 768 */
@media (max-width: 600px)  { :root { --margin: 24px; --gutter: 16px; } }  /* mobile 390 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--off); color: var(--ink);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.on-navy :focus-visible { outline-color: var(--gold); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--margin); padding-right: var(--margin); }
.sec { padding-top: 72px; padding-bottom: 72px; }
.sec--tight { padding-top: 48px; padding-bottom: 48px; }
.sec--navy { background: var(--navy); color: var(--white); }
.sec--white { background: var(--white); }
.stack { display: flex; flex-direction: column; gap: 32px; }
.stack-24 { display: flex; flex-direction: column; gap: 24px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gutter); }
@media (max-width: 1100px) { .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: minmax(0, 1fr); } }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- type ---------- */
.eyebrow { font: 600 11px/1.6 var(--sans); color: var(--gold); letter-spacing: .02em; }
.kicker { font: 400 11px/1.6 var(--sans); color: var(--slate); }            /* "01 / IDENTITY & RHYTHM" */
.display { font: 400 88px/1.08 var(--serif); }
.h1 { font: 400 64px/1.08 var(--serif); }
.h2 { font: 400 48px/1.1 var(--serif); color: var(--navy); }
.h3 { font: 400 30px/1.1 var(--serif); color: var(--navy); }
.h4 { font: 400 24px/1.15 var(--serif); color: var(--navy); }
.sec--navy .h2, .sec--navy .h3, .sec--navy .h4 { color: var(--white); }
.lead { font: 400 21px/1.6 var(--sans); }
.body { font: 400 16px/1.6 var(--sans); }
.small { font: 400 14px/1.6 var(--sans); }
.meta { font: 400 12px/1.6 var(--sans); color: var(--slate); }
.label { font: 600 11px/1.8 var(--sans); color: var(--slate); }
.muted { color: var(--slate); }
.on-navy-muted { color: var(--mist); }
.accent-rule { width: 64px; height: 2px; background: var(--gold); border: 0; margin: 0; }
.sec-head { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
@media (max-width: 1100px) {
  .display { font-size: 64px; } .h1 { font-size: 52px; } .h2 { font-size: 40px; }
}
@media (max-width: 600px) {
  .display { font-size: 44px; } .h1 { font-size: 40px; } .h2 { font-size: 34px; } .h3 { font-size: 26px; }
  .lead { font-size: 18px; }
}

/* ---------- actions ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 48px; padding: 0 24px; border-radius: var(--radius); border: 1px solid transparent;
  font: 600 13px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s; min-width: 44px;
}
.btn .ico { width: 16px; height: 16px; flex: none; }
.btn--primary { background: var(--gold); color: var(--navy); }
.btn--primary:hover { background: #b8955c; }
.btn--secondary { background: var(--navy); color: var(--white); }
.btn--secondary:hover { background: var(--ocean); }
.btn--outline { background: transparent; border-color: var(--slate); color: var(--navy); }
.btn--outline:hover { border-color: var(--navy); }
.btn--text { background: transparent; color: var(--navy); }
.btn--text:hover { text-decoration: underline; }
.on-navy .btn--text, .sec--navy .btn--text { color: var(--white); }
.on-navy .btn--outline, .sec--navy .btn--outline { color: var(--white); border-color: var(--mist); }
.btn--sm { height: 40px; padding: 0 16px; font-size: 11px; }
.btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
.btn[disabled], .btn.is-disabled { background: var(--line); color: var(--slate); border-color: transparent; cursor: not-allowed; }
.btn.is-loading { background: transparent; color: var(--navy); border-color: transparent; pointer-events: none; }
.btn.is-loading::before { content: "◌"; display: inline-block; animation: ns-spin 1s linear infinite; }
@keyframes ns-spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) { .btn-row--stack .btn { width: 100%; } }

/* ---------- global navigation ---------- */
.gnav { background: var(--navy); border-bottom: 1px solid var(--gold); position: relative; z-index: 20; }
.gnav__in { height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { font: 600 30px/1 var(--serif); color: var(--white); text-decoration: none; white-space: nowrap; letter-spacing: .01em; }
.wordmark small { display: block; font: 400 8px/1 var(--sans); color: var(--gold); margin-top: 4px; letter-spacing: .04em; }
.gnav__links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.gnav__links a { font: 400 11px/1 var(--sans); color: var(--off); text-decoration: none; padding: 8px 0; }
.gnav__links a:hover, .gnav__links a[aria-current="page"] { color: var(--gold); }
.gnav__menu { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 0; color: var(--white); cursor: pointer; }
.gnav__menu svg { width: 20px; height: 20px; }
@media (max-width: 1100px) {
  .gnav__in { height: 80px; gap: 16px; }
  .gnav__links { display: none; }
  .gnav__menu { display: inline-flex; }
  .gnav__cta { margin-left: auto; }
  .wordmark { font-size: 28px; }
  .gnav.is-open .gnav__drawer { display: flex; }
}
.gnav__cta-short { display: none; }
@media (max-width: 600px) {
  .gnav__cta-long { display: none; }
  .gnav__cta-short { display: inline; }
  .gnav__cta { padding: 0 12px; gap: 8px; }
  .wordmark { font-size: 24px; }
  .gnav__menu { margin-right: -10px; }
}
.gnav__drawer {
  display: none; flex-direction: column; gap: 4px; background: var(--navy);
  padding: 8px var(--margin) 32px; border-top: 1px solid rgba(197,164,109,.35);
}
.gnav__drawer a { color: var(--off); text-decoration: none; font: 400 15px/1 var(--sans); padding: 14px 0; border-bottom: 1px solid rgba(188,203,210,.15); }
.gnav__drawer .btn { margin-top: 20px; align-self: flex-start; }
@media (min-width: 1101px) { .gnav__drawer { display: none !important; } }

/* ---------- page introduction (inner pages) ---------- */
.intro { background: var(--navy); color: var(--white); }
.intro__in { padding-top: 96px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 24px; max-width: calc(690px + 2 * var(--margin)); margin-left: 0; }
.intro .lead { color: var(--white); }
.intro .body { color: var(--mist); }
@media (min-width: 1441px) { .intro__in { margin-left: calc((100vw - var(--maxw)) / 2); } }
@media (max-width: 600px) { .intro__in { padding-top: 56px; padding-bottom: 48px; } }

/* ---------- form controls ---------- */
.field {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; min-height: 88px; display: flex; flex-direction: column; justify-content: flex-start;
  position: relative;
}
.field:focus-within { outline: 2px solid var(--navy); outline-offset: -1px; }
.field > label, .field > .field__label { font: 600 11px/1.8 var(--sans); color: var(--slate); }
.field input, .field select, .field textarea {
  border: 0; outline: 0; background: transparent; padding: 0; margin: 0; width: 100%;
  font: 400 14px/1.8 var(--sans); color: var(--ink); min-height: 28px;
}
.field textarea { resize: vertical; min-height: 84px; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23273f4c' stroke-width='1.3'/%3E%3C/svg%3E") right 0 center / 12px no-repeat; }
.field input::placeholder, .field textarea::placeholder { color: #8a9aa3; }
.field__hint { font: 400 11px/1.8 var(--sans); color: var(--slate); }
.field__error { font: 400 11px/1.8 var(--sans); color: var(--err); display: none; }
.field.is-invalid { border-color: var(--err); }
.field.is-invalid .field__error { display: block; }
.field--full { grid-column: 1 / -1; }
.field--stack { min-height: 0; } /* label-above pattern (search/filter) */
.ctl { display: flex; flex-direction: column; gap: 8px; }
.ctl > label { font: 600 12px/1.6 var(--sans); color: var(--ink); }
.input { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); min-height: 48px; padding: 12px 14px; font: 400 14px/1.6 var(--sans); color: var(--ink); width: 100%; }
.input:focus { outline: 2px solid var(--navy); outline-offset: -1px; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23273f4c' stroke-width='1.3'/%3E%3C/svg%3E") right 14px center / 12px no-repeat; }
.stepper { display: flex; align-items: center; gap: 16px; font: 400 14px/1.8 var(--sans); }
.stepper button { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--off); border-radius: var(--radius); cursor: pointer; font-size: 16px; line-height: 1; }
.stepper output { min-width: 84px; text-align: center; }
.check { display: flex; gap: 12px; align-items: flex-start; font: 400 14px/1.6 var(--sans); color: var(--ink); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.check.is-disabled { color: var(--slate); cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--white); border-radius: 24px; padding: 8px 14px; font: 500 13px/1 var(--sans); cursor: pointer; min-height: 36px; }
.chip input { accent-color: var(--navy); margin: 0; }
.chip:has(input:checked) { border-color: var(--navy); background: var(--sand); }
.upload { border: 1px dashed var(--slate); padding: 24px; display: flex; flex-direction: column; gap: 20px; cursor: pointer; background: transparent; }
.upload.is-over { background: var(--sand); }
.upload__title { font: 600 13px/1.8 var(--sans); color: var(--ink); }
.upload__sub { font: 400 13px/1.8 var(--sans); color: var(--ink); }
.upload__file { font: 400 12px/1.6 var(--sans); color: var(--ok); }
.upload__file.is-err { color: var(--err); }

/* ---------- content ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-height: 210px; display: flex; flex-direction: column; gap: 16px; }
.card__num { font: 400 11px/1.6 var(--sans); color: var(--slate); }
.card__title { font: 400 30px/1.1 var(--serif); color: var(--navy); }
.card__text { font: 400 14px/1.6 var(--sans); color: var(--slate); }
.card--navy { background: var(--navy); border-color: var(--navy); color: var(--white); }
.card--navy .card__title { color: var(--white); }
.card--navy .card__text { color: var(--mist); }
.card a.card__link { margin-top: auto; font: 600 13px/1 var(--sans); color: var(--navy); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
@media (max-width: 600px) { .card { min-height: 0; } .card__title { font-size: 26px; } }

.tag { display: inline-flex; align-items: center; border-radius: 24px; padding: 5px 10px; font: 600 10px/1.2 var(--sans); color: var(--ink); background: var(--off); white-space: nowrap; }
.tag--sand { background: var(--sand); }
.tag--err { background: var(--err-bg); color: var(--err); }
.tag--ok { background: #e6f0ec; color: var(--ok); }
.tag--navy { background: var(--navy); color: var(--white); }
.tag--gold { background: var(--gold); color: var(--navy); }
.sec--white .tag:not([class*="tag--"]), .card .tag:not([class*="tag--"]), .ws .tag:not([class*="tag--"]) { background: var(--off); }

.notice { background: var(--sand); border-left: 3px solid var(--gold); padding: 20px; display: flex; flex-direction: column; }
.notice__title { font: 600 13px/1.6 var(--sans); color: var(--navy); }
.notice__text { font: 400 12px/1.6 var(--sans); color: var(--ink); }
.notice--err { background: var(--err-bg); border-left-color: var(--err); }
.notice--err .notice__title { color: var(--err); }
.notice--ok { background: #e6f0ec; border-left-color: var(--ok); }
.notice--ok .notice__title { color: var(--ok); }

.crumbs { font: 400 13px/1.6 var(--sans); color: var(--ink); }
.crumbs a { text-decoration: none; color: var(--slate); }
.tabs { display: flex; gap: 32px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button, .tabs a { background: none; border: 0; padding: 0 0 10px; font: 400 14px/1.6 var(--sans); color: var(--slate); cursor: pointer; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs [aria-selected="true"], .tabs .is-active { font-weight: 600; color: var(--ink); border-bottom-color: var(--navy); }

.acc { border-top: 1px solid var(--line); }
.acc:last-child { border-bottom: 1px solid var(--line); }
.acc > button { width: 100%; text-align: left; background: none; border: 0; padding: 20px 0; display: flex; justify-content: space-between; gap: 24px; font: 400 17px/1.6 var(--sans); color: var(--ink); cursor: pointer; }
.acc > button::after { content: "+"; font-size: 20px; line-height: 1.3; color: var(--slate); }
.acc.is-open > button { font-weight: 600; }
.acc.is-open > button::after { content: "−"; }
.acc__body { display: none; padding: 0 0 24px; font: 400 14px/1.6 var(--sans); color: var(--ink); max-width: 860px; }
.acc.is-open .acc__body { display: block; }

/* ---------- data ---------- */
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
@media (max-width: 600px) { .filters { grid-template-columns: 1fr; } }
.table { width: 100%; border-collapse: collapse; background: var(--white); font: 400 12px/1.45 var(--sans); }
.table th { background: var(--off); color: var(--slate); font: 600 10px/1.2 var(--sans); text-align: left; padding: 12px; white-space: nowrap; }
.table td { padding: 18px 12px; border-bottom: 1px solid var(--line); color: var(--slate); vertical-align: top; }
.table td:first-child { color: var(--navy); }
.table tr.is-click { cursor: pointer; }
.table tr.is-click:hover td { background: #fbfcfc; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 600px) {
  .table--cards thead { display: none; }
  .table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; width: 100%; }
  .table--cards tr { border: 1px solid var(--line); margin-bottom: 12px; background: var(--white); }
  .table--cards td { border: 0; padding: 8px 14px; display: flex; justify-content: space-between; gap: 16px; }
  .table--cards td::before { content: attr(data-th); font: 600 10px/1.6 var(--sans); color: var(--slate); }
}
.pager { font: 400 12px/1.6 var(--sans); color: var(--slate); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.empty, .loading, .errstate { background: var(--white); padding: 24px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.errstate { background: var(--err-bg); }
.empty__title, .loading__title { font: 400 18px/1.6 var(--sans); color: var(--ink); }
.errstate__title { font: 400 18px/1.6 var(--sans); color: var(--err); }
.skeleton { height: 24px; width: 100%; background: linear-gradient(90deg, var(--line), #e7ecef, var(--line)); background-size: 200% 100%; animation: ns-shimmer 1.4s infinite; }
@keyframes ns-shimmer { to { background-position: -200% 0; } }

/* ---------- quote & confirmation ---------- */
.progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.progress li { background: var(--line); padding: 12px; font: 400 13px/1.2 var(--sans); color: var(--slate); }
.progress li.is-active { background: var(--sand); color: var(--navy); }
.progress li.is-done { background: var(--navy); color: var(--white); }
@media (max-width: 600px) { .progress { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.premium { background: var(--navy); color: var(--white); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.premium__label { font: 400 11px/1.2 var(--sans); color: var(--gold); }
.premium__total { font: 400 42px/1.1 var(--serif); color: var(--white); }
.premium__lines { font: 400 13px/2.2 var(--sans); color: var(--mist); }
.premium__note { font: 400 12px/1.6 var(--sans); color: var(--gold); }
.premium__fine { font: 400 11px/1.6 var(--sans); color: var(--mist); }

/* ---------- overlays ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(7,28,43,.55); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 100; }
.modal { background: var(--white); border: 1px solid var(--line); padding: 32px; width: 100%; max-width: 600px; display: flex; flex-direction: column; gap: 20px; max-height: 90vh; overflow: auto; }
.modal__title { font: 400 32px/1.08 var(--serif); color: var(--ink); }
.modal__text { font: 400 14px/1.6 var(--sans); color: var(--ink); }
.toast-host { position: fixed; right: 24px; bottom: 24px; z-index: 120; display: flex; flex-direction: column; gap: 12px; max-width: min(420px, calc(100vw - 48px)); }
.toast-host .notice { box-shadow: 0 8px 24px rgba(7,28,43,.12); animation: ns-in .2s ease-out; }
@keyframes ns-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- footer ---------- */
.foot { background: var(--navy); color: var(--mist); }
.foot__in { padding-top: 48px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }
.foot__brand { font: 400 30px/1.8 var(--serif); color: var(--white); }
.foot__tag { font: 400 14px/1.8 var(--sans); color: var(--gold); }
.foot__links { font: 400 12px/2.2 var(--sans); }
.foot__links a { color: var(--mist); text-decoration: none; }
.foot__links a:hover { color: var(--white); }
.foot__legal { font: 400 11px/1.7 var(--sans); }


/* ---------- phones (1 Nov, Youssef on iPhone: "boxes humongous", page "stuck") ----------
   iOS Safari zooms into any field whose text is under 16px and leaves the page zoomed in: everything looks giant and
   cut off at both edges. Every input is 16px on phones; fields are tighter. */
a, button, input, select, textarea, label, summary { touch-action: manipulation; }
@media (max-width: 600px) {
  .field input, .field select, .field textarea, .input, select.input, textarea.input,
  input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"],
  input[type="number"], input[type="date"], input[type="datetime-local"], select, textarea { font-size: 16px; }
  .field { min-height: 0; padding: 10px 12px 8px; }
  .field > label, .field > .field__label { line-height: 1.5; }
  .field input, .field select { min-height: 26px; line-height: 1.45; }
  .field textarea { min-height: 72px; line-height: 1.45; }
  .field__hint, .field__error { line-height: 1.5; }
  .input { min-height: 44px; padding: 9px 12px; line-height: 1.45; }
  .grid-2.q-fields, .grid-2 { gap: 12px; }
}
