/* Helping Orbit — calm, accessible, customisable styles */

:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --text: #14283a;
  --muted: #536170;
  --border: #dde5ec;
  --primary: #2f5f80;
  --primary-ink: #ffffff;
  --primary-soft: #e5eef5;
  --focus: #c46a1b;
  --danger: #a33a3a;
  --success: #3d7a5a;
  --routine: #3f73a0;
  --routine-soft: #e5eef6;
  --talk: #357a5a;
  --talk-soft: #e2f0e9;
  --comfort: #6f5a98;
  --comfort-soft: #eee9f6;
  --warm: #a8692e;
  --warm-soft: #f8eee2;
  --topbar-bg: #1b3f5c;
  --topbar-ink: #d5e3ee;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 40, 58, .05), 0 6px 18px rgba(20, 40, 58, .06);
  --shadow-lg: 0 2px 4px rgba(20, 40, 58, .04), 0 18px 40px rgba(20, 40, 58, .09);
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-rtl: "Noto Naskh Arabic", "Atkinson Hyperlegible", system-ui, sans-serif;
  --base-size: 17px;
  color-scheme: light;
}

:root[data-theme="bright"] {
  --bg: #fffdf6;
  --surface: #ffffff;
  --surface-2: #fff3d6;
  --text: #1c2430;
  --muted: #4b5563;
  --border: #f0dfb5;
  --primary: #1d5fd1;
  --primary-soft: #dfeaff;
  --routine: #1d6fe0;
  --routine-soft: #dcebff;
  --talk: #18935a;
  --talk-soft: #d9f5e6;
  --comfort: #8b44d6;
  --comfort-soft: #efe2ff;
  --warm: #e07b00;
  --warm-soft: #ffeccc;
  --topbar-bg: #173f86;
  --topbar-ink: #e3ecff;
}

:root[data-theme="dark"] {
  --bg: #151a1f;
  --surface: #1e252c;
  --surface-2: #262f37;
  --text: #e7ecef;
  --muted: #a6b1ba;
  --border: #34404a;
  --primary: #8db9d6;
  --primary-ink: #10171d;
  --primary-soft: #23333f;
  --focus: #f0a35e;
  --danger: #e38b8b;
  --success: #8fcaa8;
  --routine: #8db2d1;
  --routine-soft: #223140;
  --talk: #8fc4a8;
  --talk-soft: #20332a;
  --comfort: #b9a7d6;
  --comfort-soft: #2c2638;
  --warm: #d9ac74;
  --warm-soft: #352b1e;
  --topbar-bg: #0e1418;
  --topbar-ink: #c5d0d8;
  --shadow: none;
  --shadow-lg: none;
  color-scheme: dark;
}

:root[data-theme="contrast"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f0f0;
  --text: #000000;
  --muted: #1f1f1f;
  --border: #000000;
  --primary: #0037a6;
  --primary-soft: #e6ecff;
  --routine: #0037a6; --routine-soft: #ffffff;
  --talk: #005a2b;    --talk-soft: #ffffff;
  --comfort: #4b0f8a; --comfort-soft: #ffffff;
  --warm: #7a3d00;    --warm-soft: #ffffff;
  --topbar-bg: #000000;
  --topbar-ink: #ffffff;
  --shadow: none;
  --shadow-lg: none;
}
:root[data-theme="contrast"] .card,
:root[data-theme="contrast"] .btn { border-width: 2px; }

:root[data-text="large"] { --base-size: 20px; }
:root[data-text="xlarge"] { --base-size: 23px; }

@media (prefers-reduced-motion: reduce) { :root { --motion: 0; } *, *::before, *::after { transition: none !important; animation: none !important; } }
:root[data-motion="reduced"] *, :root[data-motion="reduced"] *::before, :root[data-motion="reduced"] *::after { transition: none !important; animation: none !important; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--base-size); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[dir="rtl"], [lang="ur"], [lang="ar"] { font-family: var(--font-rtl); }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; top: -100px; inset-inline-start: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip-link:focus { top: 8px; }

/* ---------- header / nav ---------- */
/* The thin top bar scrolls away; the main bar stays at the top of the screen. */
.site-header { --topbar-h: 2.4rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: calc(-1 * var(--topbar-h)); z-index: 20; }
.topbar { background: var(--topbar-bg); color: var(--topbar-ink); font-size: .8rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--topbar-h); }
.topbar-note { margin: 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topbar-links { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; flex: none; }
.topbar-links a, .topbar-links button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 2rem; padding: 0 .65rem; border: 0; border-radius: 8px;
  background: transparent; color: inherit; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.topbar-links a:hover, .topbar-links button:hover, .topbar-links [aria-expanded="true"], .topbar-links [aria-current="page"] { background: rgba(255, 255, 255, .14); color: #fff; }
.topbar .ico { width: 1.1em; height: 1.1em; }
.header-inner { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.18rem; letter-spacing: -.01em; color: var(--text); text-decoration: none; margin-inline-end: auto; }
.brand img { width: 38px; height: 38px; }
.header-actions { display: flex; gap: 8px; order: 2; align-items: center; }
.header-actions .header-cta { display: none; }
.site-nav { order: 3; width: 100%; display: none; }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 4px 0 6px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.site-nav a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 700; font-size: .95rem; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }

.site-nav .nav-more { display: none; }
.nav-more summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: var(--radius-sm); font-weight: 700; font-size: .92rem; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary .ico { width: 15px; height: 15px; color: var(--muted); transition: transform .15s ease; }
.nav-more details[open] summary .ico { transform: rotate(180deg); }
.nav-more summary:hover, .nav-more details[open] summary { background: var(--surface-2); }
.nav-more summary.current { background: var(--primary-soft); color: var(--primary); }

@media (min-width: 1150px) {
  .brand { margin-inline-end: 0; }
  .site-nav { display: block; width: auto; order: 1; margin-inline-start: 14px; }
  .site-nav > ul { display: flex; align-items: center; padding: 0; gap: 2px; }
  .site-nav a { padding: 8px 10px; font-size: .92rem; }
  .site-nav .nav-narrow { display: none; }
  .site-nav .nav-more { display: block; position: relative; }
  .nav-more ul { display: block; position: absolute; inset-inline-start: 0; top: calc(100% + 8px); min-width: 230px; padding: 6px; z-index: 50;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); }
  .site-nav > ul > li:last-child .nav-more ul, .site-nav > ul > li.nav-more:last-child ul { inset-inline-start: auto; inset-inline-end: 0; }
  .header-actions { order: 2; margin-inline-start: auto; }
  .header-actions .nav-toggle { display: none; }
  .header-actions .header-cta { display: inline-flex; }
}
@media (max-width: 720px) {
  .topbar-note { display: none; }
}
@media (max-width: 400px) {
  .topbar-links a, .topbar-links button { padding: 0 .45rem; }
}

.display-panel { border-top: 1px solid var(--border); background: var(--surface-2); }
.display-inner { display: flex; flex-wrap: wrap; gap: 12px 28px; padding-top: 12px; padding-bottom: 12px; }
.display-inner fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.display-inner legend { font-weight: 700; margin-bottom: 4px; width: 100%; }
.display-inner label { display: flex; gap: 6px; align-items: center; cursor: pointer; }

