@font-face {
  font-family: "DM Sans";
  src: url("/assets/dm-sans-c2796eef.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "DM Mono";
  src: url("/assets/dm-mono-400-bf792450.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "DM Mono";
  src: url("/assets/dm-mono-500-e06c27ef.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Libre Baskerville";
  src: url("/assets/libre-baskerville-ab604eea.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --wine: #76283d;
  --deep: #4c1c2c;
  --ink: #38242a;
  --muted: #816c6d;
  --paper: #fffdf9;
  --wash: #f5e9e2;
  --line: #e4cec8;
  --blush: #ecd7d1;
  --bg-color: #d5b6b0;
  --diagram-skin: #c9ad8b;
  --diagram-figure: #604832;
  --diagram-tape: #76283d;
  --diagram-guide: #9a7c69;
  --font-sans: "DM Sans", sans-serif;
  --font-serif: "Libre Baskerville", serif;
  --font-mono: "DM Mono", monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
.print-only { display: none; }
html { min-height: 100%; background: var(--bg-color); }
body { min-height: 100%; margin: 0; background: var(--bg-color); color: var(--ink); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #bb7890; outline-offset: 3px; }
[hidden] { display: none !important; }
.text-right { text-align: right; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.icon-button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 5px; }

/* Marketing page */
.ms-home { min-height: 100dvh; background: var(--bg-color); color: var(--ink); overflow: hidden; }
.ms-wrap { max-width: 1280px; min-height: 100dvh; margin: 0 auto; background: var(--paper); position: relative; overflow: hidden; }
.ms-wrap::after, .app-paper::after, .cf-card::before { content: ""; position: absolute; pointer-events: none; inset: 0; opacity: .065; background-image: radial-gradient(#b28b87 .45px, transparent .45px); background-size: 8px 8px; mix-blend-mode: multiply; }
.ms-nav, .ms-hero, .ms-section, .ms-footer { position: relative; z-index: 1; }
.ms-nav { height: 72px; padding: 0 6vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.ms-brand, .app-brand { display: flex; align-items: center; gap: 10px; color: var(--deep); font-weight: 600; letter-spacing: -.035em; text-decoration: none; }
.ms-mark, .app-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--wine); color: #fff8f4; font-weight: 700; font-size: 14px; }
.ms-nav-cta { color: var(--wine); padding: 10px 0; font-size: 12px; font-weight: 600; text-decoration: none; }
.ms-hero { display: grid; grid-template-columns: 1fr .8fr; gap: 7vw; align-items: center; padding: 82px 10vw; min-height: 540px; }
.ms-kicker, .ep-kicker, .share-kicker, .set-kicker { color: var(--wine); font: 500 10px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; }
.ms-kicker { margin-bottom: 18px; }
.ms-home h1 { font: 400 clamp(35px, 4.4vw, 61px)/1.13 var(--font-serif); letter-spacing: -.055em; color: var(--ink); max-width: 650px; margin: 0; }
.ms-lede { font-size: 15px; line-height: 1.65; color: var(--muted); max-width: 515px; margin: 22px 0 27px; }
.ms-primary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; background: var(--wine); color: #fff8f4; padding: 15px 21px; border-radius: 4px; font-size: 13px; font-weight: 600; white-space: nowrap; transition: transform .18s ease, box-shadow .18s ease; text-decoration: none; }
.ms-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #5d1e31; }
.ms-actions { display: flex; align-items: stretch; gap: 8px; flex-wrap: nowrap; }
.ms-secondary { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 14px 19px; border-radius: 4px; font-size: 13px; white-space: nowrap; text-decoration: none; }
.ms-under { margin-top: 17px; color: var(--muted); font-size: 11px; }
.ms-document { height: 330px; background: #fbf0ea; border: 1px solid #ead2ca; max-width: 500px; width: 100%; margin: 0 auto; overflow: hidden; }
.ms-document img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 68%; filter: saturate(.88) sepia(.06); }
.ms-section { padding: 78px 10vw; border-top: 1px solid var(--line); }
.ms-section-head { max-width: 570px; margin: 0 auto 35px; }
.ms-values { max-width: 700px; margin: 0 auto; }
.ms-value-row { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 14px 0; font: 16px var(--font-serif); }
.ms-value-row span { font: 12px var(--font-mono); color: var(--muted); }
.ms-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 950px; margin: auto; }
.ms-step { padding: 25px 25px 27px; border-top: 1px solid var(--wine); }
.ms-step-num { font: 500 11px var(--font-mono); color: var(--wine); margin-bottom: 19px; }
.ms-step h2 { font: 400 18px var(--font-serif); margin: 0 0 10px; }
.ms-step p { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0; }
.ms-footer { border-top: 1px solid var(--line); padding: 37px 6vw 44px; display: flex; justify-content: space-between; align-items: end; }
.ms-footer p { font-size: 11px; color: var(--muted); line-height: 1.6; margin: 9px 0 0; }
.ms-footer-links, .app-footer-links { display: flex; gap: 22px; }
.ms-footer-links a, .app-footer-links a { font: 500 11px var(--font-sans); color: var(--wine); text-decoration: none; letter-spacing: .02em; }
.ms-footer-links a:hover, .app-footer-links a:hover { text-decoration: underline; }

/* Application shell */
.app-shell { min-height: 100dvh; background: var(--bg-color); color: var(--ink); position: relative; }
.app-paper { max-width: 1280px; min-height: 100dvh; margin: auto; background: var(--paper); position: relative; overflow: hidden; }
.app-nav, .app-content, .app-tabs, .app-action, .app-footer { position: relative; z-index: 1; }
.app-nav { height: 72px; border-bottom: 1px solid var(--line); padding: 0 6vw; display: flex; align-items: center; justify-content: space-between; }
.app-nav-right { display: flex; align-items: center; gap: 28px; }
.app-nav-links { display: flex; align-items: center; gap: 28px; color: var(--muted); font-size: 12px; }
.app-nav-links a { color: inherit; padding: 10px 0; text-decoration: none; }
.app-nav-links a.active { color: var(--wine); font-weight: 600; border-bottom: 1px solid var(--wine); }
.app-nav-cta { color: var(--wine); padding: 10px 0; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.app-nav-cta.active { text-decoration: underline; text-underline-offset: 4px; }
.app-context-label { color: var(--muted); font: 500 10px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.app-profile-badge { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: var(--paper); padding: 7px 10px; border-radius: 4px; color: var(--ink); font-size: 12px; min-width: 0; }
.app-profile-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-switcher { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: var(--paper); padding: 7px 10px; border-radius: 4px; color: var(--ink); font-size: 12px; cursor: pointer; position: relative; }
.app-switcher select { appearance: none; max-width: 130px; border: 0; background: transparent; color: var(--ink); outline: 0; padding: 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-switcher > .icon { pointer-events: none; }
.app-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #ead3cb; color: var(--wine); font: 500 11px var(--font-mono); }
.app-tabs { display: none; }
.app-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding: 26px 40px 30px; margin-top: 20px; }
.app-footer > span { font: 500 11px var(--font-sans); color: var(--muted); letter-spacing: -.02em; }
.app-action { position: fixed; z-index: 3; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; padding: 14px 24px 18px; background: linear-gradient(transparent, var(--paper) 24%); pointer-events: none; }
.app-toast, .cf-toast { position: fixed; z-index: 20; bottom: 88px; left: 50%; transform: translateX(-50%); background: var(--deep); color: #fff8f4; padding: 11px 16px; border-radius: 4px; font-size: 12px; white-space: nowrap; box-shadow: 0 8px 24px #541d2b40; }

/* Authentication */
.auth-shell { min-height: 100dvh; padding: 28px; display: grid; place-items: center; background: var(--bg-color); }
.auth-card { width: min(570px, 100%); min-height: min(680px, calc(100dvh - 56px)); display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 10px 36px #541d2b18; position: relative; overflow: hidden; }
.auth-card::after { content: ""; position: absolute; pointer-events: none; inset: 0; opacity: .065; background-image: radial-gradient(#b28b87 .45px, transparent .45px); background-size: 8px 8px; mix-blend-mode: multiply; }
.auth-top, .auth-content { position: relative; z-index: 1; }
.auth-top { padding: 25px 30px 0; }
.auth-content { width: min(410px, 100%); margin: auto; padding: 52px 36px 64px; }
.auth-title { color: var(--deep); font: 700 clamp(32px, 5vw, 44px)/1.12 var(--font-serif); letter-spacing: -.055em; margin: 0; }
.auth-copy { margin: 14px 0 30px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.auth-form { margin: 0; }
.auth-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.auth-field label { display: block; margin-bottom: 8px; color: var(--muted); font: 500 10px var(--font-mono); letter-spacing: .13em; text-transform: uppercase; }
.auth-field input { width: 100%; border: 0; border-bottom: 1px solid var(--wine); border-radius: 0; outline: 0; background: transparent; color: var(--deep); padding: 11px 0; font: 500 19px var(--font-sans); }
.auth-field--code input { font: 500 36px/1.1 var(--font-mono); letter-spacing: .14em; }
.auth-age-confirmation { display: flex; align-items: flex-start; gap: 10px; margin-top: 21px; color: var(--ink); font-size: 13px; line-height: 1.45; }
.auth-age-confirmation input { width: 18px; height: 18px; margin: 0; accent-color: var(--wine); flex: 0 0 auto; }
.auth-age-confirmation label { cursor: pointer; }
.auth-error { margin: 9px 0 0; color: var(--wine); font-size: 11px; line-height: 1.45; }
.auth-submit { width: 100%; min-height: 52px; margin-top: 27px; padding: 13px; border: 1px solid var(--wine); border-radius: 4px; background: var(--wine); color: #fff8f4; cursor: pointer; font: 600 13px var(--font-sans); }
.auth-submit:hover { background: var(--deep); }
.auth-note { margin: 21px 0 0; padding-left: 12px; border-left: 2px solid var(--wine); color: var(--muted); font-size: 11px; line-height: 1.5; }
.auth-resend { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 23px; padding-top: 17px; border-top: 1px solid var(--line); }
.auth-resend button { border: 0; padding: 8px 0; background: none; color: var(--wine); cursor: pointer; font: 600 12px var(--font-sans); text-decoration: underline; text-underline-offset: 3px; }
.auth-resend button:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }
.auth-resend p { margin: 0; color: var(--muted); font: 10px var(--font-mono); text-align: right; }

/* Profile */
.ep-main { max-width: 1060px; margin: auto; padding: 52px 7vw 105px; }
.ep-kicker, .share-kicker, .set-kicker { margin-bottom: 14px; }
.ep-saved-banner { margin: 0 0 20px; padding: 13px 15px; border-left: 2px solid var(--wine); background: var(--wash); color: var(--ink); font-size: 13px; line-height: 1.5; }
.ep-heading { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 28px; }
.ep-heading h1, .set-heading h1 { font: 400 clamp(31px, 4vw, 48px)/1.15 var(--font-serif); letter-spacing: -.055em; margin: 0; color: var(--ink); }
.ep-intro { color: var(--muted); font-size: 13px; line-height: 1.6; max-width: 370px; margin: 12px 0 0; }
.ep-profile-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.ep-person { font: 700 19px var(--font-serif); }
.ep-meta { color: var(--muted); font-size: 11px; margin-top: 5px; }
.ep-unit { font: 10px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.ep-list-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.ep-list-title { font: 700 18px var(--font-serif); margin: 0; }
.ep-count { font: 11px var(--font-mono); color: var(--muted); }
.ep-add-measurement { color: var(--wine); font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.ep-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 6vw; }
.ep-row { min-height: 78px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto 34px; gap: 12px; align-items: center; }
.ep-row--readonly { grid-template-columns: 1fr auto; }
.ep-edit-target { color: inherit; min-width: 0; text-decoration: none; }
.ep-edit-target:hover .ep-primary, .ep-edit-target:focus-visible .ep-primary { color: var(--wine); }
.ep-edit-target:focus-visible, .ep-history-link:focus-visible { outline: 3px solid #bb7890; outline-offset: 3px; }
.ep-name { font-size: 13px; }
.ep-date { display: block; color: var(--muted); font: 10px var(--font-mono); margin-top: 7px; }
.ep-value { text-align: right; }
.ep-primary { display: block; color: var(--deep); font: 500 19px var(--font-mono); letter-spacing: -.07em; }
.ep-alt { display: block; color: var(--muted); font: 10px var(--font-mono); margin-top: 4px; min-height: 12px; }
.ep-empty { color: var(--muted); }
.ep-edit { border: 0; background: none; color: #ae9797; padding: 8px 1px; cursor: pointer; line-height: 0; }
.ep-edit:hover { color: var(--wine); }
.ep-history-link { color: var(--wine); font: 500 10px var(--font-mono); text-decoration: underline; text-underline-offset: 3px; }
.ep-caution { color: #a27664; margin-left: 5px; font-size: 13px; }
.ep-show { border: 0; background: none; color: var(--wine); font-size: 12px; padding: 17px 0; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.ep-more > summary { list-style: none; }
.ep-more > summary::-webkit-details-marker { display: none; }
.ep-more[open] > summary .icon { transform: rotate(180deg); }
.ep-example-label { display: inline-block; margin-left: 7px; color: var(--wine); font: 500 9px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; vertical-align: middle; }
.ep-example-cta { width: 100%; min-height: 48px; margin-top: 28px; border: 1px solid var(--wine); background: var(--wine); color: #fff8f4; border-radius: 4px; font: 600 13px var(--font-sans); text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 9px; }
.ep-heading-status { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; }
.ep-completion { color: var(--muted); font: 11px var(--font-mono); }
.ep-finish { min-height: 42px; padding: 10px 16px; border: 1px solid var(--wine); border-radius: 4px; color: var(--wine); font-size: 12px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.ep-guest-banner { display: none; }
.ep-measure-link { display: block; margin-top: 5px; color: var(--wine); font-size: 11px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ep-bottom { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 17px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; line-height: 1.5; }
.ep-bottom b { color: var(--ink); font-weight: 500; }
.ep-share { pointer-events: auto; width: min(500px, 100%); min-height: 48px; border: 1px solid var(--wine); background: var(--wine); color: #fff8f4; border-radius: 4px; font: 600 13px var(--font-sans); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 9px; }
.ep-print-actions { display: flex; align-items: center; gap: 15px; margin: -8px 0 24px; }
.ep-print-actions p { max-width: 430px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.ep-print-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto; min-height: 42px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--wine); cursor: pointer; font: 600 12px var(--font-sans); }
.ep-print-button:hover { background: var(--wash); }
.profiles-main { max-width: 1060px; margin: auto; padding: 52px 7vw 105px; }
.profiles-kicker { color: var(--wine); font: 500 10px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 14px; }
.profiles-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.profiles-heading h1 { color: var(--ink); font: 400 clamp(31px, 4vw, 48px)/1.15 var(--font-serif); letter-spacing: -.055em; margin: 0; }
.profiles-heading p { max-width: 430px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.profiles-add { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 15px; border: 1px solid var(--wine); border-radius: 4px; color: var(--wine); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.profiles-status { margin-top: 20px; padding: 13px 15px; border-left: 2px solid var(--wine); background: var(--wash); color: var(--ink); font-size: 13px; line-height: 1.5; }
.profiles-list { border-top: 1px solid var(--line); margin-top: 28px; }
.profile-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 28px; min-height: 104px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.profile-card--active { border-left: 2px solid var(--wine); margin-left: -16px; padding-left: 14px; }
.profile-card-main { display: flex; min-width: 0; align-items: center; gap: 13px; }
.profile-card-avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #ead3cb; color: var(--wine); font: 500 12px var(--font-mono); }
.profile-card h2 { margin: 0; color: var(--ink); font: 700 17px var(--font-serif); }
.profile-card p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.profile-card-meta { display: grid; gap: 5px; color: var(--muted); font-size: 10px; text-align: right; white-space: nowrap; }
.profile-card-meta b { color: var(--ink); font-weight: 500; }
.profile-card-actions { display: flex; align-items: center; justify-content: end; gap: 13px; }
.profile-open, .profile-text-action { border: 0; background: none; color: var(--wine); font: 600 11px var(--font-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 8px 0; }
.profile-open { text-decoration: none; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; }
.profile-text-action--danger { color: var(--muted); }
.profile-dialog { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 18px; border: 0; background: transparent; color: var(--ink); }
.profile-dialog[open] { display: flex; align-items: center; justify-content: center; }
.profile-dialog::backdrop { background: #4a1d2b70; }
.profile-dialog-panel { width: min(480px, 100%); margin: 0; padding: 22px 24px 26px; background: var(--paper); box-shadow: 0 9px 30px #541d2b35; }
.profile-dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.profile-dialog-head .profiles-kicker { margin-bottom: 9px; }
.profile-dialog h2 { margin: 0; color: var(--ink); font: 700 19px var(--font-serif); }
.profile-dialog p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.profile-dialog input { width: 100%; margin-bottom: 23px; padding: 9px 0; border: 0; border-bottom: 1px solid var(--wine); border-radius: 0; outline: 0; background: transparent; color: var(--ink); font: 500 18px var(--font-sans); }
.profile-dialog-actions { display: flex; justify-content: end; gap: 11px; margin-top: 23px; }
.profile-cancel, .profile-confirm { min-height: 42px; padding: 9px 14px; border-radius: 4px; font: 600 12px var(--font-sans); cursor: pointer; }
.profile-cancel { border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.profile-confirm { border: 1px solid var(--wine); background: var(--wine); color: #fff8f4; }
.profile-confirm--danger { background: var(--deep); border-color: var(--deep); }
.measurement-addition-page { max-width: 1060px; margin: auto; padding: 52px 7vw 105px; }
.ma-main { max-width: 650px; }
.ma-back { display: inline-block; color: var(--wine); font-size: 12px; text-decoration: none; margin-bottom: 28px; }
.ma-back:hover, .ma-back:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.ma-heading { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.ma-heading h1, .ma-confirmation h1 { color: var(--ink); font: 400 clamp(31px, 4vw, 48px)/1.15 var(--font-serif); letter-spacing: -.055em; margin: 0; }
.ma-heading p, .ma-confirmation > p, .ma-custom > p, .ma-empty { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 12px 0 0; }
.ma-section { border-bottom: 1px solid var(--line); padding: 28px 0; }
.ma-section h2 { color: var(--ink); font: 700 18px var(--font-serif); margin: 0; }
.ma-options { border-top: 1px solid var(--line); margin-top: 16px; }
.ma-option { min-height: 58px; border-bottom: 1px solid var(--line); color: var(--ink); display: flex; align-items: center; justify-content: space-between; font-size: 13px; text-decoration: none; }
.ma-option:hover, .ma-option:focus-visible { color: var(--wine); }
.ma-custom { border-bottom: 0; }
.ma-form { margin-top: 21px; }
.ma-form label { display: block; color: var(--muted); font: 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 7px; }
.ma-form input { width: 100%; border: 0; border-bottom: 1px solid var(--wine); background: transparent; color: var(--ink); font-size: 16px; outline: 0; padding: 10px 0; }
.ma-submit { width: 100%; min-height: 48px; border: 1px solid var(--wine); border-radius: 4px; background: var(--wine); color: #fff8f4; cursor: pointer; font: 600 13px var(--font-sans); margin-top: 18px; }
.ma-error { color: var(--wine); font-size: 11px; margin: 7px 0 0; }
.ma-confirmation { max-width: 530px; }
.ma-confirmation > p { margin-bottom: 23px; }
.measurement-history-page { max-width: 1060px; margin: auto; padding: 52px 7vw 105px; }
.measurement-history { max-width: 560px; }
.measurement-history-back { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 28px; color: var(--wine); font-size: 12px; text-decoration: none; }
.measurement-history h1 { color: var(--ink); font: 400 clamp(31px, 4vw, 48px)/1.15 var(--font-serif); letter-spacing: -.055em; margin: 0; }
.measurement-history > p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 12px 0 25px; }
.measurement-history-list { border-top: 1px solid var(--line); list-style: none; margin: 0; padding: 0; }
.measurement-history-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; min-height: 70px; border-bottom: 1px solid var(--line); }
.measurement-history-list span { color: var(--deep); font: 500 19px var(--font-mono); letter-spacing: -.07em; }
.measurement-history-list time { color: var(--muted); font: 10px var(--font-mono); text-align: right; }

/* Dialogs and share composer */
.ep-dialog, .composer-dialog, .withdraw-dialog { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 18px; border: 0; background: transparent; color: var(--ink); }
.ep-dialog[open], .composer-dialog[open], .withdraw-dialog[open] { display: flex; align-items: center; justify-content: center; }
.ep-dialog::backdrop, .composer-dialog::backdrop, .withdraw-dialog::backdrop { background: #4a1d2b70; }
.ep-panel, .composer, .withdraw-panel { width: min(520px, 100%); background: var(--paper); padding: 20px 24px 28px; box-shadow: 0 9px 30px #541d2b35; }
.ep-panel-top, .composer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.ep-panel h2, .composer h2, .withdraw-panel h2 { font: 700 19px var(--font-serif); margin: 0; }
.ep-input { display: flex; align-items: center; border-bottom: 1px solid var(--wine); margin-bottom: 17px; }
.ep-input input { width: 100%; border: 0; outline: 0; background: transparent; font: 500 30px var(--font-mono); padding: 7px 0; color: var(--ink); }
.ep-input span { color: var(--muted); font: 14px var(--font-mono); }
.ep-save, .composer-submit { width: 100%; border: 0; background: var(--wine); color: #fff8f4; padding: 13px; font-weight: 600; cursor: pointer; border-radius: 4px; }
.composer { width: min(570px, 100%); padding: 25px 24px 28px; }
.composer-head { align-items: start; margin-bottom: 0; }
.composer-kicker { color: var(--wine); font: 500 10px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 13px; }
.composer-copy { font-size: 12px; line-height: 1.55; color: var(--muted); max-width: 380px; margin: 9px 0 20px; }
.field-label { display: block; color: var(--muted); font: 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 7px; }
.composer input, .composer select { width: 100%; border: 0; border-bottom: 1px solid var(--wine); background: transparent; color: var(--ink); padding: 9px 0; outline: 0; font: 14px var(--font-sans); margin-bottom: 19px; border-radius: 0; }
.composer-preview { background: var(--wash); border: 1px solid var(--line); padding: 13px 14px; margin: 1px 0 17px; font-size: 12px; line-height: 1.55; }
.composer-preview strong { display: block; font-weight: 600; color: var(--ink); }
.composer-preview code { display: block; color: var(--wine); font: 11px var(--font-mono); margin-top: 6px; word-break: break-all; }
.composer-submit { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; }
.composer-errors { margin: 0 0 17px; padding: 10px 12px; border-left: 2px solid var(--wine); background: var(--wash); color: var(--deep); font-size: 12px; line-height: 1.5; }
.composer-expiry-note { margin: -7px 0 19px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.composer-link, .composer-message { box-sizing: border-box; width: 100%; resize: vertical; border: 1px solid var(--wine); border-radius: 0; background: #fffdf9; color: var(--ink); font: 13px/1.55 var(--font-mono); }
.composer-link { min-height: 88px; padding: 12px; margin-bottom: 14px; }
.composer-message { min-height: 82px; padding: 11px 12px; margin-bottom: 18px; }
.composer-actions { display: flex; gap: 10px; margin-bottom: 19px; }
.composer-actions .composer-submit, .composer-actions .composer-secondary { flex: 1; }
.composer-secondary { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; box-sizing: border-box; border: 1px solid var(--wine); border-radius: 4px; background: transparent; color: var(--wine); font: 600 12px var(--font-sans); text-decoration: none; cursor: pointer; }
.composer-secondary:hover { background: var(--wash); }
.composer-confirmation { display: grid; gap: 6px; margin: 2px 0 20px; padding: 13px 14px; border: 1px solid var(--line); background: var(--wash); color: var(--muted); font-size: 12px; line-height: 1.5; }
.composer-confirmation strong { display: flex; align-items: center; gap: 7px; color: var(--ink); }
.composer-back { display: inline-block; color: var(--wine); font-size: 12px; text-decoration: none; }

/* Capture start */
.cs-main { position: relative; z-index: 1; padding: 48px 8vw 84px; }
.cs-crumb { font: 10px var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--wine); margin-bottom: 18px; }
.cs-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(350px, .8fr); gap: 9vw; align-items: start; }
.cs-h1 { font: 400 clamp(34px, 4vw, 55px)/1.16 var(--font-serif); letter-spacing: -.055em; max-width: 630px; margin: 0; }
.cs-lede { max-width: 490px; color: var(--muted); font-size: 15px; line-height: 1.65; margin: 20px 0 30px; }
.cs-meta { display: flex; align-items: center; gap: 16px; color: var(--muted); font: 11px var(--font-mono); border-top: 1px solid var(--line); padding-top: 15px; max-width: 490px; }
.cs-meta strong { color: var(--ink); font-weight: 500; }
.cs-count--mens, .cs-unit-name--cm { display: none; }
.cs-dot { width: 4px; height: 4px; background: var(--wine); border-radius: 50%; }
.cs-card { border: 1px solid var(--line); background: #fbf1eb; padding: 22px 22px 20px; }
.cs-card-label { font: 10px var(--font-mono); letter-spacing: .15em; text-transform: uppercase; color: var(--wine); margin-bottom: 15px; }
.cs-card h2 { font: 700 20px var(--font-serif); margin: 0 0 8px; }
.cs-card p { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 0; }
.cs-figure { height: 115px; margin: 21px 0 20px; background: #f4e2dc; position: relative; overflow: hidden; border: 1px solid #ecd2ca; }
.cs-body { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: 89px; height: 143px; border: 1px solid #b47f7a; border-radius: 44px 44px 15px 15px; border-bottom: 0; }
.cs-neck { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 25px; height: 26px; background: #f4e2dc; border-left: 1px solid #b47f7a; border-right: 1px solid #b47f7a; }
.cs-tape { position: absolute; left: 50%; top: 53px; transform: translateX(-50%) rotate(-3deg); width: 150px; height: 17px; border: 1px solid var(--wine); border-radius: 20px; background: #f8d9c9; color: var(--wine); font: 8px var(--font-mono); letter-spacing: .14em; text-align: center; line-height: 15px; }
.cs-card-note { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 11px; line-height: 1.5; }
.cs-card-note .icon { color: var(--wine); margin-top: 1px; }
.cs-section { border-top: 1px solid var(--line); margin-top: 43px; padding-top: 26px; max-width: 1030px; }
.cs-section-head { display: flex; justify-content: space-between; gap: 25px; align-items: baseline; }
.cs-section h2 { font: 700 19px var(--font-serif); margin: 0; }
.cs-section-intro { font-size: 11px; color: var(--muted); max-width: 340px; line-height: 1.5; }
.cs-assistance-options { display: grid; grid-template-columns: 1.35fr 1fr; gap: 12px; margin-top: 17px; }
.cs-assistance-option { border: 1px solid var(--line); background: var(--paper); text-align: left; padding: 18px; cursor: pointer; min-height: 118px; position: relative; color: var(--ink); }
.cs-assistance-option:hover { border-color: #b88686; }
.cs-assistance-option:has(.cs-assistance-input:checked) { border: 1.5px solid var(--wine); background: var(--wash); }
.cs-assistance-option:has(.cs-assistance-input:checked)::after { content: "✓"; position: absolute; right: 14px; top: 14px; color: var(--wine); font: 500 13px var(--font-mono); }
.cs-assistance-input { position: absolute; opacity: 0; pointer-events: none; }
.cs-assistance-option:has(.cs-assistance-input:focus-visible), .cs-toggle label:has(input:focus-visible), .set-toggle label:has(input:focus-visible) { outline: 3px solid #bb7890; outline-offset: 3px; }
.cs-assistance-icon { color: var(--wine); margin-bottom: 11px; }
.cs-assistance-option strong { display: block; font: 700 15px var(--font-serif); margin-bottom: 6px; }
.cs-assistance-option small { display: block; color: var(--muted); font-size: 11px; line-height: 1.45; max-width: 280px; }
.cs-unit { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 17px; max-width: 1030px; }
.cs-unit-label { font-size: 12px; }
.cs-unit-label span { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.cs-toggle, .set-toggle { display: flex; border: 1px solid var(--line); padding: 3px; background: var(--wash); border-radius: 4px; }
.cs-toggle label, .set-toggle label { cursor: pointer; }
.cs-toggle input, .set-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.cs-toggle span, .set-toggle span { display: block; color: var(--muted); font: 11px var(--font-mono); padding: 8px 15px; }
.cs-toggle label:has(input:checked) span, .set-toggle label:has(input:checked) span { background: var(--wine); color: #fff8f4; }
.cs-set { max-width: 1030px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; }
.cs-set strong { display: block; font-size: 12px; }
.cs-set > div > span { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.cs-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 1030px; }
.cs-start { border: 0; background: var(--wine); color: #fff8f4; border-radius: 4px; padding: 15px 21px; font-size: 13px; font-weight: 600; display: flex; gap: 10px; align-items: center; cursor: pointer; transition: transform .18s ease; }
.cs-start:hover { transform: translateY(-2px); }
.cs-account { color: var(--muted); font-size: 11px; }
.cs-account b { color: var(--ink); font-weight: 500; }
.cs-profile-section { margin-top: 43px; }
.cs-profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; max-width: 760px; }
.cs-profile-fields--single { grid-template-columns: 1fr; }
.cs-form-field label { display: block; color: var(--muted); font: 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 7px; }
.cs-form-field input { width: 100%; border: 0; border-bottom: 1px solid var(--wine); background: transparent; color: var(--ink); padding: 9px 0; outline: 0; font-size: 15px; border-radius: 0; }
.cs-child-profile { display: flex; align-items: flex-start; gap: 10px; max-width: 760px; margin-top: 18px; padding: 13px 14px; border: 1px solid var(--line); background: var(--wash); color: var(--ink); cursor: pointer; }
.cs-child-profile input { width: 18px; height: 18px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--wine); }
.cs-child-profile strong, .cs-child-profile small { display: block; }
.cs-child-profile strong { font-size: 12px; }
.cs-child-profile small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.cs-field-error { display: block; color: var(--wine); font-size: 10px; margin-top: 6px; }
.cs-resume { max-width: 1030px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 30px; padding: 15px 17px; border: 1px solid var(--line); background: var(--wash); }
.cs-resume strong, .cs-resume span { display: block; }
.cs-resume strong { font: 700 15px var(--font-serif); }
.cs-resume span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.cs-resume-link { color: var(--wine); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.capture-start:has(#profile_field_set_mens:checked) .cs-count--womens, .capture-start:has(#profile_unit_cm:checked) .cs-unit-name--in { display: none; }
.capture-start:has(#profile_field_set_mens:checked) .cs-count--mens, .capture-start:has(#profile_unit_cm:checked) .cs-unit-name--cm { display: inline; }

/* Capture flow */
.capture-flow-page { background: var(--bg-color); }
.cf-shell { min-height: 100dvh; background: var(--bg-color); color: var(--ink); display: flex; justify-content: center; padding-bottom: 24px; }
.cf-card { width: min(570px, 100%); min-height: 100dvh; background: var(--paper); position: relative; overflow: hidden; box-shadow: 0 0 36px rgba(118, 40, 61, .15); }
.cf-inner { --cf-edge-padding: 24px; position: relative; z-index: 1; padding: 28px var(--cf-edge-padding) 30px; min-height: calc(100dvh - 58px); display: flex; flex-direction: column; }
.cf-top { display: flex; justify-content: space-between; align-items: center; color: var(--wine); font-size: 12px; }
.cf-brand { display: flex; gap: 9px; align-items: center; color: var(--wine); font-weight: 600; letter-spacing: -.02em; text-decoration: none; }
.cf-mark { width: 27px; height: 27px; border-radius: 8px; background: var(--wine); color: #fff8f4; display: grid; place-items: center; font-size: 12px; }
.cf-top-actions { display: flex; align-items: center; gap: 5px; }
.cf-exit { min-height: 38px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.cf-exit { display: grid; width: 38px; place-items: center; padding: 5px; }
.cf-progress { display: flex; gap: 4px; margin: 35px 0 30px; }
.cf-progress i { height: 3px; flex: 1; background: var(--line); border-radius: 4px; }
.cf-progress i.on { background: var(--wine); }
.cf-kicker { font: 500 10px var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--wine); margin-bottom: 14px; }
.cf-title { font: 700 38px/1.06 var(--font-serif); letter-spacing: -.055em; margin: 0; max-width: 370px; color: var(--deep); }
.cf-sub { font-size: 15px; line-height: 1.58; color: var(--muted); max-width: 390px; margin: 13px 0 0; }
.cf-form { display: flex; flex: 1; flex-direction: column; }
.cf-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 30px 0 22px; }
.tape-diagram { width: clamp(190px, 23vw, 240px); max-width: 100%; aspect-ratio: 4 / 5; align-self: center; display: grid; place-items: center; flex: none; margin: 0 auto 22px; }
.tape-diagram__base, .tape-diagram > svg { grid-area: 1 / 1; display: block; width: 100%; height: 100%; }
.tape-diagram__base { object-fit: contain; }
.tape-diagram--placeholder { border: 1px solid var(--line); background: var(--paper); padding: 18px; text-align: center; }
.tape-diagram__label { color: var(--deep); font: 700 18px/1.2 var(--font-serif); }
.tape-diagram__status { margin-top: 7px; color: var(--muted); font: 500 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.cf-measure-label { font-size: 16px; color: var(--muted); margin-bottom: 10px; }
.cf-measure-label strong { color: var(--ink); font-weight: 600; }
.cf-instruction { max-width: 410px; margin: 0 0 10px; color: var(--ink); font-size: 16px; line-height: 1.55; }
.cf-guard { max-width: 410px; margin: 0 0 15px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.cf-input { display: flex; align-items: baseline; border-bottom: 2px solid var(--wine); width: 100%; max-width: 100%; }
.cf-input input { flex: 1; min-width: 0; font: 500 clamp(70px, 20vw, 92px)/1 var(--font-mono); letter-spacing: -.1em; color: var(--deep); background: none; border: 0; outline: 0; width: auto; padding: 10px 0 16px; }
.cf-input span { flex: 0 0 auto; font: 17px var(--font-mono); color: var(--muted); }
.cf-hint { margin-top: 22px; max-width: 340px; border-left: 2px solid var(--wine); padding: 1px 0 1px 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.cf-hint button { border: 0; background: none; padding: 0; color: var(--wine); font: 600 12px var(--font-sans); cursor: pointer; }
.cf-hint p { margin: 8px 0 0; }
.cf-hint--advisory { max-width: 410px; margin-top: 12px; padding: 10px 12px 11px 14px; background: var(--wash); font-size: 13px; }
.cf-hint--advisory p { color: var(--ink); margin: 0; }
.cf-advisory-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 10px; }
.cf-advisory-remeasure { text-decoration: underline; text-underline-offset: 3px; }
.cf-advisory-confirm { min-height: 34px; border: 1px solid var(--wine) !important; border-radius: 4px; padding: 7px 10px !important; background: var(--wine) !important; color: #fff8f4 !important; }
.cf-tape { width: 116px; height: 116px; border: 1px solid #d4b5b2; border-radius: 50%; align-self: flex-end; margin: 0 18px 22px 0; display: grid; place-items: center; color: var(--wine); transform: rotate(12deg); font: 700 11px/1.15 var(--font-serif); text-align: center; position: relative; }
.cf-tape::after { content: ""; position: absolute; width: 88px; height: 88px; border: 1px dashed #d4b5b2; border-radius: 50%; }
.cf-footer { position: sticky; z-index: 2; bottom: 0; border-top: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 9px; margin: 0 calc(var(--cf-edge-padding) * -1); padding: 13px var(--cf-edge-padding) calc(13px + env(safe-area-inset-bottom)); background: linear-gradient(var(--paper) 82%, color-mix(in srgb, var(--paper) 92%, transparent)); display: flex; }
.cf-secondary-actions { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 13px; }
.cf-btn { min-height: 50px; border-radius: 4px; cursor: pointer; font: 600 13px var(--font-sans); }
.cf-back { width: 44px; min-height: 44px; border: 1px solid var(--line); background: none; color: var(--wine); display: grid; place-items: center; text-decoration: none; }
.cf-back:disabled { opacity: .35; cursor: not-allowed; }
.cf-next { width: 100%; min-height: 58px; flex: none; border: 1px solid var(--wine); background: var(--wine); color: #fff8f4; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 15px; }
.cf-skip { min-height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; padding: 10px 7px; white-space: nowrap; }
.cf-error { color: var(--wine); font-size: 11px; line-height: 1.4; margin: 9px 0 0; }
.cf-toast { bottom: 30px; z-index: 24; }
.cf-complete { flex: 1; padding: 72px 0 50px; }
.cf-card--complete .cf-inner { min-height: 100dvh; }
.cf-check { width: 60px; height: 60px; background: var(--wine); color: #fff8f4; border-radius: 50%; display: grid; place-items: center; margin-bottom: 24px; }
.cf-complete .cf-title { max-width: 390px; }
.cf-summary { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 20px 0 24px; padding: 15px 0; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.cf-summary strong { color: var(--ink); font-weight: 600; display: block; margin-top: 5px; }
.cf-return-note { flex: 1; color: var(--muted); font-size: 11px; line-height: 1.45; padding: 7px 0; margin: 0; }
.cf-done-list { border-top: 1px solid var(--line); margin: 0 0 24px; padding-top: 17px; }
.cf-done-list h2 { font: 700 17px var(--font-serif); margin: 0; }
.cf-done-list p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 7px 0 12px; }
.cf-done-list div { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-done-list a { border: 1px solid var(--line); color: var(--wine); font-size: 11px; padding: 7px 9px; text-decoration: none; }
.cf-done-primary { width: 100%; text-decoration: none; }

/* Capture assistance introduction */
.cf-intro { justify-content: space-between; }
.cf-intro-content { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 430px; margin: auto; }
.cf-intro .cf-title { max-width: 430px; }
.cf-intro .cf-sub { margin-bottom: 0; }
.cf-intro-steps { display: grid; gap: 14px; margin: 31px 0 34px; padding: 0; list-style: none; counter-reset: helper-step; }
.cf-intro-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--ink); font-size: 14px; line-height: 1.5; }
.cf-intro-steps li::before { counter-increment: helper-step; content: counter(helper-step); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--wash); color: var(--wine); font: 500 11px var(--font-mono); }
.cf-intro-form { margin: 0; }
.cf-intro-primary { width: 100%; min-height: 58px; }

/* Sharing desk */
.share-content { max-width: 960px; margin: auto; padding: 54px 40px 74px; }
.share-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; border-bottom: 1px solid var(--line); padding-bottom: 29px; }
.share-title { font: 400 clamp(31px, 3.5vw, 46px)/1.13 var(--font-serif); letter-spacing: -.055em; margin: 0; }
.share-intro { color: var(--muted); font-size: 13px; line-height: 1.6; max-width: 440px; margin: 13px 0 0; }
.share-primary { border: 0; background: var(--wine); color: #fff8f4; border-radius: 4px; padding: 13px 16px; font-weight: 600; font-size: 12px; display: flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.share-primary:hover { background: var(--deep); }
.share-status { margin: 18px 0 0; color: var(--wine); font-size: 12px; }
.share-trust { display: grid; grid-template-columns: 1.25fr 1fr 1fr; border-bottom: 1px solid var(--line); padding: 22px 0 25px; margin-bottom: 35px; }
.trust-item { padding: 0 22px; border-left: 1px solid var(--line); font-size: 11px; line-height: 1.5; color: var(--muted); }
.trust-item:first-child { padding-left: 0; border-left: 0; }
.trust-item strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; font-size: 12px; }
.trust-item .icon { color: var(--wine); margin-right: 6px; }
.share-section-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 13px; }
.share-section-label h2 { font: 700 19px var(--font-serif); margin: 0; }
.share-count { font: 11px var(--font-mono); color: var(--muted); }
.grant-list { border-top: 1px solid var(--line); }
.grant { display: grid; grid-template-columns: 1.5fr 1fr auto; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.grant-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.grant-meta { color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 6px; }
.grant-meta span { margin-right: 17px; }
.grant-date { font: 10px var(--font-mono); color: var(--muted); line-height: 1.8; }
.grant-date b { display: block; color: var(--ink); font: 500 11px var(--font-sans); }
.grant-action { position: relative; text-align: right; }
.withdraw { border: 0; background: none; color: var(--muted); font-size: 11px; padding: 8px; cursor: pointer; }
.withdraw:hover { color: var(--wine); }
.more { display: none; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 8px 0; }
.grant-menu { position: absolute; right: 0; top: 35px; z-index: 4; min-width: max-content; padding: 6px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 8px 20px #541d2b18; }
.grant-menu button { border: 0; background: none; color: var(--wine); font-size: 11px; padding: 8px 12px; white-space: nowrap; cursor: pointer; }
.share-lower { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; margin-top: 48px; }
.export-card, .quiet-note { border: 1px solid var(--line); padding: 21px 22px; background: #fffaf6; }
.export-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.export-card h3, .quiet-note strong { font: 700 16px var(--font-serif); margin: 0 0 7px; }
.export-card p, .quiet-note { font-size: 11px; line-height: 1.55; color: var(--muted); margin: 0; }
.export-btn { border: 1px solid var(--wine); color: var(--wine); background: transparent; border-radius: 4px; padding: 10px 13px; font-size: 11px; display: flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; }
.export-btn:disabled { cursor: not-allowed; opacity: .55; }
.quiet-note { border-left: 2px solid var(--wine); background: transparent; }
.quiet-note strong { display: block; color: var(--ink); font-size: 14px; }
.grant-empty { margin-top: 16px; }
.grant-empty + .composer { margin: 20px auto 0; }
.withdraw-panel { width: min(430px, 100%); padding: 25px 24px 28px; }
.withdraw-panel p { font-size: 12px; color: var(--muted); line-height: 1.55; margin: 12px 0 20px; }
.withdraw-actions { display: flex; justify-content: flex-end; gap: 10px; }
.cancel, .confirm { border-radius: 4px; padding: 11px 14px; font-size: 11px; cursor: pointer; }
.cancel { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.confirm { border: 0; background: var(--wine); color: #fff8f4; }

/* Update notifications */
.notification-content { max-width: 760px; margin: auto; padding: 54px 40px 74px; }
.notification-back { display: inline-flex; align-items: center; gap: 7px; color: var(--wine); font-size: 12px; font-weight: 600; text-decoration: none; }
.notification-heading { margin-top: 27px; padding-bottom: 29px; border-bottom: 1px solid var(--line); }
.notification-kicker { margin-bottom: 14px; color: var(--wine); font: 500 10px var(--font-mono); letter-spacing: .2em; text-transform: uppercase; }
.notification-title { max-width: 570px; margin: 0; font: 400 clamp(31px, 4vw, 46px)/1.13 var(--font-serif); letter-spacing: -.055em; }
.notification-intro { max-width: 550px; margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.notification-list { margin-top: 32px; border-top: 1px solid var(--line); }
.notification-share { padding: 20px 0 22px; border-bottom: 1px solid var(--line); transition: opacity .15s ease; }
.notification-recipient { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.notification-recipient input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--wine); flex: 0 0 auto; }
.notification-recipient strong { display: block; color: var(--ink); font-size: 14px; }
.notification-recipient span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.notification-message { margin: 17px 0 0 30px; }
.notification-message label { display: block; margin-bottom: 8px; color: var(--muted); font: 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.notification-message textarea { width: 100%; min-height: 86px; resize: vertical; border: 1px solid var(--line); border-radius: 4px; background: #fffaf6; color: var(--ink); padding: 11px 12px; font: 12px/1.55 var(--font-sans); }
.notification-message textarea:focus { border-color: var(--wine); outline: 0; }
.notification-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 10px; }
.notification-actions button { min-height: 40px; border-radius: 4px; padding: 9px 12px; font-size: 11px; font-weight: 600; cursor: pointer; }
.notification-copy { border: 0; background: var(--wine); color: #fff8f4; }
.notification-share-action { border: 1px solid var(--wine); background: transparent; color: var(--wine); }
.notification-actions button:disabled { cursor: not-allowed; opacity: .45; }
.notification-share--unselected .notification-message { opacity: .45; }
.notification-footer { margin-top: 32px; }
.notification-not-now { display: inline-flex; align-items: center; min-height: 44px; color: var(--wine); font-size: 12px; font-weight: 600; }
.share-section-actions { display: flex; align-items: center; gap: 16px; }
.share-notify-link { color: var(--wine); font-size: 11px; font-weight: 600; text-decoration: none; }
.share-notify-link:hover { color: var(--deep); text-decoration: underline; }

/* Settings */
.set-main { max-width: 680px; margin: auto; padding: 52px 7vw 105px; }
.set-heading { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 28px; }
.set-group { margin-bottom: 38px; }
.set-group h2 { font: 700 18px var(--font-serif); margin: 0 0 16px; }
.set-field { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 20px; }
.set-field-label { display: block; color: var(--muted); font: 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 9px; }
.set-input { width: 100%; border: 0; border-bottom: 1px solid var(--wine); background: transparent; color: var(--ink); padding: 9px 0; outline: 0; font-size: 16px; border-radius: 0; }
.set-input:focus { border-bottom-width: 2px; }
.set-input--readonly { color: var(--muted); border-bottom-color: var(--line); }
.set-toggle { width: fit-content; }
.set-toggle span { font-size: 12px; padding: 9px 18px; border-radius: 2px; }
.set-hint { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.set-saved { color: var(--wine); font-size: 11px; border-left: 2px solid var(--wine); padding-left: 10px; margin-bottom: 28px; }
.set-error { color: var(--wine); font-size: 11px; margin-top: 8px; }
.set-submit, .set-phone-save { border: 0; border-radius: 4px; background: var(--wine); color: #fff8f4; padding: 11px 15px; margin-top: 15px; font-weight: 600; cursor: pointer; }
.set-phone-card { position: relative; padding: 24px; margin: 0 0 38px; border: 1px solid var(--line); background: var(--wash); }
.set-phone-card h2 { max-width: 560px; margin: 0; padding-right: 26px; font: 700 20px/1.35 var(--font-serif); }
.set-phone-card > p { max-width: 570px; margin: 12px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.set-phone-dismiss { position: absolute; top: 14px; right: 14px; }
.set-phone-form { max-width: 470px; }
.set-phone-actions { display: flex; align-items: center; gap: 15px; }
.set-phone-remove-form { margin-top: 13px; }
.set-phone-remove { border: 0; background: transparent; color: var(--wine); padding: 0; font-size: 11px; text-decoration: underline; cursor: pointer; }
.set-data-rights { padding-top: 4px; }
.set-link-list { padding: 0; margin: 18px 0 0; border-top: 1px solid var(--line); list-style: none; }
.set-link-list li { border-bottom: 1px solid var(--line); }
.set-link-list a { display: block; padding: 15px 0; color: var(--ink); font-size: 12px; text-decoration: none; }
.set-link-list a:hover { color: var(--wine); }
.set-link-list .set-danger-link { color: var(--wine); }
.set-coming-soon > p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.set-back-link { display: inline-block; margin-top: 22px; color: var(--wine); font-weight: 600; font-size: 12px; }

@media (min-width: 600px) {
  .cf-shell { padding: 28px; }
  .cf-card { border: 1px solid var(--line); }
  .cf-inner { --cf-edge-padding: 46px; padding: 34px var(--cf-edge-padding) 35px; }
}

@media (max-width: 767px) {
  html, body, .ms-home, .app-shell { background: var(--paper); }
  .auth-shell { padding: 0; align-items: stretch; }
  .auth-card { width: 100%; min-height: 100dvh; border: 0; box-shadow: none; }
  .auth-top { padding: 14px 24px 0; }
  .auth-content { width: 100%; margin: auto 0; padding: 33px 24px 48px; }
  .auth-title { font-size: 36px; }
  .auth-copy { margin: 11px 0 27px; font-size: 15px; }
  .auth-field label { margin-bottom: 9px; font-size: 12.5px; }
  .auth-field input { padding: 12px 0; font-size: 16px; }
  .auth-field--code input { font-size: 32px; }
  .auth-age-confirmation { margin-top: 22px; font-size: 14px; }
  .auth-error { font-size: 12.5px; }
  .auth-submit { min-height: 54px; margin-top: 26px; font-size: 16px; }
  .auth-note { margin-top: 20px; font-size: 12.5px; }
  .auth-resend { margin-top: 22px; padding-top: 15px; }
  .auth-resend button { min-height: 44px; font-size: 14px; }
  .auth-resend p { font-size: 11px; }

  .ms-nav { height: 59px; padding: 0 31px; }
  .ms-brand { gap: 12px; font-size: 15px; }
  .app-brand { font-size: 12px; }
  .ms-mark { width: 33px; height: 33px; border-radius: 9px; font-size: 15px; }
  .ms-nav-cta { display: none; }
  .ms-hero { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 35px 31px 0; min-height: auto; }
  .ms-home .ms-kicker { margin-bottom: 19px; font-size: 12.5px; }
  .ms-home h1 { font-size: 43px; }
  .ms-home .ms-lede { font-size: 15px; line-height: 1.6; margin: 23px 0 30px; }
  .ms-home .ms-actions { flex-direction: column; gap: 10px; }
  .ms-home .ms-primary, .ms-home .ms-secondary { width: 100%; font-size: 16px; }
  .ms-home .ms-primary { padding: 16px; }
  .ms-home .ms-primary .icon { width: 20px; height: 20px; }
  .ms-home .ms-secondary { padding: 15px; }
  .ms-home .ms-under { text-align: center; font-size: 12.5px; margin: 19px 0 30px; }
  .ms-home .ms-document { height: 330px; width: calc(100% + 62px); max-width: none; margin-left: -31px; }
  .ms-home .ms-document img { object-position: center top; }
  .ms-home .ms-section { padding: 29px 31px; }
  .ms-home .ms-section-head { margin-bottom: 16px; }
  .ms-home .ms-value-row { padding: 14px 0; font-size: 19px; }
  .ms-home .ms-value-row span { font-size: 12.5px; }
  .ms-home .ms-steps { display: block; }
  .ms-home .ms-step { padding: 25px 0; border-top-color: var(--line); }
  .ms-home .ms-step-num { margin-bottom: 15px; font-size: 12.5px; }
  .ms-home .ms-step h2 { font-size: 20px; }
  .ms-home .ms-step p { font-size: 14px; max-width: 350px; }
  .ms-home .ms-footer { justify-content: flex-end; padding: 24px 31px 26px; align-items: start; }
  .ms-home .ms-footer p { display: none; }
  .ms-home .ms-footer-links { gap: 20px; margin-left: auto; }
  .ms-home .ms-footer-links a { font-size: 14px; }

  .app-nav { height: 59px; padding: 0 22px; }
  .app-brand { gap: 12px; font-size: 15px; }
  .app-mark { width: 33px; height: 33px; font-size: 15px; border-radius: 9px; }
  .app-nav-right { gap: 12px; min-width: 0; }
  .app-nav-links { display: none; }
  .app-nav-cta { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
  .app-context-label { display: none; }
  .app-profile-badge { padding: 4px 7px 4px 5px; gap: 7px; font-size: 12.5px; }
  .app-switcher { max-width: 148px; padding: 4px 7px 4px 5px; gap: 7px; font-size: 12.5px; }
  .app-switcher select { max-width: 88px; font-size: 12.5px; }
  .app-profile-name { max-width: 82px; }
  .app-avatar { width: 26px; height: 26px; font-size: 11px; }
  .app-action, .app-footer { display: none; }
  .app-tabs { position: fixed; display: grid; grid-template-columns: repeat(2, minmax(120px, 180px)); justify-content: center; bottom: 0; left: 0; right: 0; height: calc(70px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255, 253, 249, .97); border-top: 1px solid var(--line); z-index: 4; }
  .app-tab { color: var(--muted); font-size: 12.5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-decoration: none; }
  .app-tab.active { color: var(--wine); font-weight: 600; }
  .app-toast { bottom: 82px; max-width: calc(100% - 30px); white-space: normal; text-align: center; }

  .ep-main { padding: 29px 22px 118px; }
  .ep-heading { padding-bottom: 21px; margin-bottom: 22px; }
  .ep-kicker { font-size: 12.5px; }
  .ep-heading h1 { font-size: 36px; }
  .ep-intro { font-size: 15px; line-height: 1.6; margin-top: 13px; }
  .ep-profile-meta { margin-bottom: 19px; align-items: end; }
  .ep-person { font-size: 20px; }
  .ep-meta { font-size: 14px; }
  .ep-unit { font-size: 12.5px; }
  .ep-list-title { font-size: 20px; }
  .ep-count { font-size: 12.5px; }
  .ep-grid { display: block; }
  .ep-row { min-height: 82px; }
  .measurement-history-page { padding: 29px 22px 118px; }
  .measurement-history-back { margin-bottom: 22px; font-size: 12.5px; }
  .measurement-history h1 { font-size: 31px; }
  .measurement-history > p { font-size: 12px; }
  .measurement-history-list li { min-height: 74px; }
  .measurement-history-list span { font-size: 17px; }
  .ep-name { font-size: 15px; }
  .ep-date { font-size: 12.5px; }
  .ep-primary { font-size: 19px; }
  .ep-alt { font-size: 12.5px; }
  .ep-show { font-size: 14px; }
  .ep-bottom { margin-top: 21px; }
  .ep-bottom { font-size: 12.5px; }
  .ep-example-label { font-size: 10px; }
  .ep-example-cta { min-height: 53px; font-size: 16px; }
  .ep-heading-status { align-items: stretch; flex-direction: column; gap: 13px; margin-top: 18px; }
  .ep-completion { font-size: 12.5px; }
  .ep-finish { width: 100%; min-height: 53px; font-size: 16px; }
  .ep-print-actions { align-items: stretch; flex-direction: column; gap: 10px; margin: -4px 0 21px; }
  .ep-print-actions p { max-width: none; font-size: 12px; }
  .ep-print-button { width: 100%; min-height: 48px; font-size: 14px; }
  .ep-guest-banner { display: block; margin: -6px 0 22px; padding: 14px 15px; border: 1px solid var(--line); background: var(--wash); color: var(--muted); font-size: 14px; line-height: 1.5; }
  .ep-measure-link { font-size: 12.5px; }
  .ep-add-measurement { font-size: 12.5px; }
  .profiles-main { padding: 29px 22px 118px; }
  .profiles-kicker { margin-bottom: 12px; font-size: 12.5px; }
  .profiles-heading { display: block; padding-bottom: 21px; }
  .profiles-heading h1 { font-size: 36px; }
  .profiles-heading p { margin-top: 13px; font-size: 15px; }
  .profiles-add { width: 100%; min-height: 53px; margin-top: 20px; font-size: 16px; }
  .profiles-status { margin-top: 18px; font-size: 14px; }
  .profiles-list { margin-top: 22px; }
  .profile-card { grid-template-columns: minmax(0, 1fr) auto; gap: 13px; min-height: 0; padding: 18px 0; }
  .profile-card--active { margin-left: -10px; padding-left: 8px; }
  .profile-card-avatar { width: 36px; height: 36px; font-size: 12px; }
  .profile-card h2 { font-size: 19px; }
  .profile-card p { font-size: 12.5px; }
  .profile-card-meta { grid-column: 1 / -1; grid-row: 2; display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; text-align: left; }
  .profile-card-actions { grid-column: 2; grid-row: 1; gap: 10px; }
  .profile-open, .profile-text-action { font-size: 12.5px; }
  .profile-dialog-panel { padding: 21px 22px 25px; }
  .profile-dialog h2 { font-size: 20px; }
  .profile-dialog p { font-size: 14px; }
  .profile-dialog input { font-size: 16px; }
  .profile-cancel, .profile-confirm { min-height: 48px; font-size: 14px; }
  .measurement-addition-page { padding: 29px 22px 118px; }
  .ma-back { margin-bottom: 22px; font-size: 12.5px; }
  .ma-heading { padding-bottom: 21px; }
  .ma-heading h1, .ma-confirmation h1 { font-size: 36px; }
  .ma-heading p, .ma-confirmation > p, .ma-custom > p, .ma-empty { font-size: 14px; }
  .ma-section { padding: 23px 0; }
  .ma-section h2 { font-size: 20px; }
  .ma-option { min-height: 62px; font-size: 15px; }
  .ma-form label, .ma-error { font-size: 12.5px; }
  .ma-form input { font-size: 16px; }
  .ma-submit { min-height: 53px; font-size: 16px; }
  .ep-panel, .composer, .withdraw-panel { padding: 20px 22px 25px; }

  .cs-main { padding: 28px 22px 94px; }
  .cs-crumb { font-size: 12.5px; margin-bottom: 17px; }
  .cs-layout { display: flex; flex-direction: column; gap: 29px; }
  .cs-h1 { font-size: 43px; line-height: 1.13; }
  .cs-lede { font-size: 15px; line-height: 1.6; margin: 20px 0 23px; }
  .cs-meta { font-size: 12.5px; gap: 11px; }
  .cs-card { padding: 20px; }
  .cs-card-label { font-size: 12.5px; }
  .cs-card h2 { font-size: 20px; }
  .cs-card p { font-size: 14px; }
  .cs-figure { height: 98px; margin: 16px 0; }
  .cs-body { top: 9px; transform: translateX(-50%) scale(.8); transform-origin: top center; }
  .cs-tape { top: 43px; width: 132px; height: 15px; line-height: 13px; }
  .cs-card-note { font-size: 12.5px; }
  .cs-section { margin-top: 29px; padding-top: 22px; }
  .cs-section-head { display: block; }
  .cs-section h2 { font-size: 20px; }
  .cs-section-intro { font-size: 14px; margin-top: 8px; }
  .cs-assistance-options { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
  .cs-assistance-option { width: 100%; min-height: 0; margin: 0; padding: 18px; display: grid; grid-template-columns: 24px minmax(0, 1fr); grid-template-areas: "icon title" "icon copy"; column-gap: 12px; row-gap: 6px; }
  .cs-assistance-icon { grid-area: icon; margin: 1px 0 0; }
  .cs-assistance-option strong { grid-area: title; font-size: 16px; margin: 0; padding-right: 22px; }
  .cs-assistance-option small { grid-area: copy; max-width: none; font-size: 14px; line-height: 1.5; }
  .cs-unit { margin-top: 20px; padding-top: 15px; }
  .cs-unit-label { font-size: 14px; }
  .cs-unit-label span { font-size: 12.5px; }
  .cs-toggle span, .set-toggle span { padding: 9px 14px; font-size: 14px; }
  .cs-set { display: block; margin-top: 16px; }
  .cs-set strong { font-size: 15px; }
  .cs-set > div > span { font-size: 12.5px; }
  .cs-set .set-toggle { display: inline-flex; margin-top: 11px; }
  .cs-bottom { display: block; margin-top: 26px; padding-top: 18px; }
  .cs-start { width: 100%; min-height: 53px; justify-content: center; font-size: 16px; }
  .cs-account { text-align: center; margin-top: 12px; font-size: 12.5px; }
  .cs-profile-section { margin-top: 29px; }
  .cs-profile-fields { display: block; margin-top: 14px; }
  .cs-form-field + .cs-form-field { margin-top: 16px; }
  .cs-form-field label { font-size: 12.5px; }
  .cs-form-field input { font-size: 16px; }
  .cs-child-profile { margin-top: 16px; padding: 14px; }
  .cs-child-profile strong { font-size: 14px; }
  .cs-child-profile small { font-size: 12.5px; }
  .cs-field-error { font-size: 12.5px; }
  .cs-resume { margin-top: 22px; padding: 14px; }
  .cs-resume strong { font-size: 16px; }
  .cs-resume span, .cs-resume-link { font-size: 14px; }

  .cf-inner { --cf-edge-padding: 24px; min-height: 100dvh; padding: 12px var(--cf-edge-padding) 14px; }
  .cf-top { font-size: 15px; }
  .cf-brand { gap: 12px; font-size: 15px; }
  .cf-mark { width: 33px; height: 33px; border-radius: 9px; font-size: 15px; }
  .cf-progress { margin: 4px 0 3px; }
  .cf-kicker { margin-bottom: 5px; font-size: 12.5px; }
  .cf-title { font-size: 36px; }
  .cf-sub { margin-top: 6px; font-size: 15px; line-height: 1.45; }
  .cf-card--additional .cf-title { font-size: 29px; }
  .cf-card--additional .cf-stage { padding-top: 0; }
  .cf-card--additional .tape-diagram { width: min(150px, calc(100vw - 48px)); margin-bottom: 4px; }
  .cf-input input { padding: 6px 0 10px; font-size: clamp(70px, 20vw, 82px); }
  .cf-input span { font-size: 16px; }
  .tape-diagram { width: min(190px, calc(100vw - 48px)); margin-bottom: 6px; }
  .cf-stage { justify-content: flex-start; padding: 2px 0 6px; }
  .cf-measure-label { margin-bottom: 5px; font-size: 16px; }
  .cf-instruction { margin-bottom: 5px; font-size: 15px; line-height: 1.42; }
  .cf-guard { margin-bottom: 6px; font-size: 14px; line-height: 1.4; }
  .cf-exit { min-height: 44px; }
  .cf-error { font-size: 12.5px; }
  .cf-hint, .cf-hint button { font-size: 12.5px; }
  .cf-hint--advisory { margin-top: 8px; padding: 8px 10px 9px 12px; font-size: 12.5px; line-height: 1.4; }
  .cf-advisory-actions { gap: 10px; margin-top: 7px; }
  .cf-advisory-confirm { min-height: 36px; padding: 7px 10px !important; font-size: 12.5px !important; }
  .cf-form { padding-bottom: 128px; }
  .cf-footer { gap: 8px; }
  .cf-btn, .cf-next { font-size: 16px; }
  .cf-next { min-height: 56px; }
  .cf-skip { font-size: 14px; }
  .cf-intro-content { justify-content: center; }
  .cf-intro .cf-title { font-size: 36px; }
  .cf-intro .cf-sub { font-size: 15px; }
  .cf-intro-steps { gap: 12px; margin: 26px 0 29px; }
  .cf-intro-steps li { font-size: 15px; }
  .cf-summary { font-size: 14px; }
  .cf-done-list h2 { font-size: 20px; }
  .cf-done-list p, .cf-done-list a { font-size: 14px; }

  @media (max-width: 599px) {
    .capture-flow-page .cf-footer { position: fixed; right: 0; bottom: 0; left: 0; width: 100%; }
  }

  .share-content { padding: 28px 22px 94px; }
  .share-heading { display: block; padding-bottom: 23px; }
  .share-kicker { font-size: 12.5px; }
  .share-title { font-size: 36px; }
  .share-intro { font-size: 15px; line-height: 1.6; margin-top: 12px; }
  .share-primary { width: 100%; min-height: 53px; justify-content: center; margin-top: 20px; padding: 13px; font-size: 16px; }
  .share-status { margin-top: 14px; font-size: 14px; }
  .share-trust { display: block; padding: 0; margin: 0 0 30px; }
  .trust-item { padding: 16px 0; border-left: 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.5; }
  .trust-item strong { font-size: 15px; }
  .share-section-label h2 { font-size: 20px; }
  .share-section-label { align-items: flex-end; gap: 14px; }
  .share-section-actions { align-items: flex-end; flex-direction: column-reverse; gap: 5px; text-align: right; }
  .share-notify-link { font-size: 12.5px; }
  .share-count { font-size: 12.5px; }
  .grant { grid-template-columns: 1fr auto; gap: 9px; padding: 17px 0; }
  .grant-name { font-size: 15px; line-height: 1.4; }
  .grant-meta { font-size: 12.5px; line-height: 1.7; margin-top: 4px; }
  .grant-meta span { display: block; margin: 0; }
  .grant-date { grid-column: 1 / 2; font-size: 12.5px; line-height: 1.6; }
  .grant-date b { font-size: 12.5px; }
  .grant-action { grid-column: 2 / 3; grid-row: 1 / 3; }
  .withdraw { display: none; }
  .more { display: flex; align-items: center; justify-content: center; }
  .grant-menu { top: 32px; }
  .share-lower { display: block; margin-top: 34px; }
  .export-card { display: block; padding: 18px; }
  .export-card h3, .quiet-note strong { font-size: 20px; }
  .export-card p, .quiet-note { font-size: 14px; }
  .export-btn { margin-top: 16px; width: 100%; justify-content: center; }
  .quiet-note { margin-top: 15px; padding: 17px 15px; }

  .notification-content { padding: 29px 22px 118px; }
  .notification-back { min-height: 44px; font-size: 14px; }
  .notification-heading { margin-top: 18px; padding-bottom: 22px; }
  .notification-kicker { margin-bottom: 12px; font-size: 12.5px; }
  .notification-title { font-size: 36px; }
  .notification-intro { margin-top: 13px; font-size: 15px; }
  .notification-list { margin-top: 26px; }
  .notification-share { padding: 18px 0 20px; }
  .notification-recipient { gap: 11px; }
  .notification-recipient input { width: 22px; height: 22px; }
  .notification-recipient strong { font-size: 16px; }
  .notification-recipient span { margin-top: 4px; font-size: 12.5px; line-height: 1.5; }
  .notification-message { margin: 17px 0 0 33px; }
  .notification-message label { font-size: 11px; }
  .notification-message textarea { min-height: 104px; padding: 13px; font-size: 14px; }
  .notification-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .notification-actions button { min-height: 48px; padding: 11px; font-size: 14px; }
  .notification-footer { margin-top: 25px; }
  .notification-not-now { min-height: 48px; font-size: 14px; }

  .set-main { padding: 29px 22px 118px; }
  .set-heading { padding-bottom: 21px; margin-bottom: 22px; }
  .set-kicker { font-size: 12.5px; }
  .set-heading h1 { font-size: 36px; }
  .set-group h2 { font-size: 20px; }
  .set-field-label { font-size: 12.5px; }
  .set-input { font-size: 16px; }
  .set-toggle span { min-height: 44px; font-size: 16px; }
  .set-hint { font-size: 14px; }
  .set-saved { font-size: 12.5px; }
  .set-phone-card { padding: 21px 18px; margin-bottom: 34px; }
  .set-phone-card h2 { font-size: 20px; }
  .set-phone-card > p, .set-link-list a { font-size: 14px; }
  .set-phone-save { width: 100%; min-height: 50px; font-size: 15px; }
  .set-phone-remove { min-height: 44px; font-size: 13px; }
}

@media (max-width: 599px) and (max-height: 720px) {
  .capture-flow-page .cf-title { font-size: 32px; }
  .capture-flow-page .cf-form { padding-bottom: 0; }
  .capture-flow-page .cf-footer { position: static; }
}

/* The desktop presentation deliberately carries the generous visual density
   of the approved prototype capture at normal browser zoom. Viewport-relative
   spacing remains fluid; fixed design dimensions are enlarged explicitly. */
@media (min-width: 1024px) {
  .ms-wrap, .app-paper { max-width: 1600px; }

  .ms-nav, .app-nav {
    height: 86px;
    padding-left: 4vw;
    padding-right: 5vw;
  }
  .ms-brand, .app-brand { gap: 12px; font-size: 20px; }
  .ms-mark, .app-mark { width: 40px; height: 40px; border-radius: 11px; font-size: 17px; }
  .ms-nav-cta { font-size: 15px; }

  .ms-hero {
    grid-template-columns: 1fr .8fr;
    gap: 7vw;
    min-height: 676px;
    padding: 103px 8vw;
  }
  .ms-home h1 {
    max-width: 520px;
    font-size: clamp(44px, 4.4vw, 76px);
  }
  .ms-lede {
    max-width: 644px;
    margin: 28px 0 34px;
    font-size: 18.75px;
  }
  .ms-actions { gap: 10px; }
  .ms-primary {
    gap: 12px;
    padding: 19px 28.5px;
    font-size: 16px;
  }
  .ms-primary .icon { width: 20px; height: 20px; }
  .ms-secondary { padding: 18px 25px; font-size: 16px; }
  .ms-under { margin-top: 21px; font-size: 13.75px; }
  .ms-document { width: calc(100% - 8px); height: 413px; max-width: 625px; margin-left: -5px; margin-right: auto; }
  .ms-section { padding: 98px 10vw; }
  .ms-section-head { max-width: 713px; margin-bottom: 44px; }
  .ms-section .ms-kicker { font-size: 12.5px; }
  .ms-values { max-width: 875px; }
  .ms-value-row { padding: 17px 0; font-size: 20px; }
  .ms-value-row span { font-size: 15px; }
  .ms-steps { max-width: 1188px; gap: 28px; }
  .ms-step { padding: 31px 31px 34px; }
  .ms-step-num { margin-bottom: 24px; font-size: 13px; }
  .ms-step h2 { margin-bottom: 12px; font-size: 22px; }
  .ms-step p { font-size: 16px; }
  .ms-footer { padding: 46px 4vw 55px; }
  .ms-footer p { font-size: 14px; }
  .ms-footer-links { gap: 28px; }
  .ms-footer-links a { font-size: 14px; }

  .app-nav-right { gap: 35px; }
  .app-nav-links { gap: 35px; font-size: 15px; }
  .app-switcher { gap: 11px; padding: 9px 13px; font-size: 15px; }
  .app-avatar { width: 33px; height: 33px; font-size: 13px; }
  .app-footer { padding: 33px 50px 38px; margin-top: 25px; }
  .app-footer > span, .app-footer-links a { font-size: 13.75px; }
  .app-footer-links { gap: 28px; }
  .app-action { padding: 18px 30px 23px; }
  .app-toast, .cf-toast {
    padding: 14px 20px;
    border-radius: 5px;
    font-size: 15px;
  }
  .app-toast { bottom: 110px; }

  .auth-shell { padding: 44px; }
  .auth-card { width: min(713px, 100%); min-height: min(850px, calc(100dvh - 88px)); }
  .auth-top { padding: 38px 48px 0; }
  .auth-content { width: min(513px, 100%); padding: 65px 48px 75px; }
  .auth-title { font-size: 52px; }
  .auth-copy { margin: 18px 0 38px; font-size: 16px; }
  .auth-field label { margin-bottom: 10px; font-size: 12.5px; }
  .auth-field input { padding: 14px 0; font-size: 20px; }
  .auth-field--code input { font-size: 45px; }
  .auth-age-confirmation { margin-top: 26px; font-size: 16px; }
  .auth-age-confirmation input { width: 21px; height: 21px; }
  .auth-error { font-size: 13px; }
  .auth-submit { min-height: 60px; margin-top: 34px; font-size: 16px; }
  .auth-note { margin-top: 25px; font-size: 13px; }
  .auth-resend { margin-top: 29px; padding-top: 22px; }
  .auth-resend button { font-size: 15px; }
  .auth-resend p { font-size: 12.5px; }

  .ep-main { max-width: 1325px; padding: 65px 7vw 131px; }
  .ep-kicker, .share-kicker, .set-kicker { margin-bottom: 17px; font-size: 12.5px; }
  .ep-heading, .set-heading { padding-bottom: 30px; margin-bottom: 35px; }
  .ep-heading h1, .set-heading h1 { font-size: clamp(39px, 4vw, 60px); }
  .ep-intro { max-width: 463px; margin-top: 15px; font-size: 16px; }
  .ep-profile-meta { margin-bottom: 30px; }
  .ep-person { font-size: 24px; }
  .ep-meta { margin-top: 6px; font-size: 14px; }
  .ep-unit { font-size: 12.5px; }
  .ep-list-head { margin-bottom: 5px; }
  .ep-list-title { font-size: 22px; }
  .ep-count { font-size: 13.75px; }
  .ep-row { min-height: 98px; grid-template-columns: 1fr auto 34px; gap: 15px; }
  .ep-name { font-size: 16px; }
  .ep-date { margin-top: 9px; font-size: 12.5px; }
  .ep-primary { font-size: 24px; }
  .ep-alt { min-height: 15px; margin-top: 5px; font-size: 12.5px; }
  .ep-edit { padding: 10px 1px; }
  .ep-edit .icon { width: 18px; height: 18px; }
  .ep-caution { width: 16px; height: 16px; margin-left: 6px; }
  .ep-show { gap: 8px; padding: 21px 0; font-size: 15px; }
  .ep-bottom { margin-top: 38px; padding-top: 21px; font-size: 12.5px; }
  .ep-share { width: min(625px, 100%); min-height: 60px; gap: 11px; font-size: 16px; }
  .measurement-addition-page { max-width: 1325px; padding: 65px 7vw 131px; }
  .ma-main { max-width: 813px; }
  .ma-back { margin-bottom: 35px; font-size: 15px; }
  .ma-heading { padding-bottom: 30px; }
  .ma-heading h1, .ma-confirmation h1 { font-size: clamp(39px, 4vw, 60px); }
  .ma-heading p, .ma-confirmation > p, .ma-custom > p, .ma-empty { font-size: 16px; }
  .ma-section { padding: 35px 0; }
  .ma-section h2 { font-size: 23px; }
  .ma-options { margin-top: 20px; }
  .ma-option { min-height: 73px; font-size: 16px; }
  .ma-form { margin-top: 26px; }
  .ma-form label, .ma-error { font-size: 12.5px; }
  .ma-form input { font-size: 18px; padding: 12px 0; }
  .ma-submit { min-height: 60px; margin-top: 23px; font-size: 16px; }

  .ep-panel, .composer, .withdraw-panel { padding: 25px 30px 35px; }
  .ep-panel { width: min(650px, 100%); }
  .composer { width: min(713px, 100%); padding-top: 31px; }
  .withdraw-panel { width: min(538px, 100%); padding-top: 31px; }
  .ep-panel-top { margin-bottom: 23px; }
  .ep-panel h2, .composer h2, .withdraw-panel h2 { font-size: 24px; }
  .ep-input { margin-bottom: 21px; }
  .ep-input input { padding: 9px 0; font-size: 38px; }
  .ep-input span { font-size: 17.5px; }
  .ep-save, .composer-submit { padding: 16px; font-size: 15px; }
  .composer-kicker { margin-bottom: 16px; font-size: 12.5px; }
  .composer-copy { max-width: 475px; margin: 11px 0 25px; font-size: 15px; }
  .field-label { margin-bottom: 9px; font-size: 12.5px; }
  .composer input, .composer select { padding: 11px 0; margin-bottom: 24px; font-size: 17.5px; }
  .composer-preview { padding: 16px 18px; margin-bottom: 21px; font-size: 15px; }
  .composer-preview code { margin-top: 8px; font-size: 13.75px; }
  .composer-errors, .composer-confirmation { font-size: 15px; }
  .composer-expiry-note, .composer-back { font-size: 13.75px; }
  .composer-link, .composer-message { font-size: 15px; }
  .composer-secondary { min-height: 52px; font-size: 15px; }

  .cs-main { padding: 60px 8vw 105px; }
  .cs-crumb { margin-bottom: 23px; font-size: 12.5px; }
  .cs-layout { grid-template-columns: minmax(0, 1.1fr) minmax(438px, .8fr); }
  .cs-h1 { max-width: 788px; font-size: clamp(42px, 4vw, 69px); }
  .cs-lede { max-width: 613px; margin: 25px 0 38px; font-size: 18.75px; }
  .cs-meta { gap: 20px; max-width: 613px; padding-top: 19px; font-size: 13.75px; }
  .cs-dot { width: 5px; height: 5px; }
  .cs-card { padding: 28px 28px 25px; }
  .cs-card-label { margin-bottom: 19px; font-size: 12.5px; }
  .cs-card h2 { margin-bottom: 10px; font-size: 25px; }
  .cs-card p { font-size: 15px; }
  .cs-figure { height: 144px; margin: 26px 0 25px; }
  .cs-body { top: 15px; width: 111px; height: 179px; border-radius: 55px 55px 19px 19px; }
  .cs-neck { width: 31px; height: 33px; }
  .cs-tape { top: 66px; width: 188px; height: 21px; font-size: 10px; line-height: 19px; }
  .cs-card-note { gap: 13px; font-size: 13.75px; }
  .cs-card-note .icon { width: 18px; height: 18px; }
  .cs-section { max-width: 1288px; margin-top: 54px; padding-top: 33px; }
  .cs-section-head { gap: 31px; }
  .cs-section h2 { font-size: 24px; }
  .cs-section-intro { max-width: 425px; font-size: 13.75px; }
  .cs-assistance-options { gap: 15px; margin-top: 21px; }
  .cs-assistance-option { min-height: 148px; padding: 23px; }
  .cs-assistance-option:has(.cs-assistance-input:checked)::after { right: 18px; top: 18px; font-size: 16px; }
  .cs-assistance-icon { width: 24px; height: 24px; margin-bottom: 14px; }
  .cs-assistance-option strong { margin-bottom: 8px; font-size: 19px; }
  .cs-assistance-option small { max-width: 350px; font-size: 13.75px; }
  .cs-unit { max-width: 1288px; margin-top: 30px; padding-top: 21px; }
  .cs-unit-label { font-size: 15px; }
  .cs-unit-label span { margin-top: 5px; font-size: 12.5px; }
  .cs-toggle, .set-toggle { padding: 4px; }
  .cs-toggle button { padding: 10px 19px; font-size: 13.75px; }
  .cs-bottom { max-width: 1288px; margin-top: 43px; padding-top: 28px; }
  .cs-start { gap: 13px; padding: 19px 26px; font-size: 16px; }
  .cs-account { font-size: 13.75px; }

  .cf-shell { padding: 35px 35px 30px; }
  .cf-card { width: min(713px, 100%); }
  .cf-inner { --cf-edge-padding: 58px; min-height: calc(100dvh - 73px); padding: 43px var(--cf-edge-padding) 44px; }
  .cf-top { font-size: 15px; }
  .cf-brand { gap: 11px; }
  .cf-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }
  .cf-progress { gap: 5px; margin: 44px 0 38px; }
  .cf-progress i { height: 4px; }
  .cf-kicker { margin-bottom: 18px; font-size: 12.5px; }
  .cf-title { max-width: 463px; font-size: 47.5px; }
  .cf-measure-label { margin-bottom: 10px; font-size: 16px; }
  .cf-hint { max-width: 425px; margin-top: 28px; padding-left: 18px; font-size: 15px; }
  .cf-hint button { font-size: 15px; }
  .cf-hint--advisory { max-width: 410px; margin-top: 12px; font-size: 13px; }
  .cf-tape { width: 145px; height: 145px; margin: 0 23px 28px 0; font-size: 13.75px; }
  .cf-tape::after { width: 110px; height: 110px; }
  .cf-check { width: 75px; height: 75px; margin-bottom: 30px; }
  .cf-complete .cf-stage { padding: 90px 0 63px; }
  .cf-complete .cf-title { max-width: 488px; }
  .cf-summary { margin: 25px 0 30px; padding: 19px 0; font-size: 15px; }
  .cf-return-note { padding: 9px 0; font-size: 13.75px; }

  .share-content { max-width: 1200px; padding: 68px 50px 93px; }
  .share-heading { gap: 38px; padding-bottom: 36px; }
  .share-title { font-size: clamp(39px, 3.5vw, 57.5px); }
  .share-intro { max-width: 550px; margin-top: 16px; font-size: 16px; }
  .share-primary { gap: 10px; padding: 16px 20px; font-size: 15px; }
  .share-trust { padding: 28px 0 31px; margin-bottom: 44px; }
  .trust-item { padding: 0 28px; font-size: 13.75px; }
  .trust-item strong { margin-bottom: 5px; font-size: 15px; }
  .share-section-label { margin-bottom: 16px; }
  .share-section-label h2 { font-size: 24px; }
  .share-count { font-size: 13.75px; }
  .grant { gap: 30px; padding: 25px 0; }
  .grant-name { font-size: 17.5px; }
  .grant-meta { margin-top: 8px; font-size: 13.75px; }
  .grant-meta span { margin-right: 21px; }
  .grant-date { font-size: 12.5px; }
  .grant-date b, .withdraw { font-size: 13.75px; }
  .withdraw { padding: 10px; }
  .grant-menu { top: 44px; padding: 8px; }
  .grant-menu button { padding: 10px 15px; font-size: 13.75px; }
  .share-lower { gap: 30px; margin-top: 60px; }
  .export-card, .quiet-note { padding: 26px 28px; }
  .export-card { gap: 23px; }
  .export-card h3, .quiet-note strong { margin-bottom: 9px; font-size: 20px; }
  .export-card p, .quiet-note { font-size: 13.75px; }
  .export-btn { gap: 9px; padding: 13px 16px; font-size: 13.75px; }
  .withdraw-panel p { margin: 15px 0 25px; font-size: 15px; }
  .withdraw-actions { gap: 13px; }
  .cancel, .confirm { padding: 14px 18px; font-size: 13.75px; }

  .set-main { max-width: 850px; padding: 65px 7vw 131px; }
  .set-group { margin-bottom: 48px; }
  .set-group h2 { margin-bottom: 20px; font-size: 22.5px; }
  .set-field { padding-bottom: 25px; margin-bottom: 25px; }
  .set-field-label { margin-bottom: 11px; font-size: 12.5px; }
  .set-input { padding: 11px 0; font-size: 20px; }
  .set-toggle span { padding: 11px 23px; font-size: 15px; }
  .set-hint { margin-top: 15px; font-size: 15px; }
  .set-saved { padding-left: 13px; font-size: 13.75px; }
  .set-error { font-size: 13.75px; }
  .set-phone-card { padding: 30px; margin-bottom: 48px; }
  .set-phone-card h2 { font-size: 25px; }
  .set-phone-card > p, .set-link-list a { font-size: 15px; }
  .set-phone-save { padding: 14px 18px; font-size: 13.75px; }
  .set-phone-remove { font-size: 13.75px; }

}

@media (min-width: 768px) and (max-width: 1023px) {
  .ms-wrap, .app-paper { max-width: none; }
  .ms-hero { grid-template-columns: 1fr .75fr; gap: 5vw; padding-inline: 8vw; }
  .ms-actions { width: max-content; flex-direction: column; }
  .ms-primary, .ms-secondary { width: 100%; }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .ms-actions { width: 290px; flex-direction: column; }
  .ms-primary, .ms-secondary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  @page { margin: 13mm 13mm 28mm; }
  html, body, .app-shell, .app-paper { min-height: 0; background: #fff !important; color: #000; }
  .app-paper { max-width: none; overflow: visible; }
  .app-paper::after { display: none; }
  .app-nav, .app-footer, .app-tabs, .app-action, .ep-kicker, .ep-heading, .ep-print-actions, .ep-guest-banner, .ep-profile-meta, .ep-list-head, .ep-bottom { display: none !important; }
  .print-only { display: block !important; }
  .ep-main { max-width: none; padding: 0; }
  .ep-print-header { display: flex !important; align-items: end; justify-content: space-between; gap: 18px; margin: 0 0 5mm; padding: 0 0 3mm; border-bottom: 1px solid #000; }
  .ep-print-kicker { margin-bottom: 1.5mm; font: 9px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
  .ep-print-header h1 { margin: 0; color: #000; font: 700 18px/1.2 var(--font-serif); }
  .ep-print-date { margin-top: 1.5mm; font: 9px/1.4 var(--font-sans); text-align: right; white-space: nowrap; }
  .ep-grid, details.ep-more:not([open]) > .ep-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8mm; }
  details.ep-more { display: block; }
  .ep-more > summary { display: none; }
  .ep-row { min-height: 13mm; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; border-color: #000; break-inside: avoid; page-break-inside: avoid; }
  .ep-edit-target { color: #000; text-decoration: none; }
  .ep-name, .ep-primary, .ep-alt, .ep-date, .ep-empty, .ep-caution { color: #000; }
  .ep-name { font-size: 11px; }
  .ep-date { margin-top: 1px; font-size: 8px; }
  .ep-primary { font-size: 16px; }
  .ep-alt { margin-top: 1px; font-size: 8px; }
  .ep-edit, .ep-history-link, .ep-measure-link { display: none !important; }
  .ep-print-footer { position: fixed; left: 0; right: 0; bottom: -20mm; padding-top: 2mm; border-top: 1px solid #000; color: #000; font: 8px/1.35 var(--font-sans); }
}
