/* =========================================================
   Salumis Health Systems — site stylesheet
   1 tokens · 2 reset · 3 type · 4 layout · 5 header/footer · 6 buttons
   7 tiles & mosaic · 8 page components · 9 dashboard · 10 forms · 11 misc
   To change colours or fonts, edit section 1 only.
   ========================================================= */

/* 1. Tokens ------------------------------------------------ */
:root {
  --pine: #16362e;
  --pine-deep: #0e2620;
  --pine-soft: #dbe7e0;
  --paper: #f7f7f4;
  --white: #ffffff;
  --ink: #1b1f1d;
  --ink-soft: #545b58;
  --ink-muted: #646c68;
  --raspberry: #b63e60;
  --raspberry-deep: #96304d;
  --raspberry-tint: #f9e7ed;
  --blush: #f6dde3;
  --lilac: #e6e2f6;
  --lilac-deep: #8b7fc7;
  --mint: #dcefe3;
  --butter: #f8ecc8;
  --gold: #d9a441;
  --sage: #7fa08e;
  --sage-deep: #5d8070;
  --sage-text: #3d6150;
  --line: #e1e4e0;
  --line-strong: #c9cec9;

  --font-display: "Outfit", "Segoe UI", Arial, sans-serif;
  --font-body: "Figtree", "Segoe UI", Arial, sans-serif;

  --container: 1180px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 8vw, 7rem);
  --radius: 18px;
  --radius-sm: 10px;
  --measure: 62ch;
  --shadow: 0 1px 2px rgba(22,54,46,.05), 0 12px 32px -16px rgba(22,54,46,.18);
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* 2. Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure, fieldset { margin: 0; }
ul, ol { padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--pine); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--raspberry); }
:focus-visible { outline: 3px solid var(--raspberry); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* 3. Type -------------------------------------------------- */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--pine);
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 4.8vw + 1rem, 4.6rem); }
h2 { font-size: clamp(1.9rem, 2.6vw + .8rem, 3rem); }
h3 { font-size: clamp(1.3rem, 1vw + .9rem, 1.55rem); line-height: 1.2; letter-spacing: -0.015em; }
h4 { font-size: 1.1rem; line-height: 1.3; letter-spacing: -0.01em; }
.as-h3 { font-size: clamp(1.3rem, 1vw + .9rem, 1.55rem); line-height: 1.2; letter-spacing: -0.015em; }
p + p, p + ul, p + ol, ul + p, ol + p { margin-top: 1em; }
.lede {
  font-size: clamp(1.1rem, .5vw + 1rem, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
}
.measure { max-width: var(--measure); }
.small { font-size: .9rem; color: var(--ink-muted); }
.list { list-style: none; }
.list li { position: relative; padding-left: 1.5rem; }
.list li + li { margin-top: .5rem; }
.list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: .7rem; height: .7rem; border-radius: 50%;
  background: var(--mint); box-shadow: inset 0 0 0 2px var(--sage-deep);
}
.on-pine .list li::before { background: transparent; box-shadow: inset 0 0 0 2px var(--sage); }
strong { font-weight: 600; }

