.features-page {
  background: #f3f4ef;
}

.features-page .desktop-nav a.is-current::after {
  transform: scaleX(1);
}

.features-page [id] {
  scroll-margin-top: 145px;
}

/* Hero */
.features-hero {
  padding-top: 78px;
  overflow: hidden;
  background: #f3f4ef;
}

.features-hero-grid {
  min-height: min(830px, 91vh);
  padding-block: clamp(72px, 8vw, 120px);
  display: grid;
  grid-template-columns: minmax(430px, 0.88fr) minmax(560px, 1.12fr);
  gap: clamp(48px, 7vw, 108px);
  align-items: center;
}

.features-hero-copy h1 {
  max-width: 720px;
  font-size: clamp(3.6rem, 6.1vw, 6.7rem);
  font-weight: 710;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.features-hero-copy h1 em {
  display: block;
  margin-top: 0.16em;
  color: var(--green);
  font-style: normal;
  font-weight: 520;
}

.features-hero-lead {
  max-width: 620px;
  margin-top: 34px;
  color: var(--ink-3);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.68;
}

.features-hero-actions {
  margin-top: 37px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.features-proofline {
  margin-top: clamp(54px, 7vw, 88px);
  padding-top: 21px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.features-proofline > span {
  min-width: 0;
  padding-right: 14px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.35;
}

.features-proofline > span + span {
  padding-left: 19px;
  border-left: 1px solid var(--line);
}

.features-proofline strong {
  display: block;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.context-engine {
  position: relative;
  min-width: 0;
  padding: clamp(24px, 3vw, 38px);
  border-radius: 28px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 42px 90px rgba(8, 23, 33, 0.22);
}

.context-engine::before {
  position: absolute;
  z-index: -1;
  top: 32px;
  right: -24px;
  width: 58%;
  height: calc(100% - 64px);
  content: "";
  border: 1px solid rgba(8, 23, 33, 0.18);
  border-radius: 24px;
  background: #dce2da;
}

.engine-head {
  min-height: 37px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line-light);
  color: rgba(255, 255, 255, 0.47);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.075em;
}

.engine-head em {
  display: flex;
  align-items: center;
  gap: 8px;
  font-style: normal;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.engine-head em i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-bright);
}

.engine-focus {
  margin-top: 29px;
  padding-bottom: 29px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 20px;
  border-bottom: 1px solid var(--line-light);
}

.engine-time strong,
.engine-time small,
.engine-copy span {
  display: block;
}

.engine-time strong {
  font-size: 1.65rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  line-height: 1;
}

.engine-time small,
.engine-copy span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
}

.engine-copy p {
  max-width: 340px;
  margin-top: 6px;
  font-size: 0.92rem;
  font-weight: 620;
  line-height: 1.45;
}

.engine-status {
  min-height: 28px;
  padding-inline: 10px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(85, 224, 174, 0.34);
  border-radius: 999px;
  background: rgba(85, 224, 174, 0.08);
  color: var(--green-bright);
  font-size: 0.75rem;
  font-weight: 760;
}

.engine-map {
  margin-block: 31px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.engine-map > i {
  width: 24px;
  height: 1px;
  position: relative;
  background: rgba(255, 255, 255, 0.22);
}

.engine-map > i::after {
  position: absolute;
  top: -2px;
  right: 0;
  width: 5px;
  height: 5px;
  content: "";
  transform: rotate(45deg);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  border-right: 1px solid rgba(255, 255, 255, 0.4);
}

.engine-node {
  min-width: 0;
  min-height: 88px;
  padding: 13px;
  border: 1px solid var(--line-light);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.engine-node:hover {
  transform: translateY(-4px);
  border-color: rgba(85, 224, 174, 0.45);
  background: rgba(85, 224, 174, 0.065);
}

.engine-node span,
.engine-node strong,
.engine-node small {
  display: block;
}

.engine-node span {
  color: var(--green-bright);
  font-size: 0.75rem;
  font-weight: 800;
}

.engine-node strong {
  margin-top: 9px;
  font-size: 0.78rem;
}

.engine-node small {
  margin-top: 2px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.engine-signals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.engine-signals span {
  min-height: 43px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-light);
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  font-weight: 650;
  transition: transform 180ms ease, color 180ms ease, border-color 180ms ease;
}

.engine-signals span:hover {
  transform: translateX(4px);
  border-color: rgba(85, 224, 174, 0.42);
  color: #fff;
}

.engine-signals svg,
.engine-receipt svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: var(--green-bright);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.engine-receipt {
  min-height: 62px;
  margin-top: 17px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 10px;
  background: var(--green-bright);
  color: var(--ink);
}

.engine-receipt svg {
  width: 20px;
  height: 20px;
  stroke: var(--ink);
}

.engine-receipt strong,
.engine-receipt small {
  display: block;
}

.engine-receipt strong {
  font-size: 0.78rem;
}

.engine-receipt small {
  color: rgba(8, 23, 33, 0.58);
  font-size: 0.75rem;
}

/* Section jump navigation */
.feature-jump {
  position: sticky;
  z-index: 50;
  top: 77px;
  border-block: 1px solid var(--line);
  background: rgba(250, 251, 247, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.feature-jump > div {
  min-height: 62px;
  display: flex;
  align-items: stretch;
}

.feature-jump a {
  min-width: 0;
  padding-inline: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  transition: background 180ms ease, color 180ms ease;
}

.feature-jump a:last-child {
  border-right: 1px solid var(--line);
}

.feature-jump a:hover,
.feature-jump a.is-active {
  background: var(--ink);
  color: #fff;
}

.feature-jump a span {
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
}

.feature-jump a:hover span,
.feature-jump a.is-active span {
  color: var(--green-bright);
}

/* Stateful AI story */
.operating-section {
  background: #fbfcf8;
}

.state-story {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--ink);
  box-shadow: var(--shadow-md);
}

.story-steps {
  padding: 26px;
  display: grid;
  gap: 7px;
  border-right: 1px solid var(--line-light);
}

.story-steps button {
  position: relative;
  min-height: 92px;
  padding: 16px 18px 16px 55px;
  display: grid;
  align-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.52);
  text-align: left;
  cursor: pointer;
  transition: padding-left 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.story-steps button:hover,
.story-steps button.is-active {
  padding-left: 61px;
  border-color: rgba(85, 224, 174, 0.28);
  background: rgba(85, 224, 174, 0.075);
  color: #fff;
}

.story-steps button > span {
  position: absolute;
  top: 20px;
  left: 18px;
  color: var(--green-bright);
  font-size: 0.75rem;
  font-weight: 820;
}

.story-steps strong,
.story-steps small {
  display: block;
}

.story-steps strong {
  font-size: 0.88rem;
  line-height: 1.4;
}

.story-steps small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.75rem;
}

.story-state {
  min-width: 0;
  margin: 26px;
  padding: clamp(25px, 4vw, 44px);
  border-radius: 17px;
  background: #fff;
  color: var(--ink);
}

.story-state-head {
  min-height: 38px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.065em;
}

.story-state-head em {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-style: normal;
  letter-spacing: 0;
}

.story-state-title {
  margin-top: 28px;
}

.story-state-title small,
.story-state-title strong {
  display: block;
}

.story-state-title small,
.story-raw > span,
.story-structured > span {
  color: var(--green-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.story-state-title strong {
  margin-top: 7px;
  font-size: clamp(1.65rem, 3vw, 2.8rem);
  letter-spacing: -0.05em;
  line-height: 1.07;
}

.story-raw {
  margin-top: 30px;
  padding: 17px 18px;
  border-left: 3px solid var(--green);
  background: #f0f2ed;
}

.story-raw p {
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 620;
  line-height: 1.5;
}

.story-structured {
  margin-top: 25px;
}

.story-structured > div {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}

.story-structured i {
  min-height: 62px;
  padding: 12px;
  display: flex;
  align-items: center;
  color: var(--ink-3);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 680;
}

.story-structured i + i {
  border-left: 1px solid var(--line);
}

.story-receipt {
  min-height: 72px;
  margin-top: 28px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
}

.story-receipt svg {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: var(--green-bright);
  stroke-width: 2;
}

.story-receipt p,
.story-receipt strong,
.story-receipt small {
  display: block;
}

.story-receipt strong {
  font-size: 0.8rem;
}

.story-receipt small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.75rem;
}

.story-state.is-changing {
  animation: state-swap 300ms ease;
}

@keyframes state-swap {
  0% { opacity: 0.55; transform: translateY(5px); }
  100% { opacity: 1; transform: none; }
}

/* Reusable feature section */
.feature-section-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.72fr) minmax(600px, 1.28fr);
  gap: clamp(60px, 9vw, 140px);
  align-items: center;
}

.feature-section-index {
  color: var(--green-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feature-section-copy h2,
.glucose-heading h2,
.surfaces-heading h2,
.foundation-copy h2 {
  margin-top: 23px;
  font-size: clamp(2.65rem, 5vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.feature-section-copy > p:not(.feature-section-index),
.glucose-heading > p:last-child,
.surfaces-heading > p:last-child,
.foundation-copy > p:last-child {
  max-width: 630px;
  margin-top: 27px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.feature-checks {
  margin: 33px 0 0;
  padding: 0;
  display: grid;
  gap: 13px;
  list-style: none;
}

.feature-checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-3);
  font-size: 0.84rem;
  line-height: 1.5;
}

.feature-checks svg {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
  fill: none;
  stroke: var(--green);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Today */
.today-section {
  background: #e6f2ec;
}

.today-cockpit {
  min-width: 0;
  padding: clamp(25px, 4vw, 42px);
  border: 1px solid rgba(8, 23, 33, 0.13);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(8, 23, 33, 0.12);
  transform: rotate(0.65deg);
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.today-cockpit:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 34px 82px rgba(8, 23, 33, 0.16);
}

.cockpit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.cockpit-head span,
.cockpit-head strong,
.cockpit-head small {
  display: block;
}

.cockpit-head span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.cockpit-head strong {
  margin-top: 2px;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.cockpit-head small {
  color: var(--muted);
  font-size: 0.75rem;
}

.cockpit-steps {
  margin-top: 30px;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: start;
  gap: 10px;
}

.cockpit-steps > i {
  height: 1px;
  margin-top: 16px;
  background: var(--line);
}

.cockpit-steps span {
  min-width: 52px;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.cockpit-steps b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ecefea;
  color: var(--muted);
  font-size: 0.75rem;
}

.cockpit-steps .is-active {
  color: var(--green-dark);
}

.cockpit-steps .is-active b {
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(20, 150, 106, 0.08);
}

.cockpit-plan {
  margin-top: 28px;
  color: var(--ink-3);
  font-size: 0.85rem;
}

.cockpit-plan span {
  margin-right: 4px;
  color: var(--ink);
  font-weight: 800;
}

.cockpit-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.cockpit-actions button {
  min-height: 46px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-3);
  font-size: 0.75rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.cockpit-actions button:first-child {
  border-color: rgba(20, 150, 106, 0.28);
  background: var(--green-soft);
  color: var(--green-dark);
}

.cockpit-actions button:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 150, 106, 0.45);
}

.cockpit-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.cockpit-metrics {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
}

.cockpit-metrics > span {
  min-width: 0;
  min-height: 102px;
  padding: 18px 14px;
}

.cockpit-metrics > span + span {
  border-left: 1px solid var(--line);
}

.cockpit-metrics small,
.cockpit-metrics strong,
.cockpit-metrics em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cockpit-metrics small {
  color: var(--muted);
  font-size: 0.75rem;
}

.cockpit-metrics strong {
  margin-top: 6px;
  font-size: 0.86rem;
}

.cockpit-metrics em {
  margin-top: 3px;
  color: var(--green-dark);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 700;
}

/* Meal intelligence */
.meal-intelligence {
  background: #10242d;
  color: #fff;
}

.meal-intelligence .section-heading > div > p {
  color: rgba(255, 255, 255, 0.56);
}

.meal-layers {
  display: grid;
  grid-template-columns: 1fr 104px 1fr;
  align-items: stretch;
}

.raw-layer,
.structured-layer {
  min-height: 285px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line-light);
}

.raw-layer {
  border-radius: 22px 0 0 22px;
  background: rgba(255, 255, 255, 0.035);
}

.structured-layer {
  border-radius: 0 22px 22px 0;
  background: #f8faf6;
  color: var(--ink);
}

.layer-label {
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.structured-layer .layer-label {
  color: var(--muted);
}

.layer-label span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--green-bright);
  font-size: 0.75rem;
}

.structured-layer .layer-label span {
  color: var(--green-dark);
}

.raw-layer blockquote {
  max-width: 560px;
  margin: 50px 0 0;
  color: #fff;
  font-size: clamp(1.35rem, 2.5vw, 2.35rem);
  font-style: normal;
  font-weight: 610;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.raw-layer > small {
  margin-top: 28px;
  display: block;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.75rem;
  line-height: 1.5;
}

.layer-connector {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--green-bright);
  font-size: 0.75rem;
  font-weight: 700;
  writing-mode: vertical-rl;
}

.layer-connector i {
  width: 1px;
  height: 35px;
  background: rgba(85, 224, 174, 0.38);
}

.structured-layer ul {
  margin: 35px 0 0;
  padding: 0;
  list-style: none;
}

.structured-layer li {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.structured-layer li:last-child {
  border-bottom: 1px solid var(--line);
}

.structured-layer b {
  font-weight: 730;
}

.structured-layer em {
  color: var(--green-dark);
  font-style: normal;
  font-weight: 760;
}

.meal-detail-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 18px;
}

.partial-editor,
.unknown-food {
  min-height: 410px;
  border: 1px solid var(--line-light);
  border-radius: 20px;
}

.partial-editor {
  padding: clamp(24px, 4vw, 42px);
}

.detail-head {
  min-height: 43px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line-light);
}

.detail-head span {
  font-size: 0.9rem;
  font-weight: 760;
}

.detail-head small {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
}

.command-row {
  min-height: 75px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line-light);
  transition: padding-left 180ms ease, background 180ms ease;
}

.command-row:hover {
  padding-left: 9px;
  background: rgba(85, 224, 174, 0.04);
}

.command-row p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.81rem;
}

