/* Dr. Ben Rabara — Patient education guides.
   Readable type, clear condition names, and direct access to every guide.
   Shared tokens and components also support the long-form guides. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/pjs-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/pjs-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


@font-face { font-family: "DM Serif Display"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/dm-serif-display.ttf") format("truetype"); }
@font-face { font-family: "DM Serif Display"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/dm-serif-display-italic.ttf") format("truetype"); }
:root {
  --bg-base: #f5f2ea;
  --surface: #fffdf8;
  --surface-solid: #fffdf8;
  --surface-raised: #ffffff;
  --surface-inset: #ece9df;
  --hairline: #d9ddd2;
  --border: #d9ddd2;
  --border-strong: #758779;
  --text: #233e34;
  --text-muted: #58675e;
  --text-faint: #636d63;
  --accent: #285b45;
  --accent-hover: #193f30;
  --accent-ink: #285b45;
  --accent-soft: #e5ecdf;
  --accent-grad: linear-gradient(135deg, #285b45, #58755d);
  --accent-grad-strong: linear-gradient(#285b45, #285b45);
  --on-accent: #fffdf8;
  --chip-bg: #fffdf8;
  --pill-bg: #e5ecdf;
  --cover-bg: #e8ecdd;
  --cover-ink: #456749;
  --warm: #a25137;
  --warm-soft: #f2e7d9;
  --danger: #aa322b;
  --danger-soft: #fce7e0;
  --success: #285b45;
  --success-soft: #e5ecdf;
  color-scheme: light;
  --display: "DM Serif Display", Georgia, serif;
  --sans: "Plus Jakarta Sans", sans-serif;
  --r-card: 20px; --r-md: 12px; --r-sm: 8px; --r-pill: 999px;
  --shadow-sm: 0 2px 5px #12291b05;
  --shadow-card: 0 6px 18px #12291b06;
  --shadow-lifted: 0 15px 36px #12291b15;
  --shadow-sheet: 0 -12px 50px #0003;
  --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-spring: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: 140ms; --dur: 220ms; --dur-slow: 400ms;
  --shell: 1080px; --pad: 24px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  /* Shared interaction and layout contracts for later UI modules. */
  --focus-ring: 3px solid var(--accent);
  --focus-offset: 4px;
  --touch-target: 44px;
  --content-measure: 72ch;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
    --bg-base: #152822;
    --surface: #1d342a;
    --surface-solid: #1d342a;
    --surface-raised: #294335;
    --surface-inset: #294335;
    --hairline: #3b5143;
    --border: #3b5143;
    --border-strong: #75866e;
    --text: #f1efe2;
    --text-muted: #c0ccbc;
    --text-faint: #b1beab;
    --accent: #c4d9ad;
    --accent-hover: #dfedc9;
    --accent-ink: #d0dfbd;
    --accent-soft: #314735;
    --accent-grad: linear-gradient(135deg, #c4d9ad, #94b38a);
    --accent-grad-strong: linear-gradient(#c4d9ad, #c4d9ad);
    --on-accent: #152822;
    --chip-bg: #1d342a;
    --pill-bg: #314735;
    --cover-bg: #354b39;
    --cover-ink: #d0dcbb;
    --warm: #e5b08d;
    --warm-soft: #3b392d;
    --danger: #ffc3b9;
    --danger-soft: #552e2a;
    --success: #c4d9ad;
    --success-soft: #314735;
    color-scheme: dark;
} }
:root[data-theme="dark"] {
    --bg-base: #152822;
    --surface: #1d342a;
    --surface-solid: #1d342a;
    --surface-raised: #294335;
    --surface-inset: #294335;
    --hairline: #3b5143;
    --border: #3b5143;
    --border-strong: #75866e;
    --text: #f1efe2;
    --text-muted: #c0ccbc;
    --text-faint: #b1beab;
    --accent: #c4d9ad;
    --accent-hover: #dfedc9;
    --accent-ink: #d0dfbd;
    --accent-soft: #314735;
    --accent-grad: linear-gradient(135deg, #c4d9ad, #94b38a);
    --accent-grad-strong: linear-gradient(#c4d9ad, #c4d9ad);
    --on-accent: #152822;
    --chip-bg: #1d342a;
    --pill-bg: #314735;
    --cover-bg: #354b39;
    --cover-ink: #d0dcbb;
    --warm: #e5b08d;
    --warm-soft: #3b392d;
    --danger: #ffc3b9;
    --danger-soft: #552e2a;
    --success: #c4d9ad;
    --success-soft: #314735;
    color-scheme: dark;
}

/* Foundations */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: clip; }
body { min-height: 100dvh; max-width: 100%; overflow-x: clip; background: var(--bg-base); color: var(--text); font: 400 calc(15px * var(--text-scale, 1))/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; touch-action: manipulation; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: none; }
button, summary { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
button, a, input { touch-action: manipulation; }
:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); border-radius: 5px; }
::selection { background: #cedcb5; color: #16372b; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.u-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; }
.u-container { width: min(calc(100% - (var(--pad) * 2)), var(--shell)); margin-inline: auto; }
.u-flow > * + * { margin-block-start: var(--flow-space, var(--space-4)); }
.u-stack { display: flex; flex-direction: column; gap: var(--stack-gap, var(--space-4)); }
.u-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--space-3)); }
.u-muted { color: var(--text-muted); }
.u-measure { max-width: var(--content-measure); }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 12px 20px; color: var(--on-accent); background: var(--accent); border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.ambient { display: none; }

