/* NextGenHealth — Apple-style editorial UI with liquid glass
   Layout: 48px translucent global nav with flyout panels; Store-style headline,
   section icon row and horizontal card shelves; News+-style centred section heroes;
   Newsroom-style article column with a floating liquid-glass reading bar;
   dense Apple-style footer. Mobile-first. */

:root {
  --bg: #F5F5F7;
  --bg-raised: #FFFFFF;
  --card: #FFFFFF;
  --ink: #1D1D1F;
  --muted: #6E6E73;
  --faint: #86868B;
  --line: #D2D2D7;
  --hair: rgba(0, 0, 0, 0.08);
  --link: #0066CC;
  --accent: #0071E3;
  --brand: #0B3D91;
  --orange: #F28C28;
  --sun: #FFC629;

  /* liquid glass */
  --glass-fill: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42));
  --glass-edge: rgba(255, 255, 255, 0.75);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.35), inset 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  --nav-fill: rgba(250, 250, 252, 0.72);
  --scrim: rgba(232, 232, 237, 0.4);

  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.12);

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Arial, sans-serif;
  --serif: 'Source Serif 4', 'New York', Georgia, serif;
  --max: 1240px;
  --gut: 16px;
}
@media (min-width: 768px) { :root { --gut: 28px; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg-raised: #161617; --card: #1C1C1E; --ink: #F5F5F7; --muted: #A1A1A6; --faint: #86868B;
    --line: #424245; --hair: rgba(255, 255, 255, 0.1); --link: #2997FF; --accent: #0A84FF;
    --glass-fill: linear-gradient(135deg, rgba(60, 60, 67, 0.62), rgba(30, 30, 32, 0.42));
    --glass-edge: rgba(255, 255, 255, 0.16);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.4);
    --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(255, 255, 255, 0.04), inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
    --nav-fill: rgba(22, 22, 23, 0.72); --scrim: rgba(0, 0, 0, 0.45);
    --card-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); --card-shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.14);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg-raised: #161617; --card: #1C1C1E; --ink: #F5F5F7; --muted: #A1A1A6; --faint: #86868B;
  --line: #424245; --hair: rgba(255, 255, 255, 0.1); --link: #2997FF; --accent: #0A84FF;
  --glass-fill: linear-gradient(135deg, rgba(60, 60, 67, 0.62), rgba(30, 30, 32, 0.42));
  --glass-edge: rgba(255, 255, 255, 0.16);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.4);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(255, 255, 255, 0.04), inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
  --nav-fill: rgba(22, 22, 23, 0.72); --scrim: rgba(0, 0, 0, 0.45);
  --card-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); --card-shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.14);
  color-scheme: dark;
}