/* 4. Layout ------------------------------------------------ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * .55); }
.section--flush-top { padding-top: 0; }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head p { margin-top: 1rem; color: var(--ink-soft); }
.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.grid--split-wide { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
@media (max-width: 860px) { .grid--2, .grid--3, .grid--split { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .grid--split-wide { grid-template-columns: 1fr; } }
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--pine); color: var(--white); border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

/* 5. Header & footer -------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,247,244,.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; }
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em;
  color: var(--pine); text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--pine); }
.brand svg { width: 30px; height: 30px; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav ul { display: flex; gap: 1.5rem; list-style: none; }
.site-nav a:not(.btn) {
  font-weight: 500; font-size: .97rem; color: var(--ink-soft); text-decoration: none;
  padding: .35rem .1rem; border-bottom: 2px solid transparent;
}
.site-nav a:not(.btn):hover { color: var(--pine); }
.site-nav a[aria-current="page"] { color: var(--pine); border-bottom-color: var(--raspberry); }
.nav-toggle {
  display: none; background: var(--white); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: .5rem .9rem; font-weight: 500; font-size: .95rem;
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: .5rem; }
  .site-header__inner { gap: .75rem; }
  .brand { font-size: 1.05rem; gap: .5rem; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.5rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a:not(.btn) { display: block; padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 1.2rem; }
}

.site-footer { padding-block: 3rem 2rem; }
.site-footer__tile { background: var(--pine); color: var(--pine-soft); border-radius: var(--radius); padding: clamp(2rem, 4vw, 3.5rem); }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--butter); text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.site-footer .brand { color: var(--white); }
.site-footer__tag { margin-top: 1rem; max-width: 34ch; }
.site-footer h4 { color: var(--white); margin-bottom: .8rem; }
.site-footer ul { list-style: none; }
.site-footer li + li { margin-top: .45rem; }
.site-footer__bottom {
  margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.15);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; font-size: .88rem; color: var(--sage);
}
@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid > :first-child { grid-column: 1 / -1; }
}

/* 6. Buttons ---------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1;
  text-decoration: none; border: 1.5px solid transparent; white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--raspberry); color: var(--white); }
.btn--primary:hover { background: var(--raspberry-deep); color: var(--white); }
.btn--secondary { background: var(--white); color: var(--pine); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--pine); color: var(--pine); }
.btn--pine { background: var(--pine); color: var(--white); }
.btn--pine:hover { background: var(--pine-deep); color: var(--white); }
.on-pine .btn--secondary { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.on-pine .btn--secondary:hover { background: var(--white); color: var(--pine); border-color: var(--white); }
.btn--large { padding: 1rem 1.7rem; font-size: 1.06rem; }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: center; margin-top: 2rem; }
.btn-row--center { justify-content: center; }
.text-link { font-weight: 600; color: var(--pine); text-decoration: none; border-bottom: 2px solid var(--raspberry); padding-bottom: .05rem; }
.text-link:hover { color: var(--raspberry); }

/* 7. Tiles & mosaic --------------------------------------- */
.tile {
  background: var(--white); border-radius: var(--radius); padding: clamp(1.4rem, 2.5vw, 2rem);
  position: relative; overflow: hidden;
}
.tile--pine { background: var(--pine); color: var(--pine-soft); }
.tile--pine h2, .tile--pine h3, .tile--pine h4, .tile--pine .stat__value { color: var(--white); }
.tile--blush { background: var(--blush); }
.tile--lilac { background: var(--lilac); }
.tile--mint { background: var(--mint); }
.tile--butter { background: var(--butter); }
.tile--paper { background: var(--paper); }
.tile--outline { background: var(--white); border: 1px solid var(--line); }
.tile--flush { padding: 0; }
.tile > * + * { margin-top: .9rem; }
.tile h3 + p, .tile h4 + p { margin-top: .5rem; }
.tile p { color: var(--ink-soft); }
.tile--pine p { color: var(--pine-soft); }
.tile__foot { margin-top: auto; padding-top: 1rem; }

/* Stat tile: the number is the content */
.stat { display: flex; flex-direction: column; justify-content: flex-end; min-height: 100%; }
.stat__value {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; line-height: 1;
  font-size: clamp(2.6rem, 3.5vw + 1rem, 4rem); color: var(--pine);
}
.stat__label { margin-top: .5rem !important; font-size: .95rem; color: var(--ink-soft); max-width: 22ch; }
.tile--pine .stat__label { color: var(--pine-soft); }

/* Image slot: shows a pastel fill until the user drops in the file */
.img-slot { position: relative; min-height: 220px; overflow: hidden; border-radius: var(--radius); background: var(--blush); }
.img-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-slot--lilac { background: var(--lilac); }
.img-slot--mint { background: var(--mint); }
.img-slot--butter { background: var(--butter); }
.img-slot--portrait { aspect-ratio: 2 / 3; min-height: 0; }
.img-slot--portrait img { object-fit: contain; }
.img-slot__hint {
  position: absolute; left: 1rem; bottom: 1rem; font-size: .8rem; color: var(--ink-soft);
  background: rgba(255,255,255,.75); padding: .3rem .6rem; border-radius: 999px;
}
.img-slot.has-image .img-slot__hint { display: none; }
.img-slot.no-image img { display: none; }

