/* Base365 — site styles */
:root {
  /* Mapped to the brand tokens in /brand/brand.css */
  --paper: var(--b365-cloud);
  --white: var(--b365-white);
  --ink: var(--b365-navy);
  --text: var(--b365-text);
  --slate: var(--b365-slate);
  --mist: var(--b365-mist);
  --line: var(--b365-line);
  --shield: var(--b365-teal);
  --shield-ink: var(--b365-teal);
  --shield-bright: var(--b365-teal-bright);
  --shield-soft: var(--b365-teal-tint);
  --navy-deep: var(--b365-navy-deep);
  --radius-s: var(--b365-radius-button);
  --radius-m: var(--b365-radius-card);
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: var(--b365-font);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--shield-ink); text-underline-offset: 3px; }
a:hover { color: var(--shield); }
:focus-visible { outline: 3px solid var(--shield); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { line-height: 1.12; letter-spacing: var(--b365-heading-tracking); margin: 0 0 0.5em; font-weight: var(--b365-weight-heading); color: var(--ink); }
h3 { font-weight: var(--b365-weight-subhead); }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 64ch; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); color: var(--slate); max-width: 52ch; }
.muted { color: var(--slate); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }

.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand img { display: block; height: auto; }
/* Header logo sized so the tagline in it stays readable (about 13px on desktop) */
.site-header .brand { min-width: 0; }
.site-header .brand img { height: 34px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.site-footer .brand img { height: 32px; width: auto; }
@media (max-width: 1024px) { .site-header .brand img { height: 30px; } }
@media (max-width: 480px) { .site-header .brand img { height: 30px; } }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: var(--b365-weight-label); font-size: 0.98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--shield); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; font: inherit; color: var(--ink); cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: var(--radius-s);
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 2px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer;
}
.btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--white); color: var(--ink); border-color: var(--ink); }
.nav .btn { padding: 9px 16px; color: #fff; font-size: 0.95rem; }
.nav .btn:hover, .nav .btn[aria-current="page"] { color: #fff; text-decoration: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { margin-bottom: 0.35em; }
.hero-kicker { font-weight: 600; color: var(--shield-ink); margin: 0 0 18px; font-size: 1.05rem; }

/* The baseline ledger: the signature element */
.ledger { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(20, 33, 61, 0.35); overflow: hidden; }
.ledger-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.ledger-head strong { font-size: 1.02rem; }
.ledger-head span { font-size: 0.85rem; color: var(--slate); }
.ledger ul { list-style: none; margin: 0; padding: 6px 0; }
.ledger li { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 11px 22px; border-bottom: 1px solid #edf0f3; font-size: 0.98rem; }
.ledger li:last-child { border-bottom: 0; }
.ledger .state { display: inline-flex; align-items: center; gap: 7px; font-size: 0.84rem; font-weight: 600; color: var(--shield-ink); background: var(--shield-soft); padding: 4px 10px 4px 8px; border-radius: 999px; white-space: nowrap; }
.ledger .state svg { width: 14px; height: 14px; }
.ledger-foot { background: var(--ink); color: var(--mist); padding: 14px 22px; font-size: 0.9rem; }
.ledger-foot b { color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .ledger.animate .state { opacity: 0; transform: scale(0.85); animation: settle 0.38s ease-out forwards; }
  .ledger.animate li:nth-child(1) .state { animation-delay: 0.25s; }
  .ledger.animate li:nth-child(2) .state { animation-delay: 0.4s; }
  .ledger.animate li:nth-child(3) .state { animation-delay: 0.55s; }
  .ledger.animate li:nth-child(4) .state { animation-delay: 0.7s; }
  .ledger.animate li:nth-child(5) .state { animation-delay: 0.85s; }
  .ledger.animate li:nth-child(6) .state { animation-delay: 1s; }
  .ledger.animate li:nth-child(7) .state { animation-delay: 1.15s; }
  @keyframes settle { to { opacity: 1; transform: none; } }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 40px; }

/* Two income streams: a split, not cards */
.split { display: grid; grid-template-columns: 1fr 1fr; border-top: 3px solid var(--ink); }
.split > div { padding: 32px 40px 8px 0; }
.split > div + div { padding-left: 40px; padding-right: 0; border-left: 1px solid var(--line); }
.split .price-line { font-weight: 600; color: var(--shield-ink); margin-bottom: 18px; }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 12px; height: 7px; border-left: 2.5px solid var(--shield); border-bottom: 2.5px solid var(--shield); transform: rotate(-45deg); }

/* Real sequence: onboarding steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; }
.steps li { counter-increment: step; padding: 0 32px 0 0; position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; margin-bottom: 18px; position: relative; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 20px; left: 40px; right: 0; height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }

/* Fit: who we work with */
.fit { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.range { margin-top: 8px; }
.range-bar { position: relative; height: 10px; background: var(--line); border-radius: 999px; margin: 18px 0 10px; }
.range-bar span { position: absolute; left: 1.6%; right: 0; top: 0; bottom: 0; background: var(--shield); border-radius: 999px; }
.range-labels { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--slate); }
.range-big { font-size: clamp(2.4rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }

.facts { border-top: 1px solid var(--line); margin: 0; }
.facts div { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--slate); }

/* Pricing */
.prices h2 { font-size: 1.5rem; }
.price { font-size: 1.05rem; color: var(--slate); margin-bottom: 22px; }
.price-num { display: block; font-size: clamp(3rem, 6vw, 4.25rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--ink); margin-bottom: 6px; }
.vat { font-weight: 600; color: var(--ink); }
.price-term { display: block; margin-top: 4px; }
.price-alt { background: var(--paper); border-left: 3px solid var(--shield); padding: 12px 16px; border-radius: 0 var(--radius-s) var(--radius-s) 0; color: var(--text); margin-bottom: 22px; }
.price-alt strong { color: var(--ink); }
.term { border: 0; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.term legend { font-weight: 600; margin-bottom: 12px; padding: 0; color: var(--ink); }
.term label { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); background: var(--white); font-weight: 500; cursor: pointer; }
.term label:first-of-type { border-radius: var(--radius-s) 0 0 var(--radius-s); }
.term label:last-of-type { border-radius: 0 var(--radius-s) var(--radius-s) 0; border-left: 0; }
.term label span { font-weight: 700; color: var(--slate); }
.term input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.term label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #fff; }
.term label:has(input:checked) span { color: var(--shield-bright); }
.term label:has(input:focus-visible) { outline: 3px solid var(--shield); outline-offset: 2px; }
.calc-save { font-weight: 600; color: var(--shield-ink); margin: 0 0 8px; font-size: 0.95rem; }
.calc-save[hidden] { display: none; }
.calc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 28px; }
.calc label { font-weight: 600; display: block; margin-bottom: 12px; }
.calc-row { display: flex; gap: 16px; align-items: center; }
.calc-row input[type=range] { flex: 1; accent-color: var(--shield); min-width: 0; }
.calc-row input[type=number] { width: 88px; font: inherit; font-weight: 600; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--white); color: var(--ink); }
.calc-out { font-size: 1.15rem; color: var(--slate); margin: 22px 0 8px; }
.calc-out span { display: block; font-size: clamp(2.2rem, 4.5vw, 3rem); font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1.1; }
.calc-note { font-size: 0.92rem; margin: 0; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--slate); }
.plain li:first-child { border-top: 1px solid var(--line); }
.plain strong { color: var(--ink); }

