/* Crew Wise website — shared styles.
   Palette: deep water blues, morning-mist greys, kōwhai yellow used sparingly,
   pōhutukawa red only for "not suitable". Light-first. */

:root {
  color-scheme: light;
  --ink: #0B2D42;          /* deepest water — headings */
  --text: #14232E;
  --muted: #5B6B77;
  --faint: #8A98A3;
  --line: #D7E0E7;
  --line-soft: #E6EDF2;
  --mist: #F4F7F9;         /* page ground */
  --mist-2: #EAF0F4;
  --white: #FFFFFF;
  --blue: #0F4C75;         /* primary */
  --blue-2: #155E86;       /* hover */
  --blue-3: #1F7FB8;       /* bright water */
  --blue-4: #6FB3D9;       /* shallow water */
  --blue-tint: #E3F0F7;
  --kowhai: #F2B705;       /* accent, sparingly */
  --kowhai-tint: #FFF4CC;
  --pohutukawa: #C8302E;
  --good: #2E8B57;
  --good-tint: #E1F3E8;
  --caution: #C97C0D;
  --caution-tint: #FDF0DA;
  --nogo-tint: #FBE4E3;
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 10px 30px rgba(11, 45, 66, 0.08);
  --shadow-lg: 0 24px 60px rgba(11, 45, 66, 0.16);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--mist); color: var(--text); font: 16px/1.6 var(--font); overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-2); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--kowhai); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 1000; font-weight: 700; }