/* Masthead */
.site-bar { width: min(calc(100% - 80px), var(--shell)); min-height: 94px; padding-top: var(--safe-t); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.brand__mark { font: calc(38px * var(--text-scale, 1))/.9 var(--display); letter-spacing: -3px; position: relative; padding-right: 10px; }
.brand__mark > span { font: calc(19px * var(--text-scale, 1))/1 var(--sans); position: absolute; top: -1px; right: -3px; color: var(--warm); }
.brand__wordmark { font-size: calc(13px * var(--text-scale, 1)); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.brand__wordmark small { display: block; font-size: calc(12px * var(--text-scale, 1)); font-weight: 500; letter-spacing: .02em; color: var(--text-muted); margin-top: 1px; }
.site-bar__actions { display: flex; gap: 10px; align-items: center; }
.theme-toggle { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; transition: background var(--dur); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle__sun, [data-theme="dark"] .theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: block; }
.page-share { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 1px solid var(--border-strong); border-radius: var(--r-pill); font-size: calc(16px * var(--text-scale, 1)); font-weight: 600; transition: background var(--dur), border-color var(--dur); }
.page-fullscreen { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 15px; border: 1px solid var(--border-strong); border-radius: var(--r-pill); color: var(--text); background: transparent; font-size: calc(14px * var(--text-scale, 1)); font-weight: 700; white-space: nowrap; transition: background var(--dur), border-color var(--dur); }
.page-fullscreen:hover, .page-fullscreen:focus-visible { background: var(--surface-soft); border-color: var(--accent); }
[data-theme="dark"] .page-fullscreen { color: var(--text); }
.page-share svg { width: 16px; height: 16px; }

/* A personal introduction, with a quiet drawing of movement. */
.shell { width: min(calc(100% - 80px), var(--shell)); margin: 14px auto 0; display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: clamp(36px, 5vw, 72px); align-items: start; }
.shell > .profile { grid-column: 1; grid-row: 1 / span 2; }
.shell > .unified-search { grid-column: 2; grid-row: 1; }
.shell > .library { grid-column: 2; grid-row: 2; }
.profile { position: sticky; top: 32px; overflow: hidden; border-radius: 140px 140px 22px 22px; padding: 40px 34px 30px; color: #f4f1e6; background: #254c3a; animation: enter 700ms var(--ease-out) both; }
.profile__topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 28px; }
.profile__overline { font-size: calc(12px * var(--text-scale, 1)); letter-spacing: .04em; text-transform: uppercase; color: #ccd8c2; }
.profile__cross { color: #d5dcb8; font-size: calc(24px * var(--text-scale, 1)); line-height: 1; font-weight: 300; }
.profile__identity { display: flex; flex-direction: column; align-items: center; text-align: center; }
.profile__avatar-wrap { position: relative; width: 128px; height: 128px; margin-bottom: 22px; padding: 5px; border: 1px solid #c2d0a969; border-radius: 50%; }
.profile__avatar-inner { width: 100%; height: 100%; overflow: hidden; border-radius: 50%; background: #d9dcbc; }
.profile__avatar-img { width: 100%; height: 100%; object-fit: cover; }
.profile__avatar-fallback { display: grid; place-items: center; width: 100%; height: 100%; font: calc(40px * var(--text-scale, 1)) var(--display); color: #254c3a; }
.profile__verified { position: absolute; bottom: 1px; right: 0; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #d9dfbf; color: #254c3a; border: 3px solid #254c3a; }
.profile__verified svg { width: 13px; height: 13px; }
.profile__hello { margin-bottom: 7px; color: #ccd8c2; font-size: calc(12px * var(--text-scale, 1)); }
.profile__name { max-width: 300px; font: 400 calc(55px * var(--text-scale, 1))/1.02 var(--display); letter-spacing: -.035em; text-wrap: balance; }
.profile__credentials { max-width: 260px; margin: 20px auto 0; color: #dae2cd; font-size: calc(15px * var(--text-scale, 1)); line-height: 1.7; text-align: center; letter-spacing: .02em; }
.profile__bio { max-width: 284px; margin: 20px auto 0; color: #d5dfcf; text-align: center; font-size: calc(17px * var(--text-scale, 1)); line-height: 1.7; text-wrap: pretty; }
.movement-art { position: relative; margin: 15px -34px 0; height: 174px; overflow: hidden; color: #bdcd9e; }
.movement-art svg { width: 100%; height: 100%; }
.movement-art g { opacity: .5; }
.movement-art__sun { color: #d4bb80; }
.movement-art > span { position: absolute; left: 34px; bottom: 14px; font: italic calc(19px * var(--text-scale, 1)) var(--display); color: #d8dfc8; }
.profile__guide-link { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 54px; padding: 12px 14px; margin-top: 12px; border: 1px solid #cedbb57a; border-radius: 12px; color: #f4f1e6; font-size: calc(16px * var(--text-scale, 1)); font-weight: 600; background: #ffffff08; }
.profile__guide-link svg { width: 19px; height: 19px; }
.profile__guide-link span { margin-left: auto; font-size: calc(21px * var(--text-scale, 1)); }
.profile__guide-link:focus-visible { outline-color: #e0e7c2; }

/* The familiar link-tree stack, with reading as the strongest action. */
.library { min-width: 0; padding-top: 5px; animation: enter 650ms 60ms var(--ease-out) both; }
.library-intro { margin-bottom: 23px; }
.eyebrow { font-size: calc(13px * var(--text-scale, 1)); font-weight: 600; line-height: 1.6; }
.library-intro > .eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; color: var(--warm); }
.library-intro > .eyebrow > span { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.library-intro__title { font: 400 calc(clamp(38px, 3.8vw, 50px) * var(--text-scale, 1))/1.08 var(--display); letter-spacing: -.025em; text-wrap: balance; }
.library-intro__title em { font-weight: 400; color: var(--accent-ink); }
.library-intro__body { margin-top: 12px; color: var(--text-muted); font-size: calc(17px * var(--text-scale, 1)); line-height: 1.6; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head__title { font-size: calc(17px * var(--text-scale, 1)); font-weight: 700; line-height: 1.4; scroll-margin-top: 24px; }
.section-head__count { font-size: calc(14px * var(--text-scale, 1)); color: var(--text-muted); white-space: nowrap; }
.guides { display: grid; gap: 20px; }
.card { position: relative; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-card); scroll-margin: 24px; transition: border-color var(--dur), box-shadow var(--dur); }
.card__cover { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 15px 25px; position: relative; overflow: hidden; background: var(--cover-bg); color: var(--cover-ink); }
.card__cover::after { content: ""; width: 220px; height: 220px; position: absolute; right: -35px; top: -117px; border: 1px solid currentColor; border-radius: 50%; box-shadow: 0 0 0 10px var(--cover-bg), 0 0 0 11px currentColor, 0 0 0 22px var(--cover-bg), 0 0 0 23px currentColor, 0 0 0 34px var(--cover-bg), 0 0 0 35px currentColor; opacity: .18; transform: scaleX(.8) rotate(-25deg); }
.card__cover-subject { display: inline-flex; align-items: center; gap: 9px; font: calc(23px * var(--text-scale, 1))/1.3 var(--display); position: relative; z-index: 1; }
.card__cover-subject svg { width: 20px; height: 20px; }
.card__cover-label { font-size: calc(14px * var(--text-scale, 1)); font-weight: 500; position: relative; z-index: 1; }
.card__body { padding: 23px 25px 0; }
.card__title { font: 400 calc(34px * var(--text-scale, 1))/1.14 var(--display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.card__desc { margin-top: 14px; font-size: calc(17px * var(--text-scale, 1)); line-height: 1.65; color: var(--text); }
.card__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 15px; color: var(--text-muted); font-size: calc(14px * var(--text-scale, 1)); }
.card__meta-item { display: inline-flex; align-items: center; gap: 6px; }
.card__meta-item svg { width: 16px; height: 16px; }
.card__actions { display: flex; gap: 12px; padding: 17px 0 21px; margin: 19px 25px 0; border-top: 1px solid var(--border); }
.card__link { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 12px 18px; border-radius: 11px; background: var(--accent); color: var(--on-accent); font-size: calc(18px * var(--text-scale, 1)); font-weight: 700; }
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 20px; }
.card__link svg { width: 21px; height: 21px; flex-shrink: 0; }
.card:has(.card__link:focus-visible) { outline: 3px solid var(--accent); outline-offset: 5px; }
.card__share { position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 12px 16px; border: 1px solid var(--border-strong); border-radius: 11px; font-size: calc(16px * var(--text-scale, 1)); font-weight: 600; background: var(--surface); }
.card__share svg { width: 19px; height: 19px; }
.card.is-highlighted { outline: 3px solid var(--accent); outline-offset: 5px; }

/* Search is always available, with both live results and a Search button. */
.controls { display: block; margin-bottom: 28px; }
.search__label { display: block; font-size: calc(17px * var(--text-scale, 1)); line-height: 1.5; font-weight: 700; margin-bottom: 9px; }
.search-row { display: flex; gap: 10px; }
.search { position: relative; flex: 1; min-width: 0; }
.search__input { width: 100%; height: 58px; padding: 0 72px 0 16px; border: 2px solid var(--border-strong); border-radius: 10px; background: var(--surface); font-size: calc(18px * var(--text-scale, 1)); }
.search__input::placeholder { color: var(--text-muted); }
.search__input:focus { border-color: var(--accent); }
.search__input::-webkit-search-cancel-button { display: none; }
.search__clear { display: none; position: absolute; top: 5px; right: 5px; min-width: 58px; height: 48px; border-radius: 7px; color: var(--accent-ink); font-size: calc(15px * var(--text-scale, 1)); font-weight: 600; text-decoration: underline; }
.search__clear.is-visible { display: block; }
.search__submit { min-height: 58px; padding: 12px 24px; border-radius: 10px; color: var(--on-accent); background: var(--accent); font-size: calc(18px * var(--text-scale, 1)); font-weight: 700; }
.search__help { margin-top: 8px; font-size: calc(15px * var(--text-scale, 1)); line-height: 1.5; color: var(--text-muted); }
.unified-search { margin-top: 28px; padding: 22px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface-raised); }
.unified-search h2 { font: 400 calc(25px * var(--text-scale, 1))/1.2 var(--display); margin-bottom: 12px; }
.unified-search label { display: block; font-weight: 700; margin-bottom: 8px; }
.unified-search__row { display: flex; gap: 10px; }
.unified-search__row input { flex: 1; min-width: 0; min-height: 50px; padding: 10px 14px; border: 2px solid var(--border-strong); border-radius: 9px; background: var(--surface); font-size: calc(16px * var(--text-scale, 1)); }
.unified-search__row button { min-height: 50px; padding: 10px 18px; border-radius: 9px; color: var(--on-accent); background: var(--accent); font-weight: 700; }
.unified-search__status { min-height: 24px; margin-top: 10px; color: var(--text-muted); }
.unified-search__results { display: grid; gap: 9px; }
.unified-search__result { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); text-decoration: none; }
.unified-search__result:hover, .unified-search__result:focus-visible { border-color: var(--accent); }
.unified-search__result span, .unified-search__result small { color: var(--text-muted); }
@media (max-width: 520px) { .unified-search__row { display: grid; } .unified-search__row button { width: 100%; } }
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; min-height: 48px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: calc(16px * var(--text-scale, 1)); background: var(--chip-bg); }
.chip__count { font-size: calc(14px * var(--text-scale, 1)); }
.chip[aria-pressed="true"] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }

/* Labeled social destinations sit below the guides. */
.social-section { margin-top: 28px; }
.social-section__note { margin: -4px 0 14px; color: var(--text-muted); font-size: calc(14px * var(--text-scale, 1)); }
.socials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.social-btn { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 64px; padding: 14px 16px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); font-size: calc(16px * var(--text-scale, 1)); font-weight: 600; transition: background var(--dur), border-color var(--dur); }
.social-btn svg { width: 21px; height: 21px; flex-shrink: 0; }
.social-btn .social-btn__arrow { width: 17px; height: 17px; margin-left: auto; color: var(--text-muted); }
.social-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Signup is an invitation, never a barrier to a guide. */
.newsletter { margin-top: 28px; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--warm-soft); }
.newsletter__heading { display: flex; align-items: center; gap: 13px; }
.newsletter__icon { width: 38px; height: 43px; border: 1px solid var(--warm); border-radius: 22px 22px 6px 6px; display: grid; place-items: center; flex-shrink: 0; color: var(--warm); }
.newsletter__icon svg { width: 18px; height: 18px; }
.newsletter .eyebrow { color: var(--warm); font-size: calc(13px * var(--text-scale, 1)); margin-bottom: 3px; }
.newsletter__title { font: 400 calc(28px * var(--text-scale, 1))/1.18 var(--display); letter-spacing: -.015em; }
.newsletter__body { font-size: calc(16px * var(--text-scale, 1)); line-height: 1.8; color: var(--text-muted); margin-top: 13px; }
.field { display: flex; gap: 8px; margin-top: 17px; }
.field__input { width: 100%; flex: 1; min-width: 0; height: 48px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px; padding: 0 13px; font-size: calc(16px * var(--text-scale, 1)); }
.field__input::placeholder { font-size: calc(16px * var(--text-scale, 1)); color: var(--text-muted); }
.field__input:focus { border-color: var(--accent); }
.field__input[aria-invalid="true"] { border-color: var(--danger); }
.field__submit { min-height: 48px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 13px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: calc(16px * var(--text-scale, 1)); font-weight: 700; white-space: nowrap; transition: background var(--dur); }
.field__submit > span { font-size: calc(18px * var(--text-scale, 1)); font-weight: 400; }
.field__submit:disabled { opacity: .65; cursor: wait; }
.field--stack { flex-direction: column; }
.form-note { margin-top: 10px; color: var(--text-muted); font-size: calc(14px * var(--text-scale, 1)); line-height: 1.8; }
.form-error { display: none; margin-top: 10px; color: var(--danger); font-size: calc(16px * var(--text-scale, 1)); }
.form-error.is-visible { display: block; }
.form-success { display: none; align-items: center; gap: 10px; margin-top: 18px; padding: 15px; border-radius: 10px; color: var(--success); background: var(--success-soft); font-size: calc(13px * var(--text-scale, 1)); }
.form-success.is-visible { display: flex; }
.form-success svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Quiet sign-off and expandable medical note. */
.footer { width: min(calc(100% - 80px), var(--shell)); margin: 62px auto 0; padding: 30px 0 calc(25px + var(--safe-b)); border-top: 1px solid var(--border); }
.footer__signature { display: flex; align-items: center; gap: 15px; font-size: calc(12px * var(--text-scale, 1)); line-height: 1.5; }
.footer__signature em { font-family: var(--display); font-size: calc(15px * var(--text-scale, 1)); font-weight: 400; }
.footer__mark { font: calc(36px * var(--text-scale, 1)) var(--display); letter-spacing: -2px; color: var(--accent); }
.disclaimer-details { margin-top: 22px; border-block: 1px solid var(--border); }
.disclaimer-details summary { display: flex; align-items: center; min-height: 48px; list-style: none; gap: 8px; color: var(--text-muted); font-size: calc(16px * var(--text-scale, 1)); }
.disclaimer-details summary::-webkit-details-marker { display: none; }
.disclaimer-details summary svg { width: 15px; height: 15px; }
.disclaimer-details__chevron { margin-left: auto; transition: transform var(--dur); }
.disclaimer-details[open] .disclaimer-details__chevron { transform: rotate(90deg); }
.disclaimer { padding-bottom: 20px; color: var(--text-muted); font-size: calc(15px * var(--text-scale, 1)); line-height: 1.85; max-width: 800px; }
.disclaimer__label { font-weight: 700; }
.footer__bottom { display: flex; gap: 15px; justify-content: space-between; color: var(--text-faint); font-size: calc(13px * var(--text-scale, 1)); margin-top: 20px; }
.noscript-note { padding: 20px; text-align: center; }
.noscript-note a { text-decoration: underline; }

/* Loading, errors, and empty states. */
.skeleton { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); padding: 25px; display: flex; gap: 18px; }
.skeleton__thumb { width: 60px; height: 70px; border-radius: 9px; flex-shrink: 0; }
.skeleton__lines { flex: 1; }
.skeleton__line { height: 12px; margin: 9px 0; border-radius: 4px; }
.skeleton__line--title { width: 85%; height: 20px; }
.skeleton__line--desc { width: 100%; }
.skeleton__line--meta { width: 45%; }
.shimmer { background: var(--surface-inset); animation: breathe 1.8s ease-in-out infinite alternate; }
.state { padding: 34px 24px; text-align: center; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-card); }
.state__emoji { font-size: calc(26px * var(--text-scale, 1)); margin-bottom: 10px; }
.state__title { font: calc(24px * var(--text-scale, 1))/1.2 var(--display); overflow-wrap: anywhere; }
.state__body { color: var(--text-muted); font-size: calc(17px * var(--text-scale, 1)); line-height: 1.8; margin-top: 10px; }
.state__action { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: 8px; margin-top: 20px; font-size: calc(16px * var(--text-scale, 1)); }
.state__action svg { width: 15px; height: 15px; }

/* Shared dialogs. Kept outside the layout so narrow screens remain usable. */
.backdrop { position: fixed; inset: 0; z-index: 60; background: #0b201ab3; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity var(--dur); }
.backdrop.is-open { opacity: 1; }
.sheet { position: fixed; bottom: 0; left: 0; right: 0; z-index: 61; max-width: 480px; margin: auto; max-height: 90dvh; overflow-y: auto; padding: 12px calc(var(--safe-r) + 25px) calc(var(--safe-b) + 25px) calc(var(--safe-l) + 25px); background: var(--surface-solid); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-sheet); transform: translateY(105%); transition: transform var(--dur-slow) var(--ease-out); }
.sheet.is-open { transform: translateY(0); }
.sheet__handle { width: 38px; height: 4px; background: var(--border-strong); border-radius: 4px; margin: 0 auto 20px; }
.sheet__title { font: calc(28px * var(--text-scale, 1))/1.15 var(--display); }
.sheet__body { color: var(--text-muted); font-size: calc(13px * var(--text-scale, 1)); margin-top: 10px; }
.sheet__dismiss { display: block; width: 100%; min-height: 48px; margin-top: 12px; color: var(--text-muted); font-size: calc(13px * var(--text-scale, 1)); border-radius: 10px; }
.modal { position: fixed; left: 50%; top: 50%; z-index: 61; width: min(calc(100% - 32px), 390px); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 30px 24px 24px; text-align: center; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lifted); transform: translate(-50%, -48%) scale(.97); opacity: 0; pointer-events: none; transition: transform var(--dur) var(--ease-out), opacity var(--dur); }
.modal.is-open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.modal__title { font: calc(27px * var(--text-scale, 1))/1.2 var(--display); padding-inline: 20px; }
.modal__body { margin-top: 10px; color: var(--text-muted); font-size: calc(12px * var(--text-scale, 1)); }
.modal__close { position: absolute; top: 9px; right: 9px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.modal__close svg { width: 16px; height: 16px; }
.qr-frame { width: 208px; height: 208px; margin: 22px auto 0; padding: 13px; border-radius: 12px; background: #fff; }
.qr-frame svg, .qr-frame img { width: 100%; height: 100%; shape-rendering: crispEdges; }
.url-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--border); border-radius: 10px; margin-top: 18px; }
.url-row__text { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: calc(11px * var(--text-scale, 1)); user-select: all; }
.url-row__copy { height: 44px; padding: 0 14px; border-radius: 7px; background: var(--surface-inset); font-size: calc(12px * var(--text-scale, 1)); font-weight: 700; }
.modal__actions { display: flex; flex-direction: column; gap: 9px; margin-top: 15px; }
.btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 18px; border-radius: 10px; font-size: calc(13px * var(--text-scale, 1)); font-weight: 600; }
.btn svg { width: 17px; height: 17px; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--ghost { border: 1px solid var(--border); color: var(--text-muted); }
.toast-stack { position: fixed; z-index: 80; left: 50%; bottom: calc(var(--safe-b) + 24px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(90%, 380px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; color: var(--on-accent); background: var(--accent); padding: 13px 20px; border-radius: 12px; box-shadow: var(--shadow-lifted); font-size: calc(12px * var(--text-scale, 1)); animation: enter 200ms var(--ease-out); }
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast.is-leaving { opacity: 0; transition: opacity 200ms; }

@media (hover: hover) and (pointer: fine) {
  .page-share:hover, .theme-toggle:hover, .icon-btn:hover, .modal__close:hover, .sheet__dismiss:hover { background: var(--surface-inset); }
  .social-btn:hover, .card__share:hover { background: var(--surface-inset); }
  .profile__guide-link:hover { background: #ffffff14; }
  .social-btn:hover::after { opacity: 1; transform: none; }
  .card:hover { border-color: var(--accent); box-shadow: var(--shadow-lifted); }
  .card__link:hover, .search__submit:hover { background: var(--accent-hover); }
  .card:hover .card__go svg { transform: translateX(4px); }
  .connect-link:hover { background: var(--surface); border-color: var(--border-strong); }
  .field__submit:hover { background: var(--accent-hover); }
}
button:active, .connect-link:active { transform: translateY(1px); }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { to { opacity: .45; } }

@media (max-width: 1050px) and (min-width: 861px) {
  .shell { grid-template-columns: 300px minmax(0, 1fr); gap: 32px; }
  .profile { padding-inline: 24px; border-radius: 112px 112px 22px 22px; }
  .profile__topline { margin-inline: 0; }
  .profile__overline { font-size: calc(11px * var(--text-scale, 1)); }
  .profile__name { font-size: calc(48px * var(--text-scale, 1)); }
  .profile__bio { font-size: calc(16px * var(--text-scale, 1)); }
  .movement-art { margin-inline: -24px; }
  .movement-art > span { left: 24px; font-size: calc(17px * var(--text-scale, 1)); }
  .socials { grid-template-columns: 1fr; }
  .library-intro__title { font-size: calc(39px * var(--text-scale, 1)); }
  .field { flex-direction: column; }
}
@media (max-width: 860px) {
  .site-bar, .shell, .footer { width: min(calc(100% - 36px), 580px); }
  .site-bar { min-height: 74px; padding-top: var(--safe-t); }
  .brand__mark { font-size: calc(35px * var(--text-scale, 1)); }
  .brand__wordmark { font-size: calc(12px * var(--text-scale, 1)); }
  .brand__wordmark small { display: none; }
  .site-bar__actions { gap: 8px; }
  .page-share { min-height: 44px; padding: 0 13px; font-size: calc(15px * var(--text-scale, 1)); }
  .theme-toggle { width: 44px; height: 44px; }
  .shell { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 4px; }
  .shell > .profile, .shell > .unified-search, .shell > .library { grid-column: 1; grid-row: auto; }
  .profile { position: relative; top: auto; border-radius: 26px; padding: 21px 22px; }
  .profile__topline, .profile__hello, .profile__bio, .profile__guide-link { display: none; }
  .profile__identity { position: relative; z-index: 1; flex-direction: row; align-items: center; gap: 16px; text-align: left; }
  .profile__avatar-wrap { flex-shrink: 0; width: 74px; height: 74px; padding: 4px; margin: 0; }
  .profile__verified { width: 25px; height: 25px; right: -2px; bottom: -2px; border-width: 2px; }
  .profile__verified svg { width: 12px; height: 12px; }
  .profile__heading { min-width: 0; }
  .profile__name { max-width: none; font-size: calc(33px * var(--text-scale, 1)); line-height: 1.08; letter-spacing: -.025em; }
  .profile__credentials { position: relative; z-index: 1; max-width: none; text-align: left; font-size: calc(14px * var(--text-scale, 1)); line-height: 1.5; margin-top: 13px; }
  .movement-art { position: absolute; width: 265px; height: 215px; top: -44px; right: -100px; margin: 0; opacity: .16; pointer-events: none; }
  .movement-art > span { display: none; }
  .library { padding: 0; }
  .library-intro { margin-bottom: 18px; }
  .library-intro > .eyebrow, .library-intro__body { display: none; }
  .library-intro__title { font-size: calc(33px * var(--text-scale, 1)); line-height: 1.1; text-wrap: balance; }
  .search__label { font-size: calc(16px * var(--text-scale, 1)); margin-bottom: 7px; }
  .search-row { gap: 8px; }
  .search__submit { padding-inline: 16px; font-size: calc(17px * var(--text-scale, 1)); min-height: 56px; }
  .search__input { height: 56px; padding-left: 12px; font-size: calc(17px * var(--text-scale, 1)); }
  .search__input:placeholder-shown { padding-right: 12px; }
  .search__help { font-size: calc(14px * var(--text-scale, 1)); }
  .search__clear { top: 4px; }
  .controls { margin-bottom: 22px; }
  .section-head__title { font-size: calc(17px * var(--text-scale, 1)); }
  .card__cover { min-height: 47px; padding: 9px 21px; }
  .card__cover-subject { font: 600 calc(15px * var(--text-scale, 1))/1.4 var(--sans); }
  .card__cover-subject svg { width: 18px; height: 18px; }
  .card__cover-label { font-size: calc(14px * var(--text-scale, 1)); }
  .card__body { padding: 19px 21px 0; }
  .card__title { font-size: calc(29px * var(--text-scale, 1)); }
  .card__desc { font-size: calc(17px * var(--text-scale, 1)); line-height: 1.6; margin-top: 12px; }
  .card__meta { margin-top: 12px; font-size: calc(14px * var(--text-scale, 1)); }
  .card__actions { margin: 15px 21px 0; padding: 14px 0 19px; gap: 9px; }
  .card__link { font-size: calc(17px * var(--text-scale, 1)); padding-inline: 10px; }
  .card__share { font-size: calc(15px * var(--text-scale, 1)); padding-inline: 12px; }
  .social-btn { padding-inline: 13px; gap: 9px; min-height: 60px; }
  .social-btn .social-btn__arrow { width: 15px; height: 15px; }
  .newsletter { padding: 21px; }
  .newsletter__title { font-size: calc(26px * var(--text-scale, 1)); }
  .field { flex-direction: column; }
  .footer { margin-top: 36px; }
  .footer__bottom { flex-direction: column; gap: 6px; }
}

/* Wide touch displays and scaled desktop windows need the mobile structure,
   but should still use the available canvas instead of a narrow phone column. */
@media (min-width: 421px) and (max-width: 860px) {
  .site-bar, .shell, .footer { width: min(calc(100% - 56px), 920px); }
  .site-bar { min-height: 86px; }
  .shell { gap: 28px; }
  .profile { padding: 28px 30px; border-radius: 34px; }
  .profile__topline { display: flex; margin: 0 0 20px; }
  .profile__hello { display: block; }
  .profile__bio { display: block; max-width: 52ch; margin: 12px 0 0; text-align: left; font-size: calc(16px * var(--text-scale, 1)); }
  .profile__guide-link { display: flex; max-width: 420px; }
  .movement-art { width: 320px; height: 240px; right: -86px; }
  .library-intro > .eyebrow, .library-intro__body { display: block; }
  .library-intro__title { font-size: calc(clamp(38px, 5vw, 50px) * var(--text-scale, 1)); }
  .socials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .newsletter { padding: 28px; }
  .field { flex-direction: row; }
}

/* A maximized window can still expose a 600–860px CSS viewport on a scaled
   desktop display. Use both columns there so the page does not read as a
   phone layout with an unused canvas beside it. */
@media (min-width: 600px) and (max-width: 860px) {
  .shell { grid-template-columns: minmax(220px, .62fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 32px); }
  .profile { position: relative; top: auto; border-radius: 92px 92px 22px 22px; padding: 28px 22px 24px; }
  .profile__identity { flex-direction: column; align-items: center; gap: 0; text-align: center; }
  .profile__avatar-wrap { width: 96px; height: 96px; margin-bottom: 16px; }
  .profile__heading { min-width: 0; }
  .profile__name { font-size: clamp(34px, 5vw, 46px); line-height: 1.04; text-align: center; }
  .profile__credentials { max-width: 240px; margin: 16px auto 0; text-align: center; }
  .profile__bio { max-width: 30ch; margin-inline: auto; text-align: center; }
  .profile__guide-link { margin-inline: auto; }
  .movement-art { width: 285px; height: 210px; right: -92px; }
  .library-intro__title { font-size: clamp(32px, 4.8vw, 46px); }
  .socials { grid-template-columns: 1fr; }
  .field { flex-direction: column; }
}

/* Full-screen mode must keep the desktop composition while the visitor jumps
   to anchors or scrolls through the library. */
@media (min-width: 421px) {
  html:fullscreen .site-bar, html:fullscreen .shell, html:fullscreen .footer { width: min(calc(100% - 56px), 920px); }
  html:fullscreen .shell { grid-template-columns: minmax(220px, .62fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 32px); }
  html:fullscreen .profile { position: relative; top: auto; border-radius: 92px 92px 22px 22px; padding: 28px 22px 24px; }
  html:fullscreen .profile__topline { display: flex; margin: 0 0 20px; }
  html:fullscreen .profile__hello { display: block; }
  html:fullscreen .profile__bio { display: block; max-width: 30ch; margin-inline: auto; text-align: center; }
  html:fullscreen .profile__guide-link { display: flex; margin-inline: auto; }
  html:fullscreen .profile__identity { flex-direction: column; align-items: center; gap: 0; text-align: center; }
  html:fullscreen .profile__avatar-wrap { width: 96px; height: 96px; margin-bottom: 16px; }
  html:fullscreen .profile__heading { min-width: 0; }
  html:fullscreen .profile__name { font-size: clamp(34px, 5vw, 46px); line-height: 1.04; text-align: center; }
  html:fullscreen .profile__credentials { max-width: 240px; margin: 16px auto 0; text-align: center; }
  html:fullscreen .movement-art { width: 285px; height: 210px; right: -92px; }
  html:fullscreen .library-intro__title { font-size: clamp(32px, 4.8vw, 46px); }
  html:fullscreen .socials { grid-template-columns: 1fr; }
  html:fullscreen .field { flex-direction: column; }
}

@media (max-width: 420px) {
  .brand__wordmark { display: none; }
}
@media (max-width: 380px) {
  .site-bar, .shell, .footer { width: calc(100% - 32px); }
  .profile { padding: 20px; }
  .profile__avatar-wrap { width: 66px; height: 66px; }
  .profile__identity { gap: 12px; }
  .profile__name { font-size: calc(30px * var(--text-scale, 1)); }
  .profile__credentials { font-size: calc(14px * var(--text-scale, 1)); }
  .library-intro__title { font-size: calc(31px * var(--text-scale, 1)); }
  .card__title { font-size: calc(28px * var(--text-scale, 1)); }
  .card__body { padding-inline: 18px; }
  .card__actions { margin-inline: 18px; }
  .card__share svg { display: none; }
  .socials { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  :root { --focus-ring: 3px solid CanvasText; }
  *, *::before, *::after { forced-color-adjust: auto; }
  .card, .profile, .connect-link, .newsletter, .social-btn, .page-share, .field__submit { border: 1px solid CanvasText; }
  .btn--primary, .card__link, .field__submit, .search__submit { background: ButtonText; color: ButtonFace; }
  :focus-visible { outline-color: Highlight; }
}
@media print {
  :root, :root[data-theme] { --bg-base: #fff; --surface: #fff; --surface-solid: #fff; --surface-raised: #fff; --text: #000; --text-muted: #333; --text-faint: #444; --accent: #254c3a; --accent-ink: #254c3a; --cover-bg: #fff; --cover-ink: #254c3a; --warm: #733c29; color-scheme: light; }
  .theme-toggle, .page-share, .profile__guide-link, .social-section, .controls, .search-sticky, .socials, .card__actions, .backdrop, .sheet, .modal, .toast-stack, .newsletter, .skip-link, .movement-art, .connect { display: none !important; }
  body { background: white; color: black; }
  .shell { display: block; width: 100%; }
  .profile { position: static; background: white; color: black; border-radius: 0; padding: 0 0 20px; }
  .profile__credentials, .profile__bio, .profile__hello { color: black; }
  .profile__credentials, .profile__bio, .profile__hello { color: black; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #999; }
  .footer { width: 100%; }
  .disclaimer-details > .disclaimer { display: block; }
}