/* Homepage hero + mosaic */
.hero { padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem); text-align: center; }
.hero h1 { max-width: 22ch; margin-inline: auto; }
.hero .lede { max-width: 58ch; margin: 1.5rem auto 0; }
.hero .btn-row { margin-top: 2rem; }
.mosaic {
  display: grid; gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1.3fr);
  grid-template-rows: minmax(300px, auto) minmax(190px, auto);
  grid-template-areas:
    "a b b"
    "a d e";
}
.mosaic__a { grid-area: a; }
.mosaic__b { grid-area: b; }
.mosaic__d { grid-area: d; }
.mosaic__e { grid-area: e; }
.mosaic .tile--pine.mosaic__a { display: flex; flex-direction: column; justify-content: flex-start; }
.mosaic__a .tile__foot { margin-top: 1.5rem; }
.mosaic__words {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1;
  font-size: clamp(1.6rem, 1.6vw + .8rem, 2.3rem); color: var(--white);
}
.mosaic__words span { display: block; }
.mosaic__words span:nth-child(2) { color: var(--butter); }
.mosaic__words span:nth-child(3) { color: var(--blush); }
.mosaic__words span:nth-child(4) { color: var(--mint); }
@media (max-width: 1000px) {
  .mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    grid-template-areas:
      "b b"
      "a a"
      "d e";
  }
}
@media (max-width: 600px) {
  .mosaic { grid-template-columns: 1fr; grid-template-areas: "b" "a" "d" "e"; }
}

/* Chips (audience list) */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; }
.chips li {
  font-weight: 500; font-size: .95rem; padding: .55rem 1rem; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line-strong); color: var(--pine);
}
.tile--lilac .chips li, .tile--mint .chips li, .tile--blush .chips li { background: rgba(255,255,255,.7); border-color: transparent; }
.chips--center { justify-content: center; }

/* 8. Page components -------------------------------------- */

/* Statement tile (pine anchor) */
.statement { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; padding: clamp(2rem, 5vw, 4rem); }
.statement h2 { max-width: 20ch; }
@media (max-width: 860px) { .statement { grid-template-columns: 1fr; } }

/* Numbered steps (true sequences only) */
.steps { list-style: none; counter-reset: step; display: grid; gap: 1rem; }
.steps--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.steps > li { counter-increment: step; }
.step { display: flex; flex-direction: column; min-height: 100%; }
.step__num {
  width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--pine);
  background: var(--mint); margin-bottom: 1.1rem;
}
.steps > li:nth-child(2) .step__num { background: var(--lilac); }
.steps > li:nth-child(3) .step__num { background: var(--blush); }
.steps > li:nth-child(4) .step__num { background: var(--butter); }
.steps > li:nth-child(5) .step__num { background: var(--pine-soft); }
.step__num::before { content: counter(step); }
.step h3 { font-size: 1.2rem; }
.step p { font-size: .97rem; margin-top: .5rem !important; }
@media (max-width: 1100px) { .steps--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .steps--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps--5 { grid-template-columns: 1fr; } }

/* Solutions overview tiles (home) and solution sections */
.areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.area { text-decoration: none; color: inherit; display: flex; flex-direction: column; min-height: 210px; transition: transform .2s var(--ease); }
.area:hover { color: inherit; transform: translateY(-2px); }
.area h3 { font-size: 1.25rem; }
.area p { font-size: .96rem; }
.area .area__go { margin-top: auto; padding-top: 1rem; font-weight: 600; color: var(--pine); font-size: .95rem; }
.area:hover .area__go { color: var(--raspberry); }
@media (max-width: 860px) { .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .areas { grid-template-columns: 1fr; } }