.command-row span {
  min-height: 32px;
  padding-inline: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(85, 224, 174, 0.28);
  border-radius: 999px;
  background: rgba(85, 224, 174, 0.075);
  color: var(--green-bright);
  font-size: 0.75rem;
  font-weight: 720;
  white-space: nowrap;
}

.command-row svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.editor-foot {
  margin-top: 25px;
}

.editor-foot strong,
.editor-foot small {
  display: block;
}

.editor-foot strong {
  color: var(--green-bright);
  font-size: 0.8rem;
}

.editor-foot small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.75rem;
}

.unknown-food {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 48px);
  background: #f3f4ef;
  color: var(--ink);
}

.unknown-mark {
  position: absolute;
  top: -42px;
  right: 19px;
  color: rgba(8, 23, 33, 0.055);
  font-size: 13rem;
  font-weight: 800;
  line-height: 1;
}

.unknown-food h3 {
  max-width: 390px;
  margin-top: 19px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.unknown-food > p:not(.feature-kicker) {
  max-width: 460px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.66;
}

.unknown-status {
  position: relative;
  margin-top: 34px;
  padding: 14px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 0.75rem;
}

.unknown-status span {
  font-weight: 760;
}

.unknown-status em {
  color: var(--orange);
  font-style: normal;
  font-weight: 720;
}

.advisor-showcase {
  margin-top: 18px;
  padding: clamp(30px, 5vw, 58px);
  display: grid;
  grid-template-columns: 0.9fr 0.72fr 1fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  border-radius: 22px;
  background: var(--green-bright);
  color: var(--ink);
}

.advisor-copy h3 {
  margin-top: 16px;
  font-size: clamp(1.7rem, 3vw, 3rem);
  font-weight: 710;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.advisor-copy > p:last-child {
  margin-top: 17px;
  color: rgba(8, 23, 33, 0.62);
  font-size: 0.81rem;
  line-height: 1.6;
}

.advisor-control {
  display: grid;
  border-top: 1px solid rgba(8, 23, 33, 0.25);
}

.advisor-control button {
  min-height: 58px;
  padding-inline: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid rgba(8, 23, 33, 0.25);
  background: transparent;
  color: rgba(8, 23, 33, 0.58);
  font-size: 0.78rem;
  font-weight: 720;
  text-align: left;
  cursor: pointer;
  transition: padding-left 170ms ease, color 170ms ease;
}

.advisor-control button:hover,
.advisor-control button.is-active {
  padding-left: 12px;
  color: var(--ink);
}

.advisor-control button span {
  font-size: 0.75rem;
  font-weight: 820;
}

.advisor-result {
  padding: 23px;
  border: 1px solid rgba(8, 23, 33, 0.17);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 22px 45px rgba(8, 23, 33, 0.12);
}

.advisor-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.advisor-result-head span {
  color: var(--green-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.advisor-result-head em {
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
}

.advisor-result > strong {
  margin-top: 17px;
  display: block;
  font-size: 1.1rem;
  line-height: 1.35;
}

.advisor-result > p {
  min-height: 55px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.advisor-result > div:last-child {
  margin-top: 19px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}

.advisor-result > div:last-child > span {
  min-width: 0;
  padding: 11px 7px;
}

.advisor-result > div:last-child > span + span {
  border-left: 1px solid var(--line);
}

.advisor-result small,
.advisor-result b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advisor-result small {
  color: var(--muted);
  font-size: 0.75rem;
}

.advisor-result b {
  margin-top: 3px;
  font-size: 0.78rem;
}

.advisor-result.is-changing {
  animation: state-swap 300ms ease;
}

/* Glucose */
.glucose-feature {
  background: #f5f6f2;
}

.glucose-heading,
.surfaces-heading {
  max-width: 970px;
}

.glucose-workspace {
  margin-top: clamp(48px, 7vw, 86px);
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.58fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.glucose-chart-panel {
  min-width: 0;
  padding: clamp(25px, 4vw, 42px);
}

.glucose-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.glucose-panel-head > div:first-child > span,
.glucose-panel-head strong,
.glucose-panel-head small {
  display: block;
}

.glucose-panel-head > div:first-child > span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.glucose-panel-head strong {
  margin-top: 7px;
  font-size: 2.7rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.065em;
  line-height: 1;
}

.glucose-panel-head strong small {
  display: inline;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0;
}

.glucose-panel-head strong em {
  color: var(--violet);
  font-size: 1.3rem;
  font-style: normal;
}

.glucose-panel-head > div:last-child {
  padding: 4px;
  display: flex;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f0f2ed;
}

.glucose-panel-head button {
  min-width: 50px;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 720;
  cursor: pointer;
}

.glucose-panel-head button:hover,
.glucose-panel-head button.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(8, 23, 33, 0.08);
}

.feature-glucose-chart {
  width: 100%;
  height: auto;
  margin-top: 27px;
  overflow: visible;
}

.feature-target {
  fill: rgba(85, 224, 174, 0.09);
}

.feature-grid line {
  stroke: rgba(8, 23, 33, 0.1);
  stroke-dasharray: 4 6;
}

.feature-area {
  fill: url(#feature-area);
}

.feature-line {
  fill: none;
  stroke: var(--violet);
  stroke-width: 4;
  stroke-linecap: round;
}

.feature-event {
  cursor: default;
}

.feature-event line {
  stroke: rgba(8, 23, 33, 0.2);
  stroke-dasharray: 4 4;
}

.feature-event circle {
  stroke: #fff;
  stroke-width: 4;
  transition: r 170ms ease;
}

.feature-event:hover circle {
  r: 13px;
}

.feature-event text {
  fill: var(--muted);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 750;
  text-anchor: middle;
}

.meal-event circle {
  fill: var(--green);
}

.med-event circle {
  fill: var(--blue);
}

.workout-event circle {
  fill: var(--orange);
}

.insight-event circle {
  fill: var(--violet);
}

.glucose-kpis {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
}

.glucose-kpis span {
  min-height: 70px;
  padding: 13px 12px;
}

.glucose-kpis span + span {
  border-left: 1px solid var(--line);
}

.glucose-kpis small,
.glucose-kpis strong {
  display: block;
}

.glucose-kpis small {
  color: var(--muted);
  font-size: 0.75rem;
}

.glucose-kpis strong {
  margin-top: 3px;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.meal-response-panel {
  padding: clamp(29px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--line);
  background: var(--ink);
  color: #fff;
}

.response-badge {
  width: max-content;
  min-height: 30px;
  padding-inline: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(85, 224, 174, 0.32);
  border-radius: 999px;
  color: var(--green-bright);
  font-size: 0.75rem;
  font-weight: 720;
}

.response-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-bright);
}

.response-name {
  margin-top: 34px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.meal-response-panel h3 {
  margin-top: 7px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.055em;
}

.response-stack {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}

.response-stack > span {
  min-height: 78px;
  padding: 13px;
  border: 1px solid var(--line-light);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.response-stack small,
.response-stack strong {
  display: block;
}

.response-stack small {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.75rem;
}

.response-stack strong {
  margin-top: 3px;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.response-stack > i {
  color: rgba(255, 255, 255, 0.38);
  font-style: normal;
}

.response-stack .response-delta {
  grid-column: 1 / -1;
  border-color: rgba(85, 224, 174, 0.32);
  background: rgba(85, 224, 174, 0.08);
}

.response-stack .response-delta strong {
  color: var(--green-bright);
}

.response-timing {
  margin-top: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
}

.response-timing i {
  height: 1px;
  position: relative;
  background: rgba(255, 255, 255, 0.18);
}

.response-timing b {
  position: absolute;
  top: -4px;
  left: 72%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green-bright);
}

.meal-response-panel > p {
  margin-top: 30px;
  padding-top: 23px;
  border-top: 1px solid var(--line-light);
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  line-height: 1.65;
}

.meal-response-panel > p strong {
  margin-right: 5px;
  color: var(--green-bright);
}

/* Therapy and workout */
.protocol-section {
  background: #f7f8f4;
}

.therapy-ledger {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.ledger-head {
  min-height: 82px;
  padding-inline: clamp(22px, 4vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}

.ledger-head span {
  font-size: 1rem;
  font-weight: 780;
}

.ledger-head em {
  color: var(--green-dark);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 720;
}

.ledger-labels,
.ledger-row {
  padding-inline: clamp(22px, 4vw, 42px);
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.8fr 0.55fr;
  gap: 20px;
  align-items: center;
}

.ledger-labels {
  min-height: 47px;
  background: #eef0eb;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.ledger-row {
  min-height: 88px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.78rem;
  transition: background 170ms ease, padding-left 170ms ease;
}

.ledger-row:hover {
  background: #f8faf6;
}

.ledger-row > span:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 12px;
}

.ledger-row > span:first-child > i {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
}

.ledger-row svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.pill-blue {
  background: #e7f1ff;
  color: var(--blue);
}

.pill-green {
  background: var(--green-soft);
  color: var(--green-dark);
}

.pill-violet {
  background: #eeeaff;
  color: var(--violet);
}

.ledger-row b,
.ledger-row small {
  display: block;
}

.ledger-row b {
  color: var(--ink);
  font-size: 0.83rem;
}

.ledger-row small {
  color: var(--muted);
  font-size: 0.75rem;
}

.ledger-row > em,
.ledger-row > button {
  width: max-content;
  min-height: 31px;
  padding-inline: 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 740;
}

.ledger-row > em.is-done {
  background: var(--green-soft);
  color: var(--green-dark);
}

.ledger-row > button {
  border: 1px dashed #98a39e;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 170ms ease, background 170ms ease, color 170ms ease;
}

.ledger-row > button:hover,
.ledger-row > button.is-taken {
  border-style: solid;
  border-color: rgba(20, 150, 106, 0.3);
  background: var(--green-soft);
  color: var(--green-dark);
}

.ledger-receipt {
  min-height: 62px;
  margin: 0 clamp(22px, 4vw, 42px) 27px;
  padding: 12px 14px;
  display: none;
  align-items: center;
  gap: 11px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
}

.ledger-receipt.is-visible {
  display: flex;
  animation: receipt-in 260ms ease;
}

@keyframes receipt-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}

.ledger-receipt svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: var(--green-bright);
  stroke-width: 2;
}

.ledger-receipt strong,
.ledger-receipt small {
  display: block;
}

.ledger-receipt strong {
  font-size: 0.78rem;
}

.ledger-receipt small {
  color: var(--green-bright);
  font-size: 0.75rem;
}

.therapy-guardrail {
  min-height: 76px;
  margin-top: 13px;
  padding: 17px 21px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 25px;
  border-left: 3px solid var(--orange);
  background: #ecefea;
}

.therapy-guardrail span {
  color: var(--orange);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.therapy-guardrail p {
  color: var(--ink-3);
  font-size: 0.78rem;
  line-height: 1.6;
}

.workout-showcase {
  margin-top: clamp(70px, 9vw, 130px);
  padding: clamp(35px, 6vw, 74px);
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(50px, 8vw, 120px);
  align-items: center;
  border-radius: 25px;
  background: var(--ink);
  color: #fff;
}

.workout-showcase-copy .feature-kicker {
  color: var(--green-bright);
}

.workout-showcase-copy h3 {
  margin-top: 19px;
  font-size: clamp(2.2rem, 4.2vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.workout-showcase-copy > p:last-child {
  max-width: 490px;
  margin-top: 25px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.84rem;
  line-height: 1.68;
}

.workout-session {
  overflow: hidden;
  border: 1px solid var(--line-light);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.035);
}

.session-head {
  min-height: 90px;
  padding: 17px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line-light);
}

.session-head > span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--green-bright);
  font-size: 0.75rem;
  font-weight: 760;
}

.session-head > span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 6px rgba(85, 224, 174, 0.08);
}

.session-head > strong {
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
}

.session-head strong small {
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.75rem;
  letter-spacing: 0;
}

.session-row {
  min-height: 79px;
  padding: 13px 22px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line-light);
  transition: background 170ms ease;
}

.session-row:hover {
  background: rgba(85, 224, 174, 0.045);
}

.session-row span b,
.session-row span small {
  display: block;
}

.session-row span b {
  font-size: 0.8rem;
}

.session-row span small {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
}

.session-row > strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.session-row > button {
  min-width: 50px;
  min-height: 42px;
  border: 1px solid rgba(85, 224, 174, 0.36);
  border-radius: 9px;
  background: rgba(85, 224, 174, 0.07);
  color: var(--green-bright);
  font-size: 0.75rem;
  font-weight: 780;
  cursor: pointer;
  transition: transform 170ms ease, background 170ms ease, color 170ms ease;
}

.session-row > button:hover {
  transform: translateY(-2px);
  background: var(--green-bright);
  color: var(--ink);
}

.session-row > strong.bump {
  animation: workout-bump 260ms ease;
}

@keyframes workout-bump {
  50% { transform: scale(1.16); color: var(--green-bright); }
}

.session-foot {
  min-height: 57px;
  padding-inline: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.75rem;
}

.session-foot em {
  color: var(--green-bright);
  font-style: normal;
}

/* Product surfaces */
.surfaces-section {
  overflow: hidden;
  background: #10242d;
  color: #fff;
}

.surfaces-heading > p:last-child {
  color: rgba(255, 255, 255, 0.54);
}

.surface-stage {
  position: relative;
  min-height: 690px;
  margin-top: clamp(60px, 8vw, 105px);
}

.desktop-surface,
.mobile-surface,
.widget-surface {
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.desktop-surface:hover,
.mobile-surface:hover,
.widget-surface:hover {
  z-index: 5;
  transform: translateY(-8px);
}

.desktop-surface {
  position: absolute;
  top: 0;
  right: 0;
  width: 76%;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: #f6f8f5;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.3);
  color: var(--ink);
}

.surface-browser {
  min-height: 49px;
  padding-inline: 17px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.surface-browser > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c3cbc7;
}

.surface-browser > i:first-child {
  background: #ef7757;
}

.surface-browser > i:nth-child(2) {
  background: #e4b953;
}

.surface-browser > i:nth-child(3) {
  background: var(--green);
}

.surface-browser span {
  margin-left: 11px;
  color: var(--muted);
  font-size: 0.75rem;
}

.desktop-surface-body {
  min-height: 445px;
  display: grid;
  grid-template-columns: 72px 1fr;
}

.desktop-surface-body aside {
  padding-block: 20px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 17px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.desktop-surface-body aside b {
  width: 31px;
  height: 31px;
  margin-bottom: 12px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  font-size: 0.75rem;
}

.desktop-surface-body aside i {
  width: 20px;
  height: 6px;
  border-radius: 999px;
  background: #ced5d1;
}

.desktop-surface-body aside i.is-active {
  width: 31px;
  background: var(--green);
}

.desktop-panels {
  padding: 24px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: 155px 220px;
  gap: 12px;
}

.desktop-panels > div {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.panel-next {
  padding: 19px;
}

.panel-next span,
.panel-next strong {
  display: block;
}

.panel-next span {
  color: var(--muted);
  font-size: 0.75rem;
}

.panel-next strong {
  margin-top: 5px;
  font-size: 0.85rem;
}

.panel-next i {
  width: 78%;
  height: 8px;
  margin-top: 16px;
  display: block;
  border-radius: 999px;
  background: #e5e9e5;
}

.panel-next i:last-child {
  width: 54%;
}

.panel-stats {
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.panel-stats i {
  border-radius: 8px;
  background: #edf0ec;
}

.panel-stats i:first-child {
  background: var(--green-soft);
}

.panel-chart {
  padding: 17px;
}

.panel-chart svg {
  width: 100%;
  height: 100%;
}

.panel-chart path,
.mobile-chart path {
  fill: none;
  stroke: var(--violet);
  stroke-width: 3;
  stroke-linecap: round;
}

.panel-list {
  padding: 17px;
  display: grid;
  gap: 10px;
}

.panel-list i {
  border-radius: 8px;
  background: #edf0ec;
}

.panel-list i:nth-child(2) {
  background: #e6f1ff;
}

.surface-label {
  position: absolute;
  z-index: 7;
  min-height: 31px;
  padding-inline: 11px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--green-bright);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 780;
}

.desktop-surface > .surface-label {
  right: 18px;
  bottom: 18px;
}

.mobile-surface {
  position: absolute;
  z-index: 3;
  bottom: 10px;
  left: 2%;
  width: 250px;
  min-height: 515px;
  padding: 23px 15px 16px;
  border: 8px solid #050a0d;
  border-radius: 38px;
  background: #f7f9f6;
  box-shadow: 0 32px 75px rgba(0, 0, 0, 0.38);
  color: var(--ink);
}

.mobile-island {
  width: 74px;
  height: 17px;
  margin: -14px auto 18px;
  border-radius: 999px;
  background: #050a0d;
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mobile-brand i {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: var(--green);
}

.mobile-brand strong {
  font-size: 0.78rem;
}

.mobile-next {
  margin-top: 17px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.mobile-next span,
.mobile-next strong,
.mobile-next p {
  display: block;
}

.mobile-next span {
  color: var(--muted);
  font-size: 0.75rem;
}

.mobile-next strong {
  margin-top: 2px;
  font-size: 0.85rem;
}

.mobile-next p {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 0.75rem;
  line-height: 1.4;
}

.mobile-next > div {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.mobile-next > div i {
  height: 26px;
  border-radius: 6px;
  background: #e7ece8;
}

.mobile-next > div i:first-child {
  background: var(--green-soft);
}

.mobile-stats {
  margin-top: 9px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.mobile-stats i {
  height: 55px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.mobile-chart {
  height: 111px;
  margin-top: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.mobile-chart svg {
  width: 100%;
  height: 100%;
}

.mobile-nav {
  position: absolute;
  right: 13px;
  bottom: 13px;
  left: 13px;
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
}

.mobile-nav i {
  width: 14px;
  height: 14px;
  border: 2px solid #75837c;
  border-radius: 4px;
}

.mobile-nav b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 500;
}

.mobile-surface > .surface-label {
  right: -16px;
  bottom: 68px;
}

.widget-surface {
  position: absolute;
  z-index: 4;
  right: 4%;
  bottom: 7px;
  width: 260px;
  min-height: 244px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: #f8faf7;
  box-shadow: 0 27px 65px rgba(0, 0, 0, 0.34);
  color: var(--ink);
}

.widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
}

.widget-head span {
  font-size: 0.78rem;
  font-weight: 800;
}

.widget-head em {
  color: var(--violet);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 780;
}

.widget-ring {
  width: 85px;
  height: 85px;
  margin: 19px auto;
  display: grid;
  place-items: center;
  align-content: center;
  border: 8px solid var(--green-soft);
  border-top-color: var(--green);
  border-radius: 50%;
}

.widget-ring strong {
  font-size: 1.25rem;
  line-height: 1;
}

.widget-ring strong small {
  font-size: 0.75rem;
}

.widget-ring span {
  color: var(--muted);
  font-size: 0.75rem;
}

.widget-surface > p {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.widget-surface > p span,
.widget-surface > p strong {
  display: block;
}

.widget-surface > p span {
  color: var(--muted);
  font-size: 0.75rem;
}

.widget-surface > p strong {
  font-size: 0.78rem;
}

.widget-footer {
  margin-top: 11px;
  display: flex;
  justify-content: space-between;
  color: var(--green-dark);
  font-size: 0.75rem;
  font-weight: 720;
}

.widget-surface > .surface-label {
  right: -12px;
  bottom: -13px;
}

.surface-principles {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line-light);
}

.surface-principles article {
  min-height: 218px;
  padding: 30px 28px;
  transition: background 180ms ease, transform 180ms ease;
}

.surface-principles article + article {
  border-left: 1px solid var(--line-light);
}

.surface-principles article:hover {
  transform: translateY(-4px);
  background: rgba(85, 224, 174, 0.055);
}

.surface-principles article > span {
  color: var(--green-bright);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.surface-principles h3 {
  margin-top: 44px;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.surface-principles p {
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.78rem;
  line-height: 1.6;
}

/* Foundation */
.foundation-section {
  background: #f1f3ed;
}

.foundation-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(55px, 9vw, 140px);
  align-items: start;
}

.foundation-copy {
  position: sticky;
  top: 176px;
}

.foundation-copy .light-index {
  color: var(--green-dark);
}

.foundation-rules {
  border-top: 1px solid var(--line);
}

.foundation-rules article {
  min-height: 152px;
  padding: 26px 4px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  transition: padding-left 180ms ease, background 180ms ease;
}

.foundation-rules article:hover {
  padding-left: 12px;
}

.foundation-rules article > span {
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 820;
}

.foundation-rules h3 {
  font-size: 1.1rem;
  letter-spacing: -0.025em;
}

.foundation-rules p {
  max-width: 600px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.baseline-proof {
  grid-column: 1 / -1;
  margin-top: 20px;
  padding: clamp(30px, 5vw, 58px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
  border-radius: 21px;
  background: var(--ink);
  color: #fff;
}

.baseline-proof > div {
  display: flex;
  align-items: center;
  gap: 22px;
}

.baseline-proof > div strong {
  font-size: clamp(4rem, 8vw, 8rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.08em;
  line-height: 0.8;
}

.baseline-proof > div strong span {
  color: var(--green-bright);
  font-size: 0.42em;
}

.baseline-proof > div p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  line-height: 1.4;
}

.baseline-proof ul {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  list-style: none;
  border-top: 1px solid var(--line-light);
}

.baseline-proof li {
  min-height: 62px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line-light);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
}

.baseline-proof li:nth-child(odd) {
  border-right: 1px solid var(--line-light);
}

.baseline-proof li b {
  color: var(--green-bright);
  font-size: 0.75rem;
}

.baseline-proof > span {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid var(--line-light);
  color: rgba(255, 255, 255, 0.37);
  font-size: 0.75rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.features-closing .closing-copy > p:not(.section-index) {
  max-width: 560px;
}

/* Responsive */
@media (max-width: 1200px) {
  .features-hero-grid {
    grid-template-columns: minmax(360px, 0.83fr) minmax(510px, 1.17fr);
    gap: 48px;
  }

  .features-hero-copy h1 {
    font-size: clamp(3.3rem, 6.4vw, 5.4rem);
  }

  .feature-jump a {
    padding-inline: 15px;
  }

  .feature-section-grid {
    grid-template-columns: minmax(300px, 0.72fr) minmax(530px, 1.28fr);
    gap: 56px;
  }

  .advisor-showcase {
    grid-template-columns: 0.9fr 0.72fr 1.08fr;
    gap: 30px;
  }

  .glucose-workspace {
    grid-template-columns: minmax(0, 1.28fr) minmax(310px, 0.72fr);
  }
}

@media (max-width: 980px) {
  .features-page [id] {
    scroll-margin-top: 85px;
  }

  .features-hero-grid,
  .feature-section-grid,
  .foundation-grid {
    grid-template-columns: 1fr;
  }

  .features-hero-grid {
    min-height: auto;
    padding-block: 80px 105px;
  }

  .features-hero-copy {
    max-width: 800px;
  }

  .features-hero-copy h1 {
    font-size: clamp(3.8rem, 10.6vw, 6.3rem);
  }

  .context-engine {
    max-width: 850px;
  }

  .feature-jump {
    position: relative;
    top: auto;
  }

  .feature-jump > div {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .feature-jump a {
    min-height: 52px;
    border-bottom: 1px solid var(--line);
  }

  .state-story {
    grid-template-columns: 1fr;
  }

  .story-steps {
    grid-template-columns: 1fr 1fr;
    border-right: 0;
    border-bottom: 1px solid var(--line-light);
  }

  .story-steps button:last-child {
    grid-column: 1 / -1;
  }

  .feature-section-grid {
    gap: 55px;
  }

  .feature-section-copy {
    max-width: 760px;
  }

  .today-cockpit {
    max-width: 850px;
  }

  .meal-layers {
    grid-template-columns: 1fr;
  }

  .raw-layer {
    border-radius: 20px 20px 0 0;
  }

  .structured-layer {
    border-radius: 0 0 20px 20px;
  }

  .layer-connector {
    min-height: 75px;
    display: flex;
    flex-direction: row;
    writing-mode: initial;
  }

  .layer-connector i {
    width: 45px;
    height: 1px;
  }

  .meal-detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .advisor-showcase {
    grid-template-columns: 1fr 1fr;
  }

  .advisor-copy {
    grid-column: 1 / -1;
  }

  .glucose-workspace {
    grid-template-columns: 1fr;
  }

  .meal-response-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .response-stack {
    grid-template-columns: 1fr auto 1fr 1fr;
  }

  .response-stack .response-delta {
    grid-column: auto;
  }

  .workout-showcase {
    grid-template-columns: 1fr;
  }

  .surface-stage {
    min-height: 780px;
  }

  .desktop-surface {
    width: 88%;
  }

  .mobile-surface {
    bottom: 5px;
  }

  .widget-surface {
    right: 1%;
    bottom: 9px;
  }

  .foundation-copy {
    position: static;
    max-width: 760px;
  }

  .foundation-grid {
    gap: 55px;
  }
}

@media (max-width: 760px) {
  .features-hero {
    padding-top: 70px;
  }

  .features-hero-grid {
    padding-block: 58px 86px;
    gap: 54px;
  }

  .features-hero-copy h1 {
    font-size: clamp(3rem, 14vw, 4.8rem);
  }

  .features-hero-lead {
    margin-top: 26px;
    font-size: 1rem;
  }

  .features-hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .features-hero-actions .button {
    width: 100%;
  }

  .features-hero-actions .text-link {
    width: max-content;
    padding: 8px 2px;
  }

  .features-proofline > span {
    font-size: 0.75rem;
  }

  .context-engine {
    padding: 20px;
    border-radius: 20px;
  }

  .context-engine::before {
    display: none;
  }

  .engine-focus {
    grid-template-columns: auto 1fr;
  }

  .engine-status {
    grid-column: 2;
    width: max-content;
  }

  .engine-map {
    grid-template-columns: 1fr;
  }

  .engine-map > i {
    width: 1px;
    height: 18px;
    margin-inline: auto;
  }

  .engine-map > i::after {
    top: auto;
    right: -2px;
    bottom: 0;
    transform: rotate(135deg);
  }

  .engine-node {
    min-height: 76px;
  }

  .feature-jump > div {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-jump a:nth-child(even),
  .feature-jump a:last-child {
    border-right: 1px solid var(--line);
  }

  .story-steps {
    padding: 15px;
    grid-template-columns: 1fr;
  }

  .story-steps button:last-child {
    grid-column: auto;
  }

  .story-steps button {
    min-height: 83px;
  }

  .story-state {
    margin: 15px;
    padding: 21px;
  }

  .story-structured > div {
    grid-template-columns: 1fr;
  }

  .story-structured i + i {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .feature-section-copy h2,
  .glucose-heading h2,
  .surfaces-heading h2,
  .foundation-copy h2 {
    font-size: clamp(2.55rem, 12vw, 4.2rem);
  }

  .today-cockpit {
    padding: 22px 17px;
    border-radius: 18px;
    transform: none;
  }

  .cockpit-steps {
    gap: 4px;
  }

  .cockpit-steps span {
    min-width: 43px;
    font-size: 0.75rem;
  }

  .cockpit-actions {
    grid-template-columns: 1fr 1fr;
  }

  .cockpit-actions button {
    min-height: 48px;
  }

  .cockpit-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .cockpit-metrics > span:nth-child(3) {
    border-left: 0;
  }

  .cockpit-metrics > span:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }

  .meal-layers,
  .meal-detail-grid,
  .advisor-showcase {
    margin-inline: -1px;
  }

  .raw-layer,
  .structured-layer {
    padding: 26px 21px;
  }

  .raw-layer blockquote {
    margin-top: 36px;
    font-size: 1.45rem;
  }

  .meal-detail-grid {
    grid-template-columns: 1fr;
  }

  .partial-editor,
  .unknown-food {
    min-height: auto;
  }

  .command-row {
    padding-block: 13px;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .command-row span {
    width: max-content;
  }

  .advisor-showcase {
    padding: 27px 21px;
    grid-template-columns: 1fr;
  }

  .advisor-copy {
    grid-column: auto;
  }

  .glucose-workspace {
    border-radius: 18px;
  }

  .glucose-chart-panel,
  .meal-response-panel {
    padding: 22px 17px;
  }

  .glucose-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .glucose-panel-head > div:last-child {
    width: 100%;
  }

  .glucose-panel-head button {
    min-width: 0;
    flex: 1;
  }

  .feature-glucose-chart {
    min-width: 0;
  }

  .glucose-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .glucose-kpis span:nth-child(3) {
    border-left: 0;
  }

  .glucose-kpis span:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }

  .response-stack {
    grid-template-columns: 1fr auto 1fr;
  }

  .response-stack .response-delta {
    grid-column: 1 / -1;
  }

  .ledger-labels {
    display: none;
  }

  .ledger-row {
    min-height: 106px;
    padding-block: 17px;
    grid-template-columns: 1fr auto;
    gap: 7px 14px;
  }

  .ledger-row > span:first-child {
    grid-row: 1 / span 2;
  }

  .ledger-row > span:nth-child(2)::before,
  .ledger-row > span:nth-child(3)::before {
    margin-right: 5px;
    color: var(--muted);
    font-size: 0.75rem;
  }

  .ledger-row > span:nth-child(2)::before {
    content: "Urnik: ";
  }

  .ledger-row > span:nth-child(3)::before {
    content: "Vnos: ";
  }

  .ledger-row > em,
  .ledger-row > button {
    grid-column: 2;
    justify-self: end;
  }

  .therapy-guardrail {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .workout-showcase {
    padding: 30px 19px;
    border-radius: 18px;
  }

  .session-row,
  .session-head {
    padding-inline: 15px;
  }

  .surface-stage {
    min-height: 790px;
  }

  .desktop-surface {
    width: 100%;
    min-height: 370px;
  }

  .desktop-surface-body {
    min-height: 310px;
    grid-template-columns: 49px 1fr;
  }

  .desktop-surface-body aside {
    gap: 11px;
  }

  .desktop-panels {
    padding: 12px;
    grid-template-rows: 115px 145px;
    gap: 7px;
  }

  .panel-next {
    padding: 12px;
  }

  .panel-stats,
  .panel-list,
  .panel-chart {
    padding: 9px;
  }

  .mobile-surface {
    left: 1%;
    width: 220px;
    min-height: 465px;
  }

  .widget-surface {
    right: 0;
    width: 225px;
  }

  .surface-principles {
    grid-template-columns: 1fr;
  }

  .surface-principles article {
    min-height: 190px;
  }

  .surface-principles article + article {
    border-top: 1px solid var(--line-light);
    border-left: 0;
  }

  .surface-principles h3 {
    margin-top: 34px;
  }

  .baseline-proof {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .baseline-proof ul {
    grid-template-columns: 1fr;
  }

  .baseline-proof li:nth-child(odd) {
    border-right: 0;
  }

  .baseline-proof > span {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  .features-hero-copy h1 {
    font-size: clamp(2.75rem, 13.5vw, 3.9rem);
  }

  .features-proofline {
    grid-template-columns: 1fr;
  }

  .features-proofline > span {
    min-height: 59px;
    padding: 11px 0;
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 11px;
  }

  .features-proofline > span + span {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .features-proofline strong {
    display: inline;
  }

  .engine-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .engine-focus {
    grid-template-columns: 1fr;
  }

  .engine-status {
    grid-column: auto;
  }

  .engine-signals {
    grid-template-columns: 1fr;
  }

  .feature-jump a {
    padding-inline: 11px;
  }

  .story-state-title strong {
    font-size: 1.65rem;
  }

  .cockpit-steps span {
    min-width: 35px;
    font-size: 0.68rem;
  }

  .cockpit-steps b {
    width: 28px;
    height: 28px;
  }

  .unknown-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .ledger-head {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .ledger-row {
    padding-inline: 14px;
  }

  .ledger-row > span:first-child > i {
    width: 36px;
    height: 36px;
  }

  .session-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .session-row {
    grid-template-columns: 1fr auto;
  }

  .session-row > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .session-foot {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  .surface-stage {
    min-height: 1050px;
  }

  .desktop-surface {
    min-height: 330px;
  }

  .desktop-surface-body {
    min-height: 270px;
  }

  .desktop-panels {
    grid-template-columns: 1fr;
    grid-template-rows: 90px 82px 90px;
  }

  .panel-stats {
    display: none;
  }

  .panel-chart {
    grid-row: 2;
  }

  .panel-list {
    grid-row: 3;
  }

  .mobile-surface {
    top: 365px;
    bottom: auto;
    left: 50%;
    width: 214px;
    transform: translateX(-58%);
  }

  .mobile-surface:hover {
    transform: translateX(-58%) translateY(-8px);
  }

  .widget-surface {
    right: 50%;
    bottom: 6px;
    transform: translateX(56%);
  }

  .widget-surface:hover {
    transform: translateX(56%) translateY(-8px);
  }

  .baseline-proof > div {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-state.is-changing,
  .advisor-result.is-changing,
  .ledger-receipt.is-visible,
  .session-row > strong.bump {
    animation: none;
  }
}
