/* Static content pages (public/marine-survey-software/, public/pre-purchase-boat-survey-checklist/).
   Plain HTML served as files, outside the React app. Colours and type follow the
   tokens in src/index.css (the warm "dune" palette and the landing's chart-room
   ink), with a dark variant the app itself doesn't have yet. */
:root {
  --text: #2E2C2A;
  --text-mid: #4A4744;
  --text-muted: #6B6560;
  --text-faint: #8A857F;
  --bg: #F5F3F0;
  --surface: #FFFFFF;
  --surface-alt: #FAF8F5;
  --border: #E8E3DC;
  --border-strong: #D4CFC8;
  --primary: #2EA84D;
  --primary-hover: #1A6B31;
  --primary-tint: #EAF7EE;
  --link: #1A6B31;
  --amber-light: #FEF3E2;
  --amber-dark: #8A5600;
  --ink: #1E1C1A;
  --on-dark: #FFFFFF;
  --chip-bg: #F0ECE6;
  --chip-text: #4A4744;
  --shadow-card: 0 1px 4px rgba(46,44,42,.07), 0 4px 16px rgba(46,44,42,.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-sans: 'Source Sans 3', system-ui, sans-serif;
  --font-display: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text: #EFEAE4;
    --text-mid: #D6D0C8;
    --text-muted: #B3ACA4;
    --text-faint: #8F8982;
    --bg: #171614;
    --surface: #211F1D;
    --surface-alt: #262321;
    --border: #36322F;
    --border-strong: #4A4542;
    --primary-tint: #1C2E21;
    --link: #6FD08A;
    --amber-light: #33281A;
    --amber-dark: #F0C27A;
    --ink: #0F0E0D;
    --chip-bg: #2E2A27;
    --chip-text: #D6D0C8;
    --shadow-card: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --text: #EFEAE4; --text-mid: #D6D0C8; --text-muted: #B3ACA4; --text-faint: #8F8982;
  --bg: #171614; --surface: #211F1D; --surface-alt: #262321; --border: #36322F; --border-strong: #4A4542;
  --primary-tint: #1C2E21; --link: #6FD08A; --amber-light: #33281A; --amber-dark: #F0C27A;
  --ink: #0F0E0D; --chip-bg: #2E2A27; --chip-text: #D6D0C8; --shadow-card: none; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-sans); font-size: 17px; line-height: 1.65; color: var(--text); background: var(--bg); }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--primary); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Header + hero (chart-room ink, like the landing page) */
.cp-hero { background: var(--ink); color: var(--on-dark); padding: 0 0 56px; }
.cp-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 40px; }
.cp-brand { display: inline-flex; align-items: baseline; gap: 10px; color: var(--on-dark); text-decoration: none; }
.cp-brand:hover { color: var(--on-dark); }
.cp-brand b { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.cp-brand small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.cp-nav-actions { display: flex; align-items: center; gap: 16px; font-size: 15px; }
.cp-nav-actions a.cp-signin { color: rgba(255,255,255,.75); text-decoration: none; }
.cp-nav-actions a.cp-signin:hover { color: var(--on-dark); }
.cp-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: var(--on-dark); font-weight: 600; text-decoration: none; padding: 10px 18px; border-radius: var(--radius-md); white-space: nowrap; }
.cp-btn:hover { background: var(--primary-hover); color: var(--on-dark); }
.cp-btn-lg { padding: 14px 24px; font-size: 17px; }
.cp-crumbs { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); margin: 0 0 18px; }
.cp-crumbs a { color: rgba(255,255,255,.75); text-decoration: none; }
.cp-crumbs a:hover { color: var(--on-dark); text-decoration: underline; }
.cp-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 6vw, 60px); line-height: 1.02; letter-spacing: -.03em; margin: 0 0 20px; max-width: 900px; }
.cp-hero h1 span { color: var(--primary); }
.cp-lede { font-size: clamp(17px, 2vw, 20px); color: rgba(255,255,255,.75); max-width: 720px; margin: 0 0 28px; }
.cp-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.cp-hero-cta p { margin: 0; color: rgba(255,255,255,.65); font-size: 15px; }
@media (max-width: 480px) { .cp-nav-actions a.cp-signin { display: none; } }