/* ---------- buttons & forms ---------- */
.btn {
  --btn-bg: var(--surface);
  --btn-ink: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 44px; padding: .55em 1.05em;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--btn-bg); color: var(--btn-ink);
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .15s ease;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.primary { --btn-bg: var(--primary); --btn-ink: var(--primary-ink); border-color: var(--primary); }
.btn.primary:hover { filter: brightness(1.08); background: var(--primary); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { min-height: 38px; padding: .35em .8em; font-size: .85rem; }
.btn.big { min-height: 64px; padding: .7em 1.6em; font-size: 1.25rem; }
.btn[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.whatsapp { --btn-bg: #1f7a4d; --btn-ink: #fff; border-color: #1f7a4d; }
.btn.whatsapp:hover { background: #1f7a4d; filter: brightness(1.1); }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 1.1rem; cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn[disabled] { opacity: .35; cursor: default; }

label { font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type="text"], input[type="email"], input[type="url"], input[type="date"], input[type="month"],
input[type="password"], input[type="search"], input[type="number"], input[type="tel"], input:not([type]), select, textarea {
  width: 100%; min-height: 44px; padding: .55em .75em;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 400;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }

.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: .35em .9em;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font: inherit; font-size: .9rem; font-weight: 700; color: var(--text); cursor: pointer;
}
.chip[aria-pressed="true"], .chip.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.badge { display: inline-block; padding: .15em .6em; border-radius: 999px; background: var(--surface-2); font-size: .78rem; font-weight: 700; color: var(--muted); }
.badge.yes { background: var(--talk-soft); color: var(--talk); }
.badge.no { background: var(--warm-soft); color: var(--warm); }

/* ---------- layout pieces ---------- */
.section { padding: 40px 0; }
.section.tight { padding: 24px 0; }
.page-head { padding: 32px 0 12px; }
.page-head .lead { font-size: 1.1rem; color: var(--muted); max-width: 720px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35em; }
.grid { display: grid; gap: 16px; }
.grid.fit { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; }
.toolbar .spacer { flex: 1; }
.toolbar select { width: auto; min-width: 160px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.seg .btn { border: 0; border-radius: 0; }

.notice { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--primary-soft); border-inline-start: 4px solid var(--primary); }
.notice.warm { background: var(--warm-soft); border-inline-start-color: var(--warm); }
.notice.success { background: var(--talk-soft); border-inline-start-color: var(--success); }
.notice.error { background: #fbe9e9; border-inline-start-color: var(--danger); color: #5c1d1d; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 2px dashed var(--border); border-radius: var(--radius); list-style: none; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs .btn[aria-selected="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }

details.disclosure { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
details.disclosure > summary { cursor: pointer; padding: 12px 16px; font-weight: 700; }
details.disclosure > div { padding: 0 16px 16px; }

/* ---------- home ---------- */
.hero { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); max-width: 820px; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 680px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 18px 0 0; list-style: none; color: var(--muted); font-weight: 700; }

.tool-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.tool-card {
  --c: var(--routine); --c-soft: var(--routine-soft);
  display: flex; flex-direction: column; gap: 6px; padding: 28px; min-height: 230px;
  background: var(--c-soft); border: 2px solid transparent; border-radius: 24px;
  text-decoration: none; color: var(--text); transition: transform .15s ease, border-color .15s ease;
}
.tool-card:hover { border-color: var(--c); transform: translateY(-2px); }
.tool-card .tool-emoji { font-size: 3rem; line-height: 1; margin-bottom: 8px; }
.tool-card h2 { color: var(--c); margin: 0; font-size: 1.6rem; }
.tool-card p { margin: 0; font-size: 1.1rem; }
.tool-card .go { margin-top: auto; font-weight: 700; color: var(--c); }
.tool-card.talk { --c: var(--talk); --c-soft: var(--talk-soft); }
.tool-card.comfort { --c: var(--comfort); --c-soft: var(--comfort-soft); }

.mini-tools { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.mini-tools.three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.mini-tool { display: flex; gap: 14px; align-items: flex-start; padding: 18px; text-decoration: none; color: var(--text); }
.mini-tool:hover { border-color: var(--primary); }
.mini-tool .tool-emoji { font-size: 2rem; line-height: 1; }
.mini-tool h3 { margin: 0 0 4px; color: var(--primary); }
.mini-tool p { margin: 0; color: var(--muted); font-size: .92rem; }

.principles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.principles .card p { margin: 0; color: var(--muted); }
.support-band { background: var(--warm-soft); border-radius: 24px; padding: 28px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.support-band p { margin: 0; max-width: 620px; }
.helper-band { background: var(--primary-soft); border-radius: 24px; padding: 24px 28px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.helper-band > div { flex: 1; min-width: min(100%, 260px); }
.helper-band h2 { margin: 0 0 4px; color: var(--primary); }
.helper-band p { margin: 0; }
.helper-band .tool-emoji { font-size: 2.6rem; line-height: 1; }
a.chip { text-decoration: none; }

/* ---------- visual (emoji / photo) ---------- */
.visual { display: inline-grid; place-items: center; width: 56px; height: 56px; font-size: 2.2rem; line-height: 1; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.visual.emoji { background: transparent; }
.visual.lg { width: min(42vw, 200px); height: min(42vw, 200px); font-size: min(26vw, 7.5rem); border-radius: 20px; }
.visual.md { width: 88px; height: 88px; font-size: 3.4rem; }

/* ---------- routine ---------- */
.progress { height: 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--routine); border-radius: 999px; transition: width .3s ease; }
.progress-text { text-align: center; font-weight: 700; color: var(--muted); margin: 8px 0 18px; }
.first-then { display: flex; align-items: stretch; justify-content: center; gap: 16px; flex-wrap: wrap; }
.ft-card {
  position: relative; flex: 1 1 260px; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 24px 18px 20px; background: var(--surface); border: 3px solid var(--border); border-radius: 24px; text-align: center;
}
.ft-card.now { border-color: var(--routine); background: var(--routine-soft); }
.ft-card.next { opacity: .8; }
.ft-label { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: var(--muted); }
.ft-card.now .ft-label { color: var(--routine); }
.ft-text { font-size: 1.6rem; font-weight: 700; margin: 0; }
.ft-card .speak { position: absolute; top: 12px; inset-inline-end: 12px; }
.ft-arrow { align-self: center; font-size: 2.4rem; color: var(--muted); }
.child-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 22px 0; }
.child-actions .btn.primary { --btn-bg: var(--routine); border-color: var(--routine); min-width: 220px; }
.all-done { text-align: center; padding: 28px; }
.all-done .big-emoji { font-size: 5rem; }
.all-done-text { font-size: 2rem; font-weight: 700; }

.step-strip { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 12px; margin: 0; list-style: none; }
.step-strip li { flex: 0 0 auto; width: 110px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: var(--surface); border: 2px solid var(--border); text-align: center; font-size: .85rem; font-weight: 700; position: relative; }
.step-strip li.done { opacity: .5; }
.step-strip li.done::after { content: "✓"; position: absolute; top: 4px; right: 8px; color: var(--success); font-size: 1.1rem; }
.step-strip li.current { border-color: var(--routine); background: var(--routine-soft); }

.edit-list { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.edit-row { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.edit-row.dragging { opacity: .4; }
.edit-row.drop-target { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.edit-row .drag-handle { cursor: grab; font-size: 1.3rem; color: var(--muted); padding: 0 4px; user-select: none; touch-action: none; }
.edit-row input, .edit-row textarea { flex: 1; min-width: 0; }
.edit-row .row-actions { display: flex; gap: 4px; }
.pic-btn { border: 2px dashed var(--border); border-radius: 14px; background: var(--surface-2); padding: 2px; cursor: pointer; }
.pic-btn:hover { border-color: var(--primary); }
.add-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px; border: 2px dashed var(--border); border-radius: var(--radius); }
.add-row input { flex: 1; min-width: 180px; }
@media (max-width: 560px) {
  .edit-row { flex-wrap: wrap; }
  .edit-row input { flex-basis: calc(100% - 120px); }
  .edit-row .row-actions { width: 100%; justify-content: flex-end; }
}

/* ---------- dialogs ---------- */
dialog { border: 1px solid var(--border); border-radius: 20px; padding: 0; width: min(560px, calc(100vw - 24px)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(20, 26, 32, .55); }
dialog .dialog-body { padding: 22px; max-height: calc(100vh - 80px); overflow-y: auto; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; padding: 4px; }
.emoji-grid button { font-size: 1.8rem; height: 52px; border-radius: 10px; border: 2px solid transparent; background: var(--surface-2); cursor: pointer; }
.emoji-grid button[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }
.pic-preview { display: flex; align-items: center; gap: 12px; margin: 12px 0; }

/* ---------- communication board ---------- */
.sentence-bar { position: sticky; top: 64px; z-index: 5; background: var(--talk-soft); border: 2px solid var(--talk); border-radius: 20px; padding: 12px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sentence { flex: 1 1 260px; min-height: 64px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sentence .placeholder { color: var(--muted); font-weight: 700; }
.sentence-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--surface); border-radius: 12px; font-weight: 700; font-size: 1.1rem; border: 1px solid var(--border); }
.sentence-chip .visual { width: 36px; height: 36px; font-size: 1.6rem; }
.sentence-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sentence-actions .btn.primary { --btn-bg: var(--talk); border-color: var(--talk); }

.board-section h2 { font-size: 1.05rem; color: var(--muted); margin: 18px 0 10px; }
.board { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.board.size-m { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.board.size-xl { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.talk-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 150px; padding: 14px 10px; border-radius: 22px; border: 3px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: 1.05rem; text-align: center; cursor: pointer;
  transition: transform .1s ease, border-color .15s;
}
.talk-btn:hover { border-color: var(--talk); }
.talk-btn:active, .talk-btn.flash { transform: scale(.96); background: var(--talk-soft); border-color: var(--talk); }
.talk-btn .visual { width: 72px; height: 72px; font-size: 3.2rem; }
.board.size-m .talk-btn { min-height: 120px; font-size: .95rem; }
.board.size-m .talk-btn .visual { width: 54px; height: 54px; font-size: 2.4rem; }
.board.size-xl .talk-btn { min-height: 210px; font-size: 1.3rem; }
.board.size-xl .talk-btn .visual { width: 110px; height: 110px; font-size: 5rem; }
.talk-btn.quick { border-color: var(--warm); background: var(--warm-soft); }
.talk-btn.add { border-style: dashed; color: var(--muted); }
.board.editing .talk-btn:not(.add) { border-style: dashed; border-color: var(--primary); }
.board.editing .talk-btn:not(.add)::after { content: "✎ Edit"; font-size: .75rem; color: var(--primary); }

.big-overlay { position: fixed; inset: 0; z-index: 50; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; text-align: center; cursor: pointer; }
.big-overlay .big-visuals { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.big-overlay .visual { width: 140px; height: 140px; font-size: 6.5rem; }
.big-overlay p { font-size: clamp(2rem, 7vw, 4.5rem); font-weight: 700; margin: 0; line-height: 1.2; }

/* ---------- comfort ---------- */
.comfort-head { background: var(--comfort-soft); border-radius: 24px; padding: 22px; margin-bottom: 20px; }
.log-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.log-table th, .log-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.log-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.bar-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.bar-list li { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 36px; gap: 10px; align-items: center; font-size: .92rem; }
.bar-list .bar { height: 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-list .bar span { display: block; height: 100%; background: var(--comfort); border-radius: 999px; }
.suggestion-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.suggestion-list li { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.suggestion-list .s-emoji { font-size: 1.8rem; line-height: 1; }
.suggestion-list p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.cost { font-size: .75rem; font-weight: 700; padding: .1em .55em; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin-inline-start: 6px; white-space: nowrap; }
.cost.free { background: var(--talk-soft); color: var(--talk); }
.have { background: var(--primary-soft); color: var(--primary); }

/* ---------- activities ---------- */
.filters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); margin-bottom: 14px; }
.filters .field label { font-size: .85rem; }
.activity-card { display: flex; flex-direction: column; gap: 8px; }
.activity-card .a-head { display: flex; gap: 12px; align-items: center; }
.activity-card .a-emoji { font-size: 2.4rem; line-height: 1; }
.activity-card h3 { margin: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.activity-card ul, .activity-card ol { padding-inline-start: 1.2em; margin: 0 0 .6em; }
.activity-card details > summary { cursor: pointer; font-weight: 700; color: var(--primary); padding: 6px 0; }
.activity-card .card-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- stories ---------- */
.story-reader { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 24px; text-align: center; }
.story-page { min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.story-page p { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; max-width: 640px; margin: 0; }
.story-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.story-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.story-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.story-dots span.on { background: var(--primary); }

/* ---------- journal ---------- */
.entry { border-inline-start: 5px solid var(--routine); }
.entry.teacher { border-inline-start-color: var(--talk); }
.entry dl { display: grid; grid-template-columns: 1fr; gap: 2px 16px; margin: 0; }
.entry dt { font-weight: 700; font-size: .85rem; color: var(--muted); margin-top: 8px; }
.entry dd { margin: 0; white-space: pre-wrap; }
@media (min-width: 720px) { .entry dl { grid-template-columns: 240px 1fr; } .entry dt { margin-top: 0; } }
.entry-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.week-head { margin: 28px 0 12px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }

/* ---------- places ---------- */
.place-card h3 { margin-bottom: 2px; }
.place-card h3 a { color: var(--text); text-decoration: none; }
.place-card h3 a:hover { color: var(--primary); }
.place-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; margin: 16px 0; }
.place-facts .fact { padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.place-facts .fact strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.prose-block { white-space: pre-wrap; }
.hp-field { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- news ---------- */
.news-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.news-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.news-card .thumb { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--surface-2); display: block; }
.news-card .news-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card h3 { font-size: 1.08rem; margin: 0; }
.news-card h3 a { color: var(--text); text-decoration: none; }
.news-card h3 a:hover { color: var(--primary); text-decoration: underline; }
.news-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.news-card .news-meta { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--muted); font-weight: 700; }
.news-card .read { margin-top: auto; font-weight: 700; font-size: .9rem; }
.pager { display: flex; justify-content: center; gap: 8px; margin: 28px 0; flex-wrap: wrap; }
.ad-slot { margin: 24px 0; min-height: 90px; text-align: center; }
.ad-slot .ad-label { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- admin ---------- */
.admin-sub { margin-bottom: 16px; }
.admin-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; margin-bottom: 8px; padding: 12px 16px; }
.admin-row > span { flex: 1; min-width: 200px; }
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.order-card.status-new { border-inline-start: 4px solid var(--warm); }
.order-card.status-cancelled { opacity: .6; }
fieldset.plain { border: 0; padding: 0; margin: 0; }
/* "Your centre" on the sign-up and account forms: the add-a-centre part sits under the field, set off by a line. */
.centre-field #c-found, .centre-field #c-hint { margin: 6px 0 0; }
.centre-field #c-add-wrap { margin-top: 8px; }
fieldset.plain.centre-add { margin-top: 12px; padding-block: 4px; padding-inline: 14px 0; border-inline-start: 3px solid var(--primary-soft); }

/* ---------- picture maker ---------- */
.maker-bar { margin-bottom: 10px; }
.maker-start { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
#ready-words { margin: 0 0 14px; }
.maker-tick { font-size: .8rem; font-weight: 700; }
.maker-tick input { position: static; opacity: 1; pointer-events: auto; width: 18px; height: 18px; accent-color: var(--primary); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; padding: 0; position: relative; overflow: hidden; }
.swatch[aria-pressed="true"] { outline: 3px solid var(--focus); outline-offset: 2px; }
.swatch.custom { background: conic-gradient(#d64545, #f2c94c, #3d9a5b, #3f6f8f, #8a76a8, #d64545); }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.maker-size { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; }
.maker-size input[type="range"] { width: 110px; accent-color: var(--primary); }
.maker-size input[type="color"] { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.maker-sel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.maker-sel-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.maker-stage { display: flex; justify-content: center; padding: 16px; background: var(--surface-2); border-radius: var(--radius); margin-bottom: 16px; }
.maker-stage canvas { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; background: #fff; border-radius: 6px; box-shadow: var(--shadow); touch-action: none; }
.maker-gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.maker-thumb { margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.maker-open { padding: 0; border: 0; background: var(--surface-2); border-radius: 8px; cursor: pointer; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.maker-open img { max-width: 100%; max-height: 100%; }
.maker-thumb figcaption { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; }
.maker-thumb figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- accounts, children & goals ---------- */
.sync-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 16px 0 0; padding: 8px 14px; border-radius: var(--radius-sm); background: var(--primary-soft); font-size: .9rem; }
.sync-bar select { width: auto; min-height: 36px; padding: .25em .6em; }
.account-link { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite-card { border: 2px solid var(--primary); margin-bottom: 16px; }
.invite-code { font-size: 2rem; font-weight: 700; letter-spacing: .18em; margin: 8px 0; font-family: ui-monospace, Menlo, Consolas, monospace; }
.goal-card.status-achieved { border-inline-start: 4px solid var(--success); }
.goal-card.status-paused { opacity: .75; }
.prompt-key { display: grid; gap: 8px 16px; margin-top: 6px; }
@media (min-width: 640px) { .prompt-key { grid-template-columns: 1fr 1fr; align-items: start; } }
.prompt-key .chips { flex-direction: column; align-items: stretch; }
.prompt-key .chip { justify-content: flex-start; border-radius: 12px; }
.goal-chart { display: block; width: 100%; max-width: 560px; height: auto; margin: 8px 0 4px; }
.goal-chart .grid { stroke: var(--border); stroke-width: 1; }
.goal-chart .axis { fill: var(--muted); font-size: 13px; font-family: var(--font); }
.goal-chart .line { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; }
.goal-chart .dot { fill: var(--primary); stroke: var(--surface); stroke-width: 2; transition: transform .1s; transform-box: fill-box; transform-origin: center; }
.goal-chart .hit { fill: transparent; }
.goal-chart .pt:hover .dot { transform: scale(1.5); }
.log-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.log-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.log-row input[type="date"] { width: auto; }
.log-row input[type="text"] { flex: 1; min-width: 200px; }
.log-row input.pct, .log-row input.dur { flex: 0 0 auto; min-width: 0; }
.log-row input.pct { width: 7.5rem; }
.log-row input.dur { width: 8.5rem; }
.log-row input.note { flex: 1 1 100%; min-width: 0; }
@media (max-width: 640px) {
  .log-row input.dur { flex: 1 1 8rem; width: auto; }
}
.goal-more { margin-top: 10px; }
.goal-more summary { cursor: pointer; color: var(--primary); font-weight: 700; }

/* ---------- target plans ---------- */
.plan-section { margin-top: 14px; }
.plan-section-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.plan-title { flex: 1; min-width: 220px; font-weight: 700; font-size: 1.05rem; }
.plan-items { display: grid; gap: 8px; margin-bottom: 10px; }
.plan-item { display: flex; gap: 8px; align-items: flex-start; }
.plan-item > input, .plan-item > textarea { flex: 1; min-height: 40px; }
.plan-item textarea { min-height: 60px; }
.plan-item .cell-area { flex: 0 0 160px; }
.plan-item .cell-answer { flex: 0 0 34%; }
.plan-save-bar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 12px 0; margin-top: 16px; background: var(--bg); border-top: 1px solid var(--border); z-index: 5; }
.plan-doc { background: #fff; color: #1d2731; border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 40px; max-width: 900px; margin: 0 auto; box-shadow: var(--shadow); }
.plan-doc[lang="en"] { font-family: var(--font); line-height: 1.6; }
.plan-doc-head { text-align: center; }
.plan-org { font-size: 1.5rem; font-weight: 700; margin: 0; }
.plan-unit { font-size: 1.15rem; font-weight: 700; margin: 2px 0 0; }
.plan-doc h1 { font-size: 1.35rem; color: #3f6f8f; margin: 10px 0 16px; }
.plan-info { width: 100%; border-collapse: collapse; text-align: start; margin-bottom: 10px; font-size: .95rem; }
.plan-info th, .plan-info td { text-align: start; }
.plan-info th { white-space: nowrap; padding-block: 4px; padding-inline: 0 8px; width: 1%; }
.plan-info td { padding-block: 4px; padding-inline: 0 18px; }
.plan-doc-section h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .03em; background: #e3edf3; padding: 6px 10px; margin: 22px 0 10px; border-radius: 4px; }
.plan-doc-section ul { margin: 0; padding-inline-start: 22px; }
.plan-doc-section li { margin: 3px 0; }
.plan-rtl { font-family: var(--font-rtl); font-size: 1.1rem; line-height: 1.9; }
.plan-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.plan-table th, .plan-table td { border: 1px solid #b8c2ca; padding: 6px 8px; vertical-align: top; text-align: start; }
.plan-table th { background: #e3edf3; }
.plan-sign { display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; }
@media (max-width: 600px) {
  .plan-doc { padding: 20px 16px; }
  .plan-info, .plan-info tbody, .plan-info tr, .plan-info th, .plan-info td { display: block; width: auto; }
  .plan-info th { padding-top: 8px; }
  .plan-item { flex-wrap: wrap; }
  .plan-item .cell-area, .plan-item .cell-answer { flex: 1 1 100%; }
}
@media print {
  .plan-doc { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .plan-doc-section h2 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .plan-doc-section { break-inside: auto; }
  .plan-table tr, .plan-doc-section li { break-inside: avoid; }
  .sync-bar, .breadcrumbs { display: none !important; }
}

/* ---------- Urdu (right-to-left) ---------- */
html[dir="rtl"] body { font-family: var(--font-rtl); line-height: 1.85; }
html[dir="rtl"] .breadcrumbs li + li::before { content: "‹"; margin: 0 2px 0 6px; }
html[dir="rtl"] .site-nav a, html[dir="rtl"] .btn, html[dir="rtl"] .chip { letter-spacing: 0; }
html[dir="rtl"] .eyebrow { letter-spacing: 0; text-transform: none; }
/* Charts, codes and numbers keep left-to-right drawing; their text is still Urdu. */
.goal-chart, .invite-code, input[type="tel"], input[type="email"], input[type="date"], input[type="number"] { direction: ltr; }
html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[type="email"] { text-align: right; }
.lang-menu { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .45rem; font-size: .82rem; }
.lang-menu a { text-decoration: none; color: inherit; }
.lang-menu a[aria-current="true"] { font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.lang-menu a[lang="ur"], .lang-menu a[lang="ar"] { font-family: var(--font-rtl); font-size: .95rem; }
html[dir="rtl"] .lang-menu a[lang="en"], html[dir="rtl"] .lang-menu a[lang="de"], html[dir="rtl"] .lang-menu a[lang="fr"] { font-family: var(--font); font-size: .82rem; }

/* ---------- plan → goals, daily notes ---------- */
.track-form { display: inline; margin-inline-start: 6px; }
.track-btn { border: 1px solid var(--border); background: var(--surface); color: var(--primary); border-radius: 999px; font: inherit; font-size: .75rem; font-weight: 700; padding: .1em .6em; cursor: pointer; }
.track-btn:hover { background: var(--primary-soft); }
.plan-doc-section h2 .track-form { float: inline-end; margin-top: -4px; }
.plan-doc-section h2 .btn { font-size: .75rem; min-height: 28px; text-transform: none; letter-spacing: 0; }
.note-form textarea { width: 100%; }
.note { padding: 14px 16px; }

/* ---------- directory ---------- */
.badge.featured { background: var(--warm-soft); color: #8a5a1c; }
.provider-card { display: flex; flex-direction: column; gap: 4px; }
.provider-card.is-featured { border: 2px solid var(--warm); }
.provider-card h3 { margin: 6px 0 0; }
.provider-card h3 a { color: var(--text); text-decoration: none; }
.provider-card h3 a:hover { color: var(--primary); }
.provider-card .card-actions { margin-top: auto; padding-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.contact-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }

/* ---------- shop ---------- */
.product-card { display: flex; flex-direction: column; gap: 6px; }
.product-card.in-cart { border: 2px solid var(--primary); }
.product-card.sold-out { opacity: .65; }
.product-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
.product-img.emoji { display: grid; place-items: center; font-size: 4rem; }
.product-card h3 { margin: 8px 0 0; }
.product-card p { margin: 0; }
.product-buy { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.product-buy { flex-wrap: wrap; }
.product-buy .price { font-size: 1.15rem; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty input { width: 52px; text-align: center; padding-left: .3em; padding-right: .3em; }
.order-total { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.order-total span:last-child { font-size: 1.15rem; }
.admin-sub dl { display: grid; grid-template-columns: 200px 1fr; gap: 4px 12px; font-size: .92rem; }
.admin-sub dt { font-weight: 700; color: var(--muted); }
.admin-sub dd { margin: 0; white-space: pre-wrap; }

/* ---------- footer ---------- */
.site-footer { margin-top: 56px; border-top: 1px solid var(--border); background: var(--surface); padding: 32px 0 16px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.footer-inner > div { max-width: 520px; }
.footer-brand { display: flex; gap: 8px; align-items: center; font-weight: 700; margin-bottom: 6px; }
.footer-contact a { font-weight: 600; overflow-wrap: anywhere; }
.footer-social { margin: 14px 0 16px; }
.social-links { display: flex; flex-wrap: wrap; gap: 10px; }
.social-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding-block: 8px; padding-inline: 12px 16px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface-2); color: var(--text); font-weight: 700; text-decoration: none; }
.social-link:hover { border-color: var(--primary); color: var(--primary); }
.social-link svg { flex: none; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; align-content: start; }
.footer-head { font-weight: 700; margin: 0 0 6px; }
.footer-col { min-width: 180px; }
.breadcrumbs ol { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .88rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin: 0 6px 0 2px; }
.breadcrumbs a { color: var(--muted); }
.browse-links { margin-top: 32px; }
.browse-links h2 { font-size: 1.2rem; margin: 20px 0 10px; }
.link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.link-list a[aria-current="page"] { font-weight: 700; text-decoration: none; color: var(--text); }
.copyright { margin-top: 18px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 700; z-index: 100; max-width: calc(100vw - 32px); transition: transform .25s ease; }
.toast.show { transform: translate(-50%, 0); }

/* ---------- print ---------- */
#print-sheet { display: none; }
@media print {
  body.printing > *:not(#print-sheet) { display: none !important; }
  body.printing #print-sheet { display: block; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-header, .site-footer, .toolbar, .no-print { display: none !important; }
  a { color: #000; }
  .print-title { font-size: 22pt; margin-bottom: 4pt; }
  .print-sub { color: #444; margin-bottom: 14pt; }
  .print-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10pt; }
  .print-cards.four { grid-template-columns: repeat(4, 1fr); }
  .print-cards.two { grid-template-columns: repeat(2, 1fr); }
  .print-card { border: 2pt solid #333; border-radius: 10pt; padding: 10pt; text-align: center; break-inside: avoid; }
  .print-card .visual { width: 90pt; height: 90pt; font-size: 60pt; }
  .print-card p { font-size: 15pt; font-weight: 700; margin: 6pt 0 0; }
  .print-card .num { font-size: 10pt; color: #555; }
  .print-card .tick { display: inline-block; width: 18pt; height: 18pt; border: 2pt solid #333; border-radius: 4pt; margin-top: 6pt; }
  .print-story .print-card { min-height: 220pt; display: flex; flex-direction: column; justify-content: center; align-items: center; }
  .print-section { break-inside: avoid; margin-bottom: 14pt; }
  .print-section h2 { font-size: 14pt; border-bottom: 1pt solid #999; padding-bottom: 3pt; }
  .print-section dl { display: grid; grid-template-columns: 34% 1fr; gap: 3pt 10pt; margin: 0; }
  .print-section dt { font-weight: 700; }
  .print-section dd { margin: 0; white-space: pre-wrap; }
  table { width: 100%; border-collapse: collapse; }
  th, td { border: 1pt solid #999; padding: 4pt; text-align: start; vertical-align: top; font-size: 10pt; }
}

/* ---------- Guides (signs.php, after-diagnosis.php, ...) ---------- */
.guide-head .guide-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 10px; }
.guide { max-width: 780px; }
.guide h2 { margin-top: 1.8em; scroll-margin-top: 90px; }
.guide h3 { margin-top: 1.3em; }
.guide > p, .guide li { line-height: 1.7; }
.guide li + li { margin-top: .35em; }
.toc { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 18px; margin: 8px 0 20px; }
.toc p { margin: 0 0 6px; font-weight: 700; }
.toc ol { margin: 0; padding-inline-start: 22px; }
.callout { padding: 16px 18px; border-radius: var(--radius-sm); margin: 18px 0; background: var(--primary-soft); border-inline-start: 5px solid var(--primary); }
.callout > :last-child { margin-bottom: 0; }
.callout h3 { margin-top: 0; }
.callout.tip { background: var(--talk-soft); border-inline-start-color: var(--talk); }
.callout.warn { background: #fbe9e9; border-inline-start-color: var(--danger); color: #4d1a1a; }
.callout.warm { background: var(--warm-soft); border-inline-start-color: var(--warm); }
:root[data-theme="dark"] .callout.warn { background: #3a2222; color: #f3d6d6; }
.checklist { list-style: none; padding: 0; margin: 10px 0; }
.checklist li { margin: 0; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 400; }
.checklist label:hover { background: var(--surface-2); }
.checklist input { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 3px; accent-color: var(--primary); }
.age-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 16px 12px; margin: 14px 0; background: var(--surface); }
.age-block > h3 { margin-top: 12px; }
.check-result { margin-top: 12px; }
.steps { list-style: none; padding: 0; margin: 16px 0; counter-reset: step; }
.steps > li { position: relative; padding: 2px 0 18px; padding-inline-start: 52px; counter-increment: step; }
.steps > li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-weight: 700; }
.steps > li::after { content: ""; position: absolute; inset-inline-start: 17px; top: 40px; bottom: 4px; width: 2px; background: var(--border); }
.steps > li:last-child::after { display: none; }
.steps > li > h3 { margin: 4px 0 6px; }
.week-label { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 2px 10px; margin-bottom: 4px; }
.fact-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .97rem; }
.fact-table th, .fact-table td { border: 1px solid var(--border); padding: 9px 10px; text-align: start; vertical-align: top; }
.fact-table th { background: var(--surface-2); }
.q-list { padding-inline-start: 22px; }
.q-list li { margin: .3em 0; }
.guide-disclaimer { margin-top: 20px; }
.lang-pill { font-size: .85rem; }

/* Share bar on every public page */
.share-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 24px 0 8px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.share-bar .share-label { font-weight: 700; margin-inline-end: 4px; }
.page-share { margin-top: 8px; }

/* Printable packs (printable.php) */
.pack-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); margin: 16px 0; }
.pack-cards.strip { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.pcard { border: 2px solid var(--text); border-radius: 14px; padding: 12px 10px; text-align: center; background: var(--surface); break-inside: avoid; position: relative; }
.pcard .pc-emoji { font-size: 3.4rem; line-height: 1.15; display: block; }
.pcard .pc-en { display: block; font-weight: 700; font-size: 1.05rem; margin-top: 6px; }
.pcard .pc-ur { display: block; font-family: var(--font-rtl); font-size: 1.15rem; line-height: 1.7; }
.pcard .pc-num { position: absolute; top: 6px; inset-inline-start: 10px; font-size: .8rem; color: var(--muted); }
.pcard .pc-tick { display: block; width: 26px; height: 26px; border: 2px solid var(--text); border-radius: 6px; margin: 8px auto 0; }
.pack-section-title { margin: 22px 0 4px; }
.pack-tips { margin-top: 18px; }
.print-only { display: none; }
.pack-grid .card h3 { margin-top: 0; }
.pack-langs { display: flex; gap: 6px; flex-wrap: wrap; }

/* Family stories, updates sign-up, provider badge */
.story-card { border-inline-start: 5px solid var(--talk); }
.story-card blockquote { margin: 8px 0; font-size: 1.05rem; line-height: 1.75; white-space: pre-line; }
.story-card .story-meta { color: var(--muted); font-size: .9rem; }
.story-card .story-helped { background: var(--talk-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 10px; }
.badge-poster { max-width: 560px; margin: 0 auto; border: 3px solid var(--primary); border-radius: 22px; padding: 28px; text-align: center; background: #fff; color: #22303a; }
.badge-poster h2 { color: #3f6f8f; margin: 8px 0; }
.badge-poster .qr { display: inline-block; padding: 10px; background: #fff; margin: 14px 0; }
.badge-poster .qr img, .badge-poster .qr canvas { display: block; }
.badge-poster .bp-ur { font-family: var(--font-rtl); font-size: 1.2rem; line-height: 1.8; }
.embed-code { width: 100%; min-height: 110px; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; direction: ltr; }

@media print {
  .site-header, .site-footer, .share-bar, .breadcrumbs, .no-print, .guide-meta, .skip-link { display: none !important; }
  .print-only { display: block !important; }
  body { background: #fff !important; color: #000 !important; }
  .card, .age-block { box-shadow: none !important; }
  .pcard { border-color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pack-cards { gap: 8pt; }
  .callout { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .badge-poster { border-color: #3f6f8f; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a[href^="http"]::after { content: ""; }
}
.hero-note { margin: 12px 0 0; max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.hero-actions .btn, .share-bar .btn { max-width: 100%; text-align: center; }
.film-item.is-relevant { background: var(--warm-soft); border-radius: var(--radius-sm); }
.film-item .for-you { display: none; font-weight: 700; }
.film-item.is-relevant .for-you { display: inline; }

/* Communication Board: type to talk */
.type-talk { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; margin-bottom: 16px; }
.type-talk-title { font-size: 1rem; margin: 0 0 8px; }
.type-talk-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.type-talk-row input { flex: 1 1 260px; min-height: 48px; font-size: 1.15rem; }
.type-recent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.type-recent .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- autism help by country & region (help.php, includes/countries.php) ---------- */
.region-bar { background: var(--primary-soft); border-bottom: 1px solid var(--border); }
.region-bar-inner { display: flex; align-items: center; gap: 10px; padding-block: 10px; font-size: .95rem; }
.region-bar-inner > span:first-child { font-size: 1.3rem; line-height: 1; }
.region-bar-inner > span:nth-child(2) { flex: 1; }
.region-bar-close { margin-inline-start: auto; min-width: 40px; min-height: 40px; border: 0; background: transparent; color: var(--muted); font-size: 1.5rem; cursor: pointer; border-radius: var(--radius-sm); }
.region-bar-close:hover { background: var(--surface); color: var(--text); }
.country-choose { display: grid; gap: 10px; margin: 8px 0 12px; }
.country-choose-row { display: flex; flex-wrap: wrap; gap: 10px; }
.country-choose-row select { flex: 1 1 240px; min-width: 0; }
.country-choose p { margin: 0; }
.first-steps { padding-inline-start: 1.4em; }
.first-steps li { margin-bottom: 10px; }
.org-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.org-list li { overflow-wrap: anywhere; }
.org-phone { white-space: nowrap; }
.country-dir { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.country-dir .card h3 { margin-top: 0; }
.source-list { padding-inline-start: 1.2em; overflow-wrap: anywhere; }
.faq-list details { margin-bottom: 10px; }
.faq-list details p { margin: 0; }

/* Centre teams and parent reviews */
.team-list { display: grid; gap: 16px; margin-top: 12px; }
.team-person { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; background: var(--bg); }
.team-person h3, .team-home-card h3, .team-dept-heading { margin: 0 0 4px; }
.team-dept { margin: 0; color: var(--primary); font-weight: 700; }
.team-score { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin: 6px 0; }
.team-stars { color: var(--warm); letter-spacing: .04em; }
.team-reviews { display: grid; gap: 12px; margin-top: 8px; }
.team-review { margin: 0; padding-top: 10px; border-top: 1px solid var(--border); }
.team-reply { background: var(--primary-soft); border-radius: var(--radius-sm); padding: 8px 10px; }
.team-review-form, .team-reply-form, .team-edit { margin-top: 12px; }
.star-pick { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.star-pick legend { font-weight: 700; margin-inline-end: 4px; }
.star-pick label { border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; background: var(--surface); }
.team-dept-heading { margin: 18px 0 8px; }
.team-home-row { display: grid; gap: 10px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.team-home-card { color: inherit; text-decoration: none; padding: 12px; }
.team-home-card h3 { font-size: 1rem; overflow-wrap: anywhere; }
.team-home-card .team-stars { display: block; margin: 4px 0; font-size: .95rem; }
.team-home-meta { margin: 0; color: var(--muted); font-size: .85rem; }
@media (max-width: 980px) {
  .team-home-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .team-home-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =====================================================================
   2026 refresh: "Clear & Trusted" look (line icons, crisper cards, new home page).
   Everything uses the theme variables above, so Calm / Bright / Dark / High contrast and text sizes still work.
   ===================================================================== */

/* ---------- icons ---------- */
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
html[dir="rtl"] .ico-flip { transform: scaleX(-1); }
.btn .ico { width: 1.1em; height: 1.1em; }
.btn.primary { box-shadow: 0 1px 2px rgba(20, 40, 58, .16), 0 6px 16px rgba(47, 95, 128, .16); }
:root[data-theme="dark"] .btn.primary, :root[data-theme="contrast"] .btn.primary { box-shadow: none; }

.tool-ic { --c: var(--primary); --s: var(--primary-soft); width: 46px; height: 46px; border-radius: 12px; display: inline-grid; place-items: center; flex: none; background: var(--s); color: var(--c); }
.tool-ic .ico { width: 24px; height: 24px; }
.tool-ic.big { width: 56px; height: 56px; border-radius: 14px; }
.tool-ic.big .ico { width: 28px; height: 28px; }
.tone-routine { --c: var(--routine); --s: var(--routine-soft); }
.tone-talk { --c: var(--talk); --s: var(--talk-soft); }
.tone-comfort { --c: var(--comfort); --s: var(--comfort-soft); }
.tone-warm { --c: var(--warm); --s: var(--warm-soft); }
.tone-primary { --c: var(--primary); --s: var(--primary-soft); }
:root[data-theme="contrast"] .tool-ic { border: 2px solid currentColor; }

/* ---------- headings, cards and page titles ---------- */
h1, h2 { letter-spacing: -.015em; }
html[dir="rtl"] h1, html[dir="rtl"] h2 { letter-spacing: 0; }
.card { border-radius: 14px; }
.mini-tool { gap: 16px; padding: 20px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.mini-tool:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.mini-tool h3 { color: var(--text); font-size: 1.08rem; line-height: 1.3; }
.mini-tool .tool-ic { margin-top: 2px; }
.page-head { padding: 40px 0 18px; }
.page-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); line-height: 1.12; }
.page-head .lead { font-size: 1.12rem; }
.page-head .eyebrow, .eyebrow.accent { color: var(--primary); }
.page-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.page-kicker .eyebrow { margin: 0; }
.kicker { margin: 0 0 8px; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
html[dir="rtl"] .kicker { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.section-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.more-link:hover { text-decoration: underline; }
.more-link .ico { width: 1em; height: 1em; }

/* ---------- footer ---------- */
.site-footer { margin-top: 72px; padding: 52px 0 0; }
.footer-inner { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-inner > div:first-child { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .footer-inner { grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); } .footer-inner > div:first-child { grid-column: auto; } }
.footer-inner > div { max-width: none; }
.footer-brand { font-size: 1.2rem; gap: 10px; margin-bottom: 10px; }
.footer-head { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
html[dir="rtl"] .footer-head { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.footer-links { gap: 8px; }
.footer-links a { color: var(--text); text-decoration: none; font-size: .92rem; }
.footer-links a:hover { color: var(--primary); text-decoration: underline; }
.footer-links .ico, .footer-contact .ico { color: var(--muted); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 18px; padding-bottom: 26px; border-top: 1px solid var(--border); }

/* ---------- home page ---------- */
.home-hero { background: linear-gradient(180deg, var(--primary-soft) 0%, var(--bg) 100%); padding: 56px 0 52px; }
.home-hero-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .home-hero-grid { grid-template-columns: 1.1fr .9fr; gap: 56px; } }
.home-eyebrow { display: inline-flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 16px 6px 10px; font-size: .85rem; font-weight: 700; color: var(--primary); margin: 0 0 18px; }
.home-eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--talk-soft); }
.home-hero h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 18px; }
html[dir="rtl"] .home-hero h1 { letter-spacing: 0; line-height: 1.45; }
.home-hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 600px; margin: 0; }
.home-hero .hero-actions { margin-top: 28px; gap: 12px; }
.home-hero .hero-actions .btn { min-height: 52px; padding: .7em 1.35em; font-size: 1rem; }
.home-account { display: flex; gap: 8px; align-items: flex-start; margin: 22px 0 0; font-size: .88rem; color: var(--muted); max-width: 600px; }
.home-account .ico { margin-top: .2em; }
.home-start { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 26px; box-shadow: var(--shadow-lg); }
.home-start h2 { font-size: 1.3rem; margin: 0 0 2px; }
.home-start > p { color: var(--muted); font-size: .92rem; margin: 0 0 12px; }
.home-path { display: flex; align-items: center; gap: 14px; padding: 13px 14px; margin-top: 10px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.home-path:hover { border-color: var(--primary); background: var(--primary-soft); }
.home-path > span:nth-child(2) { flex: 1; min-width: 0; }
.home-path strong { display: block; font-size: 1rem; line-height: 1.3; }
.home-path small { display: block; color: var(--muted); font-size: .85rem; line-height: 1.4; margin-top: 2px; }
.home-path > .ico { color: var(--muted); width: 18px; height: 18px; }

.home-trust { background: var(--surface); border-block: 1px solid var(--border); }
.trust-list { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.trust-list li { display: flex; gap: 12px; align-items: flex-start; padding: 20px 16px; }
.trust-list .ico { width: 24px; height: 24px; color: var(--primary); margin-top: 2px; }
.trust-list p { margin: 0; line-height: 1.35; }
.trust-list strong { display: block; font-size: .95rem; }
.trust-list span { font-size: .85rem; color: var(--muted); }
@media (min-width: 1000px) {
  .trust-list li + li { border-inline-start: 1px solid var(--border); }
  .trust-list li:first-child { padding-inline-start: 0; }
}

.home-sec { padding: 68px 0 0; }
.home-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; }
.home-head > div { max-width: 700px; }
.home-head h2, .local-body h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.15; margin: 0; }
.home-head .sub, .local-body .sub { color: var(--muted); font-size: 1.05rem; margin: 10px 0 0; }

.home-tools { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.home-tool { --c: var(--primary); position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; color: var(--text); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.home-tool::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c); }
.home-tool:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--c); }
.home-tool .tool-ic { margin-bottom: 20px; }
.home-tool h3 { font-size: 1.35rem; margin: 0 0 6px; }
.home-tool p { color: var(--muted); margin: 0; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 22px; }
.tags li { font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--muted); padding: 4px 10px; border-radius: 7px; }
.home-tool .open { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--c); }

.home-helper { margin-top: 24px; background: var(--primary-soft); border-radius: 16px; padding: 22px 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.home-helper .tool-ic { --s: var(--surface); }
.home-helper-text { flex: 1 1 240px; }
.home-helper h3 { margin: 0 0 2px; font-size: 1.15rem; }
.home-helper p { margin: 0; color: var(--muted); font-size: .92rem; }
.home-helper .chips { list-style: none; margin: 0; padding: 0; flex: 1 1 360px; }
.home-helper .chip, .local-chips .chip { text-decoration: none; min-height: 36px; font-size: .85rem; }
.home-helper .chip:hover, .local-chips .chip:hover { border-color: var(--primary); color: var(--primary); }

.home-reviews { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
#parents-reviewed .chips { margin: -6px 0 18px; }
.review-card { display: flex; gap: 14px; align-items: center; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--text); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.review-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.review-avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 1.15rem; }
.review-body { display: grid; gap: 2px; min-width: 0; }
.review-name { font-weight: 700; overflow-wrap: anywhere; }
.review-card .team-stars { font-size: .95rem; }
.home-reviews-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px 28px; }
.home-reviews-empty > div { flex: 1 1 320px; }
.home-reviews-empty h2 { font-size: 1.35rem; margin: 0 0 4px; }
.home-reviews-empty p:not(.kicker) { margin: 0; color: var(--muted); }
.review-score { color: var(--muted); font-size: .82rem; letter-spacing: 0; margin-inline-start: 4px; }

.home-local { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .home-local { grid-template-columns: 1fr 1fr; gap: 56px; } }
.local-art { position: relative; background: var(--primary-soft); border-radius: 24px; aspect-ratio: 560 / 380; overflow: hidden; }
.local-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.globe-fill { fill: #d3e2ed; fill: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.globe-line { stroke: #9fbcd1; stroke: color-mix(in srgb, var(--primary) 40%, var(--surface)); stroke-width: 2; }
.globe-orbit { stroke: var(--primary); stroke-width: 2; stroke-dasharray: 6 8; }
.globe-p1 { fill: var(--talk); }
.globe-p2 { fill: var(--comfort); }
.globe-p3 { fill: var(--warm); }
.local-tags { list-style: none; margin: 0; padding: 0; }
.local-tags li { position: absolute; max-width: 46%; }
.local-tag { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px; font-size: .8rem; font-weight: 700; text-decoration: none; box-shadow: 0 4px 12px rgba(20, 40, 58, .1); }
.local-tag:hover { border-color: var(--primary); color: var(--primary); }
.local-tag.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
/* Positions follow a world map; they are not mirrored on Urdu pages because the drawing is not. */
.local-tag-w { top: 41%; left: 3%; }
.local-tag-nw { top: 11%; left: 7%; }
.local-tag-sw { bottom: 12%; left: 6%; }
.local-tag-n { top: 6%; right: 9%; }
.local-tag-e { top: 46%; right: 3%; }
.local-tag-se { bottom: 7%; right: 12%; }
@media (max-width: 520px) { .local-tag { font-size: .7rem; padding: 4px 10px; } }
.local-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.local-form select { flex: 1 1 240px; min-width: 0; min-height: 52px; border-radius: 12px; border-width: 1.5px; }
.local-form .btn { min-height: 52px; padding-inline: 1.3em; }
.local-here { margin: 14px 0 0; font-weight: 700; }
.local-here a { display: inline-flex; gap: 6px; align-items: center; }
.local-chips { list-style: none; padding: 0; margin: 18px 0 0; }

.home-faq { columns: 2 340px; column-gap: 36px; }
.home-faq details { break-inside: avoid; border-bottom: 1px solid var(--border); }
.home-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 15px 0; font-weight: 700; }
.home-faq summary::-webkit-details-marker { display: none; }
.home-faq summary::after { content: "+"; color: var(--primary); font-size: 1.35rem; line-height: 1; }
.home-faq details[open] summary::after { content: "–"; }
.home-faq details p { margin: 0 0 16px; color: var(--muted); }

.home-principles { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.home-principles > div { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.home-principles .tool-ic { margin-bottom: 14px; }
.home-principles h3 { font-size: 1.05rem; margin: 0 0 6px; }
.home-principles p { margin: 0; color: var(--muted); font-size: .92rem; }

.home-support { background: var(--topbar-bg); color: var(--topbar-ink); border-radius: 22px; padding: 36px 40px; display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; }
.home-support p { margin: 0; max-width: 560px; font-size: 1.05rem; }
.home-support strong { color: #fff; }
.home-support-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.home-support .btn:not(.whatsapp) { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.home-support .btn:not(.whatsapp):hover { background: rgba(255, 255, 255, .1); }
@media (max-width: 600px) {
  .trust-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-list li { padding: 16px 8px; gap: 10px; }
  .trust-list .ico { width: 20px; height: 20px; }
  .review-card { padding: 12px 14px; }
  .review-avatar { width: 40px; height: 40px; font-size: 1rem; }
  .home-hero { padding: 32px 0 36px; }
  .home-start { padding: 18px; }
  .home-sec { padding-top: 52px; }
  .home-support { padding: 26px 22px; }
  .home-tool { padding: 22px; }
}

/* ---- Directory extras: logo, photos, fees, ratings, availability, jobs, centre dashboard (2026-11) ---- */
.provider-title { display: flex; gap: 16px; align-items: center; }
.provider-title h1 { margin: 2px 0 0; }
.provider-logo { width: 84px; height: 84px; border-radius: 18px; object-fit: cover; border: 1px solid var(--border); background: #fff; flex: none; }
.provider-card-head { display: flex; gap: 12px; align-items: flex-start; margin-top: 6px; }
.provider-card-head h3 { margin: 0; }
.provider-card-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); background: #fff; flex: none; }
.card-rating { margin: 8px 0 0; color: var(--text); }
.card-rating .team-stars { font-size: .95rem; }
.card-fee { margin: 6px 0 0; font-weight: 700; color: var(--talk); }
.badge.rating { background: var(--warm-soft); color: var(--text); text-decoration: none; }
.badge.rating .team-stars { color: var(--warm); }
.badge.hiring { background: var(--comfort-soft); color: var(--comfort); text-decoration: none; }
.badge.avail-open { background: var(--talk-soft); color: var(--talk); }
.badge.avail-waitlist { background: var(--warm-soft); color: var(--warm); }
.badge.avail-full { background: var(--surface-2); color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); display: block; border: 1px solid var(--border); }
.photo-grid.small-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.photo-pick { display: grid; gap: 4px; }
.fee-table th { width: 50%; font-weight: 600; }
.rating-summary .team-stars { font-size: 1.2rem; }
.team-person-head { display: flex; gap: 14px; align-items: flex-start; }
.team-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--border); background: var(--surface-2); }
.team-initial { display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); }
.team-cred { margin: 2px 0 0; color: var(--muted); }
.team-photo-field { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.team-photo-field .team-photo { width: 56px; height: 56px; }
.job-mini { margin: 0; padding-inline-start: 18px; display: grid; gap: 8px; }
.jobs-band { background: var(--comfort-soft); }
.job-card h3 { margin: 6px 0 0; }
.job-card h3 a { color: var(--text); text-decoration: none; }
.job-row { border-top: 1px solid var(--border); padding: 12px 0; display: grid; gap: 6px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 10px; margin: 10px 0; }
.stat-tile { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; display: grid; gap: 2px; }
.stat-tile strong { font-size: 1.6rem; line-height: 1.1; color: var(--primary); }
.stat-tile span { font-size: .85rem; color: var(--muted); }
.score-bar { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); max-width: 420px; }
.score-bar span { display: block; height: 100%; background: var(--talk); border-radius: 999px; }
.missing-list { margin: 4px 0 0; padding-inline-start: 18px; columns: 2 220px; }
.msg-list { display: grid; gap: 10px; }
.msg { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--bg); }
.fee-rows { display: grid; gap: 8px; margin-top: 10px; }
.fee-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 8px; align-items: center; }
.fee-row[hidden] { display: none; }
.fee-label { font-size: .92rem; font-weight: 600; }
@media (max-width: 560px) {
  .fee-row { grid-template-columns: 1fr 1fr; }
  .fee-label { grid-column: 1 / -1; }
  .fee-row select { grid-column: 1 / -1; }
  .provider-title { align-items: flex-start; }
  .provider-logo { width: 64px; height: 64px; }
}
.badge.hiring { display: inline-flex; align-items: center; gap: 6px; }
.badge.hiring .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--comfort); flex: none; box-shadow: 0 0 0 0 var(--comfort); animation: hiring-pulse 2s ease-out infinite; }
.badge.hiring:hover { text-decoration: underline; }
@keyframes hiring-pulse { 0% { box-shadow: 0 0 0 0 rgba(111, 90, 152, .55); } 70% { box-shadow: 0 0 0 7px rgba(111, 90, 152, 0); } 100% { box-shadow: 0 0 0 0 rgba(111, 90, 152, 0); } }
/* Home: centres with fees and reviews */
.home-centres { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.home-centre { display: grid; gap: 6px; align-content: start; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.home-centre h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.home-centre h3 a { color: var(--text); text-decoration: none; }
.home-centre h3 a:hover { color: var(--primary); }
.home-centre .meta { margin: 0; }
.home-centre p { margin: 0; }
