/* HIPS marketing site — tokens come from the HIPS brand (Brand/README.md). Light theme by design. */
:root {
  --teal: #0F766E;        /* brand primary: icon, links, focus */
  --teal-700: #0B5E58;    /* hover */
  --teal-50: #E8F3F2;     /* tinted surfaces */
  --navy: #0B2545;        /* wordmark, headings, dark bands */
  --coral: #E0703D;       /* logo accent only */
  --coral-600: #B4491F;   /* CTA fill (white text passes AA) */
  --coral-700: #963B18;   /* CTA hover */
  --ink: #0B2545;
  --body: #334155;
  --muted: #475569;
  --line: #D5E0DF;
  --bg: #FFFFFF;
  --bg-alt: #F4F8F8;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 10px;
  --wrap: 1160px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--body); background: var(--bg); }
img, svg { max-width: 100%; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-700); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 700; letter-spacing: -.01em; }
.h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); font-weight: 700; }
.h3, h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 760px; }
.narrow-p { max-width: 68ch; }
.center { text-align: center; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--navy); color: #fff; padding: 8px 12px; border-radius: 6px; }
.eyebrow { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: .75rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.fine { font-size: .875rem; color: var(--muted); }
.mono { font-family: var(--mono); font-size: .92em; user-select: all; }
.src { font-size: .8rem; white-space: nowrap; }
.src::before { content: "Source: "; color: var(--muted); }
.more { font-weight: 600; }
.more::after { content: " →"; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: .98rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn-lg { min-height: 50px; padding: 12px 24px; font-size: 1.03rem; }
.btn-primary { background: var(--coral-600); color: #fff; }
.btn-primary:hover { background: var(--coral-700); color: #fff; }
.btn-ghost { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-ghost:hover { background: var(--teal-50); color: var(--teal-700); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--teal-50); color: var(--navy); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; text-decoration: none; }
.brand svg { height: 38px; width: auto; display: block; }
.brand-tag { font-size: .8rem; line-height: 1.2; font-weight: 600; color: #475569; letter-spacing: .01em; border-left: 1px solid #CBD5E1; padding-left: 10px; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 10px; border-radius: 6px; }
.nav a:hover { background: var(--teal-50); }
.nav a[aria-current="page"] { color: var(--teal); box-shadow: inset 0 -2px 0 var(--teal); border-radius: 0; }
.nav-wide { margin-left: auto; }
.nav a, .header-actions .btn { white-space: nowrap; }
.header-actions { display: flex; gap: 10px; }
.menu { display: none; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; font-weight: 600; color: var(--ink); padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; min-height: 44px; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .nav { position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
@media (max-width: 1240px) {   /* room for the readable tagline next to the logo */
  .nav-wide { display: none; }
  .menu { display: block; }
}
@media (max-width: 620px) {
  .header-actions .btn-ghost { display: none; }
  .brand svg { height: 30px; }
  .brand-tag { font-size: .72rem; padding-left: 8px; }
  .header-actions .btn { padding: 8px 12px; font-size: .9rem; }
  .menu[open] .nav a { padding: 12px 4px; }
}

/* Sections */
.section { padding-block: 72px; }
.section.alt { background: var(--bg-alt); }
.page-head { padding-block: 72px 24px; background: linear-gradient(var(--teal-50), var(--bg)); }
.hero { padding-block: 64px 56px; background: linear-gradient(180deg, var(--teal-50), var(--bg) 85%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
.hero-copy { min-width: 0; }
.actions, .cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Chart card */
.chart-card { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 16px; box-shadow: 0 10px 30px -18px rgba(11,37,69,.35); min-width: 0; }
.chart-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.chart-head .eyebrow { margin: 0; color: var(--muted); }
.chart-head strong { color: var(--ink); font-size: 1rem; }
.chart-scroll { overflow-x: auto; }
.chart-scroll svg { min-width: 520px; width: 100%; height: auto; display: block; }
.c-label { font: 600 16px var(--font); fill: var(--ink); }
.c-track { stroke: var(--line); stroke-width: 2; }
.c-grid { stroke: #EEF3F3; stroke-width: 1; }
.c-band { fill: var(--teal); fill-opacity: .18; }
.c-median { stroke: var(--teal); stroke-width: 3; }
.c-you { fill: var(--coral-600); stroke: #fff; stroke-width: 2; }
.c-val { font: 600 15px var(--mono); fill: var(--coral-700); }
.c-tick { font: 14px var(--font); fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .85rem; color: var(--muted); padding-top: 6px; }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border-radius: 3px; }
.k-you { background: var(--coral-600); border-radius: 50% !important; }
.k-band { background: rgba(15,118,110,.25); }
.k-med { background: var(--teal); width: 4px !important; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.stat { border-top: 3px solid var(--teal); padding-top: 16px; min-width: 0; }
.stat .num { display: block; font-size: 2.4rem; font-weight: 700; color: var(--navy); line-height: 1.1; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.stat .num small { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.stat p { font-size: .95rem; margin: 0; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }

/* Steps */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 28px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps li { counter-increment: s; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; margin-bottom: 12px; }
.steps p { margin: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* Modules */
.modules { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.module { display: block; text-decoration: none; color: var(--body); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; transition: border-color .15s, transform .15s; }
.module:hover { border-color: var(--teal); transform: translateY(-2px); color: var(--body); }
.module h3 { font-size: 1.02rem; margin: 10px 0 6px; }
.module p { font-size: .9rem; margin: 0; }
.code { font-family: var(--mono); font-size: .78rem; color: var(--teal); background: var(--teal-50); padding: 3px 8px; border-radius: 4px; letter-spacing: .03em; }
@media (max-width: 1000px) { .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .modules { grid-template-columns: 1fr; } }
.module-detail:nth-of-type(even) { background: var(--bg-alt); }
.mod-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.mod-grid .h2 { margin-top: 12px; }
.question { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 820px) { .mod-grid { grid-template-columns: 1fr; } }

/* Cards & lists */
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 24px 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .cards3 { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px; border-left: 2.5px solid var(--teal); border-bottom: 2.5px solid var(--teal); transform: rotate(-45deg); }
.checks.cols { columns: 2; column-gap: 32px; }
@media (max-width: 640px) { .checks.cols { columns: 1; } }
.links { padding-left: 1.2em; }
.links li { margin-bottom: 10px; }
.links .src::before { content: ""; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.timeline li { position: relative; padding: 28px 16px 0 0; border-top: 3px solid var(--line); }
.timeline li::before { content: ""; position: absolute; top: -9px; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--teal); border: 3px solid var(--bg-alt); }
.timeline li:nth-child(4)::before { background: var(--coral-600); }
.timeline strong { display: block; color: var(--ink); margin-bottom: 4px; }
.timeline span { font-size: .95rem; }
@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; }
  .timeline li { border-top: 0; border-left: 3px solid var(--line); padding: 0 0 24px 24px; }
  .timeline li::before { top: 2px; left: -9px; }
}

/* Formula */
.formula { font-size: 1.25rem; color: var(--ink); background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0 20px; font-family: var(--mono); }
.frac { display: inline-flex; flex-direction: column; text-align: center; font-size: 1rem; }
.frac span:first-child { border-bottom: 2px solid var(--ink); padding: 0 6px 4px; }
.frac span:last-child { padding: 4px 6px 0; }

/* Privacy + CTA bands */
.privacy-strip { background: var(--navy); color: #DCE5EE; }
.privacy-strip .h2 { color: #fff; }
.privacy-row, .cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.privacy-row > div { max-width: 64ch; }
.cta-band { background: var(--teal); color: #E8F3F2; padding-block: 56px; }
.cta-band h2 { color: #fff; font-size: 1.8rem; }
.cta-band p { margin: 0; }
.cta-band .cta-actions { margin: 0; }

/* Security diagram */
.arch { display: grid; grid-template-columns: minmax(0, 1fr) 200px minmax(0, 1fr); gap: 16px; align-items: center; }
.zone { border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: #fff; }
.zone-in { background: var(--teal-50); }
.zone h3 { margin: 0 0 4px; font-size: 1rem; }
.node { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-weight: 500; color: var(--ink); }
.node small { font-weight: 400; color: var(--muted); }
.node-key { border: 2px solid var(--coral-600); }
.flow { display: flex; flex-direction: column; gap: 10px; text-align: center; font-weight: 600; color: var(--ink); font-size: .92rem; }
.flow small { font-weight: 400; color: var(--muted); }
@media (max-width: 860px) { .arch { grid-template-columns: 1fr; } }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink); background: var(--bg-alt); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

/* Forms */
.form-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; }
.form { display: flex; flex-wrap: wrap; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 100%; min-width: 0; }
.field.half { flex: 1 1 calc(50% - 8px); }
label { font-weight: 600; color: var(--ink); font-size: .95rem; }
.opt { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid #A9BAB8; border-radius: 8px; padding: 11px 12px; min-height: 46px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(15,118,110,.35); border-color: var(--teal); }
[aria-invalid="true"] { border-color: #B42318; }
.form-status { flex: 1 1 100%; margin: 0; font-weight: 600; }
.form-status.ok { color: var(--teal-700); }
.form-status.err { color: #B42318; }
@media (max-width: 860px) { .form-wrap { grid-template-columns: 1fr; } .field.half { flex-basis: 100%; } }

/* Calculator, sign-in, FAQ */
.calc-grid, .signin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: start; }
.calc { display: flex; flex-direction: column; gap: 14px; }
.calc-out { margin: 6px 0 0; font-size: 2.4rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.calc-out small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.signin { display: flex; flex-direction: column; align-items: flex-start; }
.signin .btn { margin-top: auto; }
@media (max-width: 760px) { .calc-grid, .signin-grid { grid-template-columns: 1fr; gap: 24px; } }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); min-height: 32px; }
.faq details p { margin: 10px 0 0; }

/* Footer */
.site-footer { background: var(--navy); color: #C7D3E0; padding-block: 56px 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-grid a { display: block; color: #E3EAF2; text-decoration: none; padding: 4px 0; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.footer-h { color: #fff; font-size: .8rem; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.footer-brand .icon-mark { width: 44px; height: 44px; }
.footer-brand strong { color: #fff; }
.site-footer .fine { color: #A9B8C9; }
.copy { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.wrap.cards3 { margin-inline: auto; }

/* narrow phones: logo, tagline and Menu only (Pilot and Portal are in the menu) */
@media (max-width: 480px) { .header-actions { display: none; } }
