/* Mouen product design system v2 (2026-10)
   One palette from the Gumroad cover to the activation page: deep navy + cream + gold hairline,
   teal for "pass", red for "warn". Source Serif 4 for display headlines and big figures, Inter for UI,
   JetBrains Mono for eyebrows and labels. White app surfaces on a cream canvas. */
:root {
  --navy-900: #0b1f3a; --navy-800: #0f2748; --navy: #12305a; --navy-700: #1b3f73; --navy-600: #27518f;
  --ink: #14263f; --body: #3b4a5e; --mute: #6a7686; --mute-2: #8a94a3;
  --cream: #f5f2ea; --cream-2: #ece7da; --cream-3: #e3dccb; --paper: #ffffff;
  --line: #d8dde4; --line-soft: #e8ebef; --line-dark: rgba(255, 255, 255, .14);
  --gold: #d9a128; --gold-2: #f0b63a; --gold-soft: #fff3cf; --amber: #8a5a00;
  --teal: #1f7a6b; --teal-soft: #e3f2ee; --red: #b42318; --red-soft: #fdecea;
  --on-dark: #ffffff; --on-dark-2: #c9d6e8; --on-dark-3: #8ea3c2;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-sm: 8px; --r: 10px; --r-lg: 16px; --r-xl: 22px;
  --shadow-sm: 0 1px 2px rgba(18, 48, 90, .06), 0 1px 1px rgba(18, 48, 90, .04);
  --shadow: 0 10px 30px rgba(18, 48, 90, .10), 0 1px 2px rgba(18, 48, 90, .08);
  --shadow-lg: 0 24px 60px rgba(18, 48, 90, .18), 0 2px 6px rgba(18, 48, 90, .08);
  --max: 1120px; --gutter: 16px;
  /* legacy aliases used by older page styles */
  --p-cream: var(--cream); --p-cream-2: var(--cream-2); --p-paper: var(--paper); --p-navy: var(--navy); --p-navy-2: var(--navy-700);
  --p-ink: var(--ink); --p-body: var(--body); --p-mute: var(--mute); --p-line: var(--line); --p-line-soft: var(--line-soft);
  --p-gold: var(--gold); --p-gold-soft: var(--gold-soft); --p-teal: var(--teal); --p-teal-soft: var(--teal-soft); --p-red: var(--red); --p-red-soft: var(--red-soft); --p-amber: var(--amber);
  --m-canvas: var(--navy-900); --m-ink: #fff; --m-body-dark: var(--on-dark-2); --m-mute-dark: var(--on-dark-3); --m-green: var(--gold);
  --radius: var(--r); --radius-lg: var(--r-lg);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; font-feature-settings: "calt", "rlig", "tnum"; font-variant-numeric: tabular-nums; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-700); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap-narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Chrome: header + footer ---------- */