/* Body */
main { padding: 56px 0 24px; }
.cp-prose { max-width: 760px; }
.cp-prose h2 { font-family: var(--font-display); font-size: clamp(25px, 3.4vw, 32px); line-height: 1.15; letter-spacing: -.02em; margin: 56px 0 14px; }
.cp-prose h2:first-child { margin-top: 0; }
.cp-prose h3 { font-family: var(--font-display); font-size: 20px; letter-spacing: -.01em; margin: 30px 0 8px; }
.cp-prose p, .cp-prose ul, .cp-prose ol { margin: 0 0 16px; }
.cp-prose li { margin-bottom: 8px; }
.cp-prose strong { color: var(--text); }
.cp-muted { color: var(--text-muted); }
.cp-note { font-size: 15px; color: var(--text-muted); background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; }

/* Card grid for the field workflow */
.cp-steps { list-style: none; padding: 0; margin: 20px 0 8px; display: grid; gap: 14px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 720px) { .cp-steps { grid-template-columns: 1fr 1fr; } }
.cp-steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 18px 20px; margin: 0; }
.cp-steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-bottom: 6px; }
.cp-steps h3 { margin: 0 0 6px; font-size: 18px; }
.cp-steps p { margin: 0; font-size: 16px; color: var(--text-mid); }

/* Standards table */
.cp-table-wrap { overflow-x: auto; margin: 16px 0 20px; }
.cp-table { width: 100%; border-collapse: collapse; font-size: 15.5px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.cp-table th, .cp-table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.cp-table th { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--text-muted); background: var(--surface-alt); }
.cp-table tr:last-child td { border-bottom: none; }

/* FAQ */
.cp-faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0 18px; margin: 0 0 10px; }
.cp-faq summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 17.5px; padding: 14px 0; list-style-position: outside; }
.cp-faq details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.cp-faq details p { margin: 0 0 14px; }

/* CTA band */
.cp-cta { background: var(--primary-tint); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 24px; margin: 48px 0 8px; max-width: 760px; }
.cp-cta h2 { margin-top: 0 !important; }
.cp-cta p { margin: 0 0 18px; }

/* Checklist */
.cp-toc { columns: 2 220px; column-gap: 28px; padding-left: 20px; margin: 12px 0 20px; font-size: 16px; }
.cp-toc li { margin-bottom: 4px; break-inside: avoid; }
.cp-section { margin: 44px 0 0; max-width: 860px; scroll-margin-top: 16px; }
.cp-section h2 { font-family: var(--font-display); font-size: clamp(23px, 3vw, 28px); letter-spacing: -.02em; margin: 0 0 4px; }
.cp-section-meta { font-size: 15px; color: var(--text-muted); margin: 0 0 12px; }
.cp-items { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.cp-items li { padding: 12px 16px 12px 46px; border-bottom: 1px solid var(--border); position: relative; }
.cp-items li:last-child { border-bottom: none; }
.cp-items li::before { content: ''; position: absolute; left: 16px; top: 16px; width: 16px; height: 16px; border: 1.5px solid var(--border-strong); border-radius: 4px; }
.cp-item-label { display: block; font-weight: 600; line-height: 1.4; }
.cp-item-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 6px; font-size: 13.5px; line-height: 1.4; }
.cp-chip { display: inline-block; background: var(--amber-light); color: var(--amber-dark); border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.cp-std { display: inline-block; font-family: var(--font-mono); font-size: 12.5px; color: var(--chip-text); background: var(--chip-bg); border-radius: 6px; padding: 2px 8px; }
.cp-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 15px; color: var(--text-muted); margin: 0 0 8px; }
.cp-refs { font-size: 15.5px; }
.cp-refs dt { font-family: var(--font-mono); font-size: 14px; font-weight: 600; margin-top: 8px; }
.cp-refs dd { margin: 0 0 4px; color: var(--text-mid); }
.cp-refs-group { margin: 22px 0 6px; font-family: var(--font-display); font-size: 18px; }

/* Footer */
.cp-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 64px; padding: 28px 0 36px; font-size: 15px; color: var(--text-muted); }
.cp-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 10px; }
.cp-footer a { color: var(--text-mid); text-decoration: none; }
.cp-footer a:hover { color: var(--text); text-decoration: underline; }
.cp-footer p { margin: 0; }

@media print {
  .cp-hero { background: none; color: #000; padding-bottom: 12px; }
  .cp-nav, .cp-cta, .cp-footer, .cp-hero-cta { display: none; }
  .cp-lede, .cp-crumbs { color: #333; }
  .cp-items { box-shadow: none; }
  .cp-section { break-inside: avoid-page; }
}
