:root {
    --ink: #173b36;
    --ink-2: #28534d;
    --paper: #f5f2e9;
    --paper-deep: #ebe6d8;
    --white: #fffef9;
    --mint: #b9e4d5;
    --mint-soft: #dff3ea;
    --coral: #f16f5f;
    --coral-dark: #c84f43;
    --amber: #f0b85a;
    --line: rgba(23, 59, 54, .17);
    --muted: #5e726e;
    --shadow: 0 24px 70px rgba(23, 59, 54, .12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    background-image: radial-gradient(rgba(23, 59, 54, .075) .7px, transparent .7px);
    background-size: 9px 9px;
    content: "";
    pointer-events: none;
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.shell {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.narrow {
    max-width: 860px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 10px;
    left: 10px;
    padding: 9px 14px;
    color: var(--white);
    background: var(--ink);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.icon {
    width: 1.25em;
    height: 1.25em;
    flex: 0 0 auto;
}

.site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(245, 242, 233, .94);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    line-height: 1;
}

.brand-mark {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    border-radius: 13px 13px 13px 5px;
    color: var(--ink);
    background: var(--mint);
    transform: rotate(-4deg);
}

.brand-mark .icon {
    width: 23px;
    height: 23px;
}

.brand > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand strong {
    font-size: 1.05rem;
    letter-spacing: -.03em;
}

.brand small {
    color: var(--coral-dark);
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a {
    padding: 10px 15px;
    border-radius: 99px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 750;
    text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    color: var(--ink);
    background: rgba(185, 228, 213, .45);
}

.header-cta {
    padding: 10px 17px;
    border: 1px solid var(--ink);
    border-radius: 99px;
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
}

.header-cta:hover {
    color: var(--white);
    background: var(--ink);
}

.hero {
    padding: 88px 0 96px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    align-items: center;
    gap: clamp(48px, 7vw, 100px);
}

.eyebrow,
.section-number,
.card-kicker {
    margin: 0;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--coral-dark);
}

.eyebrow span {
    width: 30px;
    height: 2px;
    background: currentColor;
}

.hero h1,
.subpage-hero h1 {
    margin: 22px 0 24px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.5rem, 6.5vw, 6.6rem);
    font-weight: 500;
    line-height: .92;
    letter-spacing: -.055em;
}

.hero h1 em {
    color: var(--coral);
    font-weight: inherit;
}

.hero-lead {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-size: .91rem;
    font-weight: 820;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    color: var(--white);
    background: var(--coral);
    box-shadow: 0 12px 30px rgba(241, 111, 95, .24);
}

.button-primary:hover {
    background: var(--coral-dark);
}

.button-dark {
    color: var(--white);
    background: var(--ink);
}

.button-dark:hover {
    background: var(--ink-2);
}

.button-wide {
    width: 100%;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .87rem;
    font-weight: 820;
    text-underline-offset: 5px;
}

.text-link .icon {
    width: 17px;
}

.privacy-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 650;
}

.privacy-note .icon {
    width: 16px;
}

.hero-visual {
    position: relative;
    min-height: 460px;
    padding: 34px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 42px 42px 42px 12px;
    color: var(--white);
    background: var(--ink);
    box-shadow: var(--shadow);
    transform: rotate(1.5deg);
}

.hero-visual::before {
    position: absolute;
    width: 240px;
    height: 240px;
    top: -90px;
    right: -70px;
    border: 52px solid rgba(185, 228, 213, .08);
    border-radius: 50%;
    content: "";
}

.visual-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255, 255, 255, .7);
    font-size: .74rem;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 99px;
}

.live-pill i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mint);
}

.visual-value {
    display: flex;
    align-items: flex-end;
    gap: 17px;
    margin-top: 38px;
}

.visual-value > strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 5.1rem;
    font-weight: 500;
    line-height: .85;
    letter-spacing: -.06em;
}

.visual-value > span {
    color: rgba(255, 255, 255, .62);
    font-size: .73rem;
    line-height: 1.55;
}

.visual-value b {
    color: var(--mint);
    font-weight: 750;
}

.curve {
    width: calc(100% + 15px);
    margin: 30px -6px 0;
    overflow: visible;
}

.curve-grid {
    stroke: rgba(255, 255, 255, .09);
    stroke-dasharray: 3 8;
}

.curve-area {
    fill: rgba(185, 228, 213, .08);
}

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

.curve circle {
    fill: var(--coral);
    stroke: var(--ink);
    stroke-width: 5;
}

.curve-labels {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, .38);
    font-size: .65rem;
}