.subnav { position: sticky; top: 4.5rem; z-index: 30; background: rgba(247,247,244,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.subnav ul { list-style: none; display: flex; gap: .4rem; overflow-x: auto; padding-block: .7rem; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a {
  display: block; font-weight: 500; font-size: .9rem; white-space: nowrap; text-decoration: none;
  color: var(--ink-soft); padding: .4rem .85rem; border-radius: 999px;
}
.subnav a:hover { background: var(--white); color: var(--pine); }

.solution { padding-block: clamp(3rem, 6vw, 5rem); scroll-margin-top: 8.5rem; }
.solution + .solution { border-top: 1px solid var(--line); }
.solution__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.solution__kicker { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--raspberry); letter-spacing: -0.01em; margin-bottom: .6rem; }
.solution h2 { margin-bottom: 1.2rem; }
.solution__aside h3 { font-size: 1.1rem; margin-bottom: .9rem; }
.solution__aside .list li { font-size: .96rem; }
@media (max-width: 860px) { .solution__grid { grid-template-columns: 1fr; } }

/* Causal chain — arrows mean causation */
.chain { list-style: none; display: grid; max-width: 40rem; }
.chain__item { position: relative; padding-bottom: 2rem; }
.chain__item:last-child { padding-bottom: 0; }
.chain__item::after {
  content: ""; position: absolute; left: 1.6rem; bottom: .55rem; height: 1.45rem; width: 2px; background: var(--line-strong);
}
.chain__item::before {
  content: ""; position: absolute; left: calc(1.6rem - 4px); bottom: .3rem;
  border: 5px solid transparent; border-top: 7px solid var(--line-strong); border-bottom: 0;
}
.chain__item:last-child::before, .chain__item:last-child::after { display: none; }
.chain__node {
  display: flex; align-items: center; gap: .9rem; width: 100%;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .95rem 1.1rem; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--pine); text-align: left;
}
.chain__dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--raspberry); flex: none; }
.chain__node--outcome { background: var(--pine); color: var(--white); border-color: var(--pine); }
.chain__node--outcome .chain__dot { background: var(--butter); }

/* Interactive chain (theory of change) */
.chain__toggle {
  display: flex; align-items: center; gap: .9rem; width: 100%;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .95rem 1.1rem; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--pine); text-align: left;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.chain__toggle:hover { border-color: var(--pine); }
.chain__toggle[aria-expanded="true"] { background: var(--pine); color: var(--white); border-color: var(--pine); }
.chain__toggle .chain__dot { background: var(--line-strong); }
.chain__toggle[aria-expanded="true"] .chain__dot { background: var(--butter); }
.chain__plus { margin-left: auto; width: .9rem; height: .9rem; position: relative; flex: none; }
.chain__plus::before, .chain__plus::after {
  content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 2px; background: currentColor;
  transform: translateY(-50%); transition: transform .2s var(--ease);
}
.chain__plus::after { transform: translateY(-50%) rotate(90deg); }
.chain__toggle[aria-expanded="true"] .chain__plus::after { transform: translateY(-50%) rotate(0); }
.chain__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.chain__panel > div { overflow: hidden; visibility: hidden; }
.chain__item.is-open .chain__panel { grid-template-rows: 1fr; }
.chain__item.is-open .chain__panel > div { visibility: visible; }
.chain__panel-inner { padding: 1rem 1.1rem .6rem 2.65rem; color: var(--ink-soft); font-size: .97rem; }
.chain__panel-inner p:first-child { color: var(--ink); }
.chain__outcome {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem;
  background: var(--pine); color: var(--white); border-radius: var(--radius-sm);
  padding: .95rem 1.1rem; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
}
.chain__outcome .arrow { color: var(--butter); font-weight: 400; }
.chain__outcome em { font-style: normal; color: var(--butter); }
.chain-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
@media (max-width: 860px) { .chain-wrap { grid-template-columns: 1fr; } }

/* Principle sentence */
.principle {
  font-family: var(--font-display); font-weight: 500; letter-spacing: -0.015em;
  font-size: clamp(1.2rem, 1.4vw + .7rem, 1.7rem); line-height: 1.4; color: var(--pine); max-width: 44rem;
}
.principle .arrow { color: var(--raspberry); padding-inline: .15em; }