/* section colours: icon gradients (--s1, --s2) and accessible text colour (--st) */
.s-medicines { --s1: #FF9F43; --s2: #E8590C; --st: #B8470B; }
.s-treatments { --s1: #A78BFA; --s2: #6D28D9; --st: #6D28D9; }
.s-evidence { --s1: #2DD4BF; --s2: #0E7490; --st: #0E7490; }
.s-safety { --s1: #4ADE80; --s2: #15803D; --st: #15803D; }
.s-conditions { --s1: #FB7185; --s2: #BE123C; --st: #BE123C; }
.s-policy { --s1: #60A5FA; --s2: #1D4ED8; --st: #1D4ED8; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .s-medicines { --st: #FDBA74; } :root:not([data-theme="light"]) .s-treatments { --st: #C4B5FD; }
  :root:not([data-theme="light"]) .s-evidence { --st: #5EEAD4; } :root:not([data-theme="light"]) .s-safety { --st: #86EFAC; }
  :root:not([data-theme="light"]) .s-conditions { --st: #FDA4AF; } :root:not([data-theme="light"]) .s-policy { --st: #93C5FD; }
}
:root[data-theme="dark"] .s-medicines { --st: #FDBA74; } :root[data-theme="dark"] .s-treatments { --st: #C4B5FD; }
:root[data-theme="dark"] .s-evidence { --st: #5EEAD4; } :root[data-theme="dark"] .s-safety { --st: #86EFAC; }
:root[data-theme="dark"] .s-conditions { --st: #FDA4AF; } :root[data-theme="dark"] .s-policy { --st: #93C5FD; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.47; letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { text-wrap: balance; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-left: max(var(--gut), env(safe-area-inset-left, 0px)); padding-right: max(var(--gut), env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }
.skip { position: absolute; left: 12px; top: -80px; background: var(--accent); color: #FFFFFF; padding: 10px 14px; font-weight: 600; z-index: 100; border-radius: 10px; }
.skip:focus { top: calc(10px + env(safe-area-inset-top, 0px)); text-decoration: none; }

/* ---------- liquid glass ---------- */
.glass {
  position: relative; isolation: isolate;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-hi), var(--glass-shadow);
}
.glass::before { /* specular sheen */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 55%),
              radial-gradient(80% 60% at 100% 100%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 60%);
  mix-blend-mode: soft-light;
}
.glass-round {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: var(--ink); cursor: pointer; padding: 0;
}
.glass-round svg { width: 14px; height: 14px; }
.glass-round:disabled { opacity: 0.35; cursor: default; }
.glass-chip {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; padding: 6px 12px 6px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: -0.005em; color: var(--ink);
}
.glass-chip .ico { width: 15px; height: 15px; }

/* ---------- global nav ---------- */
.gnav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; }
.gnav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--nav-fill);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
}
.gnav-inner { display: flex; align-items: center; justify-content: space-between; height: 48px; gap: 20px; }
.gnav-logo { color: var(--ink); display: block; line-height: 0; flex-shrink: 0; }
.gnav-logo .wordmark { width: 118px; height: auto; }
.gnav-list { display: none; }
@media (min-width: 1024px) {
  .gnav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
  .gnav-link { display: block; padding: 0 12px; line-height: 48px; font-size: 12.5px; color: var(--ink); opacity: 0.85; letter-spacing: -0.01em; }
  .gnav-link:hover, .gnav-link[aria-current="page"] { opacity: 1; text-decoration: none; }
  .gnav-link[aria-current="page"] { font-weight: 600; }
}
.flyout {
  position: absolute; left: 0; right: 0; top: 48px; z-index: 49;
  background: var(--nav-fill);
  -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px);
  border-bottom: 1px solid var(--hair);
  visibility: hidden; opacity: 0; transform: translateY(-6px);
  transition: opacity 0.22s ease 0.12s, transform 0.22s ease 0.12s, visibility 0s linear 0.34s;
}
.gnav-item:hover > .flyout, .gnav-item:focus-within > .flyout {
  visibility: visible; opacity: 1; transform: none; transition-delay: 0.12s, 0.12s, 0s;
}
.flyout-inner { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding-block: 36px 52px; }
.fly-h { margin: 0 0 14px; font-size: 12px; color: var(--muted); }
.fly-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fly-col a { color: var(--ink); font-size: 12.5px; font-weight: 600; }
.fly-big { font-size: 22px !important; line-height: 1.2; font-weight: 600 !important; letter-spacing: -0.02em; display: inline-block; max-width: 30ch; }
.fly-wide ul { gap: 12px; }
.scrim {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0; transition: opacity 0.25s ease 0.1s;
  background: var(--scrim); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
@media (min-width: 1024px) {
  body:has(.gnav-item:hover .flyout) .scrim, body:has(.gnav-item:focus-within .flyout) .scrim { opacity: 1; }
}
.gnav-menu {
  display: inline-grid; place-content: center; gap: 6px; width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; cursor: pointer; color: var(--ink);
}
.gnav-menu span { display: block; width: 17px; height: 1.5px; border-radius: 1px; background: currentColor; transition: transform 0.25s ease; }
.gnav-menu[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.gnav-menu[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
@media (min-width: 1024px) { .gnav-menu { display: none; } }
.msheet { position: fixed; inset: calc(48px + env(safe-area-inset-top, 0px)) 0 0; background: var(--nav-fill); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); overflow-y: auto; }
.msheet-list { list-style: none; margin: 0; padding: 24px 0 48px; display: grid; gap: 6px; }
.msheet-list a { display: block; padding: 6px 0; color: var(--ink); font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
@media (min-width: 1024px) { .msheet { display: none !important; } }

/* ---------- ribbon + store headline ---------- */
.ribbon { background: var(--bg-raised); border-bottom: 1px solid var(--hair); }
.ribbon p { margin: 0; padding-block: 12px; text-align: center; font-size: 14px; color: var(--ink); }
.ribbon a { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.chev { width: 10px; height: 10px; flex-shrink: 0; }
.store-head { display: flex; flex-direction: column; gap: 14px; padding-block: 40px 28px; }
.display { margin: 0; font-size: clamp(40px, 9vw, 80px); line-height: 1.05; font-weight: 700; letter-spacing: -0.035em; }
.store-aside { margin: 0; font-size: 17px; line-height: 1.4; color: var(--muted); max-width: 30ch; display: flex; flex-direction: column; gap: 6px; }
.store-aside strong { color: var(--ink); font-weight: 600; }
.store-aside a { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; }
@media (min-width: 900px) {
  .store-head { flex-direction: row; justify-content: space-between; align-items: flex-end; padding-block: 64px 36px; }
  .store-aside { text-align: right; align-items: flex-end; font-size: 21px; }
}


/* ---------- shelves ---------- */
.shelf { padding-top: 36px; }
@media (min-width: 900px) { .shelf { padding-top: 52px; } }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.shelf-title { margin: 0 0 18px; font-size: clamp(22px, 4.6vw, 28px); line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; max-width: 46ch; }
.shelf-head .shelf-title { margin: 0; }
.shelf-ctrl { display: none; gap: 10px; }
@media (hover: hover) and (min-width: 900px) { .shelf-ctrl { display: flex; } }
.scroller {
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  --edge: max(var(--gut), env(safe-area-inset-left, 0px), calc((100% - var(--max)) / 2 + var(--gut)));
  scroll-padding-inline: var(--edge);
}
.scroller::-webkit-scrollbar { display: none; }
.track { list-style: none; margin: 0; display: flex; gap: 16px; padding: 4px var(--edge) 28px; width: max-content; }
.track > li { scroll-snap-align: start; display: flex; }
@media (min-width: 900px) { .track { gap: 20px; } }

/* product-style card */
.card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  width: min(78vw, 340px); min-height: 460px; background: var(--card); border-radius: 18px; overflow: hidden;
  box-shadow: var(--card-shadow); transition: transform 0.3s cubic-bezier(0, 0, 0.5, 1), box-shadow 0.3s cubic-bezier(0, 0, 0.5, 1);
}
@media (min-width: 900px) { .card { width: 360px; min-height: 500px; } }
.card:hover { transform: scale(1.015); box-shadow: var(--card-shadow-hover); text-decoration: none; }
.card-text { display: flex; flex-direction: column; gap: 8px; padding: 26px 26px 18px; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--st, var(--muted)); }
a.eyebrow:hover { text-decoration: underline; }
.card-title { margin: 0; font-size: 21px; line-height: 1.19; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.card-title a { color: inherit; }
.card-dek { margin: 0; font-size: 14px; line-height: 1.43; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-media { aspect-ratio: 4 / 3; margin: 0 14px 14px; border-radius: 12px; }

.stretch { color: inherit; }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.stretch:hover { text-decoration: none; }
.stretch:focus-visible { outline: none; }
.stretch:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 18px; }

.media { position: relative; overflow: hidden; background: var(--brand); }
.media .art, .media .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media .ph { color: transparent; font-size: 0; transition: transform 0.6s cubic-bezier(0, 0, 0.5, 1); }
.card:hover .ph, .feature:hover .ph { transform: scale(1.04); }

/* end-of-shelf card */
.card-end { align-items: flex-start; justify-content: flex-end; gap: 6px; padding: 26px; color: var(--ink); }
.card-end strong { font-size: 24px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; max-width: 12ch; }
.card-end .glass-round { margin-top: 16px; }
.card-end .tile-ico { margin-bottom: auto; }

/* dark feature card */
.feature {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: 18px; overflow: hidden; color: #FFFFFF; background: #0B0B0C; isolation: isolate;
  box-shadow: var(--card-shadow);
}
.feature .media { position: absolute; inset: 0; z-index: -2; }
.feature-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.55) 62%, rgba(0, 0, 0, 0.88) 100%); }
.feature-text { display: flex; flex-direction: column; gap: 10px; padding: 26px; }
.feature .glass-chip { color: #FFFFFF; background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1)); border-color: rgba(255, 255, 255, 0.35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 16px rgba(0, 0, 0, 0.2); }
.feature-title { margin: 0; font-size: 26px; line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; }
.feature-dek { margin: 0; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, 0.86); max-width: 56ch; }
.feature .meta { color: rgba(255, 255, 255, 0.72); }
.feature-shelf { width: min(88vw, 560px); min-height: 460px; }
@media (min-width: 900px) { .feature-shelf { width: 640px; min-height: 500px; } .feature-shelf .feature-title { font-size: 32px; } .feature-text { padding: 32px; } }
.meta { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- tiles ("Six sections") ---------- */
.tiles-wrap { padding-top: 44px; }
.tiles { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.tile { display: flex; flex-direction: column; gap: 14px; padding: 26px; background: var(--card); border-radius: 18px; color: var(--ink); box-shadow: var(--card-shadow); transition: transform 0.3s cubic-bezier(0, 0, 0.5, 1), box-shadow 0.3s; }
.tile:hover { text-decoration: none; transform: scale(1.015); box-shadow: var(--card-shadow-hover); }
.tile-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #FFFFFF; background: linear-gradient(160deg, var(--s1), var(--s2)); }
.tile-ico .ico { width: 24px; height: 24px; }
.tile-text { font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.tile-name { color: var(--st); font-weight: 600; }
.tile-count { font-size: 13px; color: var(--muted); }

.quick { padding-top: 44px; }
.sec-others .quick { padding-top: 0; }
.store-head + .shelf { padding-top: 8px; }
.quick-h { margin: 0 0 14px; font-size: 17px; font-weight: 600; }
.quick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.qpill { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font-size: 14px; }
.qpill:hover { border-color: var(--ink); text-decoration: none; }

/* ---------- breadcrumbs ---------- */
.crumbs ol { list-style: none; margin: 0; padding: 16px 0 0; display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 12.5px; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); max-width: 48ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 639px) { .crumbs li:last-child { display: none; } .crumbs li:nth-last-child(2) .chev { display: none; } }

/* ---------- section page (News+ style) ---------- */
.sec-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding-block: 40px 32px; }
.app-ico { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 20px; color: #FFFFFF; background: linear-gradient(160deg, var(--s1, #2F7BF5), var(--s2, #0B3D91)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 24px rgba(0, 0, 0, 0.14); }
.app-ico .ico { width: 40px; height: 40px; }
.app-ico-brand { background: linear-gradient(160deg, #1F5FD1, #0B3D91); }
.app-ico-brand svg { width: 52px; height: 52px; }
.display-center { text-align: center; }
.sec-sub { margin: 0; font-size: clamp(19px, 3vw, 24px); line-height: 1.3; color: var(--muted); max-width: 32ch; letter-spacing: -0.015em; }
.sec-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.sec-lead .feature-wide { min-height: 440px; }
@media (min-width: 900px) { .sec-lead .feature-wide { min-height: 560px; } .feature-wide .feature-title { font-size: 40px; max-width: 20ch; } .feature-wide .feature-text { padding: 44px; } }
.sec-lead { padding-bottom: 44px; }
.grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.grid .card { width: auto; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sec-others { padding-top: 52px; }

/* ---------- article (Newsroom style) ---------- */
.art-head { display: flex; flex-direction: column; gap: 14px; padding-block: 28px 30px; max-width: calc(880px + 2 * var(--gut)); }
.art-kicker { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.art-kicker .eyebrow { font-size: 12px; }
.art-title { margin: 0; font-size: clamp(32px, 7vw, 56px); line-height: 1.07; font-weight: 700; letter-spacing: -0.035em; }
.art-sub { margin: 0; font-size: clamp(19px, 2.6vw, 24px); line-height: 1.35; color: var(--muted); letter-spacing: -0.015em; max-width: 46ch; }
.art-byline { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.art-hero { margin: 0 auto; }
.art-hero .media { aspect-ratio: 16 / 9; border-radius: 22px; }
@media (min-width: 900px) { .art-hero .media { aspect-ratio: 2 / 1; border-radius: 28px; } }
.art-hero figcaption { padding-top: 10px; font-size: 12px; color: var(--muted); }
.art-hero figcaption a { color: var(--muted); text-decoration: underline; }
.art-body { width: 100%; max-width: calc(692px + 2 * var(--gut)); margin: 0 auto; padding: 36px max(var(--gut), env(safe-area-inset-right, 0px)) 24px max(var(--gut), env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 28px; }
.summary { padding: 22px 24px; border-radius: 18px; background: var(--card); box-shadow: var(--card-shadow); }
.summary-h { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.summary-text { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 500; }
.summary-list { margin: 14px 0 0; padding: 14px 0 0 20px; border-top: 1px solid var(--hair); display: grid; gap: 8px; font-size: 15.5px; line-height: 1.45; }
.summary-list li::marker { color: var(--orange); }
.prose { font-size: 18px; line-height: 1.68; letter-spacing: -0.012em; min-width: 0; }
@media (min-width: 768px) { .prose { font-size: 19px; } }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; margin: 1.7em 0 0.5em; }
.prose h3 { font-size: 21px; font-weight: 600; margin: 1.4em 0 0.4em; }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 600; }
.prose blockquote { margin: 1.6em 0; padding: 0; font-size: clamp(24px, 3.6vw, 30px); line-height: 1.22; font-weight: 600; letter-spacing: -0.025em; }
.prose blockquote::before { content: ""; display: block; width: 48px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--orange), var(--sun)); margin-bottom: 16px; }
.prose blockquote p { margin: 0; }
.table-wrap { overflow-x: auto; margin: 1.4em 0; border-radius: 14px; background: var(--card); box-shadow: var(--card-shadow); }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.prose th { font-weight: 600; white-space: nowrap; }
.tags { list-style: none; margin: 0; padding: 22px 0 0; border-top: 1px solid var(--hair); display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 13px; color: var(--ink); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
.about-body { padding-top: 8px; }
.share { display: flex; flex-direction: column; gap: 12px; }
.share-compact { margin-top: 6px; }
.share-h { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.share-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 15px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink);
  background: var(--glass-fill); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), 0 2px 8px rgba(0, 0, 0, 0.06);
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.share-btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--glass-hi), 0 6px 16px rgba(0, 0, 0, 0.1); }
.share-native { background: var(--accent); color: #FFFFFF; border-color: var(--accent); }
.share-status { margin: 0; min-height: 1.2em; font-size: 13px; color: var(--muted); }
.share-compact .share-status:empty { display: none; }
.art-body > .share { padding-top: 22px; border-top: 1px solid var(--hair); }

/* floating liquid-glass reading bar */
.readbar {
  position: fixed; z-index: 45; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); width: min(calc(100% - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)), 720px);
  display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 8px 0 10px; border-radius: 999px;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.readbar.is-hidden { opacity: 0; transform: translate(-50%, 24px); pointer-events: none; }
.rb-progress { position: absolute; left: 22px; right: 22px; bottom: 6px; height: 3px; border-radius: 2px; background: rgba(127, 127, 127, 0.18); overflow: hidden; }
.rb-progress span { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--orange), var(--sun)); border-radius: inherit; }
.rb-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; color: #FFFFFF; background: linear-gradient(160deg, var(--s1), var(--s2)); }
.rb-ico .ico { width: 19px; height: 19px; }
.rb-title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline: 4px; }
.rb-btn { flex-shrink: 0; height: 36px; padding: 0 12px; border-radius: 999px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.rb-btn:hover, .rb-btn[aria-expanded="true"] { background: rgba(127, 127, 127, 0.16); }
.rb-top { width: 36px; padding: 0; display: grid; place-items: center; }
.rb-top svg { width: 14px; height: 14px; }
@media (max-width: 520px) { .rb-title { display: none; } .readbar { justify-content: space-between; } }
.rb-toc { position: absolute; bottom: calc(100% + 10px); left: 0; right: 0; max-height: 60vh; overflow-y: auto; padding: 18px 20px; border-radius: 22px; }
.rb-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: t; display: grid; gap: 2px; }
.rb-toc li { counter-increment: t; }
.rb-toc a { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; padding: 8px 0; color: var(--ink); font-size: 15px; font-weight: 500; }
.rb-toc a::before { content: counter(t); color: var(--orange); font-weight: 700; font-variant-numeric: tabular-nums; }
.rb-status { position: absolute; bottom: calc(100% + 10px); right: 16px; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: var(--bg); opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.rb-status.on { opacity: 1; }
body:has(.readbar) .gfoot { padding-bottom: 72px; }

/* ---------- 404 (Apple Music homage) ---------- */
.nf { display: grid; gap: 40px; align-items: center; padding-block: 48px 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .nf { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-block: 80px 40px; } }
.nf-art { display: flex; justify-content: center; }
.nf-device { width: 240px; height: 380px; border-radius: 36px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.nf-screen { width: 100%; height: 150px; border-radius: 10px; background: linear-gradient(180deg, #C9CDBF, #B4B9A8); color: #2A2D25; padding: 12px; display: flex; flex-direction: column; gap: 4px; font: 600 12px/1.3 ui-monospace, Menlo, monospace; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35); }
.nf-screen strong { font-size: 14px; margin-top: 8px; }
.nf-screen em { font-style: normal; opacity: 0.7; }
.nf-screen i { display: block; height: 6px; margin-top: auto; border-radius: 3px; border: 1px solid #2A2D25; }
.nf-screen b { display: block; width: 62%; height: 100%; background: #2A2D25; }
.nf-wheel { width: 150px; height: 150px; border-radius: 50%; background: var(--card); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.12); display: grid; place-items: center; }
.nf-wheel span { width: 52px; height: 52px; border-radius: 50%; background: var(--bg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.nf-text { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.nf-title { margin: 12px 0 0; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 7vw, 56px); line-height: 1.05; letter-spacing: -0.02em; }
.nf-sub { margin: 0; font-family: var(--serif); font-size: clamp(26px, 4vw, 34px); color: var(--muted); }
.nf-links { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.nf-links a { display: inline-flex; align-items: center; gap: 3px; color: var(--ink); font-size: 15px; }

/* ---------- footer (Apple style) ---------- */
.gfoot { margin-top: 64px; background: var(--bg); border-top: 1px solid var(--hair); font-size: 12px; line-height: 1.33; color: var(--muted); }
.fine { margin: 0; padding: 17px 0 11px; border-bottom: 1px solid var(--hair); }
.fcrumb { display: flex; align-items: center; gap: 8px; padding: 12px 0 10px; color: var(--ink); }
.fcrumb .chev { width: 9px; height: 9px; color: var(--faint); }
.fcrumb span { color: var(--ink); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcrumb-logo { color: var(--ink); line-height: 0; }
.fcrumb-logo .wordmark { width: 92px; height: auto; }
.fcols { display: grid; gap: 22px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px 0 22px; border-top: 1px solid var(--hair); }
@media (min-width: 768px) { .fcols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .fcols { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.fcol h3 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--ink); }
.fcol ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.fcol a { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fcol a:hover { color: var(--ink); text-decoration: underline; }
.fcol .fall { color: var(--link); }
.flegal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 14px 0 calc(22px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--hair); }
.flegal p { margin: 0; }
.flegal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.flegal li + li::before { content: "|"; margin: 0 8px; color: var(--line); }
.flegal a { color: var(--muted); }
.flegal-region { margin-left: auto !important; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