.m-header { background: var(--navy-900); color: #fff; position: sticky; top: 0; z-index: 50; }
.m-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.m-logo { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: -.02em; font-size: 19px; font-family: var(--font-sans); }
.m-logo .dot { width: 9px; height: 9px; border-radius: 2px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 3px rgba(217, 161, 40, .18); }
.m-logo .suffix { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-3); margin-left: 6px; padding-left: 10px; border-left: 1px solid var(--line-dark); }
.m-nav { display: flex; gap: 6px 24px; align-items: center; font-size: 14px; }
.m-nav a { color: var(--on-dark-2); text-decoration: none; font-weight: 500; }
.m-nav a:hover { color: #fff; }
.m-nav .m-cta { background: var(--gold); color: #1a1200; font-weight: 600; padding: 9px 16px; border-radius: 999px; white-space: nowrap; }
.m-nav .m-cta:hover { background: var(--gold-2); color: #1a1200; }
.m-footer { background: var(--navy-900); color: var(--on-dark-2); margin-top: 72px; padding: 44px 0 32px; font-size: 14px; }
.m-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.m-footer h4 { margin: 0 0 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-3); font-weight: 500; }
.m-footer a { color: var(--on-dark-2); }
.m-footer a:hover { color: #fff; }
.m-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.m-footer .legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line-dark); color: var(--on-dark-3); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
@media (max-width: 760px) { .m-footer .cols { grid-template-columns: 1fr; } .m-nav a:not(.m-cta) { display: none; } .m-header .wrap { min-height: 56px; } }

/* ---------- Typography ---------- */
.eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin: 0 0 12px; }
.eyebrow-gold { color: var(--gold); }
h1, .h1 { font-family: var(--font-serif); font-weight: 700; font-size: clamp(34px, 5vw, 56px); line-height: 1.06; letter-spacing: -.015em; color: var(--navy); margin: 0 0 18px; text-wrap: balance; }
h2, .h2 { font-family: var(--font-serif); font-weight: 700; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.14; letter-spacing: -.01em; color: var(--navy); margin: 0 0 14px; text-wrap: balance; }
h3, .h3 { font-family: var(--font-sans); font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 8px; color: var(--navy); }
.h4 { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--body); max-width: 58ch; line-height: 1.55; }
p { margin: 0 0 14px; }
.muted { color: var(--mute); }
.small { font-size: 14px; }
.xs { font-size: 12.5px; }
.mono { font-family: var(--font-mono); }
.num, .tnum { font-variant-numeric: tabular-nums; }
.figure { font-family: var(--font-serif); font-weight: 700; letter-spacing: -.02em; color: var(--navy); line-height: 1; }
.on-dark { color: #fff; } .on-dark h1, .on-dark h2, .on-dark h3, .on-dark .h1, .on-dark .h2, .on-dark .h3 { color: #fff; } .on-dark p, .on-dark li { color: var(--on-dark-2); } .on-dark .muted { color: var(--on-dark-3); } .on-dark .eyebrow { color: var(--gold); } .on-dark a { color: #fff; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15.5px; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .05s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease; white-space: nowrap; line-height: 1.2; font-family: inherit; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 6px 16px rgba(18, 48, 90, .22); }
.btn-primary:hover { background: var(--navy-700); color: #fff; }
.btn-gold { background: var(--gold); color: #1a1200; box-shadow: 0 6px 16px rgba(217, 161, 40, .28); }
.btn-gold:hover { background: var(--gold-2); color: #1a1200; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); background: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--cream); color: var(--navy); }
.btn-outline-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-outline-dark:hover { background: rgba(255, 255, 255, .08); color: #fff; border-color: #fff; }
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 17px; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn .ic { width: 18px; height: 18px; flex: 0 0 auto; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Surfaces ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.card-soft { background: var(--cream-2); border-color: transparent; box-shadow: none; }
.card-dark { background: var(--navy-900); border-color: var(--navy-800); color: #fff; }
.card-gold { border-top: 3px solid var(--gold); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 13.5px; font-weight: 600; color: var(--navy); margin: 0 8px 8px 0; }
.chip-dark { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.callout { border-radius: var(--r); padding: 14px 16px; font-size: 14.5px; line-height: 1.5; }
.callout-gold { background: var(--gold-soft); border: 1px solid #f1d98a; color: #4a3600; }
.callout-navy { background: var(--navy); color: #fff; }
.callout-red { background: var(--red-soft); border: 1px solid #f3b8b1; color: #7a1a12; }
.callout-teal { background: var(--teal-soft); border: 1px solid #b9dfd4; color: #0f4a40; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); line-height: 1.4; white-space: nowrap; }
.badge-gold { background: var(--gold-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-navy { background: var(--navy); color: #fff; }
.badge-dark { background: rgba(255, 255, 255, .12); color: #fff; }
.badge-neutral { background: var(--cream-2); color: var(--body); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .field .label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field label .opt { font-weight: 400; color: var(--mute); }
.field .hint { font-size: 13px; color: var(--mute); line-height: 1.45; }
.input, select.input, input.input { width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); transition: border-color .12s ease, box-shadow .12s ease; appearance: none; -webkit-appearance: none; }
.input::placeholder { color: var(--mute-2); }
.input:hover { border-color: #b9c2cf; }
.input:focus { border-color: var(--navy); outline: 3px solid rgba(18, 48, 90, .14); outline-offset: 0; }
.input[aria-invalid="true"] { border-color: var(--red); outline-color: rgba(180, 35, 24, .15); }
select.input { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2312305a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; cursor: pointer; }
input[type="number"].input { -moz-appearance: textfield; }
input[type="number"].input::-webkit-outer-spin-button, input[type="number"].input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-sug { background: #fffdf3; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row .input { flex: 1; }
.suffix { font-size: 14px; color: var(--mute); white-space: nowrap; }
.input-wrap { position: relative; }
.input-wrap .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--mute); pointer-events: none; font-family: var(--font-mono); letter-spacing: .02em; }
.input-wrap .input { padding-right: 64px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
/* stepper: - [value] + */
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; min-height: 48px; }
.stepper:focus-within { border-color: var(--navy); outline: 3px solid rgba(18, 48, 90, .14); }
.stepper button { border: 0; background: var(--cream-2); color: var(--navy); font-size: 20px; font-weight: 600; cursor: pointer; font-family: inherit; min-height: 46px; }
.stepper button:hover { background: var(--cream-3); }
.stepper button:active { background: var(--line); }
.stepper .input { border: 0; border-radius: 0; box-shadow: none; text-align: center; min-height: 46px; }
.stepper .input:focus { outline: none; }
/* segmented control */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.seg label { position: relative; min-width: 0; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 48px; padding: 6px 4px; border-right: 1px solid var(--line-soft); font-size: 13px; font-weight: 600; color: var(--body); text-align: center; line-height: 1.2; cursor: pointer; }
.seg label:last-child span { border-right: 0; }
.seg small { font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--mute); letter-spacing: .04em; }
.seg input:checked + span { background: var(--navy); color: #fff; }
.seg input:checked + span small { color: var(--on-dark-2); }
.seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: -3px; }
details.adv { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0 18px; margin: 0; background: #fff; box-shadow: var(--shadow-sm); }
details.adv summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 15px; color: var(--navy); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details.adv summary::-webkit-details-marker { display: none; }
details.adv summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute); transform: rotate(45deg); transition: transform .15s ease; flex: 0 0 auto; margin-right: 4px; }
details.adv[open] summary::after { transform: rotate(-135deg); }
details.adv .body { padding: 2px 0 16px; }

/* ---------- Data display ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); text-align: right; vertical-align: top; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl thead th { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); font-weight: 600; border-bottom: 2px solid var(--line); }
.tbl .total td { font-weight: 700; color: var(--navy); border-top: 2px solid var(--navy); border-bottom: 0; font-size: 17px; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.tiles.cols-3 { grid-template-columns: repeat(3, 1fr); }
.tiles.cols-4 { grid-template-columns: repeat(4, 1fr); }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.tile .k { font-size: 12px; color: var(--mute); line-height: 1.3; }
.tile .v { font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.tile .v small { font-size: 12px; font-weight: 500; color: var(--mute); }
.tile .v.warn { color: var(--red); }
.tile.on-dark { background: rgba(255, 255, 255, .06); border-color: var(--line-dark); } .tile.on-dark .k { color: var(--on-dark-3); } .tile.on-dark .v { color: #fff; } .tile.on-dark .v small { color: var(--on-dark-3); }
.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; }
.checks li { display: flex; gap: 9px; align-items: flex-start; line-height: 1.4; color: var(--body); }
.checks .ic { flex: 0 0 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; margin-top: 1px; }
.checks .ok .ic { background: var(--teal-soft); color: var(--teal); }
.checks .warn .ic { background: var(--red-soft); color: var(--red); }
.checks .warn { color: #7a1a12; }
.checks.on-dark li { color: var(--on-dark-2); } .checks.on-dark .ok .ic { background: rgba(31, 122, 107, .35); color: #9fe0cf; } .checks.on-dark .warn { color: #ffb4a8; } .checks.on-dark .warn .ic { background: rgba(180, 35, 24, .35); color: #ffb4a8; }
.ok { color: var(--teal); } .warn { color: var(--red); }

/* ---------- Tool page scaffolding ---------- */
.tool-head { padding: 28px 0 10px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; }
.tool-head h1 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 6px; }
.tool-head .lead { font-size: 15.5px; max-width: 64ch; margin: 0; }
.steps-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.steps-nav a { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--navy); text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 7px; }
.steps-nav a b { width: 20px; height: 20px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.sec-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; flex: 0 0 auto; }
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font-family: var(--font-sans); font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.sec-head p { margin: 2px 0 0; }

/* ---------- Sticky mobile bar ---------- */
.sticky-bar { display: none; }
@media (max-width: 920px) {
  body.has-sticky { padding-bottom: 84px; }
  .sticky-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: rgba(11, 31, 58, .97); backdrop-filter: blur(10px); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 12px; align-items: center; border-top: 1px solid rgba(255, 255, 255, .1); }
  .sticky-bar .t { color: #fff; font-size: 13.5px; line-height: 1.3; flex: 1; min-width: 0; }
  .sticky-bar .t small { color: var(--on-dark-3); display: block; }
  .sticky-bar .t .fig { font-family: var(--font-serif); font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
  .sticky-bar .btn { min-height: 46px; padding: 10px 18px; font-size: 15px; }
}

/* ---------- Utility ---------- */
.stack > * + * { margin-top: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; } .mt-4 { margin-top: 44px; } .mt-5 { margin-top: 72px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 28px; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.visually-print-only { display: none; }
@media print {
  .m-header, .m-footer, .no-print, .sticky-bar { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; padding-bottom: 0 !important; }
  .card { border-color: #bbb; box-shadow: none; }
  .visually-print-only { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