.skip:focus { top: 12px; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.12; margin: 0 0 12px; letter-spacing: -0.02em; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(34px, 5.6vw, 58px); letter-spacing: -0.03em; }
h2 { font-size: clamp(27px, 3.6vw, 38px); }
h3 { font-size: 20px; }
h4 { font-size: 16.5px; margin-bottom: 6px; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 640px; }
.eyebrow { display: inline-block; color: var(--blue-3); font-weight: 800; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
strong { color: var(--ink); }
code { background: var(--mist-2); border: 1px solid var(--line-soft); border-radius: 6px; padding: 1px 7px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em; overflow-wrap: anywhere; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.wrap.narrow { max-width: 780px; }
.section { padding: 72px 0; }
.section.tight { padding: 48px 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section.deep { background: linear-gradient(180deg, var(--ink) 0%, #0F4C75 100%); color: #DCE9F2; }
.section.deep h2, .section.deep h3, .section.deep strong { color: #fff; }
.section.deep .lead, .section.deep .muted { color: #B7CCDB; }
.section.deep a { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 36px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--blue); color: #fff; font-weight: 700; font-size: 15.5px; border-radius: 999px; padding: 13px 24px; border: 2px solid var(--blue); cursor: pointer; font-family: inherit; line-height: 1.2; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { background: var(--blue-2); border-color: var(--blue-2); color: #fff; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--blue); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--blue); background: var(--blue-tint); color: var(--blue); }
.btn.light { background: #fff; color: var(--ink); border-color: #fff; }
.btn.light:hover { background: var(--mist-2); border-color: var(--mist-2); color: var(--ink); }
.btn.outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn.outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.btn.accent { background: var(--kowhai); border-color: var(--kowhai); color: var(--ink); }
.btn.accent:hover { background: #E0A800; border-color: #E0A800; color: var(--ink); }
.btn.sm { padding: 9px 16px; font-size: 14px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.arrow-link { font-weight: 700; white-space: nowrap; }
.arrow-link::after { content: " →"; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(244, 247, 249, 0.88); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line-soft); }
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--text); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.site-nav a:hover { background: var(--mist-2); text-decoration: none; color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--blue); background: var(--blue-tint); }
.site-nav .btn { margin-left: 8px; padding: 10px 18px; font-size: 14.5px; }
.site-nav .btn:hover { background: var(--blue-2); }
.nav-toggle { display: none; margin-left: auto; background: transparent; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 22px; height: 22px; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 14px 16px; gap: 2px; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 12px; font-size: 16px; }
  .site-nav .btn { margin: 8px 0 0; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 0; background: linear-gradient(180deg, #F4F7F9 0%, #E9F1F6 60%, #DCEAF3 100%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-bottom: 56px; }
.hero h1 { margin-bottom: 16px; }
.hero .lead { margin-bottom: 26px; }
.hero-art { position: relative; min-width: 0; }
.hero-art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 30px rgba(11,45,66,.14)); }
.hero-note { color: var(--muted); font-size: 14px; margin-top: 16px; max-width: 520px; }
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.badge { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--ink); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.wave { display: block; width: 100%; height: 60px; background: var(--mist); }
.wave svg { display: block; width: 100%; height: 60px; }
@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; padding-bottom: 40px; }
  .hero-art { max-width: 560px; }
}

/* ---------- page header (inner pages) ---------- */
.page-head { padding: 56px 0 40px; background: linear-gradient(180deg, #F4F7F9 0%, #E9F1F6 100%); border-bottom: 1px solid var(--line-soft); }
.page-head .lead { margin-bottom: 0; }
.page-head .btn-row { margin-top: 24px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 6px; color: var(--faint); }

/* ---------- cards & grids ---------- */
.grid > * { min-width: 0; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
@media (max-width: 600px) { .grid.four { grid-template-columns: 1fr; } }
.card { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 2px rgba(11,45,66,.04); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; margin-bottom: 14px; }
.card .icon svg { width: 24px; height: 24px; }
.card.link { display: block; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card.link:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--blue-4); color: inherit; }
.card.link .arrow-link { display: inline-block; margin-top: 10px; color: var(--blue); }
.card.soft { background: var(--mist-2); border-color: transparent; box-shadow: none; }
.card.tint { background: var(--blue-tint); border-color: transparent; box-shadow: none; }
.card.warn { background: var(--kowhai-tint); border-color: transparent; box-shadow: none; }
.card.warn strong { color: #6B4E00; }
.cardlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cardlist li { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 14px 16px; }
.cardlist li .n, .num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.cardlist li p { margin: 0; }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 18px 20px; }
.stat b { display: block; font-size: 26px; color: var(--ink); letter-spacing: -0.02em; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 14px; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* checklists */
ul.check { list-style: none; margin: 0 0 16px; padding: 0; }
ul.check li { position: relative; padding-left: 28px; margin: 8px 0; }
ul.check li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--good-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%232E8B57' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
ul.plain { margin: 8px 0 16px; padding-left: 22px; }
ul.plain li { margin: 6px 0; }
ol.steps { list-style: none; counter-reset: step; margin: 14px 0 22px; padding: 0; }
ol.steps > li { counter-increment: step; position: relative; padding: 0 0 0 46px; margin: 0 0 14px; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; font-size: 14px; display: grid; place-items: center; }
ol.steps > li p { margin: 0 0 6px; }
ol.steps > li p:last-child { margin: 0; }

/* button-name chips (exact on-screen names) */
kbd.ui, .ui { display: inline-block; font-family: inherit; font-size: 0.92em; font-weight: 700; color: var(--ink); background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 8px; padding: 0 8px; white-space: nowrap; max-width: 100%; overflow-wrap: anywhere; line-height: 1.55; }
kbd.ui.blue, .ui.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (max-width: 400px) { kbd.ui, .ui { white-space: normal; } }
.path { color: var(--ink); font-weight: 700; }
.path .arrow { color: var(--faint); margin: 0 4px; font-weight: 400; }

/* pills */
.pill { display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; line-height: 1.5; }
.pill.good { background: var(--good-tint); color: var(--good); }
.pill.caution { background: var(--caution-tint); color: var(--caution); }
.pill.nogo { background: var(--nogo-tint); color: var(--pohutukawa); }
.pill.plan { background: var(--blue-tint); color: var(--blue); }
.pill.free { background: var(--kowhai-tint); color: #6B4E00; }

/* tables */
.tablewrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line-soft); border-radius: var(--radius-s); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { color: var(--muted); font-weight: 800; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; background: var(--mist); }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--ink); font-weight: 700; }

/* FAQ */
details.faq { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 0; margin: 10px 0; }
details.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 15px 44px 15px 18px; list-style: none; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 22px; color: var(--blue-3); font-weight: 400; }
details.faq[open] summary::after { content: "–"; }
details.faq .body, details.faq > p { padding: 0 18px 16px; margin: 0; }
details.faq > p + p { padding-top: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #B7CCDB; padding: 56px 0 32px; margin-top: 0; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.site-footer h4 { color: #fff; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.site-footer a { color: #DCE9F2; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 7px 0; font-size: 15px; }
.site-footer .brand { color: #fff; }
.site-footer .brand svg .w { stroke: #6FB3D9; }
.site-footer .fine { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; font-size: 13.5px; color: #8FB0C4; display: flex; flex-wrap: wrap; gap: 8px 18px; }
@media (max-width: 800px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ---------- misc ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 24px; } }
.cta-band { background: linear-gradient(120deg, #0B2D42 0%, #155E86 60%, #1F7FB8 100%); color: #fff; border-radius: 24px; padding: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: clamp(22px, 3vw, 30px); }
.cta-band p { margin: 0; color: #CFE1EC; }
@media (max-width: 600px) { .cta-band { padding: 28px 22px; } .section { padding: 56px 0; } }
.note { background: var(--kowhai-tint); border-left: 4px solid var(--kowhai); border-radius: 0 var(--radius-s) var(--radius-s) 0; padding: 14px 18px; margin: 18px 0; }
.note p:last-child { margin-bottom: 0; }
.tag { display: inline-block; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 800; color: var(--blue-3); margin-bottom: 6px; }
.article { max-width: 760px; min-width: 0; }
.article h2 { font-size: 26px; margin-top: 48px; padding-top: 8px; }
.article h2:first-child { margin-top: 0; }
.article h3 { margin-top: 28px; }
.article p, .article li { color: var(--text); }
.toc { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 14px 18px; margin: 0 0 28px; }
.toc b { display: block; margin-bottom: 6px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 20px; }
.toc li { margin: 3px 0; font-size: 15px; break-inside: avoid; }
@media (max-width: 560px) { .toc ol { columns: 1; } }
.help-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.help-layout > * { min-width: 0; }
.help-side { position: sticky; top: 88px; }
.help-side ul { list-style: none; margin: 0; padding: 0; }
.help-side li a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: 14.5px; }
.help-side li a:hover { background: var(--mist-2); text-decoration: none; }
.help-side li a[aria-current="page"] { background: var(--blue-tint); color: var(--blue); }
.help-side .label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin: 0 12px 8px; }
@media (max-width: 900px) { .help-layout { grid-template-columns: 1fr; gap: 24px; } .help-side { position: static; } .help-side ul { display: flex; flex-wrap: wrap; gap: 6px; } .help-side li a { background: #fff; border: 1px solid var(--line-soft); padding: 7px 12px; } .help-side .label { display: none; } }
@media print { .site-header, .site-footer, .nav-toggle, .btn-row, .cta-band { display: none !important; } body { background: #fff; } }
