/* TutorHQ sample tour (/tour/). Builds on site.css tokens; logical properties throughout so the Arabic copy mirrors. */
:root {
  --tour-shadow: 0 1px 2px rgba(20, 32, 27, .06), 0 18px 40px -18px rgba(20, 32, 27, .28);
  --tour-ease: cubic-bezier(.2, .7, .2, 1);
  --tour-scene: 560ms;
  --tour-quick: 200ms;
  --tour-dir: 1;
  --tour-ok: #1f7a6a;
  --tour-warn-bg: #fff3e6;
  --tour-sel: #e6e8f7;
}
[dir="rtl"] { --tour-dir: -1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --tour-shadow: 0 1px 2px rgba(0,0,0,.3), 0 18px 40px -18px rgba(0,0,0,.7); --tour-ok: #7fd6c4; --tour-warn-bg: #3a2a1d; --tour-sel: #262a55; }
}
:root[data-theme="dark"] { --tour-shadow: 0 1px 2px rgba(0,0,0,.3), 0 18px 40px -18px rgba(0,0,0,.7); --tour-ok: #7fd6c4; --tour-warn-bg: #3a2a1d; --tour-sel: #262a55; }

/* Intro */
.tour-intro { padding: 28px 0 24px; max-width: 46em; }
@media (min-width: 720px) { .tour-intro { padding: 44px 0 32px; } }
.tour-tag { display: inline-block; margin: 0 0 14px; padding: 3px 12px; border-radius: 999px; background: var(--lime); color: var(--lime-ink); font-size: 13px; font-weight: 700; }
.tour-intro h1 { font-size: clamp(32px, 5vw, 50px); }
.tour-intro .lede { margin: 16px 0 14px; font-size: 17px; }
.tour-status { display: flex; align-items: center; gap: 8px; margin: 0; min-height: 1.6em; font-size: 14px; color: var(--muted); }
.tour-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--line); flex: none; }
.tour-status[data-state="live"] .tour-dot { background: var(--green); }
.tour-status[data-state="sample"] .tour-dot { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); }