.trust-strip {
    border-block: 1px solid var(--line);
    background: rgba(255, 254, 249, .52);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.trust-grid > div {
    display: flex;
    min-height: 114px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    border-right: 1px solid var(--line);
}

.trust-grid > div:last-child {
    border-right: 0;
}

.trust-grid .icon {
    width: 25px;
    height: 25px;
    color: var(--coral);
}

.trust-grid span {
    display: flex;
    flex-direction: column;
}

.trust-grid strong {
    font-size: .9rem;
}

.trust-grid small {
    color: var(--muted);
    font-size: .74rem;
}

.calculator-section,
.hba1c-section,
.log-section,
.knowledge-preview {
    padding: 120px 0;
}

.calculator-section {
    background: var(--white);
}

.section-grid {
    display: grid;
    grid-template-columns: .78fr 1.22fr;
    align-items: start;
    gap: clamp(50px, 8vw, 120px);
}

.section-number {
    color: var(--coral-dark);
}

.section-intro h2,
.section-heading-row h2,
.log-copy h2 {
    margin: 15px 0 22px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.5rem, 4.4vw, 4.5rem);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.045em;
}

.section-intro > p:not(.section-number),
.section-heading-row > p,
.log-copy > p:not(.section-number) {
    color: var(--muted);
}

.formula-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 38px;
    padding: 20px 22px;
    border-left: 4px solid var(--mint);
    background: var(--paper);
}

.formula-card span,
.formula-card small {
    color: var(--muted);
    font-size: .72rem;
}

.formula-card strong {
    font-size: .92rem;
}

.calculator-card {
    padding: clamp(25px, 4vw, 45px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.card-heading,
.log-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.card-kicker {
    color: var(--coral-dark);
}

.card-heading h3,
.log-header h3 {
    margin: 4px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.1;
}

.precision-badge {
    padding: 6px 10px;
    border: 1px solid rgba(23, 59, 54, .16);
    border-radius: 99px;
    color: var(--ink-2);
    background: var(--mint-soft);
    font-size: .67rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.input-pair {
    display: grid;
    grid-template-columns: 1fr 44px 1fr;
    align-items: end;
    gap: 12px;
}

.value-field > span:first-child,
.context-field > span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: .73rem;
    font-weight: 740;
}

.input-wrap {
    display: flex;
    height: 76px;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border: 2px solid transparent;
    border-radius: 15px;
    background: var(--white);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.input-wrap:focus-within {
    border-color: var(--ink);
    box-shadow: 0 0 0 4px rgba(185, 228, 213, .7);
}

.input-wrap input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 2.85rem);
    font-weight: 500;
}

.input-wrap b {
    color: var(--muted);
    font-size: .7rem;
    white-space: nowrap;
}

.swap-button,
.icon-button {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    background: var(--white);
    cursor: pointer;
}

.swap-button {
    margin-bottom: 16px;
}

.swap-button:hover,
.icon-button:hover {
    color: var(--white);
    background: var(--ink);
}

.field-help,
.small-note,
.form-message {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: .72rem;
}

.context-field {
    display: block;
    margin-top: 27px;
}

.context-field small {
    color: var(--coral-dark);
    font-size: .66rem;
}

.context-field select {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    color: var(--ink);
    background: var(--white);
}

.context-field select:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 4px rgba(185, 228, 213, .6);
}

.interpretation {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-top: 18px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
}

.interpretation[hidden] {
    display: none;
}

.status-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    margin-top: 8px;
    border-radius: 50%;
    background: var(--mint);
}

.interpretation[data-state="attention"] .status-dot {
    background: var(--amber);
}

.interpretation[data-state="medical"] .status-dot {
    background: var(--coral);
}

.interpretation strong {
    font-size: .86rem;
}

.interpretation p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: .76rem;
}

.medical-note,
.callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 22px 0;
    padding: 16px;
    border: 1px solid rgba(240, 184, 90, .45);
    border-radius: 12px;
    background: rgba(240, 184, 90, .11);
}

.medical-note .icon,
.callout .icon {
    margin-top: 3px;
    color: #a66b0d;
}

.medical-note p,
.callout p {
    margin: 0;
    color: var(--muted);
    font-size: .76rem;
}

.form-message {
    min-height: 1.3em;
    text-align: center;
}

.form-message.is-success {
    color: #28715e;
}

.form-message.is-error {
    color: var(--coral-dark);
}

.hba1c-section {
    background: var(--ink);
    color: var(--white);
}

.hba1c-section .section-number {
    color: var(--mint);
}

.section-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: clamp(30px, 7vw, 100px);
    margin-bottom: 50px;
}

.section-heading-row > div {
    flex: 1.25;
}

.section-heading-row > p,
.section-heading-row > a {
    flex: .75;
    max-width: 410px;
    margin-bottom: 15px;
}

