/* Public site (marketing, legal pages, 404) in the White City world.
   Tokens come from identity.css; this file owns public composition. */

*, *::before, *::after { box-sizing: border-box; }
/* Safe areas (viewport-fit=cover): side insets widen the gutters in landscape on
   notched phones; the bottom inset lifts everything pinned to the bottom edge. */
html {
  --safe-x: calc(env(safe-area-inset-left, 0px) + env(safe-area-inset-right, 0px));
  --safe-side: max(env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 76px;
  scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%;
}
body.site, body.legal-page { margin: 0; font-size: 1.0625rem; line-height: 1.7; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.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; }
.skip-link, .skip-links a { position: fixed; inset-inline-start: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: var(--radius-md); background: var(--text-primary); color: var(--bg-primary); font-weight: 600; text-decoration: none; }
.skip-link:focus, .skip-links a:focus { top: 16px; }

.container { width: min(1280px, 100% - 64px - var(--safe-x)); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 22px; border: 1px solid transparent; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-large { min-height: 54px; padding: 14px 30px; font-size: 1.0625rem; }
.btn-secondary { border-color: var(--text-primary); }

/* ---------- Navigation: a ribbon band ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--ribbon), color-mix(in srgb, var(--bg-primary) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  padding-top: var(--safe-top);
  transition: border-color var(--dur-ui) ease;
}
.navbar.scrolled { border-bottom-color: var(--border-subtle); }
.nav-container { width: min(1360px, 100% - 48px - var(--safe-x)); margin-inline: auto; min-height: var(--nav-h); padding-top: 7px; display: flex; align-items: center; gap: 28px; }
.nav-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--text-primary); }
.nav-logo { width: 32px; height: 32px; }
.nav-brand-name { font-family: var(--font-sans); font-size: 1.28rem; font-weight: 800; letter-spacing: -.02em; direction: ltr; }
.nav-menu { display: flex; align-items: center; gap: 4px; margin-inline-start: 12px; }
.nav-link { position: relative; padding: 8px 12px; border-radius: var(--radius-md); color: var(--text-secondary); font-size: .98rem; text-decoration: none; transition: color var(--dur-ui) ease; }
.nav-link:hover { color: var(--text-primary); }
.nav-link[aria-current="true"] { color: var(--text-primary); }
.nav-link[aria-current="true"]::after { content: ""; position: absolute; inset-inline: 12px; bottom: 2px; height: 2px; background: var(--sun); }
.nav-link-app, .nav-menu-cta { display: none; }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.nav-actions .btn { min-height: 40px; padding: 8px 18px; font-size: .95rem; }
.theme-toggle { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border-medium); cursor: pointer; transition: color var(--dur-ui) ease, border-color var(--dur-ui) ease; }
.theme-toggle:hover { color: var(--text-primary); border-color: var(--text-primary); }
.theme-icon-moon { display: none; }
html:not(.theme-light) .theme-icon-sun { display: none; }
html:not(.theme-light) .theme-icon-moon { display: block; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--border-medium); border-radius: var(--radius-md); background: transparent; color: var(--text-primary); cursor: pointer; place-items: center; align-content: center; gap: 6px; }
.nav-toggle span { display: block; width: 18px; height: 1.6px; background: currentColor; transition: transform var(--dur-ui) var(--ease-out); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.8px) rotate(-45deg); }

/* ---------- Hero: the building under the sun ---------- */
.sun-hero {
  position: relative;
  min-height: max(640px, calc(100svh - 76px));
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}
.sun-hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.sun-hero--static .sun-hero__canvas { background: url('og-image.png') 18% 60% / cover no-repeat; opacity: .9; }
.sun-hero__sky { position: absolute; inset: 0 0 auto 0; height: 36%; z-index: 1; pointer-events: none; }
.sun-hero__sky svg { width: 100%; height: 100%; overflow: visible; }
.sun-hero__sky path { fill: none; stroke: var(--sun); stroke-width: 1.25; vector-effect: non-scaling-stroke; opacity: .75; }
.sun-hero__sun {
  position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  background: var(--sun); left: 60%; top: 20%;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--sun) 16%, transparent);
}
html:not(.theme-light) .sun-hero__sun { background: #e9ecf8; box-shadow: 0 0 0 10px rgb(233 236 248 / 10%); }
/* Callout pinned to the facade plaque: a leader line from the plaque's corner, then the label. */
.sun-hero__tag {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px; margin: -34px 0 0 14px;
  padding: 4px 10px; border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-medium);
  font-size: .8rem; font-weight: 600; white-space: nowrap; direction: rtl;
}
.sun-hero__tag::before {
  content: ""; position: absolute; left: -14px; bottom: -8px; width: 16px; height: 1px;
  background: var(--text-muted); transform: rotate(-35deg); transform-origin: left;
}
.sun-hero__tag.is-flipped { margin-left: 0; }
.sun-hero__tag.is-flipped::before { left: auto; right: -14px; transform: rotate(35deg); transform-origin: right; }
/* Phones: the label hangs under the plaque on a short vertical leader. */
.sun-hero__tag.is-below { margin: 0; }
.sun-hero__tag.is-below::before { left: var(--leader-x, 50%); right: auto; top: -12px; bottom: auto; width: 1px; height: 12px; transform: none; }
.sun-hero__inner {
  position: relative; z-index: 2; flex: 1;
  width: min(1360px, 100% - 64px - var(--safe-x)); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 46%) 1fr; align-content: center;
  padding-block: 64px 40px;
  pointer-events: none;
}
.sun-hero__copy { pointer-events: auto; padding-top: 4vh; }
.sun-hero h1 {
  font-size: clamp(3rem, 6.4vw, 6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--text-primary);
}
.sun-hero h1 span { color: var(--text-primary); }
.sun-hero__lede { margin-top: 28px; max-width: 30ch; font-size: clamp(1.125rem, 1.5vw, 1.35rem); line-height: 1.6; color: var(--text-secondary); }
.sun-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.sun-hero__scroll {
  position: relative; z-index: 2; align-self: center; margin-bottom: 22px;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  color: var(--text-muted); font-size: .88rem; text-decoration: none;
  transition: color var(--dur-ui) ease;
}
.sun-hero__scroll:hover { color: var(--text-primary); }