/* Sticky bar: role switcher + Reset, always on screen */
.tour-bar { position: sticky; top: var(--head-h, 0px); z-index: 15; background: var(--bg); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-block: 1px solid var(--line); }
.tour-bar:focus { outline: none; }
.tour-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-block: 10px; }
.roles-tabs { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); max-width: 100%; }
.roles-tabs [role="tab"] { font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); background: transparent; border: 0; border-radius: 999px; min-height: 40px; padding: 0 16px; cursor: pointer; transition: background var(--tour-quick), color var(--tour-quick); }
.roles-tabs [role="tab"]:hover { color: var(--ink); }
.roles-tabs [role="tab"][aria-selected="true"] { background: var(--green); color: var(--green-ink); }
.tour-reset { font: inherit; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.tour-reset:hover { border-color: var(--green); }
.tour-reset .rs-short { display: none; }
@media (max-width: 560px) { .tour-reset .rs-long { display: none; } .tour-reset .rs-short { display: inline; } .tour-reset { padding: 0 12px; } .tour-bar-in { gap: 6px; row-gap: 6px; padding-block: 8px; } .roles-tabs [role="tab"] { padding: 0 12px; } }
@media (max-width: 420px) { .roles-tabs [role="tab"] { padding: 0 7px; font-size: 13px; } .tour-reset { font-size: 13px; padding: 0 10px; gap: 4px; } .tour-reset svg { width: 16px; height: 16px; } }
.tour-reset svg { width: 18px; height: 18px; flex: none; }
[dir="rtl"] .tour-reset svg { transform: scaleX(-1); }

/* Layout: guide beside the stage on wide screens, above it on phones */
.tour-grid { display: grid; gap: 20px; padding-top: 20px; padding-bottom: 56px; align-items: start; }
@media (min-width: 1000px) { .tour-grid { grid-template-columns: 320px minmax(0, 1fr); gap: 40px; padding-top: 32px; } .guide { position: sticky; top: calc(var(--head-h, 0px) + 84px); } }

/* Guide */
.guide-title { font-size: 22px; }
.guide-progress { margin: 4px 0 12px; color: var(--muted); font-size: 14px; min-height: 1.6em; }
.tasks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
@media (max-width: 999px) and (min-width: 560px) { .tasks { grid-template-columns: repeat(3, 1fr); } }
.task { font: inherit; width: 100%; display: flex; align-items: flex-start; gap: 10px; text-align: start; padding: 10px 12px; min-height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color var(--tour-quick), background var(--tour-quick); }
.task:hover { border-color: var(--green); }
.task[aria-current="step"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.task-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--bg-alt); color: var(--ink); font-weight: 700; font-size: 13px; }
.task[aria-current="step"] .task-n { background: var(--lime); color: var(--lime-ink); }
.task-text { display: grid; gap: 1px; min-width: 0; }
.task-name { font-weight: 600; font-size: 15px; line-height: 1.35; }
.task-state { font-size: 13px; color: var(--muted); }
.task[data-state="done"] .task-state { color: var(--tour-ok); font-weight: 600; }
.task[data-state="in"] .task-state { color: var(--ink); }
.guide-card { margin-top: 14px; padding: 16px; border-radius: 16px; background: var(--bg-alt); border: 1px solid var(--line); min-height: 132px; }
.guide-card h3 { font-family: var(--sans); font-weight: 700; font-size: 15px; margin: 0 0 8px; }
.guide-card ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.guide-card li[data-now] { color: var(--ink); font-weight: 600; }
.guide-card li[data-done] { color: var(--muted); }
.guide-card li[data-done]::marker { color: var(--tour-ok); }
.guide-card p { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.guide-card .btn { margin-top: 12px; }
.guide-live { margin: 12px 0 0; font-size: 14px; min-height: 1.6em; color: var(--ink); }
.guide-live:not(:empty) { padding: 10px 12px; border-inline-start: 3px solid var(--green); background: var(--surface); border-radius: 0 10px 10px 0; }
[dir="rtl"] .guide-live:not(:empty) { border-radius: 10px 0 0 10px; }

/* Buttons used inside the screens */
.btn { font: inherit; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-align: center; transition: border-color var(--tour-quick), background var(--tour-quick), transform var(--tour-quick); }
.btn:hover { border-color: var(--green); }
.btn:active { transform: translateY(1px); }
.btn.solid { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 13px; }
.btn.link { border-color: transparent; background: transparent; padding-inline: 4px; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* The stage: three screens stacked in one grid cell. Shallow 3D on wide screens. */
.stage { display: grid; position: relative; min-height: 560px; scroll-margin-top: 72px; }
.stage > .screen { grid-area: 1 / 1; }
.stage[data-ready="false"] .screen { visibility: hidden; }
.stage[data-ready="false"]::before { content: ""; grid-area: 1 / 1; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.tour-noscript { grid-area: 1 / 1; align-self: center; justify-self: center; padding: 24px; position: relative; }
.screen { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--tour-shadow); min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.screen[data-depth="0"] { z-index: 3; }
.screen[data-depth="1"] { z-index: 2; }
.screen[data-depth="2"] { z-index: 1; }

@media (min-width: 760px) {
  .stage { perspective: 1800px; perspective-origin: 50% 0; padding-block-start: 64px; padding-inline-end: 64px; }
  .screen { transform-origin: 50% 0; transition: transform var(--tour-scene) var(--tour-ease), opacity var(--tour-scene) var(--tour-ease), filter var(--tour-scene) var(--tour-ease); will-change: transform; }
  .screen[data-depth="0"] { transform: translate3d(0, 0, 0); }
  .screen[data-depth="1"] { transform: translate3d(calc(var(--tour-dir) * 32px), -32px, -70px) rotateY(calc(var(--tour-dir) * -5deg)); opacity: .78; filter: saturate(.7); cursor: default; }
  .screen[data-depth="2"] { transform: translate3d(calc(var(--tour-dir) * 64px), -64px, -140px) rotateY(calc(var(--tour-dir) * -5deg)); opacity: .55; filter: saturate(.5); }
  .screen:not([data-depth="0"]) .scr-body { pointer-events: none; }
}
/* Phones: one screen at a time, a short crossfade */
@media (max-width: 759px) {
  .stage { min-height: 480px; }
  .screen:not([data-depth="0"]) { display: none; }
  .screen[data-depth="0"] { animation: tour-in var(--tour-quick) ease-out both; }
}
@keyframes tour-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .screen { transition: opacity 150ms linear !important; }
  .screen[data-depth="0"] { animation: tour-in 150ms linear both; }
  .btn, .task, .roles-tabs [role="tab"] { transition: none; }
}
.stage[data-motion="reduce"] .screen { transition: opacity 150ms linear; }

/* Screen chrome: who this is and what they can see */
.scr-chrome { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--bg-alt); font-size: 13px; }
.scr-role { font-weight: 700; color: var(--ink); }
.scr-sees { color: var(--muted); }
.scr-body { padding: 18px; display: grid; gap: 22px; align-content: start; flex: 1; }
@media (min-width: 720px) { .scr-body { padding: 22px 24px 26px; } }
.scr-day { margin: 0; color: var(--muted); font-size: 14px; }
.scr-title { font-size: clamp(22px, 3vw, 28px); line-height: 1.2; margin: 2px 0 0; }
.scr-title:focus { outline: none; }
.scr-title:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.blk h4 { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
:lang(ar) .blk h4, :lang(zh-Hans) .blk h4 { text-transform: none; letter-spacing: 0; font-size: 14px; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--lime); color: var(--lime-ink); font-size: 12px; }

/* Needs action */
.needs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.need { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.need-main { min-width: 0; }
.need-title { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.4; }
.need-meta { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.need-kind { display: inline-block; margin-inline-end: 6px; font-size: 12px; font-weight: 700; color: var(--lime-ink); background: var(--lime); padding: 1px 8px; border-radius: 999px; }
.need[data-hot] { position: relative; }
.need[data-hot]::before { content: ""; position: absolute; inset-inline-start: -10px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--green); }
@media (prefers-reduced-motion: no-preference) {
  .need[data-hot]::before { animation: tour-breathe 2.4s ease-in-out infinite; }
  @keyframes tour-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
}
.stage[data-paused] *, .stage[data-paused] *::before { animation-play-state: paused !important; }
.empty { margin: 0; padding: 12px 0; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* Figures: the first one leads, the rest are quieter */
.figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
@media (min-width: 560px) { .figs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.figs > div { padding: 10px 2px 8px; border-bottom: 1px solid var(--line); }
.figs dt { font-size: 12px; color: var(--muted); order: 2; }
.figs dd { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.15; }
.figs > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.figs > div.lead dd { font-size: 30px; }

/* Calendar: days as columns, lesson cards that can move */
.cal { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 560px) { .cal { grid-template-columns: repeat(var(--days, 3), minmax(0, 1fr)); } }
.cal-day { min-width: 0; border-top: 2px solid var(--line); padding-top: 8px; }
.cal-day[data-today] { border-top-color: var(--green); }
.cal-day h5 { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.cal-day h5 small { font-weight: 500; color: var(--muted); margin-inline-start: 4px; }
.cal-list { display: grid; gap: 6px; min-height: 40px; }
@media (max-width: 559px) { .cal-day { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 8px; } .cal-day h5 { margin: 0; } }
.lc { border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; background: var(--surface); font-size: 13px; line-height: 1.35; display: grid; gap: 1px; position: relative; }
.lc-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.lc-name { color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lc-st { font-size: 12px; color: var(--muted); }
.lc[data-status="done"] { background: var(--bg-alt); }
.lc[data-status="done"] .lc-name { color: var(--muted); }
.lc[data-status="cancelled"] .lc-name { text-decoration: line-through; color: var(--muted); }
.lc[data-flag="request"] { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.lc[data-flag="request"] .lc-name, .lc[data-flag="request"] .lc-st { color: var(--lime-ink); }
.lc[data-flag="moved"] { border-color: var(--green); box-shadow: inset 3px 0 0 var(--green); }
[dir="rtl"] .lc[data-flag="moved"] { box-shadow: inset -3px 0 0 var(--green); }
.lc.ghost { border-style: dashed; background: transparent; color: var(--muted); }
.lc.ghost .lc-name { color: var(--muted); }

/* Recent activity / history */
.recent { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.recent li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.recent time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.recent li[data-local] span { font-weight: 600; }
.recent li[data-local] span small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

/* Detail views (request preview, reminders review) */
.back { align-self: start; justify-self: start; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cmp > div { padding: 12px 14px; }
.cmp > div + div { border-inline-start: 1px solid var(--line); background: var(--tour-sel); }
.cmp span { display: block; font-size: 12px; color: var(--muted); }
.cmp strong { display: block; font-size: 16px; font-weight: 700; margin-top: 2px; }
.cmp small { display: block; color: var(--muted); font-size: 12px; }
.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .facts > div { grid-template-columns: 150px minmax(0, 1fr); gap: 14px; } }
.facts dt { font-size: 13px; font-weight: 700; }
.facts dd { margin: 0; font-size: 14px; color: var(--ink); }
.facts dd small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.clashes { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.clash { display: flex; gap: 8px; align-items: baseline; padding: 8px 10px; border-radius: 10px; background: var(--tour-warn-bg); color: var(--ink); font-size: 14px; }
.clash b { flex: none; font-size: 12px; font-weight: 700; color: var(--warn); text-transform: uppercase; letter-spacing: .03em; }
:lang(ar) .clash b, :lang(zh-Hans) .clash b { text-transform: none; letter-spacing: 0; }
.noclash { margin: 0; font-size: 14px; }
.explain { margin: 0; font-size: 13px; color: var(--muted); border-inline-start: 2px solid var(--line); padding-inline-start: 10px; }
.alts { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.alts legend { font-size: 13px; font-weight: 700; margin-bottom: 6px; padding: 0; }
.alt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 14px; min-height: 48px; }
.alt:has(input:checked) { border-color: var(--green); background: var(--tour-sel); }
.alt input { accent-color: var(--green); width: 18px; height: 18px; margin: 0; flex: none; }
.alt span { flex: 1; min-width: 0; }
.alt em { font-style: normal; font-size: 12px; color: var(--muted); }
.alt em[data-clash] { color: var(--warn); font-weight: 600; }
.outcome { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--green); background: var(--tour-sel); }
.outcome h4 { font-family: var(--sans); font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.outcome p { margin: 0; font-size: 14px; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-inline-start: 2px solid var(--line); margin-inline-start: 4px; }
.history li { position: relative; padding: 4px 0 10px; padding-inline-start: 16px; font-size: 14px; }
.history li::before { content: ""; position: absolute; inset-inline-start: -6px; top: 10px; width: 10px; height: 10px; border-radius: 999px; background: var(--surface); border: 2px solid var(--green); }
.history time { display: block; font-size: 12px; color: var(--muted); }

/* Reminders: two sibling cards become one household message */
.sibs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 92px; }
.sib { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg-alt); font-size: 13px; display: grid; gap: 2px; }
.sib b { font-size: 14px; }
.sib span { color: var(--muted); }
.merged { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.merged-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-alt); font-size: 13px; }
.merged-head span { color: var(--muted); }
.merged-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.merged-chips .sib { padding: 4px 10px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: baseline; background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.merged-chips .sib span { color: var(--lime-ink); }
.bubble { margin: 10px 14px 14px; padding: 12px 14px; border-radius: 14px; border-start-start-radius: 4px; background: var(--bg-alt); font-size: 15px; }
@media (prefers-reduced-motion: no-preference) {
  .merged[data-fresh] .bubble { animation: tour-rise 420ms var(--tour-ease) 260ms both; }
  @keyframes tour-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
.tabs2 { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs2 button { font: inherit; font-size: 14px; font-weight: 600; background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 10px 10px 8px; min-height: 44px; color: var(--muted); cursor: pointer; }
.tabs2 button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--green); }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.plist li span:last-child { color: var(--muted); text-align: end; }
.plist li.ex span:last-child { color: var(--ink); }
.sendstate { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-size: 13px; }
.sendstate li { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.sendstate li[data-on] { border-color: var(--green); color: var(--ink); font-weight: 600; }
.sendstate li[data-past] { color: var(--ink); }
.note { margin: 0; font-size: 13px; color: var(--muted); }

/* Teacher: next lesson + register */
.next { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 4px; }
.next .big { font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.next p { margin: 0; font-size: 14px; color: var(--muted); }
.reqstat { font-size: 14px; padding: 10px 12px; border-radius: 12px; background: var(--bg-alt); margin: 0; }
.reg { display: grid; gap: 0; border-top: 1px solid var(--line); }
.reg-row { border: 0; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; min-width: 0; }
@media (min-width: 620px) { .reg-row { grid-template-columns: 130px minmax(0, 1fr); align-items: center; } }
.reg-row legend { float: inline-start; padding: 0; font-weight: 600; font-size: 15px; }
@supports not (float: inline-start) { .reg-row legend { float: left; } [dir="rtl"] .reg-row legend { float: right; } }
.reg-row legend small { display: block; font-weight: 500; font-size: 12px; color: var(--warn); }
.marks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; clear: both; }
@media (min-width: 620px) { .marks { clear: none; } }
.mark { position: relative; }
.mark input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.mark span { display: grid; place-items: center; min-height: 44px; padding: 0 4px; border-radius: 10px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.2; transition: background var(--tour-quick), color var(--tour-quick), border-color var(--tour-quick); }
.mark input:checked + span { background: var(--green); color: var(--green-ink); border-color: var(--green); }
.mark input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.mark input[value="absent"]:checked + span { background: var(--warn); border-color: var(--warn); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mark input[value="absent"]:checked + span { color: #1f140c; } }
:root[data-theme="dark"] .mark input[value="absent"]:checked + span { color: #1f140c; }
.regbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.regbar p { margin: 0; font-size: 14px; }
.regbar p[data-unsaved] { color: var(--warn); font-weight: 600; }

/* Parent: children, messages, homework, balance */
.kids { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 620px) { .kids { grid-template-columns: 1fr 1fr; } }
.kid { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; font-size: 14px; }
.kid b { font-size: 16px; }
.kid .when { font-weight: 700; }
.kid span { color: var(--muted); }
.kid .tagm { justify-self: start; margin-top: 4px; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--lime); color: var(--lime-ink); }
.inbox { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.inbox li { padding: 10px 12px; border-radius: 12px; border-start-start-radius: 4px; background: var(--bg-alt); font-size: 14px; }
.inbox li small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.inbox li[data-new] { box-shadow: inset 0 0 0 1px var(--green); }
@media (prefers-reduced-motion: no-preference) {
  .inbox li[data-new] { animation: tour-rise 420ms var(--tour-ease) both; }
}
.hw { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.hw li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hw li b { margin-inline-end: 6px; }
.bal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
@media (min-width: 560px) { .bal { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bal > div { padding: 10px 2px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.bal dt { font-size: 12px; color: var(--muted); }
.bal dd { margin: 0; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.bal > div[data-k="outstanding"] dd { color: var(--warn); }
.balbar { height: 8px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); overflow: hidden; margin-top: 10px; }
.balbar i { display: block; height: 100%; background: var(--green); border-radius: 999px; }

/* Bottom call to action spacing */
.tour-next { padding-bottom: 24px; }
.tour-next .close h2 { font-size: clamp(26px, 3.4vw, 34px); }

/* Arabic: list numbers in Arabic-Indic digits too */
:lang(ar) .guide-card ol { list-style-type: arabic-indic; }
