/* =========================================================
   Kid Safe Surgery — iOS Liquid Glass
   Mobile-first. Materials, controls and metrics follow iOS.
   ========================================================= */
:root {
  /* iOS label colours */
  --label: #0b1f24;
  --label-2: rgba(30, 50, 56, .74);
  --label-3: rgba(30, 50, 56, .5);
  --separator: rgba(30, 50, 56, .14);
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .2);

  /* brand tint (from the logo) */
  --tint: #0f7f89;
  --tint-strong: #0a646d;
  --tint-soft: rgba(15, 127, 137, .12);
  --gold: #d49a2e;
  --orange: #e8890c;
  --green: #2a9663;

  /* materials */
  --mat: rgba(255, 255, 255, .58);
  --mat-blur: 28px;
  --rim: rgba(255, 255, 255, .75);
  --shadow: 0 8px 28px -12px rgba(8, 40, 48, .28), 0 1px 2px rgba(8, 40, 48, .06);
  --shadow-lg: 0 24px 60px -24px rgba(8, 40, 48, .4), 0 2px 6px rgba(8, 40, 48, .06);

  --r-card: 26px;
  --r-group: 22px;
  --max: 1180px;
  --gutter: 16px;
  --ease: cubic-bezier(.25, .8, .25, 1);
  --spring: cubic-bezier(.32, 1.4, .56, 1);
  --sheet: cubic-bezier(.32, .72, 0, 1);

  /* Type: SF on Apple devices, Inter (optical sizes) elsewhere; dedicated faces for Sinhala and Tamil. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Noto Sans Sinhala", "Catamaran", system-ui, "Segoe UI", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Yaldevi", "Anek Tamil", system-ui, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, "Inter", system-ui, sans-serif;
  --display-weight: 800;
  /* aliases used by picture-first.css */
  --ink: var(--label); --ink-2: var(--label-2); --muted: var(--label-2); --teal: var(--tint); --teal-deep: var(--tint-strong); --serif: var(--font-round);
  color-scheme: light;
}
:lang(en) {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --display-weight: 800;
}
:lang(si) {
  --font: "Noto Sans Sinhala", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  --font-display: "Yaldevi", "Noto Sans Sinhala", -apple-system, "Inter", system-ui, sans-serif;
  --display-weight: 700;
}
:lang(ta) {
  --font: "Catamaran", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  --font-display: "Anek Tamil", "Catamaran", -apple-system, "Inter", system-ui, sans-serif;
  --display-weight: 700;
}
[lang] { font-family: var(--font); }
@media (min-width: 700px) { :root { --gutter: 28px; } }
@media (min-width: 1100px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100svh;
  font-family: var(--font); font-size: 17px; line-height: 1.47; letter-spacing: -.022em;
  color: var(--label); background: #e6f3f2;
  overflow-x: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto; font-kerning: normal; text-rendering: optimizeLegibility;
}
body.reader-open { overflow: hidden; }
:lang(si), :lang(ta) { letter-spacing: 0; line-height: 1.62; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; letter-spacing: inherit; -webkit-appearance: none; appearance: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-optical-sizing: auto; text-wrap: balance; overflow-wrap: break-word; }
p { margin: 0; text-wrap: pretty; }
.i { width: 1.1em; height: 1.1em; flex: none; }
.defs { position: absolute; width: 0; height: 0; }
:focus-visible { outline: 3px solid rgba(15, 127, 137, .6); outline-offset: 2px; border-radius: 12px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--label); color: #fff; padding: 10px 16px; border-radius: 12px; text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }

/* ---------- wallpaper ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(170deg, #e9f7f4 0%, #e3f1f3 45%, #eef0fb 100%); }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); will-change: transform; }
.b1 { width: 70vmax; height: 70vmax; left: -30vmax; top: -30vmax; background: radial-gradient(circle, #5fd0c6 0%, rgba(95,208,198,0) 68%); opacity: .75; animation: drift1 28s ease-in-out infinite alternate; }
.b2 { width: 55vmax; height: 55vmax; right: -25vmax; top: 2vh; background: radial-gradient(circle, #ffc29e 0%, rgba(255,194,158,0) 68%); opacity: .7; animation: drift2 34s ease-in-out infinite alternate; }
.b3 { width: 50vmax; height: 50vmax; left: 10vw; top: 45vh; background: radial-gradient(circle, #b3a6ff 0%, rgba(179,166,255,0) 68%); opacity: .5; animation: drift3 40s ease-in-out infinite alternate; }
.b4 { width: 50vmax; height: 50vmax; left: -22vmax; bottom: -22vmax; background: radial-gradient(circle, #8fe3b8 0%, rgba(143,227,184,0) 68%); opacity: .65; animation: drift2 30s ease-in-out infinite alternate-reverse; }
.b5 { width: 46vmax; height: 46vmax; right: -18vmax; bottom: -18vmax; background: radial-gradient(circle, #8cc3f5 0%, rgba(140,195,245,0) 68%); opacity: .6; animation: drift1 36s ease-in-out infinite alternate-reverse; }
.cursor-glow { position: absolute; width: 480px; height: 480px; left: calc(var(--px, -999px) - 240px); top: calc(var(--py, -999px) - 240px);
  background: radial-gradient(circle, rgba(255,255,255,.5), transparent 65%); border-radius: 50%; transition: left .5s var(--ease), top .5s var(--ease); }
.grain { position: absolute; inset: 0; opacity: .16; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
@keyframes drift1 { to { transform: translate(10vw, 8vh) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-8vw, 12vh) scale(.92); } }
@keyframes drift3 { to { transform: translate(-12vw, -10vh) scale(1.15); } }

/* ---------- material ---------- */
.glass {
  position: relative; isolation: isolate;
  background: var(--mat);
  -webkit-backdrop-filter: blur(var(--mat-blur)) saturate(180%);
  backdrop-filter: blur(var(--mat-blur)) saturate(180%);
  border: .5px solid var(--rim);
  box-shadow: var(--shadow), inset 0 .5px 0 rgba(255,255,255,.9);
}
/* Liquid Glass rim: bright specular edge on the top-left and bottom-right. */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1; pointer-events: none;
  background: linear-gradient(140deg, rgba(255,255,255,.95), rgba(255,255,255,0) 30%, rgba(255,255,255,0) 70%, rgba(255,255,255,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, -50%), rgba(255,255,255,.5), rgba(255,255,255,0) 60%);
  opacity: 0; transition: opacity .35s var(--ease);
}
@media (hover: hover) { .glass:hover::after { opacity: 1; } }
.glass-dark { --mat: rgba(10, 34, 40, .48); --rim: rgba(255,255,255,.25); color: #fff; }
/* Content groups inside a sheet don't stack another blur pass. */
.reader-sheet .glass { -webkit-backdrop-filter: none; backdrop-filter: none; --mat: rgba(255,255,255,.7); }
.liquid .site-header, .liquid .dock {
  -webkit-backdrop-filter: url(#liquid) blur(12px) saturate(190%);
  backdrop-filter: url(#liquid) blur(12px) saturate(190%);
}

/* ---------- typography helpers ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--tint-strong); }
:lang(si) .eyebrow, :lang(ta) .eyebrow { text-transform: none; font-size: 14px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--tint); box-shadow: 0 0 0 0 rgba(15,127,137,.5); animation: pulse 2.4s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(15,127,137,0); } 100% { box-shadow: 0 0 0 0 rgba(15,127,137,0); } }

.section-head { display: grid; gap: 10px; margin-bottom: 22px; }
.section-head > div { display: grid; gap: 10px; }
.section-head h2 { font-size: 30px; font-weight: 700; letter-spacing: -.025em; line-height: 1.12; }
.section-head > p, .section-head-stack > p:last-child { color: var(--label-2); font-size: 17px; max-width: 56ch; }
:lang(si) .section-head h2, :lang(ta) .section-head h2 { font-size: 25px; line-height: 1.32; letter-spacing: 0; }
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1.2fr 1fr; gap: 16px 48px; align-items: end; margin-bottom: 32px; }
  .section-head h2 { font-size: 44px; }
  :lang(si) .section-head h2, :lang(ta) .section-head h2 { font-size: 34px; }
  .section-head-stack { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 17px; font-weight: 600; text-decoration: none; text-align: center; line-height: 1.25;
  transition: transform .3s var(--spring), background .2s, box-shadow .2s;
}
.btn:active { transform: scale(.96); }
.btn-primary { color: #fff; background: linear-gradient(180deg, #16939d, #0c6f78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 24px -10px rgba(12,111,120,.75); }
.btn-primary:hover { background: linear-gradient(180deg, #1aa0aa, #0d7881); }
.btn-glass { color: var(--tint-strong); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; flex: none;
  border: .5px solid rgba(255,255,255,.8); background: rgba(255,255,255,.75); color: var(--label);
  box-shadow: 0 4px 14px -6px rgba(8,40,48,.3), inset 0 .5px 0 #fff; transition: transform .3s var(--spring), background .2s; }
.icon-btn:active:not([disabled]) { transform: scale(.9); }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.icon-btn .i { width: 20px; height: 20px; }
.link-btn { background: none; border: 0; padding: 10px 4px; min-height: 44px; color: var(--tint); font-weight: 500; font-size: 16px; cursor: pointer; }
/* iOS settings-style icon tile */
.chip-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; flex: none; color: #fff;
  background: linear-gradient(180deg, #1fa7b0, #0c727b); box-shadow: inset 0 .5px 0 rgba(255,255,255,.5), 0 4px 10px -4px rgba(12,114,123,.6); }
.chip-icon .i { width: 22px; height: 22px; }

main, .site-footer { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- segmented control (iOS) ---------- */
.lang { display: inline-grid; grid-auto-flow: column; grid-auto-columns: auto; position: relative; padding: 2px; border-radius: 999px; flex: none;
  --mat: rgba(118, 118, 128, .14); border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.lang::before, .lang::after { display: none; }
.lang-blob { position: absolute; top: 2px; bottom: 2px; left: 0; width: var(--w, 0); transform: translateX(var(--x, 0)); border-radius: 999px;
  background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04), inset 0 0 0 .5px rgba(0,0,0,.04);
  transition: transform .45s var(--spring), width .35s var(--spring); }
.lang-btn { position: relative; z-index: 1; border: 0; background: none; cursor: pointer; min-height: 36px; padding: 0 12px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--label); white-space: nowrap; }
.lang-btn[aria-pressed="true"] { font-weight: 650; }
body:not(.js-ready) .lang-btn[aria-pressed="true"] { background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.12); }

/* ---------- navigation bar ---------- */
.site-header {
  position: fixed; z-index: 40; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  width: calc(100% - 20px); max-width: var(--max);
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border-radius: 999px;
  --mat: rgba(255,255,255,.55);
}
.scrolled .site-header { --mat: rgba(255,255,255,.74); }
.site-header .lang { --mat: rgba(118, 118, 128, .14); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; flex: 1; }
.brand-logo { width: 40px; height: 40px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1.5px rgba(255,255,255,.9), 0 4px 12px -4px rgba(8,40,48,.4); }
.brand-text { display: grid; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 15px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.brand-text small { display: none; font-size: 10px; letter-spacing: .08em; color: var(--label-3); font-weight: 600; white-space: nowrap; }
.primary-nav { display: none; }
.site-header .lang-btn { padding: 0 10px; font-size: 13px; min-height: 40px; }
@media (max-width: 370px) { .brand-text { display: none; } }
@media (min-width: 900px) {
  .site-header { top: 14px; width: calc(100% - 48px); padding: 8px 8px 8px 12px; }
  .brand { flex: none; }
  .brand-logo { width: 44px; height: 44px; }
  .brand-text strong { font-size: 17px; }
  .brand-text small { display: block; }
  .primary-nav { display: flex; gap: 2px; margin-left: auto; }
  .primary-nav a { text-decoration: none; padding: 9px 15px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--label-2); transition: background .2s, color .2s; }
  .primary-nav a:hover { background: rgba(255,255,255,.7); color: var(--label); }
  .site-header .lang-btn { padding: 0 14px; font-size: 14px; min-height: 36px; }
}

/* ---------- hero ---------- */
.hero { display: grid; gap: 36px; padding: 92px 0 36px; }
.hero > * { min-width: 0; }
.hero h1 { font-size: 40px; font-weight: var(--display-weight); letter-spacing: -.035em; line-height: 1.04; margin: 12px 0 14px; }
.hero h1 em { display: block; font-style: normal; font-weight: 700;
  background: linear-gradient(95deg, #0c6f78 0%, #17a2a8 45%, #3db5b4 70%, #c98f22 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
:lang(si) .hero h1, :lang(ta) .hero h1 { font-size: 28px; line-height: 1.3; letter-spacing: 0; }
.hero-lead { font-size: 18px; color: var(--label-2); max-width: 46ch; }
.hero-actions { display: grid; gap: 10px; margin: 24px 0 16px; }
.hero-note { display: inline-flex; align-items: center; gap: 8px; color: var(--label-2); font-size: 15px; }
.hero-note .i { color: var(--tint); }
.hero-visual { position: relative; width: min(100%, 440px); justify-self: center; padding-bottom: 40px; }
.hero-photo { margin: 0; padding: 7px; border-radius: 38px; aspect-ratio: 4 / 4.4; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 31px; }
.hero-photo figcaption { position: absolute; left: 16px; right: 16px; top: 16px; padding: 10px 14px; border-radius: 18px; }
.hero-photo figcaption span { display: block; font-weight: 650; font-size: 15px; }
.hero-photo figcaption p { font-size: 13px; opacity: .9; }
.chip { position: absolute; display: flex; align-items: center; gap: 10px; border-radius: 20px; padding: 10px 14px 10px 10px; --mat: rgba(255,255,255,.82); }
.chip-note { left: 10px; right: 10px; bottom: 0; }
.chip-note strong { display: block; font-size: 15px; line-height: 1.3; }
.chip-note p { font-size: 13px; color: var(--label-2); line-height: 1.35; }
.chip-note .chip-icon { width: 36px; height: 36px; border-radius: 10px; }
.chip-small { display: none; }
.chip-small .i { color: var(--gold); }
.float-1 { animation: bob 7s ease-in-out infinite; }
.float-2 { animation: bob 8s ease-in-out -3s infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.orb { position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.95) 0 7%, rgba(255,255,255,.35) 22%, rgba(255,255,255,.06) 55%, rgba(79,195,198,.22) 100%);
  box-shadow: inset -6px -8px 18px rgba(15,127,137,.22), inset 5px 6px 14px rgba(255,255,255,.7), 0 14px 30px -14px rgba(8,40,48,.35);
  -webkit-backdrop-filter: blur(4px) saturate(160%); backdrop-filter: blur(4px) saturate(160%); }
.orb-a { width: 64px; height: 64px; right: -6px; top: -22px; animation: bob 9s ease-in-out infinite; }
.orb-b, .orb-c { display: none; }
@media (max-width: 999px) {
  .hero-visual { display: grid; gap: 12px; padding-bottom: 0; }
  .hero-photo { aspect-ratio: auto; }
  .hero-photo img { height: auto; aspect-ratio: 4 / 4.4; }
  .hero-photo figcaption {
    position: absolute; inset: auto 16px 16px; color: var(--label); text-shadow: 0 1px 0 rgba(255,255,255,.28);
    background: linear-gradient(145deg, rgba(255,255,255,.28), rgba(255,255,255,.1) 65%);
    -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
    box-shadow: inset 0 1px .5px rgba(255,255,255,.9), inset 0 -1px .5px rgba(255,255,255,.35), inset 0 0 14px rgba(255,255,255,.12), 0 8px 22px -12px rgba(8,40,48,.35);
  }
  .hero-photo figcaption p { opacity: 1; }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .hero-photo figcaption { background: rgba(246,251,251,.94); }
  }
  .hero-visual .chip-note { position: relative; inset: auto; margin: 0 10px; animation: none; }
}
@media (min-width: 700px) {
  .hero h1 { font-size: 56px; }
  :lang(si) .hero h1, :lang(ta) .hero h1 { font-size: 40px; }
  .hero-actions { display: flex; flex-wrap: wrap; }
}
@media (min-width: 1000px) {
  .hero { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 64px; min-height: min(100svh, 900px); padding: 120px 0 56px; }
  .hero h1 { font-size: 72px; }
  :lang(si) .hero h1, :lang(ta) .hero h1 { font-size: 48px; }
  .hero-lead { font-size: 20px; }
  .hero-visual { display: block; width: min(100%, 440px); padding-bottom: 0; }
  .hero-photo { border-radius: 48px; padding: 10px; aspect-ratio: 4 / 5; }
  .hero-photo img { border-radius: 39px; }
  .hero-photo figcaption { top: auto; bottom: 22px; left: 22px; right: 22px; }
  .chip-note { left: -64px; right: auto; top: auto; bottom: 22%; width: 280px; max-width: calc(100% - 16px); animation: none; }
  .chip-small { display: flex; right: -12px; top: -22px; max-width: calc(100% - 16px); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; line-height: 1.4; animation: none; }
  .chip-small .i { width: 22px; height: 22px; }
  .orb-a { width: 110px; height: 110px; right: -24px; top: -30px; }
  .orb-b { display: block; width: 52px; height: 52px; left: -30px; bottom: 16%; animation: bob 6s ease-in-out -2s infinite; }
  .orb-c { display: block; width: 32px; height: 32px; right: 14%; bottom: -14px; animation: bob 5s ease-in-out -1s infinite; }
}

/* ---------- guide library ---------- */
.topics { padding: 28px 0 20px; }
.search { display: flex; align-items: center; gap: 10px; border-radius: 999px; padding: 0 16px; margin-bottom: 18px; max-width: 620px; min-height: 50px; }
.search > .i { color: var(--label-3); width: 20px; height: 20px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 17px; color: var(--label); padding: 12px 0; outline: none; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--label-3); }
.search:focus-within { box-shadow: var(--shadow), 0 0 0 3px rgba(15,127,137,.3); }
.search-count { font-size: 13px; font-weight: 600; color: var(--label-3); font-variant-numeric: tabular-nums; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.card { --t: rgba(143,220,184,.5); border-radius: 22px; padding: 6px; display: flex; flex-direction: column; min-width: 0;
  transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0));
  transition: transform .45s var(--ease), box-shadow .35s var(--ease); }
@media (hover: hover) { .card:hover { box-shadow: var(--shadow-lg); } }
.tint-mint { --t: rgba(143,220,184,.55); }
.tint-peach { --t: rgba(255,191,152,.55); }
.tint-blue { --t: rgba(134,191,240,.5); }
.tint-lilac { --t: rgba(169,150,236,.5); }
.card-art { position: relative; border-radius: 17px; overflow: hidden; aspect-ratio: 3 / 2; background: radial-gradient(circle at 30% 20%, #fff, var(--t)); }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
@media (hover: hover) { .card:hover .card-art img { transform: scale(1.05); } }
.card-num { position: absolute; top: 6px; right: 6px; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; font-family: var(--font-round);
  font-variant-numeric: tabular-nums; --mat: rgba(255,255,255,.72); box-shadow: none; }
.card-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 8px 6px; flex: 1; min-width: 0; }
.card-body h3 { font-size: 15px; font-weight: 650; line-height: 1.25; letter-spacing: -.015em; }
.card-body p { color: var(--label-2); font-size: 13px; line-height: 1.35; }
:lang(si) .card-body h3, :lang(ta) .card-body h3 { letter-spacing: 0; line-height: 1.4; }
.card-cta { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; font-weight: 600; font-size: 14px; color: var(--tint); }
.cta-bubble { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--tint-soft); color: var(--tint); transition: transform .35s var(--spring), background .2s, color .2s; }
.cta-bubble .i { width: 16px; height: 16px; stroke-width: 2.4; }
@media (hover: hover) { .card:hover .cta-bubble { transform: translateX(3px); background: var(--tint); color: #fff; } }
.card-link { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.card:has(.card-link:active) { transform: scale(.97); }
@media (min-width: 640px) {
  .card { padding: 8px; border-radius: var(--r-card); }
  .card-art { border-radius: 19px; }
  .card-body { padding: 14px 10px 8px; gap: 5px; }
  .card-body h3 { font-size: 17px; }
  .card-body p { font-size: 14px; }
  .card-num { top: 8px; right: 8px; font-size: 12px; padding: 2px 9px; }
  .cta-bubble { width: 32px; height: 32px; }
}
.empty { grid-column: 1 / -1; display: grid; justify-items: center; text-align: center; gap: 8px; padding: 40px 20px; border-radius: var(--r-card); }
.empty > .i { width: 32px; height: 32px; color: var(--label-3); }
.empty p { color: var(--label-2); }

/* ---------- sections ---------- */
/* On phones sections sit directly on the wallpaper (like iOS grouped screens). */
.panel { padding: 36px 0 8px; }
.panel.glass { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.panel.glass::before, .panel.glass::after { display: none; }
.prepare-grid { display: grid; gap: 22px; }
.prepare-grid > *, .about-open > * { min-width: 0; }
.prepare-side { display: grid; gap: 22px; align-content: start; }
@media (min-width: 960px) {
  .panel { padding: 64px 0 20px; }
  .prepare-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 36px; align-items: start; }
  .prepare-side { position: sticky; top: 96px; }
}
.framed { margin: 0; padding: 6px; border-radius: var(--r-card); }
.framed img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 20px; }
.framed figcaption { padding: 10px 10px 4px; font-size: 13px; color: var(--label-2); }

/* Reminders-style checklist */
.pack { border-radius: var(--r-group); padding: 16px 16px 4px; }
.pack-head { display: flex; gap: 12px; align-items: center; }
.pack-head h3 { font-size: 20px; font-weight: 700; line-height: 1.25; }
.pack-head p { color: var(--label-2); font-size: 14px; }
.pack-progress { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.pack-count { font-size: 13px; font-weight: 600; color: var(--label-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.liquid-bar { flex: 1; height: 6px; border-radius: 999px; overflow: hidden; background: var(--fill-2); }
.liquid-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #36b9b6, var(--tint)); transition: width .6s var(--spring); }
.pack-items { display: grid; }
.check { display: flex; align-items: center; gap: 12px; padding: 11px 0; min-height: 48px; cursor: pointer; position: relative; font-size: 16px; }
.check + .check::before { content: ""; position: absolute; top: 0; left: 36px; right: 0; height: .5px; background: var(--separator); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex: none; color: transparent;
  border: 1.5px solid rgba(30,50,56,.3); transition: background .25s, border-color .25s, transform .35s var(--spring); }
.check .box .i { width: 14px; height: 14px; stroke-width: 3.2; }
.check input:checked + .box { background: var(--tint); border-color: var(--tint); color: #fff; transform: scale(1.06); }
.check input:checked ~ span:last-child { color: var(--label-3); }
.check input:focus-visible + .box { outline: 3px solid rgba(15,127,137,.5); outline-offset: 2px; }
.pack-foot { display: flex; justify-content: space-between; align-items: center; border-top: .5px solid var(--separator); }
.pack-done { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--green); }

/* Settings-style inset grouped list */
.accordion { display: grid; min-width: 0; align-content: start; }
.hint { display: flex; align-items: center; gap: 6px; color: var(--label-2); font-size: 13px; text-transform: uppercase; letter-spacing: .02em; padding: 0 16px 8px; }
:lang(si) .hint, :lang(ta) .hint { text-transform: none; }
.hint .i { display: none; }
.acc { border-radius: 0; border: 0; box-shadow: none; }
.acc::before, .acc::after { display: none; }
.acc + .acc > summary::before { content: ""; position: absolute; top: 0; left: 58px; right: 0; height: .5px; background: var(--separator); }
.acc summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; min-height: 60px; position: relative; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary:active { background: rgba(0,0,0,.04); }
.acc-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; flex: none; font-weight: 700; font-size: 13px; font-family: var(--font-round);
  color: #fff; background: linear-gradient(180deg, #1fa7b0, #0c727b); box-shadow: inset 0 .5px 0 rgba(255,255,255,.5); }
.acc:nth-of-type(2) .acc-num { background: linear-gradient(180deg, #ffad42, #e07f06); }
.acc:nth-of-type(3) .acc-num { background: linear-gradient(180deg, #5d9cf0, #2a6fd0); }
.acc:nth-of-type(4) .acc-num { background: linear-gradient(180deg, #8f84f0, #5b5fd6); }
.acc:nth-of-type(5) .acc-num { background: linear-gradient(180deg, #4fcf8c, #2a9663); }
.acc:nth-of-type(6) .acc-num { background: linear-gradient(180deg, #f07a9a, #d6466e); }
.acc-help .acc-num { background: linear-gradient(180deg, #f2675a, #d63b2a) !important; }
.acc-label { flex: 1; display: grid; gap: 1px; min-width: 0; }
.acc-label strong { font-size: 16px; font-weight: 600; line-height: 1.3; }
.acc-label span { font-size: 13px; color: var(--label-2); line-height: 1.35; }
.acc-toggle { color: var(--label-3); display: grid; place-items: center; width: 22px; flex: none; transition: transform .35s var(--spring); }
.acc-toggle .i { width: 18px; height: 18px; stroke-width: 2.4; }
.acc[open] .acc-toggle { transform: rotate(180deg); color: var(--tint); }
.acc-body { padding: 0 16px 16px 58px; display: grid; gap: 10px; color: var(--label-2); font-size: 16px; }
.acc[open] .acc-body { animation: rise .35s var(--ease); }
.urgent { padding: 12px 14px; border-radius: 14px; background: rgba(214,59,42,.09); color: #7d2116; font-weight: 500; }
.fineprint { font-size: 13px; color: var(--label-2); padding: 8px 16px 18px; }
@media (max-width: 480px) { .acc-body { padding-left: 16px; } }
@keyframes rise { from { opacity: 0; transform: translateY(-4px); } }

.notice { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--r-group); padding: 14px 16px; }
.notice > .i { color: var(--tint); width: 22px; height: 22px; margin-top: 1px; }
.notice > div { min-width: 0; }
.notice h3 { font-size: 16px; font-weight: 650; margin-bottom: 2px; }
.notice p { color: var(--label-2); font-size: 15px; }
.notice-warm { --mat: rgba(255,240,214,.86) !important; }
.notice-warm > .i { color: var(--orange); }

/* surgery-day journey */
.journey-track { position: relative; margin: 0 calc(-1 * var(--gutter)) 14px; padding: 12px var(--gutter) 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: var(--gutter); }
.journey-track::-webkit-scrollbar { display: none; }
.journey-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 92px); gap: 6px; width: max-content; position: relative; }
.journey-line { position: absolute; top: 48px; left: calc(var(--gutter) + 46px); width: calc(6 * 98px); height: 4px; border-radius: 999px; background: var(--fill-2); }
.journey-line span { display: block; height: 100%; width: calc(var(--progress) * 100%); border-radius: inherit; background: linear-gradient(90deg, #8fdcb8, #36b9b6, var(--tint)); transition: width .6s var(--spring); }
.journey-step { display: grid; justify-items: center; gap: 8px; width: 100%; border: 0; background: none; cursor: pointer; padding: 0 0 4px; text-align: center; scroll-snap-align: start; }
.journey-bubble { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; transition: transform .45s var(--spring), box-shadow .3s; }
.journey-bubble img { width: 44px; height: 44px; object-fit: contain; }
.journey-n { position: absolute; top: -3px; right: -3px; min-width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 700; font-family: var(--font-round);
  background: #fff; color: var(--label-2); box-shadow: 0 2px 6px rgba(0,0,0,.14); transition: background .25s, color .25s; }
.journey-label { font-size: 13px; font-weight: 500; color: var(--label-2); line-height: 1.25; }
.journey-step.is-active .journey-bubble { transform: scale(1.08); box-shadow: var(--shadow), 0 0 0 3px rgba(15,127,137,.45); }
.journey-step.is-active .journey-n, .journey-step.is-done .journey-n { background: var(--tint); color: #fff; }
.journey-step.is-active .journey-label { color: var(--label); font-weight: 650; }
.journey-detail { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; align-items: start; border-radius: var(--r-group); padding: 16px; }
.journey-detail > img { width: 56px; height: 56px; object-fit: contain; animation: pop .45s var(--spring); }
.journey-detail .eyebrow { color: var(--label-3); font-family: var(--font-round); font-variant-numeric: tabular-nums; }
.journey-detail strong { display: block; font-size: 19px; margin: 2px 0 4px; line-height: 1.25; }
.journey-detail p { color: var(--label-2); font-size: 16px; animation: rise .35s var(--ease); }
.journey-nav { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@media (min-width: 900px) {
  .journey-track { overflow: visible; margin: 0 0 18px; padding: 12px 0 6px; }
  .journey-steps { grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; }
  .journey-line { left: calc(100% / 14); width: calc(100% - 100% / 7); top: 54px; }
  .journey-bubble { width: 84px; height: 84px; }
  .journey-bubble img { width: 52px; height: 52px; }
  .journey-detail { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; padding: 22px 26px; gap: 20px; }
  .journey-detail > img { width: 80px; height: 80px; }
  .journey-nav { grid-column: auto; }
}

/* about */
.about { padding: 40px 0 16px; }
.about-open { display: grid; gap: 22px; margin-bottom: 22px; align-items: center; }
.about-open .section-head { margin: 0; grid-template-columns: 1fr; }
.framed-blob img { aspect-ratio: 4 / 3; }
.about-cards { display: grid; gap: 12px; }
.about-card { border-radius: var(--r-group); padding: 18px; display: grid; gap: 6px; align-content: start; }
.about-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.about-num { font-family: var(--font-round); font-weight: 700; font-size: 13px; color: var(--label-3); font-variant-numeric: tabular-nums; }
.about-card h3 { font-size: 18px; font-weight: 650; }
.about-card p { color: var(--label-2); font-size: 15px; }
.address p:first-child { font-weight: 600; color: var(--label); }
.principles { border-radius: var(--r-group); padding: 18px 16px 6px; margin-top: 22px; }
.principles h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.principles dl { display: grid; margin: 0; }
.principles dl > div { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; padding: 12px 0; position: relative; }
.principles dl > div + div::before { content: ""; position: absolute; top: 0; left: 50px; right: 0; height: .5px; background: var(--separator); }
.principles .chip-icon { grid-row: span 2; width: 38px; height: 38px; border-radius: 10px; }
.principles dl > div:nth-child(2) .chip-icon { background: linear-gradient(180deg, #5d9cf0, #2a6fd0); }
.principles dl > div:nth-child(3) .chip-icon { background: linear-gradient(180deg, #ffad42, #e07f06); }
.principles dl > div:nth-child(4) .chip-icon { background: linear-gradient(180deg, #f07a9a, #d6466e); }
.principles dt { font-weight: 600; font-size: 16px; }
.principles dd { margin: 0; color: var(--label-2); font-size: 14px; }
.team { border-radius: var(--r-group); padding: 20px 18px; margin-top: 22px; display: grid; gap: 12px; }
.team h3 { font-size: 20px; font-weight: 700; }
.team > p { color: var(--label-2); font-size: 16px; max-width: 80ch; }
@media (min-width: 900px) {
  .about { padding: 72px 0 24px; }
  .about-open { grid-template-columns: 1fr 1fr; gap: 56px; margin-bottom: 32px; }
  .about-cards { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .about-card { padding: 24px; }
  .principles { padding: 26px 28px 14px; }
  .principles dl { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .principles dl > div:nth-child(2)::before { display: none; }
  .team { padding: 28px; }
}

/* footer */
.site-footer { display: grid; justify-items: center; gap: 10px; text-align: center; border-radius: var(--r-card); padding: 18px 16px; margin-top: 28px; margin-bottom: calc(100px + env(safe-area-inset-bottom)); }
.site-footer > p { color: var(--label-2); font-size: 14px; }
.site-footer .brand { flex: none; }
.site-footer .brand-logo { width: 36px; height: 36px; }
.site-footer .btn { min-height: 44px; font-size: 15px; padding: 8px 18px; }
@media (min-width: 900px) {
  .site-footer { display: flex; justify-content: space-between; border-radius: 999px; padding: 8px 8px 8px 14px; margin-bottom: 40px; }
}

/* ---------- iOS 26 floating tab bar ---------- */
.dock {
  position: fixed; z-index: 45; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(calc(100% - 24px), 440px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 4px; border-radius: 999px;
  --mat: rgba(255,255,255,.64);
  box-shadow: var(--shadow-lg), inset 0 .5px 0 rgba(255,255,255,.9);
  transition: transform .45s var(--sheet), opacity .3s;
}
.dock a { position: relative; z-index: 1; display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 54px; padding: 6px 2px; border-radius: 999px; min-width: 0;
  text-decoration: none; font-size: 10.5px; font-weight: 600; letter-spacing: 0; line-height: 1.2; color: var(--label); transition: color .25s; }
.dock a span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.dock a .i { width: 24px; height: 24px; stroke-width: 1.9; transition: transform .35s var(--spring); }
.dock a[aria-current] { color: var(--tint); }
.dock a:active .i { transform: scale(.88); }
.dock-lens { position: absolute; top: 4px; bottom: 4px; left: 0; width: var(--lw, 0); transform: translateX(var(--lx, 0)); border-radius: 999px;
  background: rgba(118,118,128,.15); box-shadow: inset 0 .5px 0 rgba(255,255,255,.7);
  transition: transform .5s var(--spring), width .4s var(--spring); }
.reader-open .dock { transform: translate(-50%, 160%); opacity: 0; }
body:not(.js-ready) .dock-lens { display: none; }
@media (min-width: 900px) { .dock { display: none; } }

/* ---------- guide sheet ---------- */
.reader { position: fixed; inset: 0; z-index: 60; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(0, 20, 26, .28); opacity: 0; transition: opacity .35s var(--ease); }
.reader.is-open { opacity: 1; }
.reader-sheet { position: relative; min-height: calc(100% - 10px); max-width: 1080px; margin: 0 auto; border-radius: 38px 38px 0 0;
  padding: 0 var(--gutter) calc(32px + env(safe-area-inset-bottom));
  --mat: rgba(244, 250, 250, .92); --mat-blur: 40px; border: 0;
  box-shadow: 0 -10px 40px -10px rgba(0,20,26,.35);
  transform: translateY(100%); transition: transform .5s var(--sheet); }
.reader-sheet.glass { -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%); }
.reader.is-open .reader-sheet { transform: none; }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: rgba(60,60,67,.3); margin: 7px auto 0; }
.reader-toolbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter) 14px;
  background: linear-gradient(rgba(244,250,250,.97) 70%, rgba(244,250,250,0)); }
.nav-back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 14px 0 8px; border: .5px solid rgba(255,255,255,.8); border-radius: 999px; cursor: pointer; min-width: 0;
  background: rgba(255,255,255,.8); color: var(--tint); font-size: 16px; font-weight: 500; box-shadow: 0 4px 14px -6px rgba(8,40,48,.3), inset 0 .5px 0 #fff; }
.nav-back .i { width: 22px; height: 22px; stroke-width: 2.4; }
.nav-back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.reader-hero { display: grid; gap: 18px; padding: 4px 0 18px; }
.reader-hero > * { min-width: 0; }
.reader-hero-copy { display: grid; gap: 8px; justify-items: start; }
.reader-hero h2 { font-size: 32px; font-weight: var(--display-weight); letter-spacing: -.03em; line-height: 1.1; }
:lang(si) .reader-hero h2, :lang(ta) .reader-hero h2 { font-size: 26px; line-height: 1.3; letter-spacing: 0; }
.reader-subtitle { font-size: 18px; color: var(--label-2); }
.lang-reader { margin-top: 6px; }
.reader-art { border-radius: var(--r-card); padding: 6px; --mat: radial-gradient(circle at 30% 20%, #fff, var(--t, rgba(143,220,184,.4))); background: radial-gradient(circle at 30% 20%, #fff, var(--t, rgba(143,220,184,.4))); }
.reader-art img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 20px; }
.reader-sheet > .notice, .reader-sheet > .child-explain { margin-bottom: 12px; }
.child-trigger { width: 100%; min-height: 52px; justify-content: flex-start; padding: 12px 16px; border-radius: var(--r-group); font-size: 16px; color: var(--label); }
.child-trigger .i { color: var(--gold); width: 24px; height: 24px; }
.modes .eyebrow { margin: 0 0 8px 4px; color: var(--label-2); }
.modes-row { display: grid; border-radius: var(--r-group); overflow: hidden; background: rgba(255,255,255,.7); box-shadow: var(--shadow); }
.mode { display: flex; gap: 12px; align-items: center; padding: 12px 40px 12px 16px; text-decoration: none; text-align: left; cursor: pointer; min-height: 60px; position: relative;
  border-radius: 0; border: 0; --mat: transparent; box-shadow: none; }
.mode::after { display: none; }
.mode::before { display: none; }
.mode + .mode { box-shadow: inset 0 .5px 0 var(--separator); }
.mode:active { --mat: rgba(0,0,0,.04); }
.mode > .i { width: 24px; height: 24px; color: var(--tint); }
.mode strong { display: block; font-size: 16px; font-weight: 600; }
.mode small { color: var(--label-2); font-size: 13px; }
.mode.is-selected strong { color: var(--tint); }
.mode.is-selected::before { display: block; content: ""; position: absolute; right: 18px; top: 50%; left: auto; bottom: auto; width: 7px; height: 13px; margin-top: -9px; padding: 0;
  border: solid var(--tint); border-width: 0 2.5px 2.5px 0; border-radius: 0; transform: rotate(45deg); background: none; -webkit-mask: none; mask: none; z-index: 1; }
.child-panel { margin-top: 12px; border-radius: var(--r-group); padding: 16px; animation: rise .35s var(--ease); --mat: rgba(255,246,226,.94) !important; }
.child-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.child-panel-head h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 650; }
.child-panel-head h3 .i { color: var(--gold); width: 24px; height: 24px; }
.child-panel-head .icon-btn { width: 36px; height: 36px; background: var(--fill); box-shadow: none; border: 0; color: var(--label-2); }
.child-panel-head .icon-btn .i { width: 16px; height: 16px; stroke-width: 2.6; }
.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 2px; border-radius: 10px; background: var(--fill); width: 100%; max-width: 420px; }
.segmented button { border: 0; background: none; min-height: 36px; padding: 0 6px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--label); transition: background .25s, box-shadow .25s; }
.segmented button[aria-selected="true"] { background: #fff; font-weight: 650; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); }
.child-copy { margin-top: 14px; font-size: 18px; line-height: 1.55; animation: rise .35s var(--ease); }
.reader-layout { display: grid; gap: 12px; margin-top: 12px; }
.reader-layout > * { min-width: 0; }
.toc { border-radius: var(--r-group); padding: 0; }
.toc-details summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; min-height: 52px; cursor: pointer; list-style: none; }
.toc-details summary::-webkit-details-marker { display: none; }
.toc-details summary .eyebrow { color: var(--label); font-size: 15px; text-transform: none; letter-spacing: -.01em; font-weight: 600; flex: 1; }
.toc-count { font-size: 13px; color: var(--label-3); font-weight: 600; font-family: var(--font-round); }
.toc-details summary > .i { color: var(--label-3); width: 18px; height: 18px; stroke-width: 2.4; transition: transform .3s var(--spring); }
.toc-details[open] summary > .i { transform: rotate(180deg); }
.toc ol { list-style: none; margin: 0; padding: 0 6px 8px; display: grid; }
.toc a { display: flex; gap: 10px; padding: 10px; border-radius: 12px; text-decoration: none; font-size: 15px; line-height: 1.35; color: var(--label); min-height: 44px; align-items: flex-start; }
.toc a span { font-weight: 700; font-size: 12px; color: var(--label-3); padding-top: 2px; font-family: var(--font-round); min-width: 18px; }
.toc a:active, .toc a:hover { background: var(--fill); }
.toc a.is-current { background: var(--tint-soft); color: var(--tint-strong); font-weight: 600; }
.toc a.is-current span { color: var(--tint); }
.reader-text { display: grid; gap: 12px; }
.reader-section { border-radius: var(--r-group); padding: 18px; scroll-margin-top: 72px; }
.reader-num { font-family: var(--font-round); font-weight: 700; font-size: 13px; color: var(--tint); font-variant-numeric: tabular-nums; }
.reader-section h3 { font-size: 21px; font-weight: 700; margin: 4px 0 10px; line-height: 1.25; }
.reader-section p { color: var(--label-2); font-size: 17px; line-height: 1.55; }
.reader-section p + p { margin-top: 12px; }
@media (min-width: 900px) {
  .reader { padding: 24px; }
  .reader-sheet { border-radius: 38px; min-height: 0; padding-bottom: 48px; transform: translateY(60px) scale(.98); opacity: .6; transition: transform .5s var(--sheet), opacity .4s; }
  .reader.is-open .reader-sheet { opacity: 1; }
  .grabber { display: none; }
  .reader-toolbar { padding-top: 16px; }
  .reader-hero { grid-template-columns: 1.15fr 1fr; align-items: center; gap: 32px; padding: 8px 0 28px; }
  .reader-hero h2 { font-size: 48px; }
  :lang(si) .reader-hero h2, :lang(ta) .reader-hero h2 { font-size: 36px; }
  .modes-row { grid-template-columns: repeat(2, minmax(0, 1fr)); background: none; box-shadow: none; gap: 12px; overflow: visible; }
  .mode { --mat: rgba(255,255,255,.7); border-radius: var(--r-group); box-shadow: var(--shadow) !important; padding-right: 16px; }
  .mode.is-selected { box-shadow: var(--shadow), 0 0 0 2px var(--tint) !important; }
  .mode.is-selected::before { display: none; }
  .reader-layout { grid-template-columns: 290px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 20px; }
  .toc { position: sticky; top: 76px; max-height: calc(100vh - 140px); overflow: auto; }
  .toc-details summary { pointer-events: none; }
  .toc-details summary > .i { display: none; }
  .reader-section { padding: 24px 28px; }
}

/* no-JS fallback */
.nojs { margin: 32px 0; padding: 20px; border-radius: var(--r-group); }
.nojs details { padding: 10px 0; border-bottom: .5px solid var(--separator); }
.nojs summary { cursor: pointer; font-weight: 600; }
.nojs h2 { margin: 20px 0 6px; }
.nojs h3 { margin: 14px 0 4px; font-size: 17px; }

/* ---------- motion ---------- */
.js-ready [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease) var(--d, 0ms), transform .7s var(--ease) var(--d, 0ms); }
.js-ready [data-reveal].in { opacity: 1; transform: none; }
.js-ready .card[data-reveal].in { transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition: opacity .7s var(--ease) var(--d, 0ms), transform .45s var(--ease), box-shadow .35s; }
.hero-copy > * { animation: enter .8s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .06s; }
.hero-copy > :nth-child(3) { animation-delay: .12s; }
.hero-copy > :nth-child(4) { animation-delay: .18s; }
.hero-copy > :nth-child(5) { animation-delay: .24s; }
.hero-visual { animation: enter 1s var(--ease) .1s both; }
@keyframes enter { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .blob, .cursor-glow { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .reader-sheet { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; --mat: #f6fbfb !important; }
  .glass-dark { --mat: #0a2228 !important; }
}
@media (forced-colors: active) {
  .glass { border: 1px solid CanvasText; }
  .lang-blob, .dock-lens { background: Highlight; }
}

/* ---------- print: only the open guide ---------- */
@media print {
  body { background: #fff; }
  body > *:not(.reader) { display: none !important; }
  .reader { position: static; overflow: visible; padding: 0; background: none; opacity: 1; }
  .reader-sheet { transform: none; box-shadow: none; --mat: none; padding: 0; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .grabber, .reader-toolbar, .child-explain, .toc, .lang, .glass::before, .glass::after { display: none !important; }
  .glass { box-shadow: none !important; --mat: none; border: 0; }
  .reader-layout { display: block; }
  .reader-section { padding: 0 0 12px; break-inside: avoid; }
  .reader-art { max-width: 300px; }
}

/* ---------- long-script refinements (Sinhala / Tamil) ---------- */
:lang(si) .dock a span, :lang(ta) .dock a span {
  white-space: normal; text-align: center; font-size: 9.5px; line-height: 1.15;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
:lang(si) .dock a, :lang(ta) .dock a { min-height: 58px; }
.child-trigger { text-align: left; }
.pack-head { align-items: flex-start; }

/* =========================================================
   LIQUID GLASS LAYER
   One material, applied everywhere. Built from what Safari
   supports (blur, saturation, layered specular insets) so iPhones
   get the full look; Chromium adds true edge refraction.
   ========================================================= */
:root {
  --lg-blur: 22px;
  --lg-sat: 190%;
  /* thickness: top specular, side rims, inner glow, bottom depth */
  --lg-edge:
    inset 0 1px .5px rgba(255,255,255,.95),
    inset 0 -1px .5px rgba(255,255,255,.5),
    inset 1px 0 .5px rgba(255,255,255,.55),
    inset -1px 0 .5px rgba(255,255,255,.35),
    inset 0 0 14px rgba(255,255,255,.32),
    inset 0 -12px 22px -16px rgba(10,70,80,.22);
  --lg-drop: 0 12px 32px -14px rgba(8,40,48,.32), 0 2px 6px -2px rgba(8,40,48,.1);
  --lg-glare: linear-gradient(180deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,.12) 34%, rgba(255,255,255,0) 52%);
}

.glass {
  background: var(--lg-glare), var(--mat);
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-sat)) brightness(1.05);
  backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-sat)) brightness(1.05);
  border: 0;
  box-shadow: var(--lg-edge), var(--lg-drop);
}
/* Rim light: brightest on the top-left and bottom-right like a lit droplet. */
.glass::before {
  padding: 1.2px;
  background: conic-gradient(from 210deg at 50% 50%,
    rgba(255,255,255,1) 0deg, rgba(255,255,255,.15) 70deg, rgba(255,255,255,.05) 130deg,
    rgba(255,255,255,.85) 180deg, rgba(255,255,255,.12) 250deg, rgba(255,255,255,.05) 310deg, rgba(255,255,255,1) 360deg);
}
.glass::after {
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, -60%), rgba(255,255,255,.55), rgba(255,255,255,0) 62%);
  mix-blend-mode: soft-light;
}

/* Chromium: real refraction at the edges of chrome and controls. */
.liquid :is(.site-header, .dock, .search, .btn-glass, .icon-btn, .nav-back, .chip, .card-num, .journey-bubble, .pf-switch) {
  -webkit-backdrop-filter: url(#lens) blur(10px) saturate(190%) brightness(1.06);
  backdrop-filter: url(#lens) blur(10px) saturate(190%) brightness(1.06);
}

/* ---- navigation bar & tab bar: clearest glass, strongest rim ---- */
.site-header { --mat: rgba(255,255,255,.3); }
.scrolled .site-header { --mat: rgba(255,255,255,.5); }
.dock { --mat: rgba(255,255,255,.34); box-shadow: var(--lg-edge), 0 18px 44px -18px rgba(8,40,48,.45), 0 2px 8px -2px rgba(8,40,48,.12); }
/* Tab bar selection: a clear liquid droplet that springs between tabs. */
.dock-lens {
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.38));
  box-shadow: inset 0 1px .5px #fff, inset 0 -1px .5px rgba(255,255,255,.6), inset 0 0 10px rgba(255,255,255,.6),
    inset 0 -6px 12px -8px rgba(15,127,137,.35), 0 6px 16px -6px rgba(8,40,48,.35);
  transition: transform .6s var(--spring), width .45s var(--spring);
}

/* ---- segmented controls: recessed track, droplet thumb ---- */
.lang, .segmented, .pf-switch {
  background: linear-gradient(180deg, rgba(118,118,128,.16), rgba(118,118,128,.09));
  box-shadow: inset 0 1px 2px rgba(8,40,48,.14), inset 0 -1px 0 rgba(255,255,255,.6);
}
.lang-blob, .segmented button[aria-selected="true"], .pf-switch .is-selected {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.78));
  box-shadow: inset 0 1px .5px #fff, inset 0 -1px .5px rgba(255,255,255,.7), inset 0 -5px 10px -7px rgba(15,127,137,.3),
    0 3px 10px rgba(8,40,48,.14), 0 1px 2px rgba(8,40,48,.08);
}
.lang-blob { transition: transform .6s var(--spring), width .45s var(--spring); }

/* ---- buttons ---- */
.btn-primary {
  background:
    linear-gradient(180deg, rgba(255,255,255,.38) 0%, rgba(255,255,255,.06) 48%, rgba(255,255,255,0) 52%),
    linear-gradient(180deg, #1ba2ab, #0b6b74);
  box-shadow: inset 0 1px .5px rgba(255,255,255,.75), inset 0 -1px .5px rgba(255,255,255,.25), inset 0 0 12px rgba(255,255,255,.18),
    inset 0 -10px 18px -12px rgba(0,30,35,.45), 0 12px 26px -12px rgba(11,107,116,.8);
}
.btn-primary:hover { background:
    linear-gradient(180deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.08) 48%, rgba(255,255,255,0) 52%),
    linear-gradient(180deg, #20adb6, #0c747e); }
.btn-primary::after { display: none; }
.icon-btn, .nav-back {
  background: var(--lg-glare), rgba(255,255,255,.42);
  -webkit-backdrop-filter: blur(16px) saturate(190%); backdrop-filter: blur(16px) saturate(190%);
  border: 0; box-shadow: var(--lg-edge), 0 6px 16px -8px rgba(8,40,48,.4);
}
.child-panel-head .icon-btn { background: var(--fill); box-shadow: inset 0 1px 2px rgba(8,40,48,.12); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---- glossy icon tiles (Settings icons, step numbers) ---- */
.chip-icon, .acc-num, .pf-tile {
  position: relative; overflow: hidden; isolation: isolate;
  box-shadow: inset 0 1px .5px rgba(255,255,255,.7), inset 0 -1px .5px rgba(0,0,0,.12), inset 0 -8px 14px -10px rgba(0,0,0,.25), 0 4px 12px -5px rgba(8,40,48,.45);
}
.chip-icon::after, .acc-num::after, .pf-tile::after {
  content: ""; position: absolute; inset: 0 0 52% 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0)); pointer-events: none;
}

/* ---- cards: glass frame, picture set into it like a lens ---- */
.card { --mat: rgba(255,255,255,.36); }
.card-art, .reader-art img, .framed img, .pf-art {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 1px 0 rgba(255,255,255,.8), 0 6px 14px -10px rgba(8,40,48,.35);
}
.card-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.35), rgba(255,255,255,0) 30%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.card-num { --mat: rgba(255,255,255,.62); box-shadow: var(--lg-edge); color: var(--label); }
.cta-bubble { background: linear-gradient(180deg, rgba(255,255,255,.8), rgba(255,255,255,.45)); color: var(--tint);
  box-shadow: inset 0 1px .5px #fff, inset 0 -4px 8px -6px rgba(15,127,137,.4), 0 3px 8px -4px rgba(8,40,48,.35); }

/* ---- grouped lists: one glass surface with hairline rows ---- */
.acc-group { border-radius: var(--r-group); overflow: hidden; --mat: rgba(255,255,255,.4); }
.acc { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.acc[open] { background: rgba(255,255,255,.22); }
.acc-help { background: linear-gradient(180deg, rgba(255,235,228,.55), rgba(255,235,228,.25)); }
.modes-row { background: var(--lg-glare), rgba(255,255,255,.5); box-shadow: var(--lg-edge), var(--lg-drop); }
@media (min-width: 900px) {
  .modes-row { background: none; box-shadow: none; }
  .mode { background: var(--lg-glare), rgba(255,255,255,.5); box-shadow: var(--lg-edge), var(--lg-drop) !important; }
  .mode.is-selected { box-shadow: var(--lg-edge), var(--lg-drop), 0 0 0 2px var(--tint) !important; }
}

/* ---- checklist: glass progress tube + droplet ticks ---- */
.liquid-bar { height: 8px; background: rgba(118,118,128,.14); box-shadow: inset 0 1px 2px rgba(8,40,48,.18), inset 0 -1px 0 rgba(255,255,255,.7); }
.liquid-bar span { background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0) 55%), linear-gradient(90deg, #36b9b6, var(--tint)); box-shadow: inset 0 -1px 1px rgba(0,0,0,.12); }
.check .box { background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.3)); box-shadow: inset 0 1px 2px rgba(8,40,48,.12); }
.check input:checked + .box { background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,0) 55%), var(--tint);
  box-shadow: inset 0 1px .5px rgba(255,255,255,.7), 0 3px 8px -3px rgba(15,127,137,.7); }

/* ---- timeline droplets ---- */
.journey-bubble { --mat: rgba(255,255,255,.32);
  background: radial-gradient(circle at 34% 24%, rgba(255,255,255,.9) 0 6%, rgba(255,255,255,.3) 24%, rgba(255,255,255,0) 52%), var(--mat); }
.journey-n { background: linear-gradient(180deg, #fff, rgba(255,255,255,.85)); box-shadow: inset 0 -1px .5px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.16); }
.journey-step.is-active .journey-n, .journey-step.is-done .journey-n { background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 55%), var(--tint); }
.journey-line { background: rgba(118,118,128,.16); box-shadow: inset 0 1px 1.5px rgba(8,40,48,.16); height: 5px; }

/* ---- hero photo framed in thick glass ---- */
.hero-photo { --mat: rgba(255,255,255,.28); }
/* Photo caption: clear glass. Only a whisper of tint; a soft text shadow keeps it legible over bright areas. */
.glass-dark { background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.04) 55%, rgba(255,255,255,.08));
  -webkit-backdrop-filter: blur(6px) saturate(160%); backdrop-filter: blur(6px) saturate(160%);
  box-shadow: inset 0 1px .5px rgba(255,255,255,.7), inset 0 -1px .5px rgba(255,255,255,.3), inset 0 0 14px rgba(255,255,255,.12), 0 8px 22px -12px rgba(0,0,0,.3);
  text-shadow: 0 1px 2px rgba(0,0,0,.45), 0 0 12px rgba(0,0,0,.35); }

/* ---- guide sheet: thick glass slab ---- */
.reader { background: rgba(0, 24, 30, .22); -webkit-backdrop-filter: blur(6px) saturate(120%); backdrop-filter: blur(6px) saturate(120%); }
.reader-sheet { --mat: rgba(244,250,250,.72); }
.reader-sheet.glass { -webkit-backdrop-filter: blur(44px) saturate(200%) brightness(1.04); backdrop-filter: blur(44px) saturate(200%) brightness(1.04);
  box-shadow: inset 0 1px .5px #fff, inset 0 0 24px rgba(255,255,255,.4), 0 -12px 40px -12px rgba(0,20,26,.4); }
.reader-sheet .glass { background: var(--lg-glare), rgba(255,255,255,.55); box-shadow: inset 0 1px .5px #fff, inset 0 -1px .5px rgba(255,255,255,.6), inset 0 0 12px rgba(255,255,255,.4), 0 6px 18px -12px rgba(8,40,48,.3); }
.reader-sheet .glass::before { opacity: .7; }
.reader-toolbar { background: linear-gradient(rgba(244,250,250,.85) 55%, rgba(244,250,250,0)); }
.grabber { background: linear-gradient(180deg, rgba(60,60,67,.38), rgba(60,60,67,.24)); box-shadow: 0 1px 0 rgba(255,255,255,.7); }

/* ---- typography polish ---- */
:lang(en) .hero h1 { letter-spacing: -.032em; }
:lang(en) .section-head h2 { letter-spacing: -.03em; }
.eyebrow { font-weight: 650; letter-spacing: .06em; font-size: 12.5px; }
:lang(si) .eyebrow, :lang(ta) .eyebrow { letter-spacing: 0; font-size: 14px; font-weight: 600; }
:lang(si) :is(h1, h2, h3), :lang(ta) :is(h1, h2, h3) { letter-spacing: 0 !important; }
.hero-lead, .section-head > p, .section-head-stack > p:last-child { letter-spacing: -.012em; }
:lang(si) :is(.hero-lead, .section-head > p), :lang(ta) :is(.hero-lead, .section-head > p) { letter-spacing: 0; }
.card-num, .journey-n, .acc-num, .pf-tile, .toc a span, .reader-num, .pf-num, .about-num, .search-count, .pack-count { font-variant-numeric: tabular-nums; }
::selection { background: rgba(54,185,182,.3); }

@media (prefers-reduced-transparency: reduce) {
  .glass, .acc-group, .modes-row, .icon-btn, .nav-back, .reader-sheet .glass { background: #f6fbfb !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}


/* =========================================================
   PACK FOR HOSPITAL — icon rows + liquid progress ring
   ========================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pack { padding: 16px 16px 6px; overflow: hidden; }
.pack-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: .5px solid var(--separator); }
.pack-title h3 { font-size: 19px; font-weight: 700; line-height: 1.25; }
.pack-title p { color: var(--label-2); font-size: 13.5px; line-height: 1.35; margin-top: 1px; }

/* glass progress ring */
.pack-ring { position: relative; width: 58px; height: 58px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.95), rgba(255,255,255,.45) 60%, rgba(255,255,255,.3));
  box-shadow: inset 0 1px .5px #fff, inset 0 -6px 12px -8px rgba(15,127,137,.35), inset 0 0 0 .5px rgba(255,255,255,.8), 0 6px 16px -8px rgba(8,40,48,.45); }
.pack-ring svg { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); transform: rotate(-90deg); overflow: visible; }
.ring-track { fill: none; stroke: rgba(118,118,128,.16); stroke-width: 5; }
.ring-fill { fill: none; stroke: var(--tint); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0) * 100);
  filter: drop-shadow(0 1px 2px rgba(15,127,137,.45)); transition: stroke-dashoffset .9s var(--spring), stroke .4s; }
.ring-fill { opacity: clamp(0, calc(var(--p, 0) * 1000), 1); }
.ring-count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-round); font-size: 12px; font-weight: 600; color: var(--label-3); font-variant-numeric: tabular-nums; }
.ring-count b { font-size: 17px; font-weight: 800; color: var(--label); }
.ring-count { grid-auto-flow: column; align-content: center; justify-content: center; gap: 0; }
.pack.is-complete .ring-fill { stroke: var(--green); filter: drop-shadow(0 0 4px rgba(42,150,99,.55)); }
.pack.is-complete .pack-ring { animation: ringGlow 2.4s ease-in-out infinite; }
@keyframes ringGlow { 50% { box-shadow: inset 0 1px .5px #fff, inset 0 -6px 12px -8px rgba(42,150,99,.4), 0 0 0 5px rgba(95,213,154,.18), 0 6px 16px -8px rgba(8,40,48,.45); } }

/* rows */
.pack-items { display: grid; margin: 4px -8px 0; }
.check { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 8px; min-height: 54px; border-radius: 14px; font-size: 16px; transition: background .25s; }
.check + .check::before { left: 52px; right: 8px; }
@media (hover: hover) { .check:hover { background: rgba(255,255,255,.35); } }
.check:active { background: rgba(255,255,255,.5); }
.check:has(input:checked) { background: linear-gradient(90deg, rgba(15,127,137,.07), rgba(15,127,137,0) 80%); }
.check-label { line-height: 1.3; transition: color .3s; }
.check:has(input:checked) .check-label { color: var(--label-2); }

/* glossy item tiles */
.pack-icon { position: relative; overflow: hidden; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; flex: none;
  box-shadow: inset 0 1px .5px rgba(255,255,255,.7), inset 0 -1px .5px rgba(0,0,0,.12), inset 0 -8px 14px -10px rgba(0,0,0,.25), 0 4px 10px -5px rgba(8,40,48,.45);
  transition: transform .4s var(--spring); }
.pack-icon::after { content: ""; position: absolute; inset: 0 0 52% 0; background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0)); }
.pack-icon .i { width: 19px; height: 19px; position: relative; z-index: 1; }
.pi-documents { background: linear-gradient(180deg, #5d9cf0, #2a6fd0); }
.pi-medicines { background: linear-gradient(180deg, #f07a9a, #d6466e); }
.pi-clothes { background: linear-gradient(180deg, #1fa7b0, #0c727b); }
.pi-comfort { background: linear-gradient(180deg, #ffad42, #e07f06); }
.pi-play { background: linear-gradient(180deg, #8f84f0, #5b5fd6); }
.pi-hospital-items { background: linear-gradient(180deg, #4fcf8c, #2a9663); }
.check:has(input:checked) .pack-icon { transform: scale(.92); }

/* tick circle with a self-drawing checkmark */
.check .box { width: 26px; height: 26px; border-radius: 50%; border: 1.75px solid rgba(30,50,56,.28); display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.35)); box-shadow: inset 0 1px 2px rgba(8,40,48,.1);
  transition: background .3s, border-color .3s, box-shadow .3s; }
.check .box svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .35s var(--ease) .08s; }
.check input:checked ~ .box { border-color: transparent;
  background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,0) 55%), var(--tint);
  box-shadow: inset 0 1px .5px rgba(255,255,255,.7), 0 3px 10px -3px rgba(15,127,137,.7); animation: tickPop .45s var(--spring); }
.check input:checked ~ .box svg { stroke-dashoffset: 0; }
.check input:focus-visible ~ .box { outline: 3px solid rgba(15,127,137,.5); outline-offset: 2px; }
.check:active .box { transform: scale(.88); }
@keyframes tickPop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* footer + celebration */
.pack-foot { margin-top: 4px; min-height: 48px; }
.pack-done { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 15px; color: var(--green); }
.pack-done:not(:empty) { animation: rise .45s var(--spring); }
.pack-done .i { color: var(--gold); }
.confetti { position: absolute; top: 44px; right: 45px; width: 0; height: 0; pointer-events: none; }
.confetti i { position: absolute; width: 7px; height: 7px; border-radius: 2px; opacity: 0; background: var(--c, #36b9b6); }
.pack.celebrate .confetti i { animation: burst 1.1s cubic-bezier(.15,.7,.3,1) forwards; }
.confetti i:nth-child(1)  { --c: #36b9b6; --x: -70px; --y: -36px; }
.confetti i:nth-child(2)  { --c: #ffad42; --x: -48px; --y: 30px; border-radius: 50%; }
.confetti i:nth-child(3)  { --c: #f07a9a; --x: -86px; --y: 6px; }
.confetti i:nth-child(4)  { --c: #5d9cf0; --x: -30px; --y: -52px; border-radius: 50%; }
.confetti i:nth-child(5)  { --c: #8f84f0; --x: 26px; --y: -44px; }
.confetti i:nth-child(6)  { --c: #4fcf8c; --x: 38px; --y: 24px; border-radius: 50%; }
.confetti i:nth-child(7)  { --c: #d49a2e; --x: -18px; --y: 46px; }
.confetti i:nth-child(8)  { --c: #36b9b6; --x: 8px; --y: -60px; border-radius: 50%; }
.confetti i:nth-child(9)  { --c: #f07a9a; --x: -62px; --y: 44px; border-radius: 50%; }
.confetti i:nth-child(10) { --c: #ffad42; --x: 30px; --y: 50px; }
.confetti i:nth-child(11) { --c: #5d9cf0; --x: -100px; --y: -18px; border-radius: 50%; }
.confetti i:nth-child(12) { --c: #4fcf8c; --x: -40px; --y: 60px; }
@keyframes burst {
  0% { opacity: 1; transform: translate(0, 0) scale(.4) rotate(0); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1) rotate(200deg); }
}
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }
.pack-title h3 { overflow-wrap: normal; word-break: normal; }
:lang(si) .pack-title h3, :lang(ta) .pack-title h3 { font-size: 17px; line-height: 1.35; }

/* share button: shows a tick briefly after the link is copied */
.share-btn .i + .i { display: none; }
.share-btn.is-done .i:first-child { display: none; }
.share-btn.is-done .i + .i { display: block; color: var(--green); animation: tickPop .45s var(--spring); }

/* topic tiles carry an icon instead of a number */
.acc-num .i { width: 19px; height: 19px; stroke-width: 2; position: relative; z-index: 1; }

/* =========================================================
   3D IMAGE ICONS
   The icons are self-contained 3D objects, so the coloured tiles
   behind them are dropped and each placement gets its own size.
   ========================================================= */
.i-img { display: inline-block; object-fit: contain; vertical-align: middle; flex: none; user-select: none; -webkit-user-drag: none; }

/* tiles become transparent holders for the 3D object */
:is(.chip-icon, .acc-num, .pack-icon):has(> .i-img) { background: none !important; box-shadow: none !important; overflow: visible; border-radius: 0; }
:is(.chip-icon, .acc-num, .pack-icon):has(> .i-img)::after { display: none; }
.acc-num:has(> .i-img) { width: 44px; height: 44px; }
.acc-num > .i-img { width: 44px; height: 44px; }
.acc + .acc > summary::before { left: 70px; }
.acc-body { padding-left: 70px; }
@media (max-width: 480px) { .acc-body { padding-left: 16px; } }
.pack-icon:has(> .i-img) { width: 42px; height: 42px; }
.pack-icon > .i-img { width: 42px; height: 42px; }
.check + .check::before { left: 62px; }
.chip-icon:has(> .i-img) { width: 50px; height: 50px; }
.chip-icon > .i-img { width: 50px; height: 50px; }
.principles .chip-icon:has(> .i-img), .principles .chip-icon > .i-img { width: 46px; height: 46px; }
.principles dl > div + div::before { left: 58px; }
.chip-note .chip-icon:has(> .i-img), .chip-note .chip-icon > .i-img { width: 44px; height: 44px; }

/* inline icons next to text */
.btn .i-img { width: 24px; height: 24px; }
.btn-primary .i-img { filter: drop-shadow(0 1px 2px rgba(0, 40, 45, .35)); }
.icon-btn .i-img { width: 26px; height: 26px; }
.nav-back .i-img, .pf-back .i-img { width: 24px; height: 24px; }
.cta-bubble .i-img { width: 20px; height: 20px; }
.search > .i-img { width: 24px; height: 24px; }
.empty > .i-img { width: 84px; height: 84px; }
.notice > .i-img { width: 32px; height: 32px; margin-top: -2px; }
.pf-note .i-img { width: 26px; height: 26px; }
.hero-note .i-img { width: 24px; height: 24px; }
.pack-done .i-img { width: 30px; height: 30px; }
.child-panel-head h3 .i-img { width: 32px; height: 32px; }
.mode > .i-img { width: 38px; height: 38px; }
.toc-details summary > .i-img { width: 22px; height: 22px; }
.acc-toggle .i-img { width: 22px; height: 22px; }
.acc-toggle:has(> .i-img) { width: 26px; }
.hint .i-img { width: 22px; height: 22px; }
.chip-small .i-img { width: 24px; height: 24px; }
.pf-switch .i-img { width: 22px; height: 22px; }
.child-panel-head .icon-btn .i-img { width: 20px; height: 20px; }

/* tab bar: active tab in full colour, the rest gently faded */
.dock a .i-img { width: 30px; height: 30px; transition: opacity .25s, filter .25s, transform .35s var(--spring); }
.dock a:not([aria-current]) .i-img { opacity: .62; filter: saturate(.35); }
.dock a { gap: 0; }

/* packing tick: the check image pops in when the item is ticked */
.check .box .i-img { width: 100%; height: 100%; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .35s var(--spring); }
.check input:checked ~ .box:has(> .i-img) { background: none; border-color: transparent; box-shadow: none; animation: none; }
.check input:checked ~ .box .i-img { opacity: 1; transform: scale(1.12); }
.check .box:has(> .i-img) { width: 28px; height: 28px; }

/* share button: copied state swaps to the check image */
.share-btn .i-img + .i-img { display: none; }
.share-btn.is-done .i-img:first-child { display: none; }
.share-btn.is-done .i-img + .i-img { display: inline-block; animation: tickPop .45s var(--spring); }

/* preview banner (admin "Preview" mode only) */
.preview-banner { position: fixed; z-index: 90; left: 50%; top: max(70px, calc(env(safe-area-inset-top) + 64px)); transform: translateX(-50%);
  max-width: calc(100% - 24px); padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; text-align: center;
  color: #5a3d00; background: rgba(255, 214, 120, .92); box-shadow: 0 8px 24px -10px rgba(0,0,0,.35); pointer-events: none; }