/* Framework rail — S·A·L·U·M·I·S, a true sequence */
.framework__word { display: flex; flex-wrap: wrap; gap: .4rem .5rem; align-items: center; margin: 1.5rem 0 2.5rem; }
.framework__word span {
  font-family: var(--font-display); font-weight: 600; letter-spacing: .06em; font-size: clamp(1rem, 1.2vw + .5rem, 1.35rem);
  color: var(--pine); background: var(--white); border: 1px solid var(--line); padding: .45rem .9rem; border-radius: 999px;
}
.framework__word i { color: var(--raspberry); font-style: normal; }
.framework { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .8rem; }
.framework > li { display: flex; flex-direction: column; }
.framework__letter {
  font-family: var(--font-display); font-weight: 600; font-size: 2.8rem; line-height: 1; letter-spacing: -0.03em;
  color: var(--raspberry); margin-bottom: .8rem;
}
.framework h3 { font-size: 1.02rem; }
.framework p { font-size: .9rem; margin-top: .5rem !important; }
@media (max-width: 1100px) { .framework { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .framework { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .framework { grid-template-columns: 1fr; } }

/* CTA tile */
.cta { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem; align-items: center; padding: clamp(2rem, 5vw, 4rem); }
.cta h2 { max-width: 20ch; }
.cta p { margin-top: 1rem; max-width: 44ch; }
.cta .btn-row { margin-top: 0; justify-content: flex-end; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } .cta .btn-row { justify-content: flex-start; margin-top: 1.5rem; } }

/* Origin pairs (About) */
.origin { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.origin h2 { font-size: 2rem; }
@media (max-width: 640px) { .origin { grid-template-columns: 1fr; } }
.milestone { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
@media (max-width: 860px) { .milestone { grid-template-columns: 1fr; } }

/* Pricing */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.tier { display: flex; flex-direction: column; }
.tier--featured { outline: 2px solid var(--pine); outline-offset: -2px; }
.tier__badge { position: absolute; top: 1.2rem; right: 1.2rem; font-size: .78rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; background: var(--butter); color: var(--pine); margin: 0 !important; }
.tier h2 { font-size: 1.7rem; }
.tier__for { font-size: .95rem; min-height: 3.1em; }
.tier__price { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--pine); letter-spacing: -0.01em; }
.tier__price small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .88rem; color: var(--ink-muted); margin-top: .2rem; }
.tier .list { flex: 1; }
.tier .list li { font-size: .96rem; }
.tier .btn { margin-top: 1.8rem; align-self: flex-start; }
@media (max-width: 900px) { .tiers { grid-template-columns: 1fr; max-width: 34rem; } }

.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--white); }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .96rem; }
.compare th, .compare td { text-align: left; padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-family: var(--font-display); font-weight: 600; color: var(--pine); font-size: 1.05rem; }
.compare tbody th { font-weight: 500; color: var(--ink); }
.compare td { color: var(--ink-soft); }
.compare td.yes { color: var(--pine); font-weight: 600; }
.compare td.no { color: var(--ink-muted); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }

.faq { max-width: 46rem; }
.faq details { background: var(--white); border-radius: var(--radius-sm); padding: 0 1.3rem; }
.faq details + details { margin-top: .6rem; }
.faq summary {
  cursor: pointer; padding: 1.1rem 0; list-style: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--pine);
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--raspberry); font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 1.2rem; color: var(--ink-soft); max-width: 60ch; }

/* Exchange (what you provide / receive) */
.exchange { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.exchange h3 { margin-bottom: 1rem; }
@media (max-width: 700px) { .exchange { grid-template-columns: 1fr; } }

/* Page head */
.page-head { padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem); text-align: center; }
.page-head h1 { max-width: 18ch; margin-inline: auto; }
.page-head .lede { margin: 1.3rem auto 0; max-width: 56ch; }
.page-head--left { text-align: left; }
.page-head--left h1, .page-head--left .lede { margin-inline: 0; }

