/* ═══════════════════════════════════════════════════════════════════════
   Anwar Academy: "Architecture of Light"
   ───────────────────────────────────────────────────────────────────────
   One layer loaded after style.css. It changes the look, not the layout:
   tokens first (so every rule in style.css that reads a variable follows),
   then the shared pieces of the new language, then the existing components
   restyled to speak it.

   The language comes from the 2026 logo:
     · the arch: a full semicircle head with a small V notch at its crown;
     · the nuqta: the rhombus dot, which stretched becomes every button;
     · four colours: ground green, arch teal, bird beige, letter cream.
   Arches are always full semicircles. Everything else is square.

   Specificity: component rules start with :root so they tie with the
   [data-theme="dark"] rules in style.css and, coming later, win.
   ═══════════════════════════════════════════════════════════════════════ */

/* ═══ Fonts: Thmanyah, self-hosted (font-src 'self') ═══ */
@font-face { font-family: 'Thmanyah Sans'; src: url('fonts/thmanyahsans-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Thmanyah Sans'; src: url('fonts/thmanyahsans-Medium.woff2') format('woff2'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Thmanyah Sans'; src: url('fonts/thmanyahsans-Bold.woff2') format('woff2'); font-weight: 700 900; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Display'; src: url('fonts/thmanyahserifdisplay-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Display'; src: url('fonts/thmanyahserifdisplay-Medium.woff2') format('woff2'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Display'; src: url('fonts/thmanyahserifdisplay-Bold.woff2') format('woff2'); font-weight: 700 900; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Text'; src: url('fonts/thmanyahseriftext-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }

/* ═══ Tokens: light ═══ */
:root, [data-theme="light"] {
    --font-body:     'Thmanyah Sans', 'Segoe UI', Tahoma, sans-serif;
    --font-heading:  'Thmanyah Serif Display', 'Amiri', serif;
    --font-reading:  'Thmanyah Serif Text', 'Amiri', serif;

    /* The logo's four */
    --ink:           #0A2E23;   /* ground green */
    --teal:          #4A9782;   /* the arch */
    --beige:         #DCD0A8;   /* the birds */
    --cream:         #FFF9E7;   /* the letters */

    --bg:            #FFF9E7;
    --bg-card:       #FFFDF5;
    --bg-input:      #FFFDF5;
    --bg-shade:      #F2EAD3;   /* the quieter band between sections */
    --text:          #0A2E23;
    --text-muted:    #4D5A50;   /* 7.1:1 on --bg */
    --text-secondary:#3F4D44;
    --primary:       #0A2E23;
    --primary-hover: #134536;
    --primary-light: #E7EEDF;
    --primary-rgb:   10,46,35;
    --accent:        #DCD0A8;
    --accent-hover:  #D0C291;
    --accent-light:  #F2EAD3;
    --accent-text:   #6E5D25;   /* beige deepened enough to read: 5.9:1 */
    --accent-ink:    #0A2E23;
    --link:          #2B6B59;
    --focus-ring:    #2B6B59;
    --border:        #D9CFAE;
    --border-light:  #E6DCBE;
    --rule:          #0A2E23;   /* the strong rule that opens a section */
    --track:         #E6DCBE;
    --navbar-bg:     #0A2E23;
    --navbar-text:   #FFF9E7;
    --navbar-link:   rgba(255,249,231,0.9);
    --shadow:        none;
    --shadow-lg:     0 18px 40px -24px rgba(10,46,35,0.35);
    --success:       #4A9782;
    --danger:        #8A3B2E;   /* the one colour outside the logo: warnings and deletes */
    --warning:       #DCD0A8;
    --info:          #2B6B59;
    --primary-text:  #0A2E23;
    --success-text:  #2B6B59;
    --danger-text:   #8A3B2E;
    --warning-text:  #6E5D25;
    --info-text:     #2B6B59;
    --badge-lesson:  #4A9782;
    --badge-exam:    #8A3B2E;
    --table-stripe:  rgba(10,46,35,0.025);
    --pattern-opacity: 0;
    --scrollbar-thumb:#4A9782;
    --scrollbar-track:#F2EAD3;

    /* Square, except arches */
    --radius-sm:     0;
    --radius-md:     0;
    --radius-lg:     0;
    --arch-lg:       0;
    --arch-md:       0;
    --arch-sm:       0;

    /* The lit door: light falling into an arch */
    --light-fill:    linear-gradient(180deg, #FFF9E7 0%, #DCD0A8 100%);
    --door-dark:     #0A2E23;
    --door-dark-text:#FFF9E7;
    --door-dark-sub: #C9C2A6;
    --door-dark-num: #DCD0A8;

    /* Button fills */
    --btn-bg:        #0A2E23;
    --btn-fg:        #FFF9E7;
    --btn-bg-hover:  #134536;
    --btn-line:      #0A2E23;
    --btn-line-fg:   #0A2E23;
    --btn-fill:      var(--bg);   /* what shows inside an outline button */
}

/* ═══ Tokens: dark, the hall at night ═══ */
[data-theme="dark"] {
    --bg:            #071F18;
    --bg-card:       #0B2A20;
    --bg-input:      #08231A;
    --bg-shade:      #0B2A20;
    --text:          #FFF9E7;
    --text-muted:    #B9B39A;   /* 8.3:1 on --bg-card */
    --text-secondary:#DCD0A8;
    --primary:       #DCD0A8;
    --primary-hover: #E9DFBD;
    --primary-light: #12382B;
    --primary-rgb:   220,208,168;
    --accent:        #DCD0A8;
    --accent-hover:  #E9DFBD;
    --accent-light:  #12382B;
    --accent-text:   #DCD0A8;
    --accent-ink:    #0A2E23;
    --link:          #7CC0AB;
    --focus-ring:    #7CC0AB;
    --border:        #24503F;
    --border-light:  #163E30;
    --rule:          #DCD0A8;
    --track:         rgba(0,0,0,0.35);
    --navbar-bg:     #051811;
    --navbar-text:   #FFF9E7;
    --navbar-link:   rgba(255,249,231,0.9);
    --shadow:        none;
    --shadow-lg:     0 18px 40px -20px rgba(0,0,0,0.6);
    --success:       #4A9782;
    --danger:        #D9806F;
    --warning:       #DCD0A8;
    --info:          #7CC0AB;
    --primary-text:  #FFF9E7;
    --success-text:  #7CC0AB;
    --danger-text:   #F0A595;
    --warning-text:  #E6D9AE;
    --info-text:     #7CC0AB;
    --badge-lesson:  #4A9782;
    --badge-exam:    #D9806F;
    --table-stripe:  rgba(255,249,231,0.03);
    --pattern-opacity: 0;
    --scrollbar-thumb:#4A9782;
    --scrollbar-track:#0B2A20;

    --door-dark:     #12382B;
    --door-dark-text:#FFF9E7;
    --door-dark-sub: #C9C2A6;
    --door-dark-num: #DCD0A8;

    --btn-bg:        #DCD0A8;
    --btn-fg:        #0A2E23;
    --btn-bg-hover:  #E9DFBD;
    --btn-line:      #DCD0A8;
    --btn-line-fg:   #FFF9E7;
    --btn-fill:      var(--bg);
}

/* ═══ Type ═══ */
:root body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
}
:root :is(h1, h2, h3, .h1, .h2, .h3, .page-title, .modal-title, .login-title) {
    font-family: var(--font-heading);
    font-weight: 700;
}
:root :is(h4, h5, h6, .h4, .h5, .h6, .card-header h5, .card-header h6) {
    font-family: var(--font-body);
    font-weight: 700;
}
:root .text-size-glyph { font-family: var(--font-heading); }

/* ═══════════════════════════════════════════════════════════════════════
   Shared pieces of the language (new classes, for new markup)
   ═══════════════════════════════════════════════════════════════════════ */

/* The nuqta: a rhombus marker. .is-open is the outlined (pending) form. */
.nuqta {
    display: inline-block; flex: 0 0 auto;
    width: var(--nuqta-size, 9px); height: var(--nuqta-size, 9px);
    background: var(--teal); transform: rotate(45deg);
    vertical-align: middle;
}
.nuqta.is-open { background: transparent; border: 1.5px solid var(--teal); box-sizing: border-box; }
.nuqta.is-ink  { background: var(--text); }

/* The arch door: a semicircle head, a flat base, the crown notch.
   .is-lit = light inside it; .is-dark = solid ground; neither = outline.
   --notch-bg must match whatever the door stands on. */
.arch-door {
    position: relative;
    border-radius: 999px 999px 0 0;
    box-sizing: border-box;
    border: 1.5px solid var(--text);
}
.arch-door::before {
    content: ''; position: absolute; left: 50%; top: 0;
    width: var(--notch, 14px); height: var(--notch, 14px);
    background: var(--notch-bg, var(--bg));
    transform: translate(-50%, -55%) rotate(45deg);
}
.arch-door.is-dark { background: var(--door-dark); color: var(--door-dark-text); border-color: transparent; }
.arch-door.is-lit  { background: var(--light-fill); color: #0A2E23; border-color: var(--teal); }

/* A section that opens with a strong rule, an optional number, a title */
.sec-head {
    display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
    border-top: 2px solid var(--rule); padding-top: 14px; margin: 0 0 18px;
}
.sec-head-num { color: var(--link); font-weight: 500; }

/* Ruled list: rows separated by hairlines, no boxes */
.ruled { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ruled > li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }

/* ═══════════════════════════════════════════════════════════════════════
   Buttons: the stretched nuqta
   ───────────────────────────────────────────────────────────────────────
   clip-path draws the pointed ends. An outline button is two layers: the
   button paints the line colour, ::before paints the inside 1.5px in.
   Focus can't use an outside ring (clip-path would cut it), so it draws an
   inset line and lifts the colour instead.
   ═══════════════════════════════════════════════════════════════════════ */
:root :is(.btn-anwar, .btn-accent, .btn-outline-anwar, .btn-secondary, .btn-danger, .btn-outline-danger, .btn-undo) {
    --nq: 14px;
    border: 0;
    border-radius: 0;
    padding-inline: calc(var(--nq) + 0.85rem);
    font-weight: 700;
    clip-path: polygon(var(--nq) 0, calc(100% - var(--nq)) 0, 100% 50%, calc(100% - var(--nq)) 100%, var(--nq) 100%, 0 50%);
    box-shadow: none;
    transition: background-color .18s ease, color .18s ease;
}
:root .btn-sm:is(.btn-anwar, .btn-accent, .btn-outline-anwar, .btn-secondary, .btn-danger, .btn-outline-danger, .btn-undo) { --nq: 11px; padding-inline: calc(var(--nq) + 0.6rem); }
:root .btn-lg:is(.btn-anwar, .btn-accent, .btn-outline-anwar, .btn-secondary, .btn-danger, .btn-outline-danger) { --nq: 20px; }

:root .btn-anwar { background: var(--btn-bg); color: var(--btn-fg); }
:root .btn-anwar:hover, :root .btn-anwar:focus-visible { background: var(--btn-bg-hover); color: var(--btn-fg); }

:root .btn-accent { background: var(--beige); color: #0A2E23; }
:root .btn-accent:hover, :root .btn-accent:focus-visible { background: var(--accent-hover); color: #0A2E23; }

:root .btn-danger { background: var(--danger); color: #FFF9E7; }
:root .btn-danger:hover { background: #742F24; color: #FFF9E7; }

/* Outline family */
:root :is(.btn-outline-anwar, .btn-secondary, .btn-outline-danger, .btn-undo) {
    position: relative; isolation: isolate;
    background: var(--btn-line);
    color: var(--btn-line-fg);
}
:root :is(.btn-outline-anwar, .btn-secondary, .btn-outline-danger, .btn-undo)::before {
    content: ''; position: absolute; inset: 1.5px; z-index: -1;
    background: var(--btn-fill);
    clip-path: polygon(calc(var(--nq) - 0.6px) 0, calc(100% - var(--nq) + 0.6px) 0, 100% 50%, calc(100% - var(--nq) + 0.6px) 100%, calc(var(--nq) - 0.6px) 100%, 0 50%);
    transition: background-color .18s ease;
}
:root :is(.btn-outline-anwar, .btn-secondary, .btn-undo):hover { color: var(--btn-line-fg); background: var(--btn-line); }
:root :is(.btn-outline-anwar, .btn-secondary, .btn-undo):hover::before { background: var(--primary-light); }
:root .btn-outline-danger { --btn-line: var(--danger); color: var(--danger-text); }
:root .btn-outline-danger:hover { background: var(--danger); color: var(--danger-text); }
:root .btn-outline-danger:hover::before { background: color-mix(in srgb, var(--danger) 10%, var(--btn-fill)); }
:root .btn-undo { --btn-line: var(--border); color: var(--text-muted); }

/* What shows inside an outline button follows the surface it sits on */
:root :is(.card, .modal-content, .dropdown-menu, .panel, .kpi, .login-card) { --btn-fill: var(--bg-card); }

/* Grouped buttons share edges: square them */
:root .btn-group > :is(.btn-anwar, .btn-accent, .btn-outline-anwar, .btn-secondary) { clip-path: none; --nq: 0px; padding-inline: 0.75rem; }
:root .btn-group > :is(.btn-outline-anwar, .btn-secondary) { background: transparent; box-shadow: inset 0 0 0 1.5px var(--btn-line); }
:root .btn-group > :is(.btn-outline-anwar, .btn-secondary)::before { display: none; }

/* Focus */
:root :is(.btn-anwar, .btn-accent, .btn-outline-anwar, .btn-secondary, .btn-danger, .btn-outline-danger, .btn-undo):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -6px;
}
:root :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline-color: var(--focus-ring); }

/* ═══ Surfaces: square, ruled, no floating ═══ */
:root :is(.card, .modal-content, .dropdown-menu, .alert, .list-group, .list-group-item, .form-control, .form-select, .input-group-text, .toast, .popover, .progress, .nav-pills .nav-link) {
    border-radius: 0;
}
:root .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: none;
}
:root .card:hover { box-shadow: none; }
:root .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
}
:root .modal-content { border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
:root .dropdown-menu { border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
:root .pattern-bg::before { display: none; }

/* Forms */
:root :is(.form-control, .form-select) {
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
}
:root :is(.form-control, .form-select):focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 22%, transparent);
}

/* Badges become small stretched nuqtas */
:root .badge {
    --nq: 7px;
    border-radius: 0;
    padding: 0.4em calc(var(--nq) + 0.45em);
    font-weight: 700;
    clip-path: polygon(var(--nq) 0, calc(100% - var(--nq)) 0, 100% 50%, calc(100% - var(--nq)) 100%, var(--nq) 100%, 0 50%);
}
:root .badge.rounded-circle, :root .badge.rounded-pill.position-absolute { clip-path: none; border-radius: 0; }

/* Progress: a hairline track, a teal run */
:root .progress { background: var(--track); height: 6px; overflow: hidden; }
:root .progress-bar { background: var(--teal); }

/* Tables: ruled, quiet head */
:root .table { --bs-table-bg: transparent; }
:root .table > thead th {
    font-weight: 500; color: var(--text-muted);
    border-bottom: 1px solid var(--rule);
    background: transparent;
}
:root .table > :not(caption) > * > * { border-bottom-color: var(--border-light); }

/* ═══ Navbar ═══ */
:root .navbar-anwar {
    background: var(--navbar-bg);
    box-shadow: none;
    border-bottom: 1px solid rgba(220,208,168,0.18);
}
:root .navbar-anwar .app-brand {
    --brand-letters: #FFF9E7; --brand-birds: #DCD0A8; --brand-arch: #4A9782; --brand-tagline: #DCD0A8;
}
:root .navbar-anwar .nav-link { color: var(--navbar-link); border-radius: 0; }
:root .navbar-anwar .nav-link:hover { color: #FFF9E7; background: rgba(255,249,231,0.06); }
:root .navbar-anwar .nav-link.active {
    color: #0A2E23 !important;
    background: #FFF9E7 !important;
    font-weight: 700;
}
:root .navbar-anwar .nav-link.active .ic { color: #2B6B59; }
:root .login-brand { --brand-letters: #0A2E23; --brand-birds: #4A9782; --brand-arch: #4A9782; --brand-tagline: #2B6B59; }
:root[data-theme="dark"] .login-brand { --brand-letters: #FFF9E7; --brand-birds: #DCD0A8; --brand-arch: #4A9782; --brand-tagline: #DCD0A8; }

/* ═══ Bottom navigation (phones): a flat bar, the active tab stands in a lit arch ═══ */
@media (max-width: 991.98px) {
    :root .bottom-nav {
        left: 0; right: 0; bottom: 0;
        border-radius: 0; border: 0;
        border-top: 1px solid rgba(220,208,168,0.18);
        background: var(--navbar-bg);
        box-shadow: none;
        backdrop-filter: none; -webkit-backdrop-filter: none;
        padding: 6px 6px calc(4px + env(safe-area-inset-bottom));
        overflow: visible;
    }
    :root body { padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important; }
    :root .bottom-nav-item { border-radius: 0; isolation: isolate; }
    :root .bottom-nav-item:hover { background: transparent; color: #FFF9E7; }
}
:root .bottom-nav-item { color: rgba(255,249,231,0.85); }
:root .bottom-nav-item.active { color: #0A2E23; }
:root .bottom-nav-item.active :is(i, .ic) { color: #0A2E23; transform: none; }
:root .bottom-nav-item.active::before {
    top: auto; bottom: -2px; left: 50%;
    width: 58px; height: 60px;
    transform: translateX(-50%);
    border-radius: 29px 29px 0 0;
    background: var(--light-fill);
    z-index: -1;
}
:root .bottom-nav-item.active::after {
    content: ''; position: absolute; left: 50%; bottom: 52px;
    width: 11px; height: 11px;
    background: var(--navbar-bg);
    transform: translateX(-50%) rotate(45deg);
    z-index: -1;
}
:root .bottom-nav-badge { border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); min-width: 20px; height: 20px; }

/* ═══ Page header: a title over a strong rule ═══ */
:root .page-head {
    border-bottom: 2px solid var(--rule);
    padding-bottom: 18px;
    margin-bottom: 32px;
    align-items: flex-end;
}
:root .page-title {
    font-family: var(--font-heading);
    font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
}
:root .page-title-ic { display: none; }
:root .page-sub { color: var(--text-muted); font-size: var(--text-base); }

/* ═══ Section titles: a nuqta, then the title in the display face ═══ */
:root .sec-title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 500;
    gap: 12px;
    margin-bottom: 16px;
}
:root .sec-title > .ic { display: none; }
:root .sec-title::before {
    content: ''; flex: 0 0 auto;
    width: 8px; height: 8px; background: var(--teal);
    transform: rotate(45deg); align-self: center;
}
:root .sec-title small { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 400; }
:root .section-head { font-family: var(--font-heading); font-weight: 500; }

/* ═══ "Needs attention": each card is a door; work behind it lights it ═══ */
:root .todo-grid { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 18px; }
:root .todo-card {
    position: relative;
    min-height: 236px;
    flex-direction: column; align-items: stretch; justify-content: flex-end;
    gap: 4px;
    padding: 0 22px 20px;
    border-radius: 999px 999px 0 0;
    background: var(--door-dark);
    color: var(--door-dark-text);
    border: 1.5px solid transparent;
    box-shadow: none;
}
:root .todo-card::before {
    content: ''; position: absolute; left: 50%; top: 0;
    width: 15px; height: 15px; background: var(--bg);
    transform: translate(-50%, -55%) rotate(45deg);
}
:root a.todo-card:hover { transform: none; box-shadow: none; color: var(--door-dark-text); border-color: var(--teal); }
:root .todo-card .todo-ic, :root .todo-card .todo-go { display: none; }
:root .todo-card .todo-n { font-family: var(--font-heading); font-size: 3.4rem; font-weight: 700; color: var(--door-dark-num); }
:root .todo-card .todo-t { font-size: var(--text-base); color: inherit; }
:root .todo-card .todo-d { color: var(--door-dark-sub); }
:root .todo-card.is-calm { background: transparent; color: var(--text-muted); border-color: var(--border); }
:root .todo-card.is-calm .todo-n { color: var(--teal); font-size: 2.2rem; }
:root .todo-card.is-calm .todo-d { color: var(--text-muted); }
:root a.todo-card.is-calm:hover { color: var(--text); border-color: var(--text); }
@media (max-width: 575.98px) {
    :root .todo-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    :root .todo-card { min-height: 196px; padding: 0 14px 14px; }
    :root .todo-card .todo-n { font-size: 2.6rem; }
}

/* ═══ KPIs: an editorial row, numbers in the display face ═══ */
:root .kpi-grid { gap: 0; border-top: 1px solid var(--border); }
:root .kpi {
    background: transparent; border: 0; border-radius: 0;
    padding: 18px 20px 6px;
    border-inline-start: 1px solid var(--border);
}
:root .kpi:first-child { border-inline-start: 0; padding-inline-start: 0; }
:root .kpi-l .ic { display: none; }
:root .kpi-v { font-family: var(--font-heading); font-size: 2.6rem; font-weight: 700; }

/* ═══ Panels: no box, a rule on top ═══ */
:root .panel {
    background: transparent; border: 0; border-radius: 0;
    border-top: 1px solid var(--rule);
    padding: 16px 0 0;
}

/* ═══ Rings and meters ═══ */
:root .progress-ring .ring-bar { stroke: var(--teal); }
:root .progress-ring .ring-track { stroke: var(--track); }

/* ═══ Toasts ═══ */
:root .flash-toast { border-radius: 0; }

/* ═══ Scrollbar ═══ */
:root ::-webkit-scrollbar-thumb { border-radius: 0; }

/* ═══════════════════════════════════════════════════════════════════════
   Quiet surfaces
   ───────────────────────────────────────────────────────────────────────
   The previous look washed cards in tinted gradients, floated drifting
   colour pools behind tiles and striped subject rows in five hues. The new
   language lets colour mean one thing (light, teal, warning), so all of
   that goes flat here. Gradients survive in one place only: light falling
   into an arch (--light-fill).
   ═══════════════════════════════════════════════════════════════════════ */
:root .card { background: var(--bg-card) !important; }
:root .card-header::after { display: none; }
:root :is(.kpi, .panel, .stu-hero, .stat-card, .profile-head)::before { display: none; }
:root .todo-card::before {
    inset: auto; right: auto; bottom: auto;
    left: 50%; top: 0;
    z-index: 1;
    animation: none;
    will-change: auto;
    background: var(--bg);
}
:root .progress-bar { background: var(--teal) !important; border-radius: 0 !important; }
:root .section-head::after { background: var(--border); opacity: 1; }
:root .week-badge { background: var(--ink); color: var(--cream); border-radius: 0; }
:root .week-off-banner { background: var(--accent-light); border: 1px solid var(--border) !important; border-radius: 0; }
:root .grading-card-urgent { background: var(--bg-card); border-inline-start: 0; box-shadow: inset 0 3px 0 var(--danger); }
:root .empty-state .empty-illustration { background: none; }
:root .user-avatar {
    background: var(--teal);
    color: var(--cream);
    border-radius: 0;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
:root .streak-chip {
    background: transparent; color: var(--accent-text);
    box-shadow: none; border-radius: 0; padding-inline: 0;
}
:root .streak-chip.streak-cold { color: var(--text-muted); }

/* Rank: the light, the beige, the outline */
:root :is(.rank-medal-1, .rank-medal-2, .rank-medal-3) { border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
:root .rank-medal-1 { background: var(--light-fill); color: #0A2E23; box-shadow: none; }
:root .rank-medal-2 { background: var(--beige); color: #0A2E23; }
:root .rank-medal-3 { background: var(--ink); color: var(--cream); }

/* One colour for every subject: rows are told apart by name and number, not hue */
:root [data-subject] { --subject-hue: var(--teal); }
:root .subject-card[data-subject] { border-inline-start: 1px solid var(--border) !important; }
:root .subject-card[data-subject] .subject-img { box-shadow: none; }

/* sec_head() parts */
:root .sec-head-title { margin: 0; font-family: var(--font-heading); font-weight: 500; font-size: var(--text-2xl); }
:root .sec-head-aside { color: var(--text-muted); font-size: var(--text-sm); }

/* ═══════════════════════════════════════════════════════════════════════
   Student home: her week (templates/student_dashboard.html)
   ═══════════════════════════════════════════════════════════════════════ */
.sh-hall {
    background: var(--ink); color: var(--cream);
    padding: 28px 24px 0;
    margin-top: -0.5rem;
}
[data-theme="dark"] .sh-hall { background: #0D3529; }
.sh-hello { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem); line-height: 1.25; color: var(--cream); }
.sh-meta { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--beige); font-size: .95rem; }
.sh-meta .nuqta { --nuqta-size: 6px; }

.sh-arches {
    margin-top: 28px; height: 140px;
    display: flex; align-items: flex-end; gap: 10px;
}
.sh-arch {
    position: relative; flex: 1 1 0; min-width: 22px; max-width: 72px;
    height: 104px; box-sizing: border-box;
    border-radius: 999px 999px 0 0;
    border: 1.2px solid rgba(220,208,168,.55); border-bottom: 0;
    display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px;
    transition: background-color .4s ease;
}
.sh-arch.is-tall { height: 124px; }
.sh-arch::before {
    content: ''; position: absolute; left: 50%; top: 0; width: 10px; height: 10px;
    background: var(--ink); transform: translate(-50%, -60%) rotate(45deg);
}
[data-theme="dark"] .sh-arch::before { background: #0D3529; }
.sh-arch > span { font-size: .7rem; font-weight: 700; color: var(--beige); white-space: nowrap; }
.sh-arch.is-done { background: var(--light-fill); border-color: transparent; }
.sh-arch.is-done > span { color: var(--ink); }
.sh-arches.is-crowded .sh-arch > span { display: none; }

.sh-threshold {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 20px; background: var(--bg-shade); border-bottom: 1px solid var(--border);
}
.sh-week { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sh-week-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; }
.sh-week-dates { font-size: .85rem; color: var(--text-muted); }
.sh-closed { font-weight: 700; color: var(--accent-text); }
.sh-stepper { display: flex; align-items: center; gap: 4px; margin: 0; flex-shrink: 0; }
.sh-step {
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    color: var(--text); text-decoration: none; font-size: 1.1rem;
}
.sh-step:hover { color: var(--link); }
.sh-week-num { position: relative; display: inline-flex; }
.sh-week-num input {
    width: 56px; height: 44px; text-align: center;
    font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem;
    background: var(--ink); color: var(--cream); border: 0; border-radius: 0;
    -moz-appearance: textfield; appearance: textfield;
}
[data-theme="dark"] .sh-week-num input { background: var(--beige); color: var(--ink); }
.sh-week-num input::-webkit-outer-spin-button, .sh-week-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sh-week-num input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.sh-now { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; background: var(--teal); transform: translateX(-50%) rotate(45deg); }

.sh-notice {
    margin-top: 16px; padding: 12px 14px; border: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px;
    font-size: .95rem;
}
.sh-notice a { font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.sh-notice.is-warn { justify-content: flex-start; border-color: var(--danger); color: var(--danger-text); }

.sh-rest { text-align: center; padding: 40px 0 8px; }
.sh-rest-arch {
    display: block; margin: 0 auto 18px; width: 90px; height: 120px;
    border-radius: 45px 45px 0 0; background: var(--light-fill); box-shadow: inset 0 0 0 1.5px var(--teal);
}
.sh-rest h2 { margin: 0 0 6px; font-family: var(--font-heading); }
.sh-rest p { margin: 0; color: var(--text-muted); }

.sh-sec { margin-top: 32px; }
.sh-sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 12px; }
.sh-sec-title {
    display: flex; align-items: center; gap: 10px; margin: 0 0 6px;
    font-family: var(--font-heading); font-weight: 500; font-size: 1.4rem;
}
.sh-sec-title .nuqta { --nuqta-size: 8px; }
.sh-quiet { font-size: .85rem; color: var(--text-muted); }

.sh-rows { list-style: none; margin: 0; padding: 0; }
.sh-row {
    display: flex; gap: 14px; align-items: center;
    padding: 18px 0; border-bottom: 1px solid var(--border-light);
}
.sh-door {
    position: relative; flex: 0 0 auto; align-self: flex-start; margin-top: 2px;
    width: 40px; height: 56px; box-sizing: border-box;
    border-radius: 20px 20px 0 0; border: 1.5px solid var(--text);
    display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px;
    font-family: var(--font-heading); font-weight: 700; color: var(--link);
}
.sh-door::before { content: ''; position: absolute; left: 50%; top: 0; width: 10px; height: 10px; background: var(--bg); transform: translate(-50%, -60%) rotate(45deg); }
.sh-door.is-done { background: var(--ink); border-color: var(--ink); color: var(--beige); }
[data-theme="dark"] .sh-door.is-done { background: var(--beige); border-color: var(--beige); color: var(--ink); }
.sh-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sh-row-title { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; line-height: 1.35; }
.sh-row-sub { margin: 0; font-size: .92rem; line-height: 1.6; color: var(--text-muted); }
.sh-open { margin: 2px 0 0; display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 500; color: var(--success-text); }
.sh-open .nuqta { --nuqta-size: 7px; }
.sh-links { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 2px; }
.sh-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: .92rem; font-weight: 500; color: var(--link); text-decoration: none; }
.sh-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.sh-row-action { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sh-row-action form { margin: 0; }
.sh-state { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-size: .92rem; font-weight: 700; color: var(--success-text); white-space: nowrap; }
.sh-state .nuqta { --nuqta-size: 10px; }
.sh-state.is-quiet { color: var(--text-muted); font-weight: 500; }
.sh-state.is-quiet .nuqta.is-open { border-color: var(--text-muted); }
.sh-undo {
    min-height: 36px; padding: 0; background: none; border: 0;
    font: inherit; font-size: .85rem; color: var(--text-muted);
    text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
.sh-undo:hover { color: var(--text); }

.sh-note { display: flex; flex-direction: column; gap: 10px; }
.sh-note textarea { min-height: 104px; font-size: 1rem; line-height: 1.8; }

.sh-podium {
    list-style: none; margin: 16px 0 0; padding: 0;
    display: flex; align-items: flex-end; justify-content: center; gap: 12px;
    height: 176px; border-bottom: 1.5px solid var(--rule);
}
.sh-podium-arch {
    position: relative; flex: 1 1 0; max-width: 150px; box-sizing: border-box;
    border-radius: 999px 999px 0 0; border: 1.5px solid var(--text); border-bottom: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding-bottom: 12px;
}
.sh-podium-arch::before { content: ''; position: absolute; left: 50%; top: 0; width: 13px; height: 13px; background: var(--bg); transform: translate(-50%, -60%) rotate(45deg); }
.sh-podium-arch.is-rank-1 { height: 156px; background: var(--light-fill); color: var(--ink); border-color: var(--teal); }
.sh-podium-arch.is-rank-2 { height: 124px; }
.sh-podium-arch.is-rank-3 { height: 100px; }
.sh-podium-arch.is-me:not(.is-rank-1) { background: var(--ink); color: var(--cream); border-color: var(--ink); }
[data-theme="dark"] .sh-podium-arch.is-me:not(.is-rank-1) { background: var(--beige); color: var(--ink); border-color: var(--beige); }
.sh-podium-rank { font-family: var(--font-heading); font-weight: 700; font-size: 1.4rem; line-height: 1; }
.sh-podium-name { font-size: .85rem; font-weight: 700; }
.sh-podium-pts { font-size: .8rem; opacity: .8; }

.sh-absence {
    margin: 32px 0 0; padding: 18px; background: var(--bg-shade);
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.sh-absence > div { display: flex; flex-direction: column; gap: 2px; }
.sh-absence span { font-size: .85rem; color: var(--text-muted); }
.sh-absence { --btn-fill: var(--bg-shade); }
.sh-keys { margin: 28px 0 8px; text-align: center; font-size: .85rem; color: var(--text-muted); }

/* Phones: the niche runs edge to edge; a row's action drops under it */
@media (max-width: 575.98px) {
    .sh-hall, .sh-threshold { margin-inline: -16px; }
    .sh-hall { padding-inline: 16px; }
    .sh-threshold { padding-inline: 16px; }
    .sh-row { flex-wrap: wrap; }
    .sh-row-action { flex-direction: row; align-items: center; gap: 14px; margin-inline-start: 54px; }
    .sh-row:not([data-subject]) .sh-row-action { margin-inline-start: 0; }
}

/* ═══ Dashboards (admin + teacher) ═══ */
/* People in lists: initials in a nuqta */
:root .mini-av {
    width: 38px; height: 38px; border-radius: 0;
    background: var(--bg-shade); color: var(--text);
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
/* Status dots become nuqtas: filled = fine, outlined = needs a look */
:root .status-dot { width: 9px; height: 9px; border-radius: 0; transform: rotate(45deg); background: transparent; border: 1.5px solid var(--text-muted); box-shadow: none; }
:root .status-dot.ok { background: var(--teal); border-color: var(--teal); }
:root .status-dot.warn { background: transparent; border-color: var(--danger); }
:root .reg-chip { border-radius: 0; background: transparent; border: 0; padding-inline: 0; color: var(--text); }
/* Shortcuts: ruled rows with a nuqta */
:root .quick-links > a {
    display: flex; align-items: center; gap: 12px; min-height: 50px;
    border: 0; border-bottom: 1px solid var(--border-light); border-radius: 0;
    background: transparent; padding: 0; color: var(--text); font-weight: 500;
}
:root .quick-links > a .ic { display: none; }
:root .quick-links > a::before { content: ''; width: 7px; height: 7px; background: var(--teal); transform: rotate(45deg); flex: 0 0 auto; }
:root .quick-links > a small { margin-inline-start: auto; color: var(--text-muted); }
:root .quick-links > a:hover { background: transparent; color: var(--link); }

/* Progress by level: a colonnade, height is the share done */
.lvl-colonnade { height: 230px; display: flex; align-items: flex-end; gap: 24px; border-bottom: 2px solid var(--rule); padding-inline: 6px; margin-top: 8px; }
.lvl-col { flex: 1 1 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.lvl-col-arch {
    position: relative; width: 100%; max-width: 140px; min-height: 24px;
    height: calc(var(--pct) * 1.7px);
    border-radius: 999px 999px 0 0; background: var(--ink);
}
[data-theme="dark"] .lvl-col-arch { background: var(--beige); }
.lvl-col-arch::before { content: ''; position: absolute; left: 50%; top: 0; width: 12px; height: 12px; background: var(--bg); transform: translate(-50%, -60%) rotate(45deg); }
.lvl-names { display: flex; gap: 24px; padding: 10px 6px 0; }
.lvl-names span { flex: 1 1 0; min-width: 0; text-align: center; font-weight: 700; font-size: .92rem; }

/* Teacher: who came to my lesson — one nuqta per student */
.attend-dots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.attend-dots .nuqta { --nuqta-size: 10px; margin: 2px; }
.attend-dots .nuqta.is-open { border-color: var(--text); }
:root .my-lesson { padding: 20px 0; border-bottom: 1px solid var(--border-light); }
:root .my-lesson-count { font-weight: 700; color: var(--success-text); background: none; padding: 0; border-radius: 0; }
:root .missing-chip {
    display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; border-radius: 0; padding: 0 0 0 12px;
    font-weight: 500; color: var(--text);
}
:root .missing-chip::before { content: ''; width: 6px; height: 6px; border: 1.2px solid var(--text); transform: rotate(45deg); }
.task-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; padding: 16px 0; border-bottom: 1px solid var(--border-light); }

/* ═══════════════════════════════════════════════════════════════════════
   Students' pages, phone first
   ───────────────────────────────────────────────────────────────────────
   Every student uses a phone. These pieces are shared by صفحتي، إنجازاتي،
   ملخصي، الإشعارات and the exam page so they read as one app: ruled rows,
   numbers in the display face, arches for anything that is a "door" or a
   result, nuqtas for state. No boxed cards, no icon tiles, no emoji.
   ═══════════════════════════════════════════════════════════════════════ */

/* Four figures in a ruled 2 × 2 (4 across from tablets up) */
.stat-row {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 8px; border-top: 1px solid var(--border);
}
.stat-row > div { padding: 16px 0 14px; border-bottom: 1px solid var(--border-light); display: flex; flex-direction: column; gap: 2px; }
.stat-row > div:nth-child(odd) { padding-inline-end: 16px; border-inline-end: 1px solid var(--border-light); }
.stat-row > div:nth-child(even) { padding-inline-start: 16px; }
.stat-row dt { font-size: .85rem; font-weight: 400; color: var(--text-muted); }
.stat-row dd { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: 2.3rem; line-height: 1.1; }
@media (min-width: 768px) {
    .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stat-row > div { border-bottom: 0; padding-inline: 16px !important; border-inline-end: 1px solid var(--border-light); }
    .stat-row > div:first-child { padding-inline-start: 0 !important; }
    .stat-row > div:last-child { border-inline-end: 0; }
}

/* Two results side by side as arches (rank, average) */
.pair-arches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 14px; margin-top: 28px; }
.pair-arch {
    min-height: 210px; padding: 0 12px 18px;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center; gap: 2px;
}
.pair-arch-big { font-family: var(--font-heading); font-weight: 700; font-size: 3rem; line-height: 1; }
.pair-arch-label { font-weight: 700; font-size: .92rem; }
.pair-arch-sub { font-size: .8rem; color: var(--text-muted); }
.arch-door.is-lit .pair-arch-sub { color: #4D5A50; }
.pair-arch.is-low .pair-arch-big { color: var(--danger-text); }

/* Points: the total in a lit arch, its parts ruled beside it */
.points-hero { display: flex; align-items: flex-end; gap: 18px; }
.points-hero-arch {
    flex: 0 0 132px; min-height: 196px; padding: 0 8px 16px;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center;
}
.points-parts { flex: 1 1 auto; margin: 0; border-top: 1px solid var(--border); }
.points-parts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.points-parts dt { font-size: .9rem; font-weight: 400; color: var(--text-muted); }
.points-parts dd { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: 1.6rem; line-height: 1; }
.points-parts dd.is-zero { color: var(--text-muted); }
.how-points { margin-top: 22px; padding: 14px 16px; background: var(--bg-shade); font-size: .92rem; line-height: 1.8; }
.how-points p { margin: 0 0 6px; }
.how-points ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-weight: 700; }
.how-points li { display: inline-flex; align-items: center; gap: 8px; }
.how-points .nuqta { --nuqta-size: 7px; }

/* Badges as medallions: a small lit arch with a line icon in it */
.medal-grid { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 12px; }
@media (min-width: 576px) { .medal-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } }
.medal { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.medal-arch {
    position: relative; width: 58px; height: 74px; margin-bottom: 6px;
    border-radius: 29px 29px 0 0; background: var(--light-fill); box-shadow: inset 0 0 0 1.2px var(--teal);
    display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px; box-sizing: border-box;
    color: #0A2E23;
}
.medal-arch::before { content: ''; position: absolute; left: 50%; top: 0; width: 10px; height: 10px; background: var(--bg); transform: translate(-50%, -60%) rotate(45deg); }
.medal-name { font-weight: 700; font-size: .88rem; line-height: 1.4; }
.medal-desc { font-size: .76rem; line-height: 1.5; color: var(--text-muted); }

/* A colonnade chart: arch columns, the newest lit */
.colonnade { height: 120px; display: flex; align-items: flex-end; gap: 6px; border-bottom: 1.5px solid var(--rule); margin-top: 14px; }
.colonnade-col {
    flex: 1 1 0; min-width: 0; height: max(calc(var(--h) * 100%), 3px);
    border-radius: 999px 999px 0 0; border: 1.2px solid var(--text); border-bottom: 0; box-sizing: border-box;
}
.colonnade-col.is-empty { border: 0; height: 3px; background: var(--border); border-radius: 0; }
.colonnade-col.is-lit { background: var(--teal); border-color: var(--teal); }
.colonnade-labels { display: flex; gap: 6px; margin-top: 6px; }
.colonnade-labels span { flex: 1 1 0; min-width: 0; text-align: center; font-size: .68rem; color: var(--text-muted); }
.line-chart { margin-top: 14px; }
.line-chart canvas { display: block; width: 100%; height: 110px; }

/* Ledger: ruled rows with a title, a meta line and a tag at the end */
.ledger { list-style: none; margin: 6px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.ledger > li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.ledger-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ledger-title { font-weight: 700; line-height: 1.45; }
.ledger-meta { font-size: .82rem; color: var(--text-muted); }
.score-tag {
    --nq: 10px; flex: 0 0 auto;
    display: inline-flex; align-items: baseline; gap: 1px;
    min-height: 32px; padding: 4px calc(var(--nq) + 8px);
    background: var(--ink); color: var(--cream);
    font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem;
    clip-path: polygon(var(--nq) 0, calc(100% - var(--nq)) 0, 100% 50%, calc(100% - var(--nq)) 100%, var(--nq) 100%, 0 50%);
}
.score-tag small { font-family: var(--font-body); font-size: .72rem; opacity: .8; }
[data-theme="dark"] .score-tag { background: var(--beige); color: var(--ink); }
.score-tag.is-low { background: var(--danger); color: #FFF9E7; }
.score-tag.is-plus { background: var(--beige); color: var(--ink); }
.state-tag { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700; color: var(--success-text); }
.state-tag .nuqta { --nuqta-size: 8px; }
.state-tag.is-quiet { color: var(--text-muted); font-weight: 500; }
.state-tag.is-quiet .nuqta.is-open { border-color: var(--text-muted); }

/* Ranking: ruled rows; her own row is the dark one */
.rank-list { list-style: none; margin: 6px 0 0; padding: 0; border-top: 1px solid var(--rule); counter-reset: none; }
.rank-list > li { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 12px; border-bottom: 1px solid var(--border-light); }
.rank-list-n { flex: 0 0 28px; font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; color: var(--text-muted); text-align: center; }
.rank-list > li.is-top .rank-list-n { color: var(--teal); }
.rank-list-name { flex: 1 1 auto; min-width: 0; }
.rank-list-pts { font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; }
.rank-list-you { font-size: .75rem; font-weight: 700; color: var(--link); margin-inline-start: 6px; }
.rank-list > li.is-me { background: var(--ink); color: var(--cream); font-weight: 700; border-bottom-color: var(--ink); }
.rank-list > li.is-me .rank-list-n, .rank-list > li.is-me .rank-list-you { color: var(--beige); }
[data-theme="dark"] .rank-list > li.is-me { background: var(--beige); color: var(--ink); }
[data-theme="dark"] .rank-list > li.is-me .rank-list-n, [data-theme="dark"] .rank-list > li.is-me .rank-list-you { color: var(--ink); }

/* Notifications: a ruled list, unread first-class */
.notif-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.notif { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border-light); }
.notif > .nuqta { --nuqta-size: 9px; margin-top: 8px; }
.notif > .nuqta.is-open { border-color: var(--text-muted); }
.notif-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.notif-title { font-weight: 500; line-height: 1.5; }
.notif.is-unread .notif-title { font-weight: 700; }
.notif-msg { font-size: .92rem; line-height: 1.7; color: var(--text-secondary); }
.notif-time { font-size: .78rem; color: var(--text-muted); }
.notif.is-warn > .nuqta { background: var(--danger); }
.notif.is-warn .notif-title { color: var(--danger-text); }
.notif-go { flex: 0 0 auto; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--link); align-self: center; }

/* ═══ App chrome on the phone ═══ */
/* The push-permission strip: quiet, ruled, no icon tile */
:root .app-banner { background: var(--bg-shade); border: 0; border-bottom: 1px solid var(--border); box-shadow: none; color: var(--text); }
:root .app-banner-ic { display: none; }
:root .app-banner-btn { --nq: 11px; border: 0; border-radius: 0; background: var(--btn-bg); color: var(--btn-fg); font-weight: 700; padding-inline: calc(var(--nq) + .6rem);
    clip-path: polygon(var(--nq) 0, calc(100% - var(--nq)) 0, 100% 50%, calc(100% - var(--nq)) 100%, var(--nq) 100%, 0 50%); }
:root .app-banner-later { background: none; border: 0; color: var(--text-muted); text-decoration: underline; text-underline-offset: 4px; }

/* Counts on the tab bar and the bell: a beige nuqta, not a red dot */
:root .bottom-nav-badge, :root .nav-badge {
    background: var(--beige) !important; color: var(--ink) !important;
    border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    min-width: 20px; height: 20px; padding: 0 3px; font-size: .7rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}

/* The user menu (theme, text size, calendar): square, ruled */
:root .user-menu { border-radius: 0; }
:root .user-menu-dock { border-radius: 0; background: transparent; border: 1px solid var(--border); padding: 0; gap: 0; }
:root .user-menu-dock-btn { border-radius: 0; }
:root .user-menu-dock-btn.is-active { background: var(--ink); color: var(--cream); }
[data-theme="dark"] .user-menu-dock-btn.is-active { background: var(--beige); color: var(--ink); }

/* Alerts and flash messages: ruled strips; colour only for warnings */
:root .alert { background: var(--bg-shade); border: 1px solid var(--border); color: var(--text); border-radius: 0; }
:root .alert-danger, :root .alert-warning { border-color: var(--danger); color: var(--danger-text); background: color-mix(in srgb, var(--danger) 6%, var(--bg)); }
:root .alert-success { border-color: var(--teal); }
:root .flash-toast { border-radius: 0; box-shadow: var(--shadow-lg); }

/* Empty states: one lit arch instead of an illustration in a bubble */
:root .empty-state .empty-illustration {
    width: 84px; height: 110px; margin-inline: auto; border-radius: 42px 42px 0 0;
    background: var(--light-fill); box-shadow: inset 0 0 0 1.2px var(--teal);
}
:root .empty-state .empty-illustration svg { display: none; }
:root .empty-state .empty-title { font-family: var(--font-heading); }

/* Generic stat cards on other pages: editorial, like .stat-row */
:root .stat-card { background: transparent !important; border: 0 !important; border-top: 1px solid var(--border) !important; }
:root .stat-card .card-body { padding: 14px 0 6px !important; }
:root .stat-card .card-body > .ic:first-child { display: none; }
:root .stat-number { font-family: var(--font-heading); font-weight: 700; color: var(--text) !important; }

/* Card headers read like section titles */
:root .card-header { padding-inline: 1rem; }
:root .card-header :is(h5, h6) { font-family: var(--font-heading); font-weight: 500; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
:root .card-header :is(h5, h6) > .ic, :root .card-header :is(h5, h6) > i.bi { display: none; }
:root .card-header :is(h5, h6)::before { content: ''; width: 7px; height: 7px; background: var(--teal); transform: rotate(45deg); flex: 0 0 auto; }
:root .table > thead th { background: transparent !important; }
:root .table tr[style*="primary-light"] { background: var(--accent-light) !important; }

/* Disabled buttons: flat and readable, not a faded green */
:root :is(.btn-anwar, .btn-accent):disabled, :root :is(.btn-anwar, .btn-accent).disabled {
    background: var(--border); color: var(--text-muted); opacity: 1;
}

/* ═══ The exam page ═══ */
/* Drop zone: a dashed arch you tap */
:root .upload-zone {
    position: relative;
    min-height: 250px; padding: 0 20px 26px;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center;
    border: 1.5px dashed var(--teal); border-radius: 999px 999px 0 0;
    background: transparent;
}
:root .upload-zone::before { content: ''; position: absolute; left: 50%; top: 0; width: 14px; height: 14px; background: var(--bg-card); transform: translate(-50%, -60%) rotate(45deg); }
:root .upload-zone:hover, :root .upload-zone.dragover { background: var(--accent-light); border-color: var(--text); }
:root .upload-zone > .ic { color: var(--teal); font-size: 1.8rem; }
:root .upload-zone-title { font-family: var(--font-heading); font-weight: 500; }
:root .preview-item { border-radius: 0; }
:root .preview-num { border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: var(--ink); color: var(--cream); }
:root .preview-add { border-radius: 0; border-style: dashed; }
:root .preview-remove { border-radius: 0; }

/* ═══ Register / login ═══ */
/* The light ground needs the logo's light-ground colours */
:root :is(.reg-brand, .login-mark) { --brand-letters: #0A2E23; --brand-birds: #4A9782; --brand-arch: #4A9782; --brand-tagline: #2B6B59; }
:root[data-theme="dark"] :is(.reg-brand, .login-mark) { --brand-letters: #FFF9E7; --brand-birds: #DCD0A8; --brand-arch: #4A9782; --brand-tagline: #DCD0A8; }
:root .btn-wa {
    --nq: 14px; border: 0; border-radius: 0;
    background: var(--btn-bg); color: var(--btn-fg); font-weight: 700;
    padding-inline: calc(var(--nq) + .85rem);
    clip-path: polygon(var(--nq) 0, calc(100% - var(--nq)) 0, 100% 50%, calc(100% - var(--nq)) 100%, var(--nq) 100%, 0 50%);
}
:root .btn-wa:hover { background: var(--btn-bg-hover); color: var(--btn-fg); }
:root .reg-closed-ic { border-radius: 999px 999px 0 0 !important; background: var(--light-fill) !important; color: #0A2E23 !important; }

/* ═══ Student home: the closed week reads as a label, not a stray word ═══ */
.sh-week-title .sh-closed {
    margin-inline-start: 8px; font-family: var(--font-body); font-size: .75rem; font-weight: 700;
    color: var(--accent-text); vertical-align: middle;
}

/* ═══ Phones: one gutter, one rhythm ═══ */
@media (max-width: 575.98px) {
    :root .page-head { margin-bottom: 22px; padding-bottom: 14px; }
    :root .page-title { font-size: 2rem; }
    :root .sh-sec { margin-top: 28px; }
    :root .card { border-inline: 0; }
    :root .container > .card, :root .content-measure > .card { margin-inline: -16px; }
    :root .modal-dialog { margin: auto 0 0; max-width: none; }
    :root .modal.show .modal-dialog { transform: none; }
    :root .modal-content { border-inline: 0; border-bottom: 0; }
    :root .modal-footer { flex-wrap: nowrap; }
    :root .modal-footer > .btn { flex: 1 1 0; }
}

/* A list that opens right under the page header shares its rule */
:root .page-head + :is(.notif-list, .ledger, .rank-list) { border-top: 0; }
/* On phones the week's niche meets the top bar (or the banner) with no seam */
@media (max-width: 575.98px) { .sh-hall { margin-top: -1.5rem; } }

/* Flash toasts: a plain ruled card; the icon carries the kind */
:root .flash-toast { border: 1px solid var(--border) !important; border-inline-start-width: 1px !important; background: var(--bg-card); }
/* Phones: dialogs rise from the bottom like a sheet */
@media (max-width: 575.98px) {
    :root .modal-dialog-centered { align-items: flex-end; min-height: 100%; margin: 0; }
    :root .modal-content { padding-bottom: env(safe-area-inset-bottom); }
}
/* Phones: three to-do doors never leave one stretched across the row */
@media (max-width: 575.98px) { :root .todo-grid > .todo-card { grid-column: auto !important; } }

/* ═══════════════════════════════════════════════════════════════════════
   The crown notch, drawn properly on outlined arches
   ───────────────────────────────────────────────────────────────────────
   The notch is a ground-coloured square turned 45°, centred on the arch's
   top line. On a filled arch that alone cuts the V. On an OUTLINED arch it
   only erased a piece of the line, leaving a rounded top with a gap — the
   outline has to go down into the V and back up, as the logo's arch does.
   So the square also draws the V: its right and bottom borders, after the
   45° turn, are the two lower edges. --notch-line is the outline colour
   (transparent on filled arches); --bw is the outline width. Arches drawn
   with a CSS border sit their notch half a stroke higher than arches drawn
   with an inset shadow, because a border pushes top: 0 inside the stroke.
   ═══════════════════════════════════════════════════════════════════════ */
:root :is(.arch-door, .todo-card, .sh-arch, .sh-door, .sh-podium-arch, .upload-zone)::before {
    box-sizing: border-box;
    border-style: solid; border-color: var(--notch-line, transparent);
    border-width: 0 var(--bw, 1.5px) var(--bw, 1.5px) 0;
    transform: translate(-50%, calc(-50% - var(--bw, 1.5px) / 2)) rotate(45deg);
}
:root :is(.lvl-col-arch, .medal-arch)::before {
    box-sizing: border-box;
    border-style: solid; border-color: var(--notch-line, transparent);
    border-width: 0 var(--bw, 1.5px) var(--bw, 1.5px) 0;
    transform: translate(-50%, calc(-50% + var(--bw, 1.5px) / 2)) rotate(45deg);
}

.arch-door { --notch-line: var(--text); }
.arch-door.is-lit { --notch-line: var(--teal); }
.arch-door.is-dark { --notch-line: transparent; }

:root .todo-card { --notch-line: transparent; }
:root a.todo-card:hover { --notch-line: var(--teal); }
:root .todo-card.is-calm { --notch-line: var(--border); }
:root a.todo-card.is-calm:hover { --notch-line: var(--text); }

.sh-arch { --bw: 1.2px; --notch-line: rgba(220,208,168,.55); }
.sh-arch.is-done { --notch-line: transparent; }
.sh-door { --notch-line: var(--text); }
.sh-door.is-done { --notch-line: transparent; }
.sh-podium-arch { --notch-line: var(--text); }
.sh-podium-arch.is-rank-1 { --notch-line: var(--teal); }
.sh-podium-arch.is-me:not(.is-rank-1) { --notch-line: transparent; }

.lvl-col-arch { --notch-line: transparent; }
.medal-arch { --bw: 1.2px; --notch-line: var(--teal); }

:root .upload-zone { --notch-line: var(--teal); }
:root .upload-zone::before { border-style: dashed; }
:root .upload-zone:hover, :root .upload-zone.dragover { --notch-line: var(--text); }
/* The arch's top line curves down away from the crown, so where the V meets
   it the line sits a little lower than the very top. --notch-drop lowers the
   square by that much so the V's arms land on the line instead of ticking
   above it (larger on small arches, whose curve is tighter). */
:root :is(.arch-door, .todo-card, .sh-arch, .sh-door, .sh-podium-arch, .upload-zone)::before {
    transform: translate(-50%, calc(-50% - var(--bw, 1.5px) / 2 + var(--notch-drop, .8px))) rotate(45deg);
}
:root :is(.lvl-col-arch, .medal-arch)::before {
    transform: translate(-50%, calc(-50% + var(--bw, 1.5px) / 2 + var(--notch-drop, .8px))) rotate(45deg);
}
.sh-arch, .sh-door, .medal-arch { --notch-drop: 1.2px; }
/* The active tab's arch rises above the bar onto the page, so a square
   notch showed as a dark diamond floating on the page. Cut the V out of the
   arch itself instead: a conic mask with a 90° transparent wedge, apex 10px
   down from the crown. */
:root .bottom-nav-item.active::after { display: none; }
:root .bottom-nav-item.active::before {
    /* half a degree of feather on each edge keeps the V from stair-stepping */
    -webkit-mask: conic-gradient(from 315deg at 50% 10px, #000 0, transparent .8deg 89.2deg, #000 90deg);
            mask: conic-gradient(from 315deg at 50% 10px, #000 0, transparent .8deg 89.2deg, #000 90deg);
}

/* ═══ Her initials stand in an arch ═══
   In the top bar the arch rises from the bar's bottom line, like a doorway
   standing on the floor (the bar is ~68px: 0.6rem bar padding + 0.5rem link
   padding + a 1px rule below the 32px row; the arch is 18px taller than the
   old 32px chip, centred, so it moves down by what's left). In the menu it
   simply stands on its own. */
:root .user-avatar {
    width: 40px; height: 50px;
    border-radius: 20px 20px 0 0; clip-path: none;
    background: var(--light-fill); color: #0A2E23;
    display: inline-flex; align-items: flex-end; justify-content: center;
    padding-bottom: 8px; box-sizing: border-box;
    font-size: .78rem; font-weight: 700; letter-spacing: 0;
    /* a shallower V than the big arches: on a 40px head an 8px cut read as two bumps */
    -webkit-mask: conic-gradient(from 315deg at 50% 5px, #000 0, transparent 1deg 89deg, #000 90deg);
            mask: conic-gradient(from 315deg at 50% 5px, #000 0, transparent 1deg 89deg, #000 90deg);
}
/* The toggle itself shows no box when the menu is open: the arch is the button */
:root .navbar-anwar .user-menu-toggle, :root .navbar-anwar .user-menu-toggle.show,
:root .navbar-anwar .user-menu-toggle:hover { background: transparent !important; }
/* the arch is masked, so the focus ring goes on the toggle around it */
:root .navbar-anwar .user-menu-toggle:focus-visible { outline: 2px solid var(--beige); outline-offset: 2px; }
/* Negative margins keep the bar its height: the arch takes the old chip's 32px in layout */
:root .navbar-anwar .user-menu-toggle .user-avatar { margin-block: -9px; transform: translateY(calc(1.1rem + 1px - 9px)); }
:root .user-avatar.user-avatar-lg { width: 48px; height: 60px; border-radius: 24px 24px 0 0; font-size: .95rem; padding-bottom: 10px; transform: none;
    -webkit-mask: conic-gradient(from 315deg at 50% 6px, #000 0, transparent 1deg 89deg, #000 90deg);
            mask: conic-gradient(from 315deg at 50% 6px, #000 0, transparent 1deg 89deg, #000 90deg); }

/* ═══ Lesson art in the student's lesson rows ═══
   The same lettered names as the landing page's doors, at the same
   proportions: one letter size for all five (--u from the widest, as there),
   standing on a common sill; ink letters, gold nuqtas, teal ornament. Done: the frame
   turns solid ink. The crown notch stays (::before above). */
.sh-door.has-art {
    container-type: inline-size;
    width: 60px; height: 67px; padding: 0; overflow: hidden;
    border-radius: 30px 30px 0 0;
    background: var(--light-fill);
    color: #0A2E23; --ln-dot: #8A6A33; --ln-orn: #4A9782;
    --u: calc(90cqw / 189.43);
}
.sh-door.has-art .lesson-art {
    position: absolute; left: 50%; bottom: 8cqw; transform: translateX(-50%);
    width: calc(var(--lw, 160) * var(--u)); height: auto;
}
.sh-door.has-art .lesson-art[data-subject="fiqh"]    { --lw: 189.43; }
.sh-door.has-art .lesson-art[data-subject="arabic"]  { --lw: 159.45; }
.sh-door.has-art .lesson-art[data-subject="aqeedah"] { --lw: 148.18; }
.sh-door.has-art .lesson-art[data-subject="seerah"]  { --lw: 155.7; }   /* short words: drawn 15% larger to read the same size (see landing.css) */
.sh-door.has-art .lesson-art[data-subject="akhlaq"]  { --lw: 162.43; }
.sh-door.has-art.is-done { border-width: 3px; border-color: var(--ink); box-shadow: none; --bw: 3px; --notch-line: var(--ink); }
[data-theme="dark"] .sh-door.has-art.is-done { border-color: var(--beige); box-shadow: none; --notch-line: var(--beige); }

/* ═══════════════════════════════════════════════════════════════════════
   Dashboards, pass 2 (2026-11): every device, students and teachers
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Student: one row shape for every task, on every width ──
   door · the words · the action, on one line. The action column keeps its
   own width, so "حضرت", "تم الحضور / تراجع" and the upload buttons line up
   down the list. Rows without a door (extra lessons, exams, homework) are
   words · action; on phones their wider buttons drop under the words. */
:root .sh-row {
    display: grid; align-items: center; column-gap: 14px; row-gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "door main act";
    padding: 16px 0;
}
:root .sh-row:not(:has(> .sh-door)) { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main act"; }
:root .sh-row > .sh-door { grid-area: door; align-self: start; margin-top: 0; }
:root .sh-row > .sh-row-main { grid-area: main; }
:root .sh-row > .sh-row-action { grid-area: act; margin: 0; flex-direction: column; align-items: flex-end; gap: 2px; }
:root .sh-row-kicker { margin: 0; font-size: .82rem; font-weight: 500; color: var(--text-muted); }
:root .sh-row-action .btn-action { min-width: 92px; }
@media (max-width: 575.98px) {
    :root .sh-row { flex-wrap: initial; }
    :root .sh-row-action { margin-inline-start: 0 !important; }
    :root .sh-row:not(:has(> .sh-door)):has(.sh-row-action a.btn) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "act"; }
    :root .sh-row:not(:has(> .sh-door)):has(.sh-row-action a.btn) > .sh-row-action { align-items: stretch; }
    :root .sh-row:not(:has(> .sh-door)):has(.sh-row-action a.btn) .btn-action { width: 100%; }
}

/* ── Student: two columns from 1100px ── */
@media (min-width: 1100px) {
    :root .content-measure.sh { max-width: 1140px; }
    :root .sh-body:has(> .sh-side > *) {
        display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 56px; align-items: start;
    }
    :root .sh-side { position: sticky; top: calc(var(--navbar-h, 64px) + 24px); }
    :root .sh-side .sh-sec:first-child { margin-top: 28px; }
    :root .sh-side .sh-podium { transform-origin: top center; }
}

/* ── Teacher: "needs attention" as a row of doors, not three domes ──
   Each door keeps the landing page's proportions (a semicircle on a
   220px-wide doorway) instead of stretching across the page. On phones the
   row scrolls sideways, the next door peeking in. */
:root .todo-grid { grid-template-columns: repeat(auto-fill, minmax(0, 220px)); justify-content: start; gap: 18px; }
:root .todo-card { min-height: 250px; }
@media (max-width: 575.98px) {
    :root .todo-grid {
        grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44%;
        overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
        margin-inline: -16px; padding: 12px 16px 6px;
    }
    :root .todo-grid::-webkit-scrollbar { display: none; }
    :root .todo-card { min-height: 220px; scroll-snap-align: start; }
}

/* ── Teacher: the subject's numbers, four across (two by two on phones) ── */
:root .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 575.98px) {
    :root .kpi-grid { grid-template-columns: 1fr 1fr; }
    :root .kpi:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
    :root .kpi:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* ── Teacher: tests and homework, one tidy line each; on phones in three
   rows (name and tags · dates · actions), dates never broken ── */
:root .task-line small { white-space: nowrap; }
@media (max-width: 575.98px) {
    :root .task-line { flex-direction: column; align-items: stretch; gap: 10px; }
    :root .task-line > div:last-child { justify-content: flex-start; }
    :root .task-line small { display: block; margin: 6px 0 0 !important; }
}

/* An empty state's button is a button: its icon at text size (the empty
   state's large faint icon rule was catching it and blowing the button up) */
:root .empty-state .empty-cta :is(i, .ic) { font-size: 1em; margin: 0 0 0 .4em; opacity: 1; color: inherit; }

/* ── Student: "التالي", the one thing to do now ──
   A lit band under the week stepper: the task's door (its subject's
   lettered name for a lesson, an icon for a test or homework), what it is,
   when it closes, and the button that does it. When the week is done the
   door is simply lit. */
:root .sh-next {
    display: grid; align-items: center; column-gap: 18px; row-gap: 14px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "door words act";
    margin: 22px 0 6px; padding: 18px 20px;
    background: var(--bg-shade); border: 1px solid var(--border);
    border-radius: 0;
}
:root .sh-next .sh-next-door { grid-area: door; width: 72px; height: 84px; align-self: start; }
:root .sh-next .sh-next-door.has-art { width: 72px; height: 80px; border-radius: 36px 36px 0 0; }
:root .sh-next .sh-next-door:not(.has-art) {
    display: grid; place-items: center; padding: 0;
    border-radius: 36px 36px 0 0; background: var(--light-fill); color: var(--ink);
}
:root .sh-next .sh-next-door.is-lit { border-color: transparent; }
:root .sh-next-ic { font-size: 1.6rem; display: grid; place-items: center; margin-top: 14px; }
:root .sh-next-words { grid-area: words; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
:root .sh-next-kicker { margin: 0; display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 700; color: var(--link); }
:root .sh-next-kicker > span { font-weight: 500; color: var(--text-muted); }
:root .sh-next-kicker .nuqta { --nuqta-size: 8px; }
:root .sh-next-title { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.3rem, 1.1rem + .8vw, 1.65rem); line-height: 1.35; }
:root .sh-next-meta { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; color: var(--text-muted); }
:root .sh-next-meta.is-late, :root .sh-open.is-late { color: var(--danger-text); }
:root .sh-next-act { grid-area: act; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
:root .sh-next.is-done { background: transparent; border-color: var(--rule); }
:root .sh-next.is-done .sh-next-kicker { color: var(--success-text); }
:root .sh-next.is-wait { background: transparent; }
:root .sh-open.is-quiet { color: var(--text-muted); }
@media (max-width: 767.98px) {
    :root .sh-next { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "door words" "act act"; margin-inline: -16px; padding: 16px; border-inline: 0; }
    :root .sh-next .sh-next-door, :root .sh-next .sh-next-door.has-art { width: 60px; height: 68px; border-radius: 30px 30px 0 0; }
    :root .sh-next-act { justify-content: stretch; }
    :root .sh-next-act > *, :root .sh-next-act form .btn { flex: 1 1 0; width: 100%; }
    :root .sh-next-act form { display: flex; }
}


/* ═══ Pass 3 (2026-11): notches, the tab bar, the profile ═══ */

/* The crown notch is a square in the ground's colour, half of it above the
   arch's top edge. An arch that clips its overflow cut that half away, and
   the arch's own top line showed straight across the V ("a line closing
   the arch"). These arches keep their overflow visible; what they hold is
   sized to fit inside anyway. */
:root .todo-card, :root .sh-door.has-art, :root .sh-next .sh-next-door { overflow: visible; }
/* …and the square takes the colour of the surface the arch stands on. */
:root .sh-next .sh-door::before { background: var(--bg-shade); }
:root .sh-next:is(.is-done, .is-wait) .sh-door::before { background: var(--bg); }

/* ── Phones: the active tab ──
   The lit arch carried the icon and the label and rose to within 2px of the
   bar's top edge. Now it holds the label only: the icon steps aside, and the
   arch is lower and a little wider, with clear bar above its crown. */
@media (max-width: 991.98px) {
    :root .bottom-nav-item.active { justify-content: flex-end; padding-bottom: 9px; }
    :root .bottom-nav-item.active :is(i, .ic) { display: none; }
    :root .bottom-nav-item.active::before { width: 72px; height: 46px; border-radius: 36px 36px 0 0; }
    :root .bottom-nav-item.active span { font-weight: 700; }
}

/* ── The profile in the top bar ──
   One letter in the arch (two Arabic initials read as a word, «مع»), and
   beside it the name over the role, in place of the full name and a
   coloured badge. The dropdown caret goes: the arch and the name are the
   control. */
:root .user-menu-toggle::after { display: none; }
:root .user-menu-toggle { gap: 10px !important; }
:root .user-id { display: flex; flex-direction: column; line-height: 1.25; text-align: start; }
:root .user-id-name { font-weight: 700; font-size: .95rem; color: var(--navbar-text); max-width: 13em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root .user-id-role { font-size: .75rem; font-weight: 500; color: color-mix(in srgb, var(--navbar-text) 68%, transparent); }
:root .user-avatar { font-size: 1.15rem; }

/* ── Student hall: the arches are links, the week can be celebrated ── */
:root a.sh-arch { text-decoration: none; color: inherit; cursor: pointer; }
:root a.sh-arch:hover:not(.is-done) { background: rgba(220,208,168,.12); }
:root a.sh-arch:focus-visible { outline: 2px solid var(--beige); outline-offset: 3px; }
:root .sh-row { scroll-margin-top: calc(var(--navbar-h, 64px) + 16px); }
:root .sh-row:target { animation: sh-row-flash 1.6s ease; }
@keyframes sh-row-flash { 0%, 30% { background: color-mix(in srgb, var(--teal) 14%, transparent); } 100% { background: transparent; } }
:root .sh-week-pts { font-weight: 700; color: #9FD3C1; margin-inline-start: 4px; }

:root .sh-arches { position: relative; }
:root .sh-birds { position: absolute; inset-inline-end: -6px; top: -64px; width: 110px; height: 92px; overflow: visible; pointer-events: none; opacity: 0; fill: var(--beige); }
:root .sh-hall.is-celebrating .sh-arch.is-done { animation: sh-light .7s ease both; animation-delay: calc(var(--i, 0) * 130ms + 250ms); }
@keyframes sh-light {
    from { background: transparent; box-shadow: inset 0 0 0 1.2px rgba(220,208,168,.55); }
    60%  { box-shadow: 0 0 22px 2px rgba(255,249,231,.35); }
    to   { box-shadow: 0 0 0 0 rgba(255,249,231,0); }
}
:root .sh-hall.is-celebrating .sh-birds { animation: sh-birds-show 2.6s ease 1.3s both; }
:root .sh-hall.is-celebrating .sh-bird { transform-box: fill-box; transform-origin: 50% 50%; animation: sh-bird-fly 2.4s cubic-bezier(.3,.6,.3,1) both; }
:root .sh-hall.is-celebrating .sh-bird.is-1 { animation-delay: 1.3s; }
:root .sh-hall.is-celebrating .sh-bird.is-2 { animation-delay: 1.45s; }
:root .sh-hall.is-celebrating .sh-bird.is-3 { animation-delay: 1.6s; }
@keyframes sh-birds-show { 0% { opacity: 0; } 10%, 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sh-bird-fly {
    from { transform: translate(0, 70px) scale(.4) rotate(10deg); opacity: 0; }
    25%  { opacity: 1; }
    to   { transform: translate(-34px, -18px) scale(1) rotate(-6deg); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { :root .sh-row:target { animation: none; } }
:root .sh-next .sh-next-door.is-lit { background: var(--light-fill); border-color: transparent; --notch-line: transparent; }

/* ── Teacher: the week's two lists as quiet sections (a rule, no box),
   side by side from 1200px ── */
:root .td-panel { background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
:root .td-panel > .card-header { background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--rule) !important; padding: 0 0 12px !important; }
:root .td-panel > .card-body { padding: 0 !important; }
:root .td-panel .my-lesson { padding-inline: 0; }
:root .td-panel .task-line:last-child, :root .td-panel .my-lesson:last-child { border-bottom: 0; }
:root .td-pair { margin-top: 12px; }
@media (min-width: 1200px) {
    :root .td-pair:has(> .td-panel + .td-panel) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 48px; align-items: start; }
    :root .td-pair .task-line { flex-direction: column; align-items: stretch; }
    :root .td-pair .task-line > div:last-child { justify-content: flex-start; }
}
:root .td-del {
    width: 36px; height: 36px; display: inline-grid; place-items: center;
    border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent); background: transparent;
    color: var(--danger-text); border-radius: 0;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); width: 38px; height: 38px;
    background: color-mix(in srgb, var(--danger) 10%, transparent); border: 0;
}
:root .td-del:hover { background: color-mix(in srgb, var(--danger) 22%, transparent); }

/* ═══════════════════════════════════════════════════════════════════════
   THE ARCH — one shape, defined once (2026-11)
   ───────────────────────────────────────────────────────────────────────
   Every arch on the site is the same single shape: a semicircle on a
   doorway, with the logo's V cut into its crown. It replaces the old trick
   of a page-coloured square turned 45° and laid over the top.

   How it is drawn, with no extra pieces:
   · the outline is the element itself: border-radius gives the semicircle,
     and a mask (a conic gradient, opaque everywhere except one 90° wedge
     whose point is --notch below the crown) cuts the V out of it;
   · the inside is ::before: the same shape, inset by --bw, with its V point
     set lower by --bw × (√2 − 1) so the V's line is exactly --bw thick.
   So the outline follows the V, the cut is real (whatever is behind shows
   through), and nothing sits on top of the arch.

   To use it on a new element: add it to the list below and set
     --arch-line  outline colour (transparent: no outline)
     --arch-fill  inside colour or gradient
     --bw         outline width (0: a solid arch)
     --bw-b       bottom outline width (0: open at the floor; default --bw)
     --notch      depth of the V (6px small, 9px medium, 12px large)
   ═══════════════════════════════════════════════════════════════════════ */
:root :is(.arch-door, .todo-card, .sh-arch, .sh-door, .sh-podium-arch, .lvl-col-arch, .medal-arch, .upload-zone) {
    --arch-line: transparent; --arch-fill: var(--bg); --bw: 1.5px; --notch: 9px;
    position: relative; isolation: isolate;
    border: 0 !important; box-shadow: none !important;
    border-radius: 999px 999px 0 0 !important;
    background: var(--arch-line) !important;
    -webkit-mask: conic-gradient(from 315deg at 50% var(--notch), #000 0, transparent .6deg 89.4deg, #000 90deg);
            mask: conic-gradient(from 315deg at 50% var(--notch), #000 0, transparent .6deg 89.4deg, #000 90deg);
}
:root :is(.arch-door, .todo-card, .sh-arch, .sh-door, .sh-podium-arch, .lvl-col-arch, .medal-arch, .upload-zone)::before {
    content: '' !important; position: absolute; z-index: -1;
    inset: var(--bw) var(--bw) var(--bw-b, var(--bw)) var(--bw) !important;
    width: auto !important; height: auto !important;
    transform: none !important; border: 0 !important;
    border-radius: 999px 999px 0 0;
    background: var(--arch-fill) !important;
    -webkit-mask: conic-gradient(from 315deg at 50% calc(var(--notch) + var(--bw) * .4142), #000 0, transparent .6deg 89.4deg, #000 90deg);
            mask: conic-gradient(from 315deg at 50% calc(var(--notch) + var(--bw) * .4142), #000 0, transparent .6deg 89.4deg, #000 90deg);
    transition: background-color .3s ease, opacity .5s ease;
}

/* outlined door / lit / solid (pair arches on the summary page use it) */
:root .arch-door { --arch-line: var(--text); --arch-fill: var(--notch-bg, var(--bg)); --notch: 12px; }
:root .arch-door.is-lit { --arch-line: var(--teal); --arch-fill: var(--light-fill); }
:root .arch-door.is-dark { --bw: 0px; --arch-fill: var(--door-dark); }

/* teacher: "needs attention" */
:root .todo-card { --bw: 0px; --arch-fill: var(--door-dark); --notch: 12px; }
:root a.todo-card:hover { --bw: 2px; --arch-line: var(--teal); }
:root .todo-card.is-calm { --bw: 1.5px; --arch-line: var(--border); --arch-fill: var(--bg); }
:root a.todo-card.is-calm:hover { --arch-line: var(--text); }

/* student: the week's arches in the hall (open at the floor) */
:root .sh-arch { --bw: 1.2px; --bw-b: 0px; --arch-line: rgba(220,208,168,.55); --arch-fill: var(--ink); --notch: 7px; }
[data-theme="dark"] .sh-arch { --arch-fill: #0D3529; }
:root a.sh-arch:hover:not(.is-done) { --arch-fill: color-mix(in srgb, var(--beige) 12%, var(--ink)); }
:root .sh-arch.is-done { --bw: 0px; --arch-fill: var(--light-fill); }

/* student: a lesson's door (and the "التالي" card's) */
:root .sh-door { --arch-line: var(--text); --arch-fill: var(--bg); --notch: 6px; }
:root .sh-door.is-done { --bw: 0px; --arch-fill: var(--ink); }
[data-theme="dark"] .sh-door.is-done { --arch-fill: var(--beige); }
:root .sh-door.has-art { --arch-fill: var(--light-fill); }
:root .sh-door.has-art.is-done { --bw: 3px; --arch-line: var(--ink); --arch-fill: var(--light-fill); }
[data-theme="dark"] .sh-door.has-art.is-done { --arch-line: var(--beige); }
:root .sh-next .sh-next-door { --notch: 8px; }
:root .sh-next .sh-next-door:not(.has-art) { --arch-fill: var(--light-fill); }
:root .sh-next .sh-next-door.is-lit { --bw: 0px; }

/* student: the podium (open at the floor) */
:root .sh-podium-arch { --bw-b: 0px; --arch-line: var(--text); --arch-fill: var(--bg); --notch: 10px; }
:root .sh-podium-arch.is-rank-1 { --arch-line: var(--teal); --arch-fill: var(--light-fill); }
:root .sh-podium-arch.is-me:not(.is-rank-1) { --bw: 0px; --arch-fill: var(--ink); }
[data-theme="dark"] .sh-podium-arch.is-me:not(.is-rank-1) { --arch-fill: var(--beige); }

/* admin: progress by level */
:root .lvl-col-arch { --bw: 0px; --arch-fill: var(--ink); --notch: 9px; }
[data-theme="dark"] .lvl-col-arch { --arch-fill: var(--beige); }

/* badges */
:root .medal-arch { --bw: 1.2px; --arch-line: var(--teal); --arch-fill: var(--light-fill); --notch: 6px; }

/* the exam page's drop zone: the outline is drawn in short strokes */
:root .upload-zone { --arch-fill: var(--bg-card); --notch: 12px; background: repeating-linear-gradient(45deg, var(--teal) 0 7px, transparent 7px 12px) !important; }
:root .upload-zone:hover, :root .upload-zone.dragover { --arch-fill: var(--accent-light); }

/* The week complete: each arch's light fills in (the inside, not the line) */
:root .sh-hall.is-celebrating .sh-arch.is-done { animation: none; }
:root .sh-hall.is-celebrating .sh-arch.is-done::before { animation: sh-fill .7s ease both; animation-delay: calc(var(--i, 0) * 130ms + 250ms); }
:root .sh-hall.is-celebrating .sh-arch.is-done { --arch-line: rgba(220,208,168,.55); }
@keyframes sh-fill { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════════════════════════════════════════════════════════════════
   CONNECTED — controls that belong together read as one (2026-11)
   ═══════════════════════════════════════════════════════════════════════ */

/* A joined group: one nuqta silhouette, its buttons tiles inside it,
   parted by a hairline of the ground. Outline buttons become a soft tint
   inside a group (an outline inside an outline reads as two things). */
:root .btn-join {
    --nq: 12px;
    display: inline-flex; align-items: stretch; gap: 2px; flex-wrap: nowrap; max-width: 100%;
    clip-path: polygon(var(--nq) 0, calc(100% - var(--nq)) 0, 100% 50%, calc(100% - var(--nq)) 100%, var(--nq) 100%, 0 50%);
}
:root .btn-join > form { display: flex; margin: 0 !important; }
:root .btn-join :is(.btn, .td-del) {
    clip-path: none !important; border-radius: 0 !important; margin: 0 !important;
    min-height: 40px; padding-inline: .85rem; display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    white-space: nowrap;
}
:root .btn-join > :first-child:is(.btn, .td-del), :root .btn-join > :first-child :is(.btn, .td-del) { padding-inline-start: calc(var(--nq) + .7rem); }
:root .btn-join > :last-child:is(.btn, .td-del), :root .btn-join > :last-child :is(.btn, .td-del) { padding-inline-end: calc(var(--nq) + .7rem); }
:root .btn-join :is(.btn-outline-anwar, .btn-secondary, .btn-undo)::before { display: none; }
:root .btn-join :is(.btn-outline-anwar, .btn-secondary) { background: color-mix(in srgb, var(--text) 10%, var(--bg)); color: var(--text); }
:root .btn-join :is(.btn-outline-anwar, .btn-secondary):hover { background: color-mix(in srgb, var(--text) 18%, var(--bg)); }
:root .btn-join .td-del { width: auto; height: auto; background: color-mix(in srgb, var(--danger) 14%, var(--bg)); }
:root .btn-join .td-del:hover { background: color-mix(in srgb, var(--danger) 26%, var(--bg)); }
:root .btn-join :is(.btn, .td-del):focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--focus-ring) !important; }
@media (max-width: 575.98px) {
    :root .btn-join { display: flex; width: 100%; }
    :root .btn-join > *, :root .btn-join > form > .btn, :root .btn-join > form > label { flex: 1 1 auto; }
    :root .btn-join > .td-del, :root .btn-join > form:has(.td-del) { flex: 0 0 auto; }
}
:root .sh-next-act.btn-join { justify-self: end; }
@media (max-width: 767.98px) { :root .sh-next-act.btn-join { display: flex; width: 100%; } :root .sh-next-act.btn-join > * { flex: 1 1 0; } :root .sh-next-act.btn-join > form .btn { width: 100%; } }

/* The week stepper is one control: ‹ 44 › in a single nuqta, the number
   its dark heart, the current-week mark inside it */
:root .sh-stepper {
    --nq: 14px; gap: 0;
    background: color-mix(in srgb, var(--text) 9%, transparent);
    clip-path: polygon(var(--nq) 0, calc(100% - var(--nq)) 0, 100% 50%, calc(100% - var(--nq)) 100%, var(--nq) 100%, 0 50%);
}
:root .sh-stepper .sh-step { width: 46px; }
:root .sh-stepper .sh-step:first-child { padding-inline-start: 8px; }
:root .sh-stepper .sh-step:last-child { padding-inline-end: 8px; }
:root .sh-stepper .sh-step:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
:root .sh-now { top: 4px; width: 6px; height: 6px; }

/* Hall, week and "next" are one block on the page: the next step hangs
   straight from the week's band, no gap, no second frame */
:root .sh-next { margin-top: 0; border-top: 0; }
@media (min-width: 1100px) { :root .sh-next { border-inline-start: 0; } }

/* A finished row: its state and its undo are one line */
:root .sh-row.is-done .sh-row-action { flex-direction: row; align-items: center; gap: 0; }
:root .sh-row.is-done .sh-row-action form { display: flex; }
:root .sh-row.is-done .sh-undo { margin-inline-start: 10px; padding-inline-start: 10px; border-inline-start: 1px solid var(--border); min-height: 28px; }

/* Cause and effect after she marks a task (see the page's script) */
:root .sh-arch.is-just::before { animation: sh-fill .9s ease .2s both; }
:root .sh-row.is-just { animation: sh-row-flash 1.8s ease .4s both; }
:root .sh-row.is-just .sh-door { animation: sh-door-in .6s cubic-bezier(.2,.7,.2,1.3) .5s both; }
@keyframes sh-door-in { from { transform: scale(.85); } to { transform: scale(1); } }
:root .sh-week-pts.is-just { display: inline-block; animation: sh-pts .8s cubic-bezier(.2,.7,.2,1.4) .7s both; }
@keyframes sh-pts { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Teacher: the "needs attention" doors open onto their sections; the
   section answers when you arrive */
:root .td-panel { scroll-margin-top: calc(var(--navbar-h, 64px) + 16px); }
:root .td-panel:target > .card-header { animation: td-arrive 1.8s ease; }
@keyframes td-arrive { 0%, 35% { border-bottom-color: var(--teal); box-shadow: 0 2px 0 0 var(--teal); } 100% { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) {
    :root :is(.sh-arch.is-just::before, .sh-row.is-just, .sh-row.is-just .sh-door, .sh-week-pts.is-just, .td-panel:target > .card-header) { animation: none !important; }
}
:root .task-line > .btn-join { align-self: flex-start; width: auto; }
:root .btn-join > * { flex: 0 0 auto; }
@media (max-width: 575.98px) { :root .task-line > .btn-join { align-self: stretch; width: 100%; } :root .btn-join > * { flex: 1 1 auto; } :root .btn-join > form:has(.td-del) { flex: 0 0 auto; } }
:root label.btn > input[type="file"].d-none { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════
   The test / homework page (student_exam.html), 2026-11
   ═══════════════════════════════════════════════════════════════════════ */
:root .ex-status {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 16px;
    margin: 18px 0 8px; padding: 14px 18px;
    background: var(--bg-shade); border-inline-start: 3px solid var(--teal);
}
:root .ex-status.is-done { border-inline-start-color: var(--success); }
:root .ex-status.is-wait { border-inline-start-color: var(--warning); }
:root .ex-status.is-closed { border-inline-start-color: var(--danger); }
:root .ex-status-mark {
    width: 42px; height: 48px; display: grid; place-items: end center; padding-bottom: 8px; box-sizing: border-box;
    font-size: 1.15rem; color: var(--ink);
}
:root .ex-status-mark { --arch-fill: var(--light-fill); --bw: 0px; --notch: 6px;
    position: relative; isolation: isolate; border-radius: 999px 999px 0 0;
    -webkit-mask: conic-gradient(from 315deg at 50% var(--notch), #000 0, transparent .6deg 89.4deg, #000 90deg);
            mask: conic-gradient(from 315deg at 50% var(--notch), #000 0, transparent .6deg 89.4deg, #000 90deg);
    background: var(--light-fill);
}
:root .ex-status-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
:root .ex-status-words strong { font-family: var(--font-heading); font-size: 1.15rem; }
:root .ex-status-words span { font-size: .9rem; color: var(--text-muted); }
@media (max-width: 575.98px) {
    :root .ex-status { grid-template-columns: auto minmax(0, 1fr); margin-inline: -16px; padding-inline: 16px; }
    :root .ex-status .ex-files { grid-column: 1 / -1; }
}

/* the result: score in a lit arch, the teacher's note beside it */
:root .ex-result { display: flex; align-items: flex-end; gap: 22px; margin: 22px 0 10px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
:root .ex-result-arch { flex: 0 0 132px; min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 16px; color: #0A2E23; }
:root .ex-result-score { font-family: var(--font-heading); font-weight: 700; font-size: 3rem; line-height: 1; }
:root .ex-result-score.is-word { font-size: 2.2rem; }
:root .ex-result-of { font-size: .85rem; font-weight: 700; color: #4D5A50; }
:root .ex-result-note { min-width: 0; padding-bottom: 6px; }
:root .ex-result-label { margin: 0 0 4px; font-size: .85rem; font-weight: 700; color: var(--link); }
:root .ex-result-text { margin: 0; font-size: 1.05rem; line-height: 1.8; }

/* her pages: thumbnails, each with its actions joined beneath */
:root .ex-pages { margin-top: 26px; }
:root .ex-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 16px; margin-top: 12px; }
:root .ex-page { position: relative; margin: 0; display: flex; flex-direction: column; gap: 0; }
:root .ex-page img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: var(--bg-shade); border: 1px solid var(--border); border-bottom: 0; }
:root .ex-page-num {
    position: absolute; top: 8px; inset-inline-start: 8px; width: 26px; height: 26px; display: grid; place-items: center;
    font-family: var(--font-heading); font-weight: 700; font-size: .9rem;
    background: var(--ink); color: var(--cream); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
:root .ex-page-act { display: flex; width: 100%; --nq: 10px; }
:root .ex-page-act > * { flex: 1 1 auto; }
:root .ex-page-act > form { flex: 0 0 auto; }
:root .ex-page-act .btn { width: 100%; min-height: 38px; font-size: .85rem; }
:root .ex-notify {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
    margin-top: 20px; padding: 14px 0 0; border-top: 1px solid var(--rule);
}
:root .ex-notify p { margin: 0; display: flex; flex-direction: column; gap: 2px; }
:root .ex-notify p span { font-size: .9rem; color: var(--text-muted); }

/* the upload: one column, the arch standing on its own button */
:root .ex-upload { margin: 30px 0 40px; }
:root .ex-upload-form { display: flex; flex-direction: column; align-items: stretch; max-width: 420px; margin: 16px auto 0; }
:root .ex-upload .upload-zone { min-height: 230px; width: 100%; --arch-fill: var(--light-fill); --bw: 1.5px; --notch: 12px; background: var(--teal) !important; color: #0A2E23; }
:root .ex-upload .upload-zone small { color: #4D5A50; }
:root .ex-upload .upload-zone:hover { --arch-fill: color-mix(in srgb, var(--teal) 14%, #FFF9E7); }
:root .ex-upload .ex-submit { width: 100%; margin-top: 0; --nq: 0px; clip-path: none; border-radius: 0; }
:root .ex-upload #previewGrid:not(:empty) { margin-bottom: 14px; }
:root .ex-upload #previewGrid:not(:empty) ~ .ex-submit { --nq: 20px; clip-path: polygon(var(--nq) 0, calc(100% - var(--nq)) 0, 100% 50%, calc(100% - var(--nq)) 100%, var(--nq) 100%, 0 50%); }
:root .ex-progress { margin-top: 12px; }
:root .ex-upload .upload-fallback { margin-top: 14px; text-align: center; }
:root .ex-upload .upload-help { text-align: start; color: var(--text-muted); margin: 4px 0 0; }
:root .ex-upload #previewGrid:empty { display: none; }
:root .ex-upload-form { margin-inline: 0; }
:root .ex-status-words .is-late { font-weight: 500; color: var(--danger-text); }
:root .ex-history { margin-top: 30px; }
:root .ex-hist { list-style: none; margin: 10px 0 0; padding: 0; }
:root .ex-hist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
:root .ex-hist-week { font-weight: 700; white-space: nowrap; }
:root .ex-hist-note { color: var(--text-muted); font-size: .92rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root .ex-hist-state { font-size: .88rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════════
   Grading (view_submission.html), 2026-11: pages and grade, one workspace
   ═══════════════════════════════════════════════════════════════════════ */
:root .gr-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); }
:root .gr-back { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 700; color: var(--text); text-decoration: none; }
:root .gr-back:hover { color: var(--link); }
:root .gr-left { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 700; color: var(--link); }
:root .gr-left .nuqta { --nuqta-size: 7px; }

/* the panel's parts read top to bottom as one card of facts and actions */
:root .gr-panel .grading-hero { display: block; padding: 0 0 12px; margin: 0; background: transparent; border: 0; box-shadow: none; }
:root .gr-panel .grading-hero-title { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.35rem, 1.1rem + .9vw, 1.8rem); line-height: 1.3; }
:root .gr-panel .grading-hero-meta { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--text-muted); font-size: .92rem; }
:root .gr-panel .grading-hero-meta .nuqta { --nuqta-size: 6px; }
:root .gr-panel .grading-current { margin: 0 0 14px; padding: 12px 14px; background: var(--bg-shade); border: 0; border-radius: 0; display: flex; gap: 14px; align-items: center; }
:root .gr-panel .grading-current-score { font-family: var(--font-heading); font-weight: 700; font-size: 1.8rem; }
:root .gr-panel .grading-current-score small { font-size: .9rem; }
:root .gr-panel .grading-current-score:not(.is-low) { background: #2B6B59; }   /* the small /100 needs 4.5:1 too */

:root .gr-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; padding-top: 12px; }
:root .gr-quick-btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 0; font-weight: 700;
    background: color-mix(in srgb, var(--success) 16%, var(--bg)); color: var(--success-text);
    --nq: 11px; clip-path: polygon(var(--nq) 0, calc(100% - var(--nq)) 0, 100% 50%, calc(100% - var(--nq)) 100%, var(--nq) 100%, 0 50%);
    padding-inline: calc(var(--nq) + .7rem);
}
:root .gr-quick-btn:hover { background: color-mix(in srgb, var(--success) 28%, var(--bg)); }
:root .gr-quick small { color: var(--text-muted); font-size: .82rem; }

/* the form: score and save are one control; quick scores are chips */
:root .gr-panel .grading-dock .grading-dock-row { align-items: stretch; }
:root .grading-quick-chip { border-radius: 0 !important; clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%); padding-inline: 14px !important; border: 0 !important; background: color-mix(in srgb, var(--text) 8%, var(--bg)) !important; }
:root .grading-quick-chip:hover, :root .grading-quick-chip.is-on { background: var(--ink) !important; color: var(--cream) !important; }
:root .grading-dock-kbd { display: none; }

/* Wide: pages beside the panel; the panel stays in view */
@media (min-width: 992px) {
    :root .gr-work { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 0 36px; align-items: start; }
    :root .gr-work > .grading-gallery { grid-column: 1; grid-row: 1; margin: 0; }
    :root .gr-panel { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--navbar-h, 64px) + 20px); padding: 20px; background: var(--bg-card); border: 1px solid var(--border); }
    :root .gr-panel .grading-dock { position: static; inset: auto; padding: 0; margin: 0; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; z-index: auto; }
    :root .gr-panel .grading-dock-row { flex-direction: column; gap: 10px; }
    :root .gr-panel .grading-dock-row > * { width: 100%; }
    :root .gr-panel .grading-dock-score input { font-size: 1.6rem; height: 56px; text-align: center; font-family: var(--font-heading); font-weight: 700; }
    :root .gr-panel .grading-dock-submit { width: 100%; min-height: 48px; }
    :root .gr-panel .grading-dock-kbd { display: block; margin-top: 8px; }
    :root .grading-page .grading-gallery { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
/* Phones and tablets: the dock rests above the tab bar; its extras open
   only while it is in use, so the pages stay visible */
@media (max-width: 991.98px) {
    :root .gr-panel .grading-dock .grading-dock-extras { display: none; }
    :root .gr-panel .grading-dock:focus-within .grading-dock-extras { display: flex; }
    :root .grading-page { padding-bottom: 120px; }
    :root .gr-panel { margin-top: 18px; }
}
@media (min-width: 992px) {
    /* one column in the order a grader works: score, quick scores, note,
       note templates, then save */
    :root .gr-panel .grading-dock { display: flex; flex-direction: column; gap: 10px; }
    :root .gr-panel .grading-dock-row { display: contents; }
    :root .gr-panel .grading-dock-row > * { flex: 0 0 auto; }
    :root .gr-panel .grading-dock-score { order: 1; }
    :root .gr-panel .grading-dock-extras:has([data-score]) { order: 2; }
    :root .gr-panel .grading-dock-note { order: 3; }
    :root .gr-panel .grading-dock-extras:has(.is-template):not(#myTemplates) { order: 4; }
    :root .gr-panel #myTemplates { order: 5; }
    :root .gr-panel .grading-dock-submit { order: 6; margin-top: 4px; }
    :root .gr-panel .grading-dock-extras { padding-top: 0; border-top: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Admin (2026-11): counts and tags stay with what they count
   ═══════════════════════════════════════════════════════════════════════ */
/* a count sits right after its label (not flung to the far edge, alone) */
:root .navbar-anwar :is(.dropdown-item, .nav-link):has(.menu-count) { justify-content: flex-start !important; }
:root .menu-count {
    margin-inline-start: 8px !important; margin-inline-end: 0 !important; order: 0 !important;
    min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center;
    font-size: .72rem; font-weight: 700; line-height: 1;
    background: var(--teal); color: #0A2E23; border-radius: 0;
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 6px 100%, 0 50%);
}
/* a shortcut's format tag follows its name */
:root .quick-links > a small { margin-inline-start: 6px; padding: 1px 6px; font-size: .72rem; font-weight: 700; background: color-mix(in srgb, var(--text) 8%, transparent); }

/* Progress by level: every level is a whole arch, the same height; how
   much of the week is done fills it from the floor, like light rising in a
   doorway. 0% is an empty doorway, not a stub. All levels share one colour: a
   different one would say a level is special, and none is. The figures sit under
   the floor, never on the fill, where dark ink vanished on a fuller doorway. */
:root .lvl-colonnade { height: 190px; }
:root .lvl-col-arch {
    height: 178px !important; min-height: 0; max-width: 132px;
    --bw: 1.5px; --bw-b: 0px; --arch-line: var(--teal); --notch: 10px;
    --arch-fill: linear-gradient(to top, var(--teal) 0 calc(var(--pct) * 1%), var(--bg) calc(var(--pct) * 1%) 100%);
}
:root .lvl-col { justify-content: flex-end; }
:root .lvl-names span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .95rem; }
:root .lvl-names b { font-size: 1.5rem; line-height: 1.2; }
:root .lvl-names small { font-size: .85rem; font-weight: 400; color: var(--text-muted); }
/* many levels on a phone: the doorways stay on one row and their names stay whole */
@media (max-width: 575.98px) {
    :root .lvl-colonnade, :root .lvl-names { gap: 10px; }
    :root .lvl-names span { font-size: .82rem; }
    :root .lvl-names b { font-size: 1.25rem; }
}

/* A choice and the button that applies it are one control: the select
   runs straight into its button, which carries the point at the free end */
:root .lvl-pick { display: flex; align-items: stretch; gap: 0; }
:root .lvl-pick .form-select { flex: 1 1 auto; min-width: 0; border-radius: 0 !important; border-inline-end-width: 0; }
:root .lvl-pick .btn {
    --nq: 11px; border-radius: 0 !important; margin: 0 !important; padding-inline: calc(var(--nq) + .5rem) .6rem;
    clip-path: polygon(var(--nq) 0, 100% 0, 100% 100%, var(--nq) 100%, 0 50%) !important;
}
[dir="rtl"] :root .lvl-pick .btn, :root[dir="rtl"] .lvl-pick .btn { clip-path: polygon(var(--nq) 0, 100% 0, 100% 100%, var(--nq) 100%, 0 50%) !important; }
:root .st-card-act { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
:root .st-card-act > .btn-join { width: 100%; display: flex; }
:root .st-card-act > .btn-join > * { flex: 1 1 auto; }
:root .st-card-act > .btn-join > .td-del { flex: 0 0 auto; }

/* Reports: the week stepper and its label; the export actions joined */
:root .wk-stepper { display: inline-flex; align-items: center; }
:root .wk-label { font-weight: 700; color: var(--text-muted); font-size: .92rem; }
:root .toolbar:has(.wk-stepper) { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
/* Levels: name and facts, then the level's actions as one control */
:root .lv-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
@media (max-width: 575.98px) { :root .lv-card > .lv-act { width: 100%; } }

/* A field and the button that applies it, as one control (same as .lvl-pick):
   fields run edge to edge, the button closes the row with the point */
:root .field-join { display: inline-flex; align-items: stretch; gap: 0; max-width: 100%; }
:root div.field-join, :root form.field-join { display: flex; }
:root .field-join > :is(.form-select, .form-control) { border-radius: 0 !important; margin: 0 !important; min-width: 0; }
:root .field-join > :is(.form-select, .form-control) + :is(.form-select, .form-control) { border-inline-start-width: 0; }
:root .field-join > :is(.form-select, .form-control):has(+ .btn) { border-inline-end-width: 0; }
:root .field-join > .btn {
    --nq: 11px; flex: 0 0 auto; border-radius: 0 !important; margin: 0 !important; white-space: nowrap;
    padding-inline: calc(var(--nq) + .55rem) .8rem;
    clip-path: polygon(var(--nq) 0, 100% 0, 100% 100%, var(--nq) 100%, 0 50%) !important;
}
:root .tz-form { max-width: 520px; }
:root .tz-form .field-join > .form-select { flex: 1 1 auto; }
/* Seats on phones: each student is a short block (name, attendance, average)
   with her decision row under it, instead of a squeezed table */
@media (max-width: 767.98px) {
    :root .seats-table thead { display: none; }
    :root .seats-table, :root .seats-table tbody { display: block; width: 100%; }
    :root .seats-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "n name att avg" "dec dec dec dec"; gap: 8px 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
    :root .seats-table td { display: block; border: 0 !important; padding: 0 !important; min-width: 0 !important; background: transparent !important; }
    :root .seats-table td:nth-child(1) { grid-area: n; }
    :root .seats-table td:nth-child(2) { grid-area: name; font-weight: 700; }
    :root .seats-table td:nth-child(3) { grid-area: att; text-align: center; }
    :root .seats-table td:nth-child(4) { grid-area: avg; text-align: center; }
    :root .seats-table td:nth-child(5) { grid-area: dec; }
    :root .seats-table .field-join { width: 100%; }
    :root .seats-table .field-join > .form-select { flex: 0 0 auto; width: auto !important; }
    :root .seats-table .field-join > .form-control { flex: 1 1 auto; }
}

/* ═══ DARK PASS — ink on the light fills ═══════════════════════════
   In dark the success/danger/accent tokens turn light, so white text
   on them disappears. Same badges, ink text. */
:root .ex-upload .upload-zone-title { color: #0A2E23; }
:root .ex-upload .upload-zone small { color: #4D5A50; }
[data-theme="dark"] .badge[style*="color: #fff"],
[data-theme="dark"] .badge[style*="color:#fff"],
[data-theme="dark"] .seat-release { color: #0A2E23 !important; }
[data-theme="dark"] .todo-card.is-calm .todo-t { color: #FFF9E7; }
[data-theme="dark"] .todo-card.is-calm .todo-d { color: #D6CFB4; }
[data-theme="dark"] .badge[style*="var(--success)"] { background: #7BBFA9 !important; }

/* ═══ Pre-deploy pass (2026-11) ═══ */

/* Phones: every "needs attention" door in view at once. They used to scroll
   sideways with no sign of it, and the last door could go unseen. Three stand
   in a row, two or four stand in pairs. */
@media (max-width: 575.98px) {
    :root .todo-grid {
        grid-template-columns: repeat(6, 1fr); grid-auto-flow: row; grid-auto-columns: auto;
        overflow: visible; scroll-snap-type: none; margin-inline: 0; padding: 12px 0 6px; gap: 10px;
    }
    :root .todo-grid > .todo-card { grid-column: span 3 !important; min-height: 176px; padding: 0 10px 12px; }
    :root .todo-grid > .todo-card:first-child:nth-last-child(3),
    :root .todo-grid > .todo-card:first-child:nth-last-child(3) ~ .todo-card { grid-column: span 2 !important; }
    :root .todo-card .todo-n { font-size: 2.2rem; }
    :root .todo-card .todo-t { font-size: .92rem; line-height: 1.35; }
    :root .todo-card .todo-d { display: none; }
}

/* A single result stands as a door, not a dome across the page */
.pair-arches > .pair-arch:only-child { width: min(240px, 100%); justify-self: center; }

/* Wide tables that read as cards on phones */
@media (max-width: 575.98px) {
    :root .table-stack thead { display: none; }
    :root .table-stack, :root .table-stack tbody, :root .table-stack tr, :root .table-stack td { display: block; width: 100%; }
    :root .table-stack tr { position: relative; padding: 12px 0; border-bottom: 1px solid var(--rule, var(--border)); }
    :root .table-stack td { border: 0; padding: 2px 0; }
    :root .table-stack td:first-child { font-weight: 700; font-size: 1.05rem; }
    :root .table-stack td:last-child { padding-top: 8px; }
    :root .table-stack td:last-child .btn { width: 100%; }
}

/* Fingers: nothing a student or teacher taps stays under about 40px */
@media (pointer: coarse) {
    :root .sh-undo { display: inline-flex; align-items: center; min-height: 40px; padding-block: 8px; }
    :root .wa-mini { width: 40px; height: 40px; }
    :root .form-check-input { width: 1.4em; height: 1.4em; }
    :root .heat-chip { min-height: 34px; display: inline-flex; align-items: center; }
    :root .seg > a, :root .seg > button { min-height: 40px; display: inline-flex; align-items: center; }
}

/* Small counts stay at the 12px floor */
:root .bottom-nav-badge, :root .nav-badge { font-size: .75rem; min-width: 22px; height: 22px; }

/* Readable in dark mode: the "missing" chip on reports */
[data-theme="dark"] .heat-chip.heat-missing { color: #D3DED7 !important; }

/* Text on the new teal and beige fills: dark ink. The old inline white on these
   measured 3.5:1 on teal and 1.5:1 on beige. */
:root .badge-lesson,
:root .badge[style*="var(--success)"] { color: #0A2E23 !important; }
:root [style*="var(--accent)"][style*="#fff"] { color: #0A2E23 !important; }
:root .reg-phone-link { color: var(--teal-text, #2B6B59); }
[data-theme="dark"] .reg-phone-link { color: #7CC0AB; }
:root code { font-size: max(.75rem, .875em); }

/* A lighter teal under dark ink for small labels (4.2:1 became 5:1) */
:root { --badge-lesson: #5BA893; }
[data-theme="dark"] { --badge-lesson: #5BA893; }
:root .badge[style*="var(--success)"] { background: #5BA893 !important; }
/* Grading on a phone: the score field keeps its hint readable */
@media (max-width: 575.98px) { :root #scoreInput { flex: 0 0 132px; width: 132px; } }
/* The small "/100" after a score takes the score's own colour */
:root .score-tag small { color: inherit; opacity: 1; }


/* ═══ Lesson rows: five doors, as on the home page ═══
   At 60px the lettered names in the door could not be read, and laid behind the
   words they fought them. So nothing overlaps: the name stands whole in its own
   lit arch, at one letter size (--u, measured from the arch through cqw).
   Phones: a card, the words beside the arch, the arch standing on the line above
   the action, and that action the full width of the thumb.
   Tablets up: the room goes to the doors themselves, a row of tall cards with the
   arch at the head, the words under it and the action at the foot, level across
   the row. A finished lesson's arch takes the teal: the light is on. */
:root .sh-row.has-art {
    grid-template-columns: minmax(0, 1fr) minmax(0, 42%);
    grid-template-areas: "main door" "act act";
    column-gap: 12px; row-gap: 0;
    padding: 16px 16px 12px; margin-bottom: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card, var(--bg));
}
:root .sh-rows > .sh-row.has-art:last-child { border-bottom: 1px solid var(--border); margin-bottom: 0; }
:root .sh-row > .sh-door.has-art,
:root .sh-next > .sh-next-door.has-art {
    width: 100%; height: auto; aspect-ratio: 1 / 1; overflow: hidden;
    --u: calc(86cqw / 189.43); --bw: 1px; --notch: 10px;
    --arch-line: color-mix(in srgb, var(--text) 18%, transparent);
    color: #0A2E23; --ln-dot: #8A6A33; --ln-orn: #2B6B59;
}
:root .sh-row > .sh-door.has-art { align-self: end; max-width: 190px; justify-self: end; }
:root .sh-row > .sh-door.has-art.is-done,
:root .sh-next > .sh-next-door.has-art.is-done { --bw: 0px; --arch-fill: linear-gradient(180deg, color-mix(in srgb, var(--teal) 16%, var(--cream)), color-mix(in srgb, var(--teal) 46%, var(--cream))); }
:root .sh-row.has-art > .sh-row-main { align-self: center; padding-block: 2px 14px; }
:root .sh-row.has-art .sh-row-title { font-size: 1.3rem; }
:root .sh-row.has-art .sh-links { flex-direction: column; align-items: flex-start; }
:root .sh-row.has-art .sh-link { min-height: 36px; }
:root .sh-row.has-art > .sh-row-action {
    flex-direction: row; align-items: center; justify-content: center; gap: 0;
    padding-top: 12px; border-top: 1px solid var(--border);
}
:root .sh-row.has-art > .sh-row-action:not(:has(*)) { display: none; }
:root .sh-row.has-art > .sh-row-action > form:only-child { width: 100%; }
:root .sh-row.has-art > .sh-row-action > form:only-child .btn-action { width: 100%; }

@media (min-width: 768px) {
    :root .sh-rows.is-doors { display: flex; flex-wrap: wrap; gap: 16px; }
    :root .sh-rows > .sh-row.has-art,
    :root .sh-rows > .sh-row.has-art:last-child { margin: 0; }
    :root .sh-row.has-art {
        flex: 1 1 calc(33.33% - 11px); min-width: 0; box-sizing: border-box;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr auto;
        grid-template-areas: "door" "main" "act";
        padding: 22px 20px 14px; text-align: center;
    }
    :root .sh-row > .sh-door.has-art { justify-self: center; width: min(100%, 180px); max-width: none; }
    :root .sh-row.has-art > .sh-row-main { align-self: start; align-items: center; padding-block: 16px; }
    :root .sh-row.has-art .sh-links { align-items: center; }
}

/* The "next" card holds a lesson the same way */
:root .sh-next > .sh-next-door.has-art { width: 148px; }
@media (max-width: 767.98px) {
    :root .sh-next.has-art { grid-template-columns: minmax(0, 1fr) minmax(0, 40%); grid-template-areas: "words door" "act act"; }
    :root .sh-next > .sh-next-door.has-art { width: 100%; max-width: 170px; justify-self: end; }
}

/* Phones from before 2022-23: they cannot size a lettered name from its arch (cqw),
   hold an arch by its proportions (aspect-ratio) or mix a tint (color-mix), and
   without these the arches collapse to nothing. Fixed sizes that fit every width. */
@supports not (width: 1cqw) {
    :root .sh-row > .sh-door.has-art, :root .sh-next > .sh-next-door.has-art { --u: .58px; }
    :root .sh-door.has-art .lesson-art { bottom: 10px; }
}
@supports not (aspect-ratio: 1) {
    :root .sh-row > .sh-door.has-art, :root .sh-next > .sh-next-door.has-art { height: 130px; }
}
@supports not (color: color-mix(in srgb, red, blue)) {
    :root .sh-row > .sh-door.has-art.is-done, :root .sh-next > .sh-next-door.has-art.is-done { --arch-fill: linear-gradient(180deg, #E4EDDE, #B4D3C4); --arch-line: transparent; }
    :root .sh-row > .sh-door.has-art, :root .sh-next > .sh-next-door.has-art { --arch-line: var(--border); }
}

/* ═══ Staff top bar on desktop (owner 2026-11-09: the top bar, not a side rail) ═══
   The profile menu opens rightward from the avatar, which is the bar's last
   item at the physical left; anchored by its right edge it ran off the screen.
   Below 1400px the bar is crowded (five groups, the bell, the name), so the
   tagline and the link icons step aside, and below 1280px the name beside the
   avatar too, rather than letting a label break onto two lines. */
@media (min-width: 992px) {
    :root .navbar-anwar .user-menu.dropdown-menu { left: 0 !important; right: auto !important; max-width: calc(100vw - 24px); }
    :root .navbar-anwar .navbar-nav .nav-link { white-space: nowrap; }
    /* a long name ends in «…» instead of pushing the bar past the screen */
    :root .navbar-anwar .user-id-name { display: block; max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (min-width: 992px) and (max-width: 1399.98px) {
    :root .navbar-anwar .app-brand-sep, :root .navbar-anwar .app-brand-tag { display: none; }
    :root .navbar-anwar .navbar-nav.me-auto .nav-link > .ic { display: none; }
    :root .navbar-anwar .navbar-nav.me-auto .nav-link { padding-inline: .55rem !important; }
}
@media (min-width: 992px) and (max-width: 1279.98px) {
    :root .navbar-anwar .user-menu-toggle .user-id { display: none !important; }
}

/* ═══ Tasks given to chosen students (2026-11) ═══
   A small «فردي» tag on the task, and a quiet empty cell in the report for
   students it was not given to — no fill, so it never reads as «missing». */
.badge-private {
    display: inline-flex; align-items: center; gap: .25em;
    font-size: var(--text-xs, .75rem); font-weight: 600; line-height: 1.4;
    padding: .1em .55em; border-radius: 999px;
    color: var(--info-text); background: transparent;
    border: 1px solid currentColor;
}
.report-table td.report-na {
    background: transparent !important;
    background-image: repeating-linear-gradient(135deg, transparent 0 6px, var(--border) 6px 7px) !important;
}
.private-pick { max-height: 14rem; overflow-y: auto; border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px); padding: .25rem .5rem; }
.private-pick label { display: flex; align-items: center; gap: .5rem; min-height: 44px; cursor: pointer; }
.private-pick input[type="checkbox"] { width: 1.15rem; height: 1.15rem; flex: none; margin: 0; }
.private-pick-wrap > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center;
    color: var(--link, var(--primary)); font-size: var(--text-sm, .875rem); }
.td-pick { padding: 0 0 .75rem; margin-top: -.25rem; }