.hba1c-section .section-heading-row > p {
    color: rgba(255, 255, 255, .62);
}

.hba1c-layout {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius);
}

.hba1c-control {
    padding: clamp(30px, 5vw, 55px);
    background: rgba(255, 255, 255, .06);
}

.hba1c-control > label {
    display: block;
    color: rgba(255, 255, 255, .6);
    font-size: .78rem;
    font-weight: 750;
}

.hba1c-input {
    display: flex;
    align-items: baseline;
    margin: 12px 0 24px;
}

.hba1c-input input {
    width: 180px;
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 5rem;
    line-height: 1;
}

.hba1c-input span {
    color: var(--mint);
    font-size: 1.6rem;
    font-weight: 700;
}

.range {
    width: 100%;
    accent-color: var(--coral);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, .42);
    font-size: .67rem;
}

.hba1c-control .small-note {
    margin-top: 28px;
    color: rgba(255, 255, 255, .5);
}

.hba1c-results {
    display: flex;
    min-height: 340px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(35px, 6vw, 70px);
    text-align: center;
    background: var(--mint);
    color: var(--ink);
}

.hba1c-results > p:first-child {
    margin: 0 0 25px;
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.result-numbers {
    display: flex;
    align-items: center;
    gap: clamp(20px, 4vw, 55px);
}

.result-numbers span {
    display: flex;
    flex-direction: column;
}

.result-numbers strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.3rem, 6vw, 5.2rem);
    font-weight: 500;
    line-height: .9;
    letter-spacing: -.05em;
}

.result-numbers small {
    margin-top: 7px;
    font-size: .72rem;
    font-weight: 750;
}

.result-numbers i {
    color: var(--ink-2);
    font-family: Georgia, "Times New Roman", serif;
    font-size: .9rem;
}

.result-caveat {
    max-width: 450px;
    margin: 32px 0 0;
    color: var(--ink-2);
    font-size: .74rem;
}

.log-section {
    background: var(--paper);
}

.log-layout {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    align-items: start;
    gap: clamp(50px, 8vw, 110px);
}

.local-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 254, 249, .6);
}

.local-badge > span {
    display: flex;
    flex-direction: column;
}

.local-badge strong {
    font-size: .76rem;
}

.local-badge small {
    color: var(--muted);
    font-size: .66rem;
}