/* 9. Dashboard (demo product) ----------------------------- */
.dash {
  display: grid; grid-template-columns: 220px minmax(0, 1fr);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; font-size: .88rem; color: var(--ink);
}
.dash--compact { grid-template-columns: 1fr; box-shadow: none; border-radius: 0; border: 0; }
.dash__side { background: var(--paper); border-right: 1px solid var(--line); padding: 1.1rem; display: flex; flex-direction: column; gap: 1.2rem; }
.dash__side .brand { font-size: 1rem; }
.dash__side .brand svg { width: 22px; height: 22px; }
.dash__org { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .7rem; display: flex; gap: .6rem; align-items: center; }
.dash__org b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--lilac); color: var(--pine); font-size: .75rem; font-weight: 600; flex: none; }
.dash__org span { display: block; font-size: .8rem; line-height: 1.25; }
.dash__org small { display: block; color: var(--ink-muted); font-size: .72rem; }
.dash__group { font-size: .7rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-muted); margin-bottom: .3rem; }
.dash__nav { list-style: none; }
.dash__nav li { padding: .45rem .6rem; border-radius: 8px; color: var(--ink-soft); display: flex; align-items: center; gap: .55rem; font-weight: 500; }
.dash__nav li i { width: 8px; height: 8px; border-radius: 3px; background: var(--line-strong); flex: none; }
.dash__nav li.is-active { background: var(--white); color: var(--pine); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.dash__nav li.is-active i { background: var(--raspberry); }
.dash__nav li .count { margin-left: auto; font-size: .7rem; color: var(--raspberry); font-weight: 600; }
.dash__main { padding: 1.3rem; display: grid; gap: 1rem; align-content: start; min-width: 0; }
.dash__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 1.5rem; align-items: flex-start; }
.dash__title { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--pine); letter-spacing: -0.02em; line-height: 1.15; }
.dash__sub { color: var(--ink-soft); margin-top: .2rem; }
.dash__meta { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin-top: .5rem; font-size: .8rem; color: var(--ink-muted); }
.dash__demo { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; color: var(--raspberry-deep); background: var(--raspberry-tint); padding: .3rem .7rem; border-radius: 999px; }
.dash__actions { display: flex; gap: .5rem; }
.dash__btn { border: 1px solid var(--line-strong); background: var(--white); border-radius: 8px; padding: .45rem .8rem; font-size: .82rem; font-weight: 500; }
.dash__btn--primary { background: var(--pine); color: var(--white); border-color: var(--pine); }
.dash__filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.dash__filters span { border: 1px solid var(--line); border-radius: 8px; padding: .4rem .7rem; font-size: .8rem; color: var(--ink-soft); background: var(--paper); }
.dash__filters span b { color: var(--ink); font-weight: 500; }
.dash__section { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--pine); }
.dash__section small { display: block; font-family: var(--font-body); font-weight: 400; color: var(--ink-muted); font-size: .8rem; }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .85rem .95rem; border-left: 3px solid var(--pine); display: grid; gap: .25rem; min-width: 0; }
.kpi--flag { border-left-color: var(--raspberry); }
.kpi--good { border-left-color: var(--sage-deep); }
.kpi--warn { border-left-color: var(--gold); }
.kpi__label { font-size: .78rem; color: var(--ink-soft); font-weight: 500; display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.kpi__delta { flex: none; font-size: .78rem; font-weight: 600; padding: .1rem .45rem; border-radius: 999px; background: var(--mint); color: var(--sage-text); white-space: nowrap; line-height: 1.4; }
.kpi__delta--bad { background: var(--raspberry-tint); color: var(--raspberry-deep); }
.kpi__delta--flat { background: var(--paper); color: var(--ink-muted); }
.kpi__value { font-family: var(--font-display); font-weight: 600; font-size: 1.55rem; letter-spacing: -0.02em; line-height: 1.1; color: var(--pine); font-variant-numeric: tabular-nums; }
.kpi__hint { font-size: .8rem; color: var(--ink-muted); }
.kpi__spark { margin-top: .35rem; height: 26px; width: 100%; }
.kpi__spark path { fill: none; stroke: var(--pine); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.kpi__spark .area { fill: var(--pine); opacity: .08; stroke: none; }
.kpi--flag .kpi__spark path { stroke: var(--raspberry); }
.kpi--flag .kpi__spark .area { fill: var(--raspberry); }
.kpi--good .kpi__spark path { stroke: var(--sage-deep); }
.kpi--good .kpi__spark .area { fill: var(--sage-deep); }
.kpi--warn .kpi__spark path { stroke: var(--gold); }
.kpi--warn .kpi__spark .area { fill: var(--gold); }
.kpi__bar { height: 6px; background: var(--paper); border-radius: 3px; overflow: hidden; margin-top: .4rem; position: relative; }
.kpi__bar i { display: block; height: 100%; width: calc(var(--value) * 1%); background: var(--pine); border-radius: 3px; transition: width 1s var(--ease); }
.kpi--flag .kpi__bar i { background: var(--raspberry); }
.kpi--good .kpi__bar i { background: var(--sage-deep); }
.kpi__bar b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); opacity: .5; left: calc(var(--target) * 1%); }
.dash--pre .kpi__bar i { width: 0; }
.dash--pre .kpi__spark path, .dash--pre .kpi__spark .area { opacity: 0; }
.kpi__spark path, .kpi__spark .area { transition: opacity .6s var(--ease) .3s; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 360px) { .kpis { grid-template-columns: 1fr; } }