/* Coverage */
.coverage { margin: 0 0 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.coverage div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.coverage div:last-child { border-bottom: 0; }
.coverage dt { font-weight: 700; color: var(--ink); }
.coverage dd { margin: 0; color: var(--text); }
.kit div { grid-template-columns: 190px 1fr; }
.kit dd strong { color: var(--ink); }
@media (max-width: 480px) { .coverage div { grid-template-columns: 1fr; gap: 2px; } }

/* Baseline page */
.refs { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.refs li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; font-weight: 600; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 48px; border-top: 3px solid var(--ink); }
.pillar { padding: 28px 0 12px; border-bottom: 1px solid var(--line); }
.pillar .stops { font-weight: 600; color: var(--shield-ink); margin-bottom: 16px; }
.pillar .ticks li { font-size: 0.98rem; }
.facts-wide div { grid-template-columns: minmax(180px, 0.9fr) 1.3fr; }
.facts-terms div { grid-template-columns: 240px 1fr; }

/* Controls table on baseline page */
.controls { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.controls th, .controls td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.controls thead th { background: var(--ink); color: #fff; font-weight: 600; font-size: 0.95rem; }
.controls tbody th { font-weight: 600; width: 30%; }
.controls td { color: var(--slate); }
.controls tr:last-child th, .controls tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

/* CTA band */
.cta-band { background: var(--ink); color: #fff; padding: clamp(48px, 7vw, 80px) 0; }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 8px; color: #fff; }
.cta-band p { color: var(--mist); margin: 0; }
.cta-band .btn { background: #fff; color: var(--ink); border-color: #fff; }
.cta-band .btn:hover { background: var(--shield-bright); border-color: var(--shield-bright); color: var(--ink); }

/* Page header for inner pages */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.page-head-plain { border-bottom: 0; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }

.prose { max-width: 720px; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); }
.hero-note { margin: 18px 0 0; color: var(--slate); font-size: 0.98rem; }
.contact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 28px; margin-bottom: 20px; }
.contact-card span { display: block; font-size: 0.9rem; color: var(--slate); }
.contact-email { display: inline-block; font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 8px; word-break: break-all; }
.contact-card p { color: var(--text); margin-bottom: 20px; }
.contact-card .contact-hours { margin-top: -8px; }
.contact-hours span { display: block; font-size: 0.9rem; color: var(--slate); }
.contact-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.contact-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-list span { display: block; font-size: 0.9rem; color: var(--slate); }
.contact-list a, .contact-list strong { font-size: 1.2rem; font-weight: 600; }
.placeholder { background: #fff4d6; outline: 1px dashed #c99a1a; padding: 0 4px; border-radius: 2px; }

/* Footer */
.site-footer { padding: 56px 0 40px; font-size: 0.95rem; color: var(--slate); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.site-footer h3 { font-size: 1rem; color: var(--ink); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--slate); }
.site-footer a:hover { color: var(--shield); }
.footer-contact { margin: 18px 0 0; }
.social { display: flex; align-items: center; gap: 10px; margin-top: 10px !important; }
.social span { margin-right: 4px; }
.social a { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: var(--radius-s); color: var(--ink); background: var(--white); }
.social a:hover { color: #fff; background: var(--ink); border-color: var(--ink); }
.social svg { width: 18px; height: 18px; }
.footer-contact a { font-weight: 600; color: var(--ink); }
.legal { padding-top: 24px; font-size: 0.85rem; }
.legal p { max-width: none; margin-bottom: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .pillars { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .pillars { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .facts-wide div, .facts-terms div { grid-template-columns: 1fr; }
  .hero .wrap, .fit, .two-col { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split > div, .split > div + div { padding: 28px 0 8px; border-left: 0; }
  .split > div + div { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps li { padding: 0 0 0 60px; }
  .steps li::before { position: absolute; left: 0; top: 0; margin: 0; }
  .steps li::after { top: 40px; left: 19px; right: auto; width: 2px; height: calc(100% - 12px); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 920px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { text-underline-offset: 6px; }
  .nav .btn { margin-top: 14px; border-bottom: 2px solid var(--ink); padding: 12px; }
  .controls tbody th { width: auto; }
}
@media (max-width: 480px) {
  .term label { flex-direction: column; align-items: flex-start; gap: 2px; }
  .ledger li { padding: 11px 16px; font-size: 0.94rem; }
  .ledger-head, .ledger-foot { padding-left: 16px; padding-right: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
}