.log-card {
    min-height: 390px;
    padding: clamp(25px, 4vw, 40px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.empty-state {
    display: flex;
    min-height: 230px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.empty-state > span {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 50%;
    color: var(--ink);
    background: var(--mint-soft);
}

.empty-state strong {
    font-size: .9rem;
}

.empty-state p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: .75rem;
}

.table-wrap {
    overflow-x: auto;
}

.table-wrap[hidden] {
    display: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .78rem;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: .66rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

td small {
    display: block;
    color: var(--muted);
}

.row-delete {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.row-delete:hover {
    color: var(--white);
    background: var(--coral);
}

.delete-all {
    margin-top: 18px;
    padding: 0;
    border: 0;
    color: var(--coral-dark);
    background: none;
    cursor: pointer;
    font-size: .72rem;
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.knowledge-preview {
    border-top: 1px solid var(--line);
    background: var(--white);
}

.knowledge-preview .section-heading-row {
    color: var(--ink);
}

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-block: 1px solid var(--line);
}

.knowledge-grid article {
    position: relative;
    min-height: 290px;
    padding: 35px;
    border-right: 1px solid var(--line);
}

.knowledge-grid article:last-child {
    border-right: 0;
}

.article-index {
    position: absolute;
    top: 24px;
    right: 28px;
    color: var(--paper-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 4.5rem;
    line-height: 1;
}

.knowledge-grid h3 {
    position: relative;
    margin: 45px 0 15px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
    font-weight: 500;
    line-height: 1.05;
}

.knowledge-grid article > p:last-child {
    position: relative;
    color: var(--muted);
    font-size: .86rem;
}

.subpage-hero {
    padding: 110px 0;
    border-bottom: 1px solid var(--line);
    background: var(--mint-soft);
}

.subpage-hero.compact {
    padding: 85px 0;
}

.subpage-hero h1 {
    margin-bottom: 20px;
    font-size: clamp(3.4rem, 7vw, 6.5rem);
}

.subpage-hero p:last-child {
    max-width: 700px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.content-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 760px);
    justify-content: center;
    gap: 80px;
    padding-block: 100px;
}

.toc {
    position: sticky;
    top: 30px;
    display: flex;
    height: fit-content;
    flex-direction: column;
    gap: 7px;
    padding: 20px;
    border-left: 3px solid var(--mint);
    background: rgba(255, 254, 249, .55);
}

.toc strong {
    margin-bottom: 8px;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.toc a {
    color: var(--muted);
    font-size: .78rem;
}

.prose {
    min-width: 0;
}

.prose.standalone {
    max-width: 820px;
    padding-block: 90px;
}

.prose section {
    scroll-margin-top: 40px;
}

.prose section + section {
    margin-top: 85px;
    padding-top: 70px;
    border-top: 1px solid var(--line);
}

.prose h2 {
    margin: 13px 0 22px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -.035em;
}

.prose p {
    color: var(--muted);
}

.prose strong {
    color: var(--ink);
}

.example-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    padding: 25px;
    border: 1px solid var(--line);
    background: var(--white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
}

.example-row i {
    color: var(--coral);
}

.formula-large {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 30px;
    border: 1px solid var(--line);
    background: var(--white);
}

.formula-large span,
.formula-large strong {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.formula-large strong {
    border-left: 1px solid var(--line);
}

.formula-large > :nth-last-child(-n+2) {
    border-bottom: 0;
}

.source-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--coral-dark);
    font-size: .84rem;
    font-weight: 820;
    text-underline-offset: 5px;
}

.source-link .icon {
    width: 17px;
}

.legal h2 {
    font-size: 2rem;
}

.site-footer {
    padding-top: 70px;
    color: var(--white);
    background: #102d29;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.7fr .65fr .65fr;
    gap: 70px;
    padding-bottom: 60px;
}

.brand-light {
    color: var(--white);
}

.footer-brand p {
    max-width: 390px;
    color: rgba(255, 255, 255, .5);
    font-size: .8rem;
}

.footer-main > div:not(.footer-brand) {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-main > div > strong {
    margin-bottom: 8px;
    color: var(--mint);
    font-size: .7rem;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.footer-main > div > a {
    color: rgba(255, 255, 255, .65);
    font-size: .78rem;
    text-decoration: none;
}

.footer-main > div > a:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .42);
    font-size: .69rem;
}

@media (max-width: 900px) {
    .hero-grid,
    .section-grid,
    .log-layout {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        max-width: 700px;
    }

    .hero-visual {
        min-height: 420px;
    }

    .section-intro {
        max-width: 700px;
    }

    .section-heading-row {
        display: block;
    }

    .section-heading-row > p,
    .section-heading-row > a {
        max-width: 700px;
    }

    .hba1c-layout {
        grid-template-columns: 1fr;
    }

    .knowledge-grid {
        grid-template-columns: 1fr;
    }

    .knowledge-grid article {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .knowledge-grid article:last-child {
        border-bottom: 0;
    }

    .content-layout {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .toc {
        position: static;
    }
}

@media (max-width: 680px) {
    body {
        font-size: 16px;
    }

    .shell {
        width: min(100% - 28px, 1180px);
    }

    .header-inner {
        min-height: 72px;
    }

    .main-nav,
    .header-cta {
        display: none;
    }

    .hero {
        padding: 66px 0 70px;
    }

    .hero h1 {
        font-size: clamp(3.2rem, 15vw, 4.8rem);
    }

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

    .hero-visual {
        min-height: 350px;
        padding: 25px;
        border-radius: 30px 30px 30px 10px;
        transform: none;
    }

    .visual-value > strong {
        font-size: 4.2rem;
    }

    .curve {
        margin-top: 15px;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }

    .trust-grid > div {
        min-height: 90px;
        justify-content: flex-start;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .trust-grid > div:last-child {
        border-bottom: 0;
    }

    .calculator-section,
    .hba1c-section,
    .log-section,
    .knowledge-preview {
        padding: 80px 0;
    }

    .input-pair {
        grid-template-columns: 1fr;
    }

    .swap-button {
        margin: -4px auto;
        transform: rotate(90deg);
    }

    .swap-button:hover {
        transform: rotate(90deg);
    }

    .hba1c-input input {
        width: 155px;
        font-size: 4.2rem;
    }

    .result-numbers {
        flex-direction: column;
    }

    .section-heading-row h2,
    .section-intro h2,
    .log-copy h2 {
        font-size: 2.7rem;
    }

    .subpage-hero {
        padding: 75px 0;
    }

    .content-layout,
    .prose.standalone {
        padding-block: 65px;
    }

    .example-row {
        gap: 12px;
        font-size: 1.35rem;
    }

    .formula-large {
        grid-template-columns: 1fr;
    }

    .formula-large strong {
        border-left: 0;
        background: var(--mint-soft);
    }

    .formula-large span,
    .formula-large strong {
        border-bottom: 1px solid var(--line) !important;
    }

    .formula-large > :last-child {
        border-bottom: 0 !important;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 45px 25px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
    }
}