/* Panels & charts */
.dash__row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: .8rem; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.1rem; min-width: 0; }
.panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .6rem; }
.panel__title { font-weight: 600; color: var(--pine); font-size: .95rem; }
.panel__title small { display: block; font-weight: 400; color: var(--ink-muted); font-size: .78rem; }
.panel__tabs { display: flex; gap: .2rem; }
.panel__tabs span { font-size: .74rem; padding: .25rem .55rem; border-radius: 6px; color: var(--ink-soft); }
.panel__tabs span.is-active { background: var(--paper); color: var(--pine); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .78rem; color: var(--ink-soft); margin-bottom: .4rem; }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i { display: inline-block; width: 14px; height: 2px; background: var(--pine); border-radius: 2px; }
.legend i.dashed { background: repeating-linear-gradient(90deg, var(--sage-deep) 0 4px, transparent 4px 7px); }
.legend i.band { width: 14px; height: 8px; background: var(--mint); }
.chart { position: relative; }
.trend { width: 100%; height: auto; display: block; overflow: visible; }
.trend .gridline { stroke: var(--line); stroke-width: 1; }
.trend .axis { font-size: 11px; fill: var(--ink-muted); font-family: var(--font-body); }
.trend .band { fill: var(--mint); opacity: .7; }
.trend .series { fill: none; stroke: var(--pine); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend .bench { fill: none; stroke: var(--sage-deep); stroke-width: 1.5; stroke-dasharray: 4 3; }
.trend .pt { fill: var(--pine); stroke: var(--white); stroke-width: 2; r: 4; }
.trend .pt--last { fill: var(--raspberry); }
.trend .cursor { stroke: var(--ink-muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.trend .hit { fill: transparent; }
.dash--pre .trend .series { stroke-dasharray: 1000; stroke-dashoffset: 1000; }
.trend .series { transition: stroke-dashoffset 1.4s var(--ease); }
.tooltip {
  position: absolute; pointer-events: none; opacity: 0; transform: translate(-50%, -110%);
  background: var(--ink); color: var(--white); font-size: .76rem; line-height: 1.35;
  padding: .45rem .65rem; border-radius: 8px; white-space: nowrap; transition: opacity .12s;
}
.tooltip b { display: block; color: var(--butter); font-weight: 600; }
.tooltip.is-visible { opacity: 1; }
.chart__note { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; font-size: .78rem; color: var(--ink-soft); background: var(--butter); padding: .45rem .7rem; border-radius: 8px; }
.chart__note::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }

/* Donut */
.donut-wrap { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 1rem; align-items: center; }
@media (max-width: 480px) { .donut-wrap { grid-template-columns: 1fr; justify-items: start; } }
.donut { width: 120px; height: 120px; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 14; }
.donut__track { stroke: var(--paper); }
.donut__seg { stroke-dasharray: var(--len) 1000; stroke-dashoffset: calc(-1 * var(--start)); transition: stroke-dasharray .9s var(--ease); }
.dash--pre .donut__seg { stroke-dasharray: 0 1000; }
.donut__center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut__center b { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--pine); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.donut__center small { font-size: .7rem; color: var(--ink-muted); }
.donut-legend { list-style: none; display: grid; gap: .35rem; font-size: .8rem; }
.donut-legend li { display: grid; grid-template-columns: 10px 1fr auto auto; gap: .5rem; align-items: center; color: var(--ink-soft); }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.donut-legend span:last-child { color: var(--ink-muted); min-width: 3ch; text-align: right; }
.c1 { --c: var(--pine); } .c2 { --c: var(--sage); } .c3 { --c: var(--lilac-deep); } .c4 { --c: var(--gold); }
.donut .c1, .donut .c2, .donut .c3, .donut .c4 { stroke: var(--c); }
.donut-legend .c1, .donut-legend .c2, .donut-legend .c3, .donut-legend .c4 { background: var(--c); }

/* Tables and lists inside the dashboard */
.table-scroll { overflow-x: auto; }
.dtable { width: 100%; border-collapse: collapse; font-size: .82rem; }
.table-scroll .dtable { min-width: 520px; }
.dtable th, .dtable td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.dtable thead th { font-weight: 600; color: var(--ink-muted); font-size: .74rem; border-bottom-color: var(--line-strong); }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable td:first-child { font-weight: 500; color: var(--ink); }
.pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; white-space: nowrap; }
.pill--critical { background: var(--raspberry-tint); color: var(--raspberry-deep); }
.pill--high { background: var(--butter); color: #7a5a12; }
.pill--moderate { background: var(--lilac); color: #4d4290; }
.pill--ok { background: var(--mint); color: var(--sage-text); }
.plan { list-style: none; display: grid; gap: .55rem; }
.plan li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; padding: .6rem .7rem; border-radius: 8px; background: var(--paper); font-size: .82rem; }
.plan li b { font-weight: 600; color: var(--ink); grid-column: 1; }
.plan li .meta { grid-column: 1; color: var(--ink-muted); font-size: .8rem; }
.plan li .pill { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.dash__foot { font-size: .82rem; color: var(--ink-muted); }
@media (max-width: 360px) { .plan li { grid-template-columns: 1fr; } .plan li .pill { grid-column: 1; grid-row: auto; justify-self: start; margin-top: .3rem; } }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } .dash__side { display: none; } .dash__row { grid-template-columns: 1fr; } }

/* Compact variant for the homepage tile */
.dash--compact .dash__main { padding: 1.1rem 1.2rem; gap: .8rem; }
.dash--compact .dash__title { font-size: 1.05rem; }
.dash--compact .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.dash--compact .kpi { padding: .7rem .75rem; }
.dash--compact .kpi__value { font-size: 1.3rem; }
@media (max-width: 480px) { .dash--compact .kpis { grid-template-columns: 1fr 1fr; } .dash--compact .kpi:nth-child(3) { grid-column: 1 / -1; } }
@media (max-width: 360px) { .dash--compact .kpis { grid-template-columns: 1fr; } }

/* 10. Forms ------------------------------------------------ */
.form { display: grid; gap: 1.2rem; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
@media (max-width: 620px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 500; font-size: .95rem; color: var(--ink); }
.field label small { font-weight: 400; color: var(--ink-muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--white); font-size: 1rem; line-height: 1.4;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--raspberry); outline-offset: 1px; border-color: var(--pine); }
.field.is-invalid input, .field.is-invalid select { border-color: var(--raspberry); }
.field__error { font-size: .88rem; color: var(--raspberry-deep); display: none; }
.field.is-invalid .field__error { display: block; }
.fieldset { border: 0; padding: 0; }
.fieldset legend { font-weight: 500; font-size: .95rem; margin-bottom: .6rem; padding: 0; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.2rem; }
.checks label { display: flex; gap: .6rem; align-items: flex-start; font-size: .97rem; cursor: pointer; }
.checks input { margin-top: .35rem; accent-color: var(--raspberry); }
@media (max-width: 620px) { .checks { grid-template-columns: 1fr; } }
.form__consent { font-size: .88rem; color: var(--ink-muted); max-width: 52ch; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-tile { padding: clamp(1.5rem, 3vw, 2.5rem); }
.next-steps .steps { grid-template-columns: 1fr; gap: .4rem; }
.next-steps .steps > li { display: flex; gap: .8rem; align-items: flex-start; padding: .6rem 0; }
.next-steps .step__num { margin: 0; flex: none; width: 2rem; height: 2rem; font-size: .9rem; }
.next-steps li b { display: block; font-weight: 600; color: var(--white); margin-bottom: .2rem; }
.next-steps p { font-size: .95rem; }
.next-steps .contact-line { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .95rem; }

/* 11. Misc ------------------------------------------------- */
.thanks { min-height: 55vh; display: grid; place-items: center; text-align: center; }
.thanks .lede { margin-inline: auto; }
.prose { max-width: var(--measure); }
.prose h2 { margin-bottom: 1.2rem; }
.prose h2:not(:first-child) { margin-top: 3rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