/* ---------- Section rhythm ---------- */
main > section { padding-block: clamp(96px, 12vw, 168px); position: relative; }
.section-head { display: grid; gap: 22px; margin-bottom: clamp(48px, 6vw, 80px); max-width: 760px; }
.section-head h2 { font-size: clamp(2.3rem, 4.4vw, 4rem); font-weight: 700; line-height: 1.06; letter-spacing: -.02em; }
.section-head p { max-width: 56ch; font-size: 1.15rem; color: var(--text-secondary); }

/* Package: heading and real report pages */
.package__intro { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.package__intro .section-head { margin-bottom: 0; }
.sheets { position: relative; aspect-ratio: 1 / 1.08; }
.sheets img { position: absolute; width: 64%; height: auto; border: 1px solid var(--border-subtle); background: #fff; box-shadow: var(--shadow-cast); }
.sheets__back { top: 0; left: 4%; transform: rotate(-5deg); }
.sheets__front { bottom: 6%; right: 4%; transform: rotate(2.5deg); }
.sheets figcaption { position: absolute; inset-inline-start: 0; bottom: -6px; font-size: .85rem; color: var(--text-muted); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .sheets img { transition: transform 420ms var(--ease-out); }
  .sheets:hover .sheets__back { transform: rotate(-8deg) translate(-4%, -2%); }
  .sheets:hover .sheets__front { transform: rotate(4deg) translate(3%, 1%); }
}
.package { border-top: 1px solid var(--border-subtle); padding-top: clamp(80px, 9vw, 128px); }
/* Workflow: the sun arc */
.workflow { background: var(--bg-secondary); }
.workflow__path { position: relative; padding-top: clamp(120px, 14vw, 190px); }
.workflow__arc { position: absolute; inset: 0 0 auto 0; width: 100%; height: clamp(150px, 18vw, 240px); overflow: visible; }
.workflow__arc path { fill: none; vector-effect: non-scaling-stroke; }
.workflow__arc-base { stroke: var(--border-medium); stroke-width: 1; stroke-dasharray: 3 6; }
.workflow__arc-lit { stroke: var(--sun); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: var(--arc-offset, 1); }
.workflow__steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; counter-reset: step; }
.workflow__steps li { position: relative; padding-top: 30px; border-top: 1px solid var(--text-primary); }
.workflow__steps li::before {
  content: ""; position: absolute; top: -7px; inset-inline-start: 0; width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg-secondary); border: 1.5px solid var(--text-primary);
  transition: background-color var(--dur-ui) ease, border-color var(--dur-ui) ease;
}
.workflow__steps li.is-lit::before { background: var(--sun); border-color: var(--sun); }
.workflow__steps svg { color: var(--text-primary); margin-bottom: 18px; }
.workflow__steps h3 { font-size: 1.45rem; font-weight: 700; margin-bottom: 8px; }
.workflow__steps p { color: var(--text-secondary); }

/* Grade: the next grade, marked */
.grade { border-top: 1px solid var(--border-subtle); }
.grade__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 120px); align-items: center; }
.grade__copy h2 { font-size: clamp(2.3rem, 4.4vw, 4rem); line-height: 1.06; letter-spacing: -.02em; }
.grade__copy > p { margin-top: 22px; max-width: 46ch; font-size: 1.15rem; color: var(--text-secondary); }
.grade__levers { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border-subtle); }
.grade__levers li { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border-subtle); font-weight: 500; }
.grade__levers li:nth-child(odd) { padding-inline-end: 16px; }
.grade__levers svg { color: var(--sun-text); flex: none; }

.label {
  position: relative; padding: 32px 32px 26px; background: var(--bg-card);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg) var(--radius-balcony) var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-cast);
}
.label__bars { display: grid; gap: 6px; direction: ltr; }
.label__bars li { display: flex; align-items: center; gap: 12px; }
.label__bar {
  --c: #999;
  position: relative; width: var(--w); height: 38px; background: var(--c);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%);
  display: flex; align-items: center; padding-inline-start: 14px;
  color: #fff; font-weight: 800; font-size: 1.15rem; font-family: var(--font-sans);
  transform-origin: left center;
}
.label__bars .g-aplus .label__bar { --c: #00a651; }
.label__bars .g-a .label__bar { --c: #50b848; }
.label__bars .g-b .label__bar { --c: #b3d334; color: #1c2340; }
.label__bars .g-c .label__bar { --c: #fff200; color: #1c2340; }
.label__bars .g-d .label__bar { --c: #f7941d; color: #1c2340; }
.label__bars .g-e .label__bar { --c: #f15a22; }
.label__bars .g-f .label__bar { --c: #ed1c24; }
/* Grades other than now and target recede to a tint of their colour with ink text,
   so every letter keeps its contrast. */
.label__bars li:not(.is-current):not(.is-target) .label__bar {
  background: color-mix(in srgb, var(--c) 30%, var(--bg-card));
  color: var(--text-primary);
}
.label__bars .is-target .label__bar { outline: 2px dashed var(--text-primary); outline-offset: 3px; clip-path: none; border-radius: 2px; }
.label__bars em { direction: rtl; font-style: normal; font-size: .85rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.label__bars .is-target em { color: var(--sun-text); }
.label figcaption { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border-subtle); font-size: .95rem; color: var(--text-secondary); }
.label figcaption span { display: block; margin-top: 4px; font-size: .82rem; color: var(--text-muted); }
.label[data-label] .label__bar { transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out); }
.label.is-pending .label__bar { transform: scaleX(.6); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 3px solid var(--ribbon-ink); }
.pricing-card { position: relative; display: flex; flex-direction: column; padding: 32px 28px 30px; border-inline-start: 1px solid var(--border-subtle); }
.pricing-card:first-child { border-inline-start: 0; }
.pricing-card.featured { background: var(--brand-soft); }
.pricing-card.featured::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 1px; background: var(--sun); }
.pricing-badge { position: absolute; top: 30px; inset-inline-end: 28px; padding: 3px 10px; border-radius: 999px; background: var(--sun); color: var(--sun-ink); font-size: .8rem; font-weight: 700; }
.pricing-title { font-size: 1.55rem; font-weight: 700; }
.pricing-subtitle { margin-top: 4px; color: var(--text-muted); }
.pricing-features { margin: 26px 0 32px; flex: 1; }
.pricing-features li { position: relative; padding: 10px 26px 10px 0; border-top: 1px solid var(--border-subtle); font-size: 1rem; }
.pricing-features li::before { content: ""; position: absolute; right: 2px; top: .95em; width: 11px; height: 6px; border-bottom: 1.6px solid var(--text-primary); border-left: 1.6px solid var(--text-primary); transform: rotate(-45deg); }
.pricing-card .btn { width: 100%; }
.pricing-note { margin-top: 40px; max-width: 70ch; color: var(--text-secondary); }
.pricing-note strong { color: var(--text-primary); }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-layout .section-head { position: sticky; top: 120px; margin-bottom: 0; }
.faq-grid { border-top: 3px solid var(--ribbon-ink); }
.faq-item { border-bottom: 1px solid var(--border-subtle); }
.faq-item h3 { font-family: var(--font-sans); font-size: inherit; }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 22px 0; border: 0; background: transparent; color: var(--text-primary);
  font-size: 1.15rem; font-weight: 600; text-align: start; cursor: pointer;
}
.faq-icon { position: relative; flex: none; width: 16px; height: 16px; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; top: 7.25px; left: 0; width: 16px; height: 1.5px; background: currentColor; transition: transform var(--dur-ui) var(--ease-out); }
.faq-icon::after { transform: rotate(90deg); }
.faq-question[aria-expanded="true"] .faq-icon::after { transform: rotate(0deg); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 240ms var(--ease-out); }
.faq-answer > p { overflow: hidden; color: var(--text-secondary); max-width: 62ch; }
.faq-item.active .faq-answer, .faq-question[aria-expanded="true"] + .faq-answer { grid-template-rows: 1fr; }
.faq-item.active .faq-answer > p, .faq-question[aria-expanded="true"] + .faq-answer > p { padding-bottom: 22px; }
.faq-item h3:has([aria-expanded="true"]) + .faq-answer { grid-template-rows: 1fr; }
.faq-item h3:has([aria-expanded="true"]) + .faq-answer > p { padding-bottom: 22px; }

/* Contact */
.contact { border-top: 1px solid var(--border-subtle); }
.contact-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.contact-methods { border-top: 3px solid var(--ribbon-ink); }
.contact-method { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-subtle); }
.contact-method dt { color: var(--text-muted); }
.contact-method dd { font-weight: 600; text-align: end; }
.contact-method a { text-decoration: none; }
.contact-method a:hover { text-decoration: underline; }
.contact-form-wrapper {
  padding: clamp(24px, 3vw, 40px); background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg) var(--radius-balcony) var(--radius-lg) var(--radius-lg); box-shadow: var(--shadow-cast);
}
.contact-form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: grid; gap: 8px; }
.form-group label { font-size: .95rem; font-weight: 600; }
.required { color: var(--sun-text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--border-medium); border-radius: var(--radius-md);
  background: var(--bg-primary); color: var(--text-primary); font-size: 1rem;
  transition: border-color var(--dur-ui) ease, box-shadow var(--dur-ui) ease;
}
.form-group textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--text-primary); box-shadow: 0 0 0 3px var(--brand-tint); }
.form-group .error { border-color: var(--error); }
.error-message { display: none; font-size: .88rem; color: var(--error); }
.error-message.show { display: block; }
.form-meta { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.form-privacy { font-size: .88rem; color: var(--text-muted); max-width: 60ch; }
.form-privacy a { color: var(--text-secondary); }
.btn-submit { justify-self: start; min-width: 160px; }
.btn-loader { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin 700ms linear infinite; }
.btn-submit.loading .btn-loader { display: inline-block; }
.btn-submit.loading .btn-text { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-status { min-height: 1.5em; font-size: .95rem; font-weight: 500; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--error); }

/* ---------- Footer: evening ---------- */
.footer {
  background:
    linear-gradient(#6a76a3 0 0) top / 100% 3px no-repeat,
    linear-gradient(#f4b03f 0 0) 0 6px / 100% 1px no-repeat,
    #121729;
  color: #bcc1d6;
  /* Bottom room so the floating accessibility and back-to-top buttons never sit on the last line. */
  padding: 72px 0 calc(88px + var(--safe-bottom));
}
.footer a { color: #eceef5; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer :focus-visible { outline-color: #ffc25c; }
.footer-main { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; padding-bottom: 48px; border-bottom: 1px solid #262d48; }
.footer-logo-link { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand-name { font-family: var(--font-sans); font-weight: 800; font-size: 1.3rem; font-weight: 700; direction: ltr; }
.footer-description { margin-top: 16px; max-width: 40ch; }
.footer-stat { margin-top: 12px; font-variant-numeric: tabular-nums; }
.footer-links-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-section h2 { font-family: var(--font-sans); font-size: .9rem; font-weight: 600; color: #969cb7; margin-bottom: 14px; }
.footer-links li + li { margin-top: 8px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: .88rem; color: #969cb7; }

.scroll-to-top {
  position: fixed; inset-inline-start: calc(20px + var(--safe-side)); bottom: calc(20px + var(--safe-bottom)); z-index: 40;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-md);
  border: 1px solid var(--border-medium); background: var(--bg-card); color: var(--text-primary); cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity var(--dur-ui) ease, transform var(--dur-ui) var(--ease-out);
}
.scroll-to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
/* The accessibility button steps aside while it would sit on the hero copy (small phones,
   landscape), the same way the back-to-top button comes and goes. It stays in the tab order
   and the accessibility tree, and returns when focused or while its menu is open. */
body.site .a11y-fab { transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-ui) ease, opacity var(--dur-ui) ease; }
body.site.hero-under-fab .a11y-fab:not(:focus-visible):not([aria-expanded="true"]) { opacity: 0; transform: translateY(8px); pointer-events: none; }

.cookie-banner {
  position: fixed; inset-inline: calc(16px + var(--safe-side)); bottom: calc(16px + var(--safe-bottom)); z-index: 60; margin-inline: auto; max-width: 720px;
  display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 14px;
  background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); font-size: .95rem;
}
.cookie-banner p { flex: 1; }
.cookie-actions { display: flex; gap: 8px; }
.cookie-button { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: var(--radius-md); border: 1px solid var(--border-medium); background: transparent; color: var(--text-primary); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }

/* ---------- Legal pages and 404 ---------- */
body.legal-page .navbar .container { min-height: 72px; padding-top: 7px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
body.legal-page .nav-brand .logo { width: 30px; height: 30px; }
body.legal-page .brand-text { font-family: var(--font-sans); font-weight: 800; font-size: 1.25rem; font-weight: 700; direction: ltr; }
body.legal-page .nav-menu { margin: 0; }
body.legal-page .nav-link { display: inline-flex; align-items: center; min-height: 44px; }
.legal-content, .privacy-content { padding-block: clamp(56px, 8vw, 104px); }
.legal-content .container, .privacy-content .container { width: min(820px, 100% - 40px - var(--safe-x)); }
/* Long addresses and URLs break inside the column; a table scrolls in its own box. */
.legal-content, .privacy-content { overflow-wrap: break-word; }
.legal-section a, .privacy-section a { overflow-wrap: anywhere; }
.legal-section table, .privacy-section table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.legal-header, .privacy-header { padding-bottom: 28px; margin-bottom: 36px; border-bottom: 3px solid var(--ribbon-ink); position: relative; }
.legal-header::after, .privacy-header::after { content: ""; position: absolute; inset-inline: 0; bottom: -8px; height: 1px; background: var(--sun); }
.legal-header h1, .privacy-header h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; letter-spacing: -.02em; }
.last-updated { margin-top: 10px; color: var(--text-muted); font-size: .95rem; }
.legal-section, .privacy-section { padding-block: 22px; border-bottom: 1px solid var(--border-subtle); }
.legal-section h2, .privacy-section h2 { font-size: 1.4rem; margin-bottom: 12px; }
.legal-section h3, .privacy-section h3 { font-family: var(--font-sans); font-size: 1.1rem; margin: 18px 0 8px; }
.legal-section p, .privacy-section p { color: var(--text-secondary); max-width: 68ch; }
.legal-section p + p, .privacy-section p + p { margin-top: 12px; }
.legal-section ul, .privacy-section ul, .legal-section ol, .privacy-section ol { list-style: disc; padding-inline-start: 22px; margin-top: 10px; color: var(--text-secondary); }
.legal-section li + li, .privacy-section li + li { margin-top: 6px; }
.legal-section a, .privacy-section a { color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 2px; }
.legal-section .contact-info, .privacy-section .contact-info { margin-top: 10px; padding: 16px 18px; border-radius: var(--radius-md); background: var(--bg-secondary); }
/* The closing link row wraps as whole links, each with a full-height tap target. */
.legal-nav-return { border-bottom: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; color: var(--text-muted); }
.legal-nav-return a { display: inline-flex; align-items: center; min-height: 44px; }
body.legal-page .footer { padding: 28px 0 calc(88px + var(--safe-bottom)); }
body.legal-page .footer-bottom { border: 0; padding-top: 0; }

.error-page main, .error-content { min-height: calc(100svh - 160px); display: grid; place-content: center; text-align: center; gap: 18px; padding: 48px 20px; }
.error-code { font-family: var(--font-display); font-size: clamp(6rem, 18vw, 11rem); line-height: .9; font-weight: 700; color: var(--text-primary); }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 12px; }

/* ---------- Motion: the sun is the only moving thing ---------- */
@media (prefers-reduced-motion: no-preference) {
  .sun-hero__copy > * { animation: rise 900ms var(--ease-out) both; }
  .sun-hero__copy > :nth-child(2) { animation-delay: 80ms; }
  .sun-hero__copy > :nth-child(3) { animation-delay: 160ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}
@media (hover: hover) and (pointer: fine) {
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .btn-nav-login { display: none; }
  /* Footer columns size to their content so the e-mail address never spills. */
  .footer-links-grid { grid-template-columns: repeat(3, auto); justify-content: space-between; }
}
@media (max-width: 900px) {
  html { --nav-h: 68px; scroll-padding-top: calc(var(--nav-h) + var(--safe-top) + 8px); }
  .container { width: min(1280px, 100% - 32px - var(--safe-x)); }
  .nav-container { width: calc(100% - 32px - var(--safe-x)); gap: 12px; }
  .nav-toggle { display: grid; }
  .theme-toggle { width: 44px; height: 44px; }
  /* The hamburger sheet belongs to the landing page; legal pages keep their one inline link. */
  body.site .nav-menu {
    position: fixed; inset: calc(var(--nav-h) + var(--safe-top)) 0 auto 0; margin: 0; flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100dvh - var(--nav-h) - var(--safe-top)); overflow-y: auto; overscroll-behavior: contain;
    padding: 12px calc(16px + var(--safe-side)) calc(20px + var(--safe-bottom));
    background: var(--bg-primary); border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    visibility: hidden; opacity: 0; transform: translateY(-6px);
    transition: opacity var(--dur-ui) ease, transform var(--dur-ui) var(--ease-out), visibility 0s linear var(--dur-ui);
  }
  body.site .nav-menu.active { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  /* While the sheet is open the header (and its scrim) rise above the floating
     page controls, and the page below dims so the sheet reads as one layer. */
  body.site .navbar:has(.nav-menu.active) { z-index: 70; }
  body.site .navbar:has(.nav-menu.active)::after {
    content: ""; position: fixed; inset-inline: 0; top: calc(var(--nav-h) + var(--safe-top)); height: 100lvh; z-index: -1;
    background: rgb(var(--cast-rgb) / 40%);
  }
  body.site .nav-link { padding: 14px 4px; font-size: 1.1rem; border-bottom: 1px solid var(--border-subtle); border-radius: 0; }
  body.site .nav-link[aria-current="true"]::after { inset-inline: 4px auto; width: 28px; bottom: -1px; }
  .nav-link-app { display: block; }
  .nav-menu-cta { display: flex; min-height: 52px; margin-top: 20px; font-size: 1.0625rem; }
  .btn-nav-demo { display: none; }

  /* Hero stacks: the building above the headline, cropped to the viewport in landscape. */
  .sun-hero { min-height: auto; }
  .sun-hero__canvas { position: relative; inset: auto; height: min(62vw, 70svh); min-height: min(300px, 60svh); max-height: 480px; order: -1; z-index: 1; }
  /* The sun sets behind the building, not in front of its roof. */
  .sun-hero__sky { height: 30vw; z-index: 0; }
  .sun-hero__inner { grid-template-columns: 1fr; width: calc(100% - 32px - var(--safe-x)); padding-block: 8px 32px; gap: 28px; }
  .sun-hero__copy { padding-top: 0; }
  .sun-hero__lede { max-width: 38ch; }
  .sun-hero__scroll { display: none; }
  .sun-hero__actions .btn { flex: 1 1 200px; }

  .grade__layout, .faq-layout, .contact-layout, .footer-main, .package__intro { grid-template-columns: 1fr; }
  .sheets { max-width: 460px; width: 100%; justify-self: center; }
  .faq-layout .section-head { position: static; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card { border-inline-start: 0; border-top: 1px solid var(--border-subtle); padding-inline: 20px; }
  .pricing-card:first-child { border-top: 0; }
  .pricing-card.featured::before { display: none; }
  .pricing-badge { inset-inline-end: 20px; }
  .contact-method dd { min-width: 0; overflow-wrap: anywhere; }
  .label { width: 100%; max-width: 560px; justify-self: center; }

  .legal-content .container, .privacy-content .container { width: min(820px, 100% - 32px); }
  body.legal-page .navbar .container { min-height: 64px; flex-wrap: wrap; row-gap: 0; }
}
@media (max-width: 700px) {
  /* Three steps no longer fit side by side: the arc gives way to a vertical run. */
  .workflow__steps { grid-template-columns: 1fr; gap: 28px; }
  .workflow__arc { display: none; }
  .workflow__path { padding-top: 0; }
}
@media (max-width: 600px) {
  body.site { font-size: 1rem; }
  .grade__levers { grid-template-columns: 1fr; }
  .grade__levers li:nth-child(odd) { padding-inline-end: 0; }
  .form-row { grid-template-columns: 1fr; }
  .btn-submit { justify-self: stretch; }
  .label { padding: 22px 18px 18px; }
  .label__bar { height: 32px; }
  .footer-links-grid { grid-template-columns: 1fr 1fr; justify-content: stretch; gap: 28px 24px; }
  .footer-section:last-child { grid-column: 1 / -1; }
  .footer a { overflow-wrap: anywhere; }
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-actions .cookie-button { flex: 1; justify-content: center; min-height: 44px; }
  .nav-brand-name { font-size: 1.15rem; }
  .error-content { padding-inline: 0; }
  /* Phone floor for supporting text: captions, the label notes and the form meta stay at 14px or more. */
  .sheets figcaption, .label__bars em, .label figcaption span, .pricing-badge, .form-meta, .form-privacy, .error-message, .sun-hero__tag { font-size: .875rem; }
}
/* Touch: footer and legal link lists get full-height rows instead of 27px lines. */
@media (pointer: coarse) {
  /* Tablets that still show the full header (iPad landscape) get 44px header controls. */
  .nav-link { padding-block: 10px; }
  .nav-actions .btn { min-height: 44px; }
  .theme-toggle { width: 44px; height: 44px; }
  .sun-hero__scroll { min-height: 44px; }
  .footer-logo-link { min-height: 44px; }
  .footer-links li + li { margin-top: 0; }
  .footer-links a, .footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; }
}
/* Landscape phones: a slimmer header leaves more of the short viewport to the page. */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  html { --nav-h: 58px; }
  .nav-container { padding-top: 5px; }
}
@media (max-width: 380px) {
  /* Smallest phones (and 400% zoom): the display line keeps whole words on one line. */
  .sun-hero h1 { font-size: clamp(2.4rem, 13.5vw, 3rem); }
  .section-head h2, .grade__copy h2 { font-size: clamp(2rem, 11vw, 2.3rem); }
  .pricing-card { padding-inline: 0; }
  .pricing-card.featured { padding-inline: 16px; margin-inline: -16px; }
  .pricing-badge { inset-inline-end: 0; }
  .pricing-card.featured .pricing-badge { inset-inline-end: 16px; }
  .contact-form-wrapper { padding: 22px 16px; }
}

/* ---------- Night ---------- */
html:not(.theme-light) .sheets img { filter: brightness(.9); border-color: transparent; }
html:not(.theme-light) .label__bars li:not(.is-current):not(.is-target) .label__bar { background: color-mix(in srgb, var(--c) 34%, var(--bg-card)); }

