/* ============================================================================
   panels.css - the 2026 parent and pupil panels (parent.html, student.html).
   Sky #175BB0 = structure (header, primary buttons, links, "now"), mint #2EC4A5
   = highlights (active tab, selected child, approvals, progress). Status colours
   are fixed: present green, late amber, absent red.
   Every rule is scoped under .p3 (the shell's root) so the classic stylesheets
   that stay linked never leak in or out.
   ============================================================================ */

.p3 {
    --sky: #175bb0;
    --sky-hi: #1b66c1;
    --sky-ink: #114591;
    --sky-deep: #124488;
    --sky-bg: #e6efff;
    --sky-tint: #eef5ff;
    --mint: #2ec4a5;
    --mint-ink: #0a6f5d;
    --mint-bg: #dcf5ee;
    --mint-pill: #d3f4ec;
    --mint-dark: #053b33;
    --mint-line: #9fdcca;
    --bg: #eef3fa;
    --ink: #12233f;
    --soft: #5b6b85;
    --soft2: #4a5a73;
    --mute: #8090a8;
    --line: #dfe8f4;
    --line2: #eef2f8;
    --field: #f7f9fc;
    --ok: #0b6b4a;
    --ok-bg: #e1f4ea;
    --late: #8a4a00;
    --late-bg: #fff1df;
    --bad: #b0202d;
    --bad-bg: #fde6e8;
    --sh-card: 0 10px 24px rgba(16, 42, 92, 0.08);
    --sh-lift: 0 12px 28px rgba(16, 42, 92, 0.10);
    --font: "Rubik", "Assistant", system-ui, -apple-system, "Segoe UI", sans-serif;

    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.45;
    font-variant-numeric: tabular-nums;
    text-align: start;
    color-scheme: light;
}
/* right-to-left unless the page is translated into a left-to-right language (js/translate.js sets
   <html dir="ltr"> for English) - an unconditional direction here held the English panels right-to-left */
:root:not([dir="ltr"]) .p3 { direction: rtl; }

.p3 *,
.p3 *::before,
.p3 *::after { box-sizing: border-box; }

.p3 a { color: inherit; text-decoration: none; }
.p3 a:hover, .p3 a:focus { color: inherit; text-decoration: none; }
.p3 button { font-family: inherit; cursor: pointer; }
.p3 h1, .p3 h2, .p3 h3 { font-family: var(--font); color: inherit; }
.p3 .p3-ico { flex-shrink: 0; display: block; }
.p3 :focus-visible { outline: 3px solid #f5b400; outline-offset: 2px; }
.p3 .p3-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- header -- */

.p3-head {
    background-color: var(--sky);
    color: #fff;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 56px;
}
.p3-head-in { max-width: 1180px; margin: 0 auto; }
.p3-head-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.p3-brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.p3-brand-name {
    /* the פדגוגי logo in place of the word (Roi 21/10), the same white-logo mask as the staff header and the site's
       .pdx-logo; the word stays in the page for screen readers */
    display: block; width: 80px; height: 30px; font-size: 0; line-height: 0; color: transparent; background: #fff; flex-shrink: 0;
    -webkit-mask: url(../images/logo-wb3.png) center / contain no-repeat; mask: url(../images/logo-wb3.png) center / contain no-repeat;
}
.p3-role {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
    border-radius: 999px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.38);
    color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.p3-head-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.p3-hbtn {
    position: relative; width: 44px; height: 44px; flex-shrink: 0; border-radius: 13px;
    background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.3); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.p3-hbtn:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.p3-hbtn .p3-dot {
    position: absolute; top: -5px; inset-inline-end: -5px; min-width: 19px; height: 19px; padding: 0 4px;
    border-radius: 999px; background: #fff; color: var(--bad); font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.p3-avatar {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 13px; background: #fff; border: 1px solid #fff;
    color: var(--sky-ink); font-weight: 700; font-size: 14px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.p3-who { display: none; line-height: 1.25; }
.p3-who b { display: block; font-size: 14px; font-weight: 700; }
.p3-who span { display: block; font-size: 12px; color: rgba(255, 255, 255, 0.88); }

.p3-hello { font-size: 23px; font-weight: 800; margin-top: 16px; line-height: 1.25; }
.p3-date { font-size: 13px; color: rgba(255, 255, 255, 0.9); margin-top: 2px; }
.p3-hello-row { display: block; }

/* inner page: back + title + child pill */
.p3-back {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 13px; background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; display: inline-flex; align-items: center;
    justify-content: center; padding: 0;
}
.p3-title { min-width: 0; }
.p3-title h1 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p3-title div { font-size: 12px; color: rgba(255, 255, 255, 0.9); margin-top: 2px; }

/* child switcher - tabs on the home, a pill + sheet on inner pages */
.p3-kids { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.p3-kids::-webkit-scrollbar { display: none; }
.p3-kid {
    flex: 1 0 140px; display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 14px;
    background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.32); color: #fff; text-align: start;
}
.p3-kid[aria-selected="true"] { background: #fff; border-color: #fff; color: var(--ink); box-shadow: 0 6px 16px rgba(8, 36, 84, 0.18); }
.p3-kid-av {
    width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.2);
    font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.p3-kid[aria-selected="true"] .p3-kid-av { background: var(--mint-pill); color: var(--mint-ink); }
.p3-kid-tx { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; min-width: 0; }
.p3-kid-tx b { font-size: 14px; font-weight: 700; white-space: nowrap; }
.p3-kid-tx span { font-size: 11px; color: rgba(255, 255, 255, 0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.p3-kid[aria-selected="true"] .p3-kid-tx span { color: var(--soft); }

.p3-kidpill {
    margin-inline-start: auto; flex-shrink: 0; display: flex; align-items: center; gap: 8px; height: 40px;
    padding-inline: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.3); color: #fff;
}
.p3-kidpill .p3-kid-av { width: 28px; height: 28px; border-radius: 9px; background: var(--mint-pill); color: var(--mint-ink); font-size: 13px; }
.p3-kidpill b { font-size: 14px; font-weight: 600; }

/* segmented tabs inside the header */
.p3-seg {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin-top: 16px;
    padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25);
}
.p3-seg button {
    height: 38px; border-radius: 10px; background: transparent; border: 0; color: #fff; font-size: 14px; font-weight: 600;
    padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.p3-seg button[aria-selected="true"] { background: #fff; color: var(--sky-ink); font-weight: 700; }

/* top nav (desktop only) */
.p3-topnav { display: none; gap: 4px; }
.p3-topnav a {
    display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 12px;
    color: #fff; font-size: 15px; font-weight: 500;
}
.p3-topnav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.p3-topnav a[aria-current="page"] { background: #fff; color: var(--sky-ink); font-weight: 700; }
.p3-topnav .p3-count { background: #fff; color: var(--sky-ink); }
.p3-topnav a[aria-current="page"] .p3-count { background: var(--sky); color: #fff; }

/* ------------------------------------------------------------------ main -- */

.p3-main {
    max-width: 1180px; margin: -40px auto 0; padding: 0 16px calc(104px + env(safe-area-inset-bottom, 0px));
    display: flex; flex-direction: column; gap: 14px; position: relative;
}

.p3-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.p3-card.lift { box-shadow: var(--sh-card); }
.p3-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.p3-card-h h2 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; }
.p3-card-h .p3-aside { font-size: 12px; color: var(--soft); }
.p3-group-t { font-size: 13px; font-weight: 600; color: var(--sky-ink); margin: 2px 0 4px; }

.p3-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.p3-row:last-child { border-bottom: 0; }
.p3-row.top { align-items: flex-start; }
.p3-row-tx { flex: 1; min-width: 0; }
.p3-row-tx b { display: block; font-size: 15px; font-weight: 700; }
.p3-row-tx span, .p3-row-tx small { display: block; font-size: 12px; color: var(--soft); }
.p3-row-tx p { margin: 1px 0 0; font-size: 14px; }
.p3-chev { color: var(--mute); }

.p3-ibox {
    width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; display: flex; align-items: center; justify-content: center;
    background: var(--sky-bg); color: var(--sky-ink);
}
.p3-ibox.mint { background: var(--mint-bg); color: var(--mint-ink); }
.p3-ibox.bad { background: var(--bad-bg); color: var(--bad); }
.p3-ibox.late { background: var(--late-bg); color: var(--late); }
.p3-ibox.ok { background: var(--ok-bg); color: var(--ok); }

.p3-num {
    width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--line);
    font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.p3-num.now { background: var(--sky); border-color: var(--sky); color: #fff; }

.p3-chip {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
    padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: #f1f4f9; color: var(--soft2);
}
.p3-chip.ok { background: var(--ok-bg); color: var(--ok); }
.p3-chip.late { background: var(--late-bg); color: var(--late); }
.p3-chip.bad { background: var(--bad-bg); color: var(--bad); }
.p3-chip.now { background: var(--sky-bg); color: var(--sky-ink); font-weight: 700; }
.p3-chip.mint { background: var(--mint-bg); color: var(--mint-ink); }
.p3-chip.sky { background: var(--sky); color: #fff; font-weight: 700; }

.p3-count {
    min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--sky); color: #fff;
    font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.p3-count.mint { background: var(--mint); color: var(--mint-dark); }

.p3-score {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 13px; font-size: 17px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; background: var(--sky-bg); color: var(--sky-ink);
}
.p3-score.ok { background: var(--ok-bg); color: var(--ok); }
.p3-score.late { background: var(--late-bg); color: var(--late); }
.p3-score.bad { background: var(--bad-bg); color: var(--bad); }
.p3-score.big { width: 58px; height: 58px; font-size: 22px; }

.p3-quote { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--field); font-size: 14px; line-height: 1.45; }
.p3-note { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--mint-bg); color: var(--mint-ink); font-size: 13px; font-weight: 600; }
.p3-empty { padding: 22px 8px; text-align: center; color: var(--soft); font-size: 14px; }
.p3-empty .p3-ico { margin: 0 auto 8px; color: var(--mute); }

.p3-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 16px;
    border-radius: 14px; border: 1px solid transparent; font-size: 15px; font-weight: 700; background: var(--sky); color: #fff;
}
.p3-btn:hover { background: var(--sky-deep); color: #fff; }
.p3-btn.mint { background: var(--mint); color: var(--mint-dark); }
.p3-btn.mint:hover { background: #27b096; color: var(--mint-dark); }
.p3-btn.ghost { background: #fff; border-color: #c9d6e8; color: #2a3a55; font-weight: 600; }
.p3-btn.ghost:hover { background: var(--field); color: #2a3a55; }
.p3-btn.soft { background: var(--mint-bg); border-color: var(--mint-line); color: var(--mint-ink); }
.p3-btn.block { width: 100%; }
.p3-btn[disabled] { opacity: .55; cursor: default; }
.p3-link { color: var(--sky-ink); font-weight: 600; font-size: 13px; }
.p3-link:hover { color: var(--sky-deep); text-decoration: underline; }

/* attention list on the home */
.p3-attn { padding: 4px 12px; box-shadow: var(--sh-lift); }
.p3-attn .p3-row b { font-size: 14px; }

/* the attention list arrives once, after the home has its answers: it grows in instead of jumping */
.p3-attn.p3-in { animation: p3-in .35s ease-out both; transform-origin: top; }
@keyframes p3-in { from { opacity: 0; transform: translateY(-6px) scaleY(.96); } to { opacity: 1; transform: none; } }
.p3-tile .p3-count { animation: p3-pop .25s ease-out both; }
@keyframes p3-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* the home tiles */
.p3-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.p3-tile {
    position: relative; min-height: 120px; border-radius: 20px; background: #fff; border: 1px solid var(--line);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px;
    text-align: center; transition: transform .12s ease, box-shadow .12s ease;
}
.p3-tile:hover { box-shadow: var(--sh-card); transform: translateY(-1px); }
.p3-tile .p3-tile-ic {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    background: var(--sky-bg); color: var(--sky-ink);
}
.p3-tile.mint .p3-tile-ic { background: var(--mint-bg); color: var(--mint-ink); }
.p3-tile-tx { min-width: 0; }
.p3-tile-tx b { display: block; font-size: 14px; font-weight: 700; line-height: 1.15; }
.p3-tile-tx span { display: block; font-size: 11px; color: var(--soft); margin-top: 4px; }
.p3-tile .p3-count { position: absolute; top: 10px; inset-inline-end: 10px; }
.p3-tile .p3-chev { display: none; }

/* bottom tab bar (phone) */
.p3-tabbar {
    position: fixed; bottom: 0; inset-inline: 0; z-index: 50; min-height: 78px;
    background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--line);
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 6px 6px calc(10px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 24px rgba(16, 42, 92, 0.06);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.p3-tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--soft2); font-size: 11px; min-width: 0; }
.p3-tabbar a > span:first-child { position: relative; height: 30px; display: flex; align-items: center; justify-content: center; }
.p3-tabbar a[aria-current="page"] { color: var(--mint-ink); font-weight: 700; }
.p3-tabbar a[aria-current="page"] > span:first-child { width: 48px; border-radius: 999px; background: var(--mint-pill); }
.p3-tabbar .p3-count { position: absolute; top: 0; inset-inline-end: -10px; min-width: 17px; height: 17px; font-size: 10px; }
.p3-tabbar a[aria-current="page"] .p3-count { top: -4px; inset-inline-end: 0; }

/* account sheet behind the avatar */
.p3-scrim {
    position: fixed; inset: 0; z-index: 90; background: rgba(10, 25, 50, 0.3);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: p3-fade-in .2s ease-out;
}
.p3-sheet {
    position: fixed; z-index: 91; inset-inline: 0; bottom: 0; max-height: 86vh; overflow: auto;
    background: #fff; border-radius: 22px 22px 0 0; padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -18px 48px rgba(10, 25, 50, 0.22); animation: p3-pop-in .24s cubic-bezier(.2, .8, .2, 1);
}
.p3-sheet-grip { width: 42px; height: 5px; border-radius: 99px; background: #d5deea; margin: 0 auto 12px; }
.p3-sheet-h { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; border-bottom: 1px solid var(--line2); margin-bottom: 4px; }
.p3-sheet-h .p3-avatar { background: var(--sky-bg); border-color: var(--sky-bg); }
.p3-sheet a, .p3-sheet button.p3-mi {
    width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 4px; border: 0; background: none;
    border-bottom: 1px solid var(--line2); font-size: 15px; color: var(--ink); text-align: start;
}
.p3-sheet a:last-child, .p3-sheet button.p3-mi:last-child { border-bottom: 0; }
.p3-sheet .p3-mi .p3-ibox { width: 34px; height: 34px; }
.p3-sheet .p3-mi.out { color: var(--bad); }
.p3-sheet .p3-mi.out .p3-ibox { background: var(--bad-bg); color: var(--bad); }
.p3-sheet .p3-mi small { display: block; font-size: 12px; color: var(--soft); }

/* checkboxes (tasks, homework) */
.p3-check {
    width: 26px; height: 26px; flex-shrink: 0; border-radius: 9px; border: 2px solid #c3d0e2; background: #fff;
    display: inline-flex; align-items: center; justify-content: center; color: transparent; padding: 0;
}
.p3-check.on { background: var(--mint); border-color: var(--mint); color: var(--mint-dark); }
button.p3-check:hover { border-color: var(--mint); }
.p3-check[disabled] { cursor: default; }
/* a plain checkbox / radio (the device settings, the inbox's select, a legacy pane): teacher.rtl.css drew a dark square or
   ring on its ::after, glued to the label - the brand box of the staff screens instead */
:is(.p3, .p3-legacy) input:is([type="checkbox"], [type="radio"]) {
    -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 0; margin-inline-end: 6px; flex-shrink: 0; vertical-align: -5px; cursor: pointer;
    border: 1.5px solid #a9b9cf; border-radius: 6px; background: #fff no-repeat center / 14px 14px; box-shadow: none;
}
:is(.p3, .p3-legacy) input[type="radio"] { border-radius: 50%; }
:is(.p3, .p3-legacy) input:is([type="checkbox"], [type="radio"]):hover { border-color: #175bb0; }
:is(.p3, .p3-legacy) input[type="checkbox"]:checked { background-color: #175bb0; border-color: #175bb0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E"); }
:is(.p3, .p3-legacy) input[type="radio"]:checked { background-color: #175bb0; border-color: #175bb0; box-shadow: inset 0 0 0 4px #fff; }
:is(.p3, .p3-legacy) input:is([type="checkbox"], [type="radio"]):focus-visible { outline: 3px solid #f5b400; outline-offset: 2px; }
:is(.p3, .p3-legacy) input:is([type="checkbox"], [type="radio"]):disabled { background-color: #eef2f8; border-color: #d5dfec; cursor: not-allowed; }
:is(.p3, .p3-legacy) input:is([type="checkbox"], [type="radio"]):checked:disabled { background-color: #9fb9dc; border-color: #9fb9dc; }
:is(.p3, .p3-legacy) input:is([type="checkbox"], [type="radio"])::before, :is(.p3, .p3-legacy) input:is([type="checkbox"], [type="radio"])::after { content: none !important; display: none !important; }
:is(.p3, .p3-legacy) :is(td, th) > input:is([type="checkbox"], [type="radio"]):only-child { margin-inline-end: 0; }

.p3-progress { height: 10px; border-radius: 99px; background: var(--line2); overflow: hidden; }
.p3-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--mint); }

/* the legacy page content inside the new frame */
.p3-legacy { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; overflow-x: auto; }
.p3-legacy .page-title { display: none; }


/* ------------------------------------------------------------ page parts -- */

body.p3-on { padding-top: 0 !important; padding-bottom: 0 !important; background: #eef3fa !important; }
.p3-on-desk { display: none !important; }
.p3-page { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.p3-cols, .p3-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.p3-narrow { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 760px; margin: 0 auto; }
.p3-iconbtn {
    width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--sky-ink);
    display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.p3-iconbtn[disabled] { opacity: .4; cursor: default; }
.p3-group-t.late { color: var(--late); }
.p3-rowbtn { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line2); text-align: start; color: inherit; font: inherit; padding-inline: 0; }
.p3-rowbtn:hover { background: var(--field); }
.p3-chev.up .p3-ico { transform: rotate(180deg); }
.p3-sublist { padding: 2px 0 6px; padding-inline-start: 12px; border-inline-start: 3px solid var(--sky-bg); margin: 4px 0 8px; }
.p3-small { font-size: 13px !important; color: var(--soft2); margin-top: 4px !important; }
.p3-w { color: var(--soft); font-weight: 400; }
.p3-break { display: flex; align-items: center; gap: 10px; color: var(--soft); font-size: 12px; padding: 6px 0; }
.p3-break > span { flex: 1; height: 1px; background: repeating-linear-gradient(90deg, #d5deea 0 6px, transparent 6px 12px); }
.p3-running { background: var(--sky-tint); border: 2px solid var(--sky); border-radius: 14px; padding: 10px; margin: 4px 0; }
.p3-now { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.p3-now small { font-size: 11px; color: var(--sky-ink); }
.p3-row-tx > div + div { margin-top: 6px; }
.p3-rich { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.p3-rich img { max-width: 100%; height: auto; }

/* month calendar */
.p3-cal { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.p3-cal-h { text-align: center; font-size: 12px; font-weight: 600; color: var(--soft); padding-bottom: 2px; }
.p3-cal-d {
    min-height: 44px; border-radius: 12px; background: var(--field); display: flex; flex-direction: column; align-items: center;
    justify-content: center; font-size: 14px; font-weight: 600; line-height: 1.1;
}
.p3-cal-d small { font-size: 10px; font-weight: 600; margin-top: 2px; }
.p3-cal-d.off { background: transparent; }
.p3-cal-d.future { color: #a5b2c6; background: #fafbfd; }
.p3-cal-d.late { background: var(--late-bg); color: var(--late); }
.p3-cal-d.bad { background: var(--bad-bg); color: var(--bad); }
.p3-cal-d.today { box-shadow: inset 0 0 0 2px var(--sky); color: var(--sky-ink); }
.p3-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--soft2); }
.p3-legend span { display: inline-flex; align-items: center; gap: 6px; }
.p3-legend i { width: 10px; height: 10px; border-radius: 4px; background: var(--field); border: 1px solid var(--line); }
.p3-legend i.late { background: var(--late-bg); border-color: #f2c98a; }
.p3-legend i.bad { background: var(--bad-bg); border-color: #f0a8ae; }

@media (min-width: 900px) {
    .p3-on-phone { display: none !important; }
    .p3-on-desk { display: flex !important; }
    .p3-page-h { align-items: center; gap: 14px; margin-top: 22px; }
    .p3-page-h .p3-title h1 { font-size: 30px; }
    .p3-page-h .p3-title div { font-size: 14px; }
    .p3-seg { max-width: 560px; }
    .p3-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
    .p3-col, .p3-page, .p3-narrow { gap: 20px; }
}


/* ------------------------------------------------------------- the inbox -- */
.p3-inbox { display: flex; flex-direction: column; gap: 12px; }
.p3-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.p3-chips::-webkit-scrollbar { display: none; }
.p3-fchip {
    flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
    color: var(--soft2); font-size: 14px; font-weight: 600;
}
.p3-fchip[aria-selected="true"] { background: var(--sky); border-color: var(--sky); color: #fff; }
.p3-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--sky-bg); font-size: 14px; }
.p3-selbar .p3-link { background: none; border: 0; padding: 0; }
.p3-msglist { padding: 4px 12px; }
.p3-msg { cursor: pointer; }
.p3-msg:hover { background: var(--field); }
.p3-msg.unread .p3-row-tx b { font-weight: 800; }
.p3-msg-check { flex-shrink: 0; display: flex; align-items: center; }
.p3-msg-check .checkbox, .p3-msg-check label { margin: 0 !important; padding: 0 !important; min-height: 0; }
.p3-unread { width: 10px; height: 10px; border-radius: 99px; background: var(--sky); flex-shrink: 0; }
.p3-star { width: 36px; height: 36px; flex-shrink: 0; border: 0; background: none; color: #c3d0e2; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.p3-star.on { color: #f5a400; }
.p3-star.on .p3-ico { fill: #f5b400; }
.p3-fab { position: fixed; z-index: 45; inset-inline-start: 16px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 10px 24px rgba(10, 111, 93, 0.28); }
.p3-bare > .msg-content, .p3-bare > div > .msg-content { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; }



/* the pupil's now / next strip in the header */
.p3-nowstrip {
    margin-top: 14px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.3); display: flex; align-items: center; gap: 12px; color: #fff;
}
.p3-nowstrip-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--mint); color: var(--mint-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.p3-nowstrip .p3-row-tx b { font-size: 15px; }
.p3-nowstrip .p3-row-tx span { color: rgba(255, 255, 255, 0.9); font-size: 13px; }

/* ------------------------------------------------- events and approvals -- */
.p3-rangebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--soft2); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px; box-shadow: var(--sh-card); }
.p3-rangebar .p3-fchip { margin-inline-start: auto; height: 34px; font-size: 13px; }
.p3-approve { border: 2px solid var(--mint); box-shadow: 0 12px 28px rgba(10, 111, 93, 0.14); }
.p3-ev-title { margin: 4px 0 10px; font-size: 19px; font-weight: 800; }
.p3-infos { display: flex; flex-direction: column; gap: 8px; }
.p3-info { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.p3-info-ic { color: var(--sky-ink); display: flex; }
.p3-datebox {
    width: 48px; height: 52px; flex-shrink: 0; border-radius: 13px; background: var(--sky-bg); color: var(--sky-ink);
    display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
}
.p3-datebox b { font-size: 18px; font-weight: 800; }
.p3-datebox span { font-size: 11px; font-weight: 600; }
.p3-datebox.mint { background: var(--mint-bg); color: var(--mint-ink); }

/* ------------------------------------------ old pages inside the new frame -- */
.p3-legacy, .p3-bare { font-size: 15px; }
.p3-legacy .h5, .p3-bare .h5 { font-family: var(--font); }
.p3-legacy .h5.center, .p3-legacy .h5.orange, .p3-bare .h5.orange { color: var(--soft) !important; font-size: 14px; font-weight: 500; padding: 18px 0; text-align: center; }
.p3-legacy .btn, .p3-bare .btn {
    font-family: var(--font); border-radius: 12px !important; border: 1px solid #c9d6e8; background: #fff; color: #2a3a55;
    min-height: 38px; padding: 7px 14px; font-weight: 600; box-shadow: none !important;
}
.p3-legacy .btn-xs, .p3-bare .btn-xs { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.p3-legacy .btn-primary, .p3-bare .btn-primary, .p3-legacy .btn-success, .p3-bare .btn-success { background: var(--sky) !important; border-color: var(--sky) !important; color: #fff !important; }
.p3-legacy .btn:hover, .p3-bare .btn:hover { background: var(--field); }
.p3-legacy .btn-primary:hover, .p3-bare .btn-primary:hover { background: var(--sky-deep) !important; }
.p3-legacy .bg-orange, .p3-bare .bg-orange { background: var(--mint) !important; border-color: var(--mint) !important; color: var(--mint-dark) !important; }
.p3-legacy .form-control, .p3-bare .form-control, .p3-legacy select, .p3-legacy textarea, .p3-bare textarea {
    font-family: var(--font); border-radius: 12px; border: 1px solid #c9d6e8; box-shadow: none; min-height: 42px; font-size: 15px; background: #fff;
}
.p3-legacy textarea.form-control, .p3-bare textarea.form-control { min-height: 110px; }
.p3-legacy .form-control:focus, .p3-bare .form-control:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(23, 91, 176, 0.15); }
.p3-legacy label, .p3-bare label { font-weight: 600; color: var(--ink); }
.p3-legacy .lessons-nav, .p3-bare .lessons-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid var(--line2); }
.p3-legacy ul.remarks-list, .p3-bare ul.remarks-list { list-style: none; padding: 0; margin: 0; }
.p3-legacy ul.remarks-list > li, .p3-bare ul.remarks-list > li { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 0 0 10px; background: #fff; }
.p3-legacy .dayofweek, .p3-bare .dayofweek { display: block; font-size: 13px; font-weight: 600; color: var(--sky-ink); margin-bottom: 4px; }
.p3-legacy .remark, .p3-bare .remark { font-size: 15px; padding: 2px 0; }
.p3-legacy .remark-subject, .p3-bare .remark-subject { display: inline-block; font-size: 12px; font-weight: 600; color: var(--soft2); background: #f1f4f9; border-radius: 999px; padding: 2px 9px; margin-top: 6px; }
.p3-legacy .label, .p3-bare .label { border-radius: 999px; font-family: var(--font); font-weight: 600; padding: 4px 10px; }
.p3-legacy .bg-green, .p3-bare .bg-green, .p3-legacy .label.day5 { background: var(--ok-bg) !important; color: var(--ok) !important; }
.p3-legacy .bg-red, .p3-bare .bg-red { background: var(--bad-bg) !important; color: var(--bad) !important; }
.p3-legacy .orange { color: var(--late) !important; }
.p3-legacy table.table, .p3-bare table.table { background: #fff; border-radius: 14px; overflow: hidden; }
.p3-legacy .table > tbody > tr > td, .p3-bare .table > tbody > tr > td, .p3-legacy .table > thead > tr > th { border-color: var(--line2); padding: 10px 8px; vertical-align: middle; }
.p3-legacy .tabs, .p3-bare .tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.p3-legacy .alert, .p3-bare .alert { border-radius: 14px; }
.p3-legacy .modal-content, .p3 .modal-content { border-radius: 18px; border: 0; box-shadow: 0 24px 64px rgba(10, 25, 50, 0.28); font-family: var(--font); }
.p3 .modal-header { border-bottom: 1px solid var(--line2); }
.p3 .modal-title { font-weight: 700; color: var(--ink); }
/* every popup: the page stays visible behind a light tint and a blur, and the box fades in */
:is(.p3, .p3-legacy) .modal-backdrop, :is(.p3, .p3-legacy) .modal-backdrop.in {
    background: rgba(10, 25, 50, 0.3); opacity: 1; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: p3-fade-in .2s ease-out;
}
:is(.p3, .p3-legacy) .modal-dialog { animation: p3-pop-in .24s cubic-bezier(.2, .8, .2, 1); }
/* the popups' inside (components/Modal.js: a lesson, a task, the parents' outing approval): room around the text, a round
   close target beside the title, rounded fields and choice boxes like the rest of the app */
:is(.p3, .p3-legacy) .modal-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
:is(.p3, .p3-legacy) .modal-header::before, :is(.p3, .p3-legacy) .modal-header::after { content: none; display: none; }
:is(.p3, .p3-legacy) .modal-header > .modal-title { order: 1; flex: 1; min-width: 0; margin: 0; font-size: 18px; line-height: 1.35; }
:is(.p3, .p3-legacy) .modal-header > .close { order: 2; float: none; flex-shrink: 0; margin: 0; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; opacity: .65; }
:is(.p3, .p3-legacy) .modal-header > .close:hover, :is(.p3, .p3-legacy) .modal-header > .close:focus { opacity: 1; background: var(--line2); }
:is(.p3, .p3-legacy) .modal-body { padding: 18px 20px; line-height: 1.6; color: var(--ink); }
:is(.p3, .p3-legacy) .modal-body label:not([class]):not(:where(.checkboxes *)) { font-size: 13px; font-weight: 600; color: var(--soft2); }
:is(.p3, .p3-legacy) .modal-body .checkboxes > label { font-size: 14.5px; font-weight: 500; color: var(--ink); }
:is(.p3, .p3-legacy) .modal-body .form-control { border: 1px solid #c9d6e8; border-radius: 12px; box-shadow: none; font-family: var(--font); }
:is(.p3, .p3-legacy) .modal-body .form-control:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(23, 91, 176, .16); }
:is(.p3, .p3-legacy) .modal-body textarea.form-control { width: 100%; min-height: 96px; padding: 10px 12px; margin-top: 6px; resize: vertical; }
:is(.p3, .p3-legacy) .modal-body :is(.radioselect, .multiselect) .checkboxes { border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; margin: 8px 0 14px; background: var(--field); }
:is(.p3, .p3-legacy) .modal-body :is(.radioselect, .multiselect) .checkboxes > label { padding: 6px 0; }
:is(.p3, .p3-legacy) .modal-footer { padding: 14px 20px; border-top: 1px solid var(--line2); }
@media (max-width: 600px) {
    :is(.p3, .p3-legacy) .modal-body { padding: 16px; }
}
@keyframes p3-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes p3-pop-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .p3-scrim, .p3-sheet, :is(.p3, .p3-legacy) :is(.modal-backdrop, .modal-dialog) { animation: none; }
}

/* --------------------------------------------------------------- desktop -- */

@media (min-width: 900px) {
    .p3-head { padding: 0 32px 76px; }
    .p3-head-row { min-height: 76px; gap: 28px; }
    .p3-brand-name { width: 92px; height: 34px; }
    .p3-role { height: 34px; font-size: 14px; }
    .p3-topnav { display: flex; }
    .p3-who { display: block; }
    .p3-hello-row { display: flex; align-items: center; gap: 24px; margin-top: 22px; }
    .p3-hello { font-size: 32px; margin-top: 0; }
    .p3-date { font-size: 15px; margin-top: 4px; }
    .p3-hello-row .p3-kids { margin: 0 0 0 0; margin-inline-start: auto; }
    .p3-kid { flex: 0 0 210px; padding: 9px 10px; border-radius: 16px; }
    .p3-kid-av { width: 38px; height: 38px; border-radius: 12px; font-size: 16px; }
    .p3-kid-tx b { font-size: 15px; }
    .p3-kid-tx span { font-size: 12px; }
    .p3-page-head { padding-top: 22px; }

    .p3-main { margin-top: -48px; padding: 0 32px 48px; gap: 20px; }
    .p3-tabbar { display: none; }
    .p3-tiles { gap: 16px; }
    .p3-tile { min-height: 96px; flex-direction: row; justify-content: flex-start; gap: 16px; padding: 0 20px; text-align: start; }
    .p3-tile .p3-tile-ic { width: 52px; height: 52px; border-radius: 16px; }
    .p3-tile-tx { flex: 1; }
    .p3-tile-tx b { font-size: 17px; }
    .p3-tile-tx span { font-size: 13px; margin-top: 3px; }
    .p3-tile .p3-count { position: static; min-width: 24px; height: 24px; font-size: 12px; }
    .p3-tile .p3-chev { display: block; }
    .p3-attn { display: flex; padding: 0; }
    .p3-attn .p3-row { flex: 1; min-width: 0; padding: 16px 18px; border-bottom: 0; }
    .p3-attn .p3-row + .p3-row { border-inline-start: 1px solid #e6edf6; }
    .p3-attn .p3-row b { font-size: 16px; }
    .p3-attn .p3-ibox { width: 44px; height: 44px; border-radius: 13px; }
    .p3-sheet { inset-inline: auto 24px; inset-inline-start: auto; inset-inline-end: 24px; top: 84px; bottom: auto; width: 360px; border-radius: 18px; }
    .p3-sheet-grip { display: none; }
}

@media (min-width: 900px) {
    .p3-fab { position: static; align-self: flex-start; }
}

@media (max-width: 359px) {
    .p3-tiles { gap: 8px; }
    .p3-tile-tx b { font-size: 13px; }
    .p3-role { display: none; }
}

@media print {
    .p3-head, .p3-tabbar, .p3-topnav { display: none !important; }
    .p3-main { margin: 0; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .p3 * { transition: none !important; animation: none !important; }
}


/* ============================================ pages review 19/10 (parent) == */

/* ------------------------------------- lessons: the day and the week board -- */
.p3-daynav { gap: 8px; padding-bottom: 12px; margin-bottom: 2px; border-bottom: 1px solid var(--line2); }
.p3-daynav .p3-iconbtn { width: 44px; height: 44px; border-radius: 13px; }
.p3-daynav .p3-iconbtn:hover { background: var(--field); }
.p3-daynav-t { flex: 1; min-width: 0; text-align: center; }
.p3 .p3-daynav-t h2 { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.3; }
.p3-daynav-t > span { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; color: var(--soft); }
.p3-lrow { padding: 12px 0; }
.p3-lrow > .p3-num { margin-top: 4px; }
.p3-lrow-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.p3-lesson { margin-inline: -8px; padding: 6px 8px; border-radius: 12px; cursor: pointer; }
.p3-lesson:hover { background: var(--field); }
.p3-lesson-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.p3-lesson-h b { font-size: 15px; font-weight: 700; }
.p3-lesson-meta { font-size: 13px; color: var(--soft); }
.p3-lesson-meta::before { content: "·"; margin-inline-end: 6px; }
.p3-lesson-topic { margin-top: 2px; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.p3-lesson-descr { margin-top: 2px; font-size: 13px; color: var(--soft2); white-space: pre-line; overflow-wrap: anywhere; }
.p3-hw {
    display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; padding: 7px 10px; border-radius: 10px;
    background: var(--mint-bg); color: var(--mint-ink); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere;
}
.p3-hw .p3-ico { margin-top: 1px; }
.p3-hw b { font-weight: 700; }
.p3-achips { display: flex; flex-wrap: wrap; gap: 6px; }
.p3 button.p3-achip {
    border: 0; min-height: 32px; padding: 4px 11px; font-family: inherit; font-size: 13px; white-space: normal;
    text-align: start; line-height: 1.3; cursor: pointer;
}
.p3 button.p3-achip:hover { box-shadow: inset 0 0 0 1px currentColor; }
.p3-card-foot {
    display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 10px; padding-top: 12px;
    border-top: 1px solid var(--line2);
}
.p3-card-foot .p3-btn { height: 44px; font-size: 14px; }

/* the week: phones get the days one under the other, desktops a board (below) */
.p3-wk-scroll { display: none; }
.p3-wk-day + .p3-wk-day { border-top: 1px solid var(--line); }
.p3-wk-dayt { display: flex; align-items: center; gap: 8px; padding: 12px 0 2px; font-size: 13px; font-weight: 700; color: var(--sky-ink); }
.p3-wk-none { padding: 4px 0 12px; font-size: 13px; color: var(--mute); }

/* the board (shown on desktops and in print) */
.p3-wk-scroll { overflow-x: auto; margin-top: 12px; border: 1px solid var(--line2); border-radius: 14px; }
.p3 table.p3-wk { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; background: #fff; margin: 0; }
.p3 .p3-wk th, .p3 .p3-wk td { padding: 10px; vertical-align: top; text-align: start; border-bottom: 1px solid var(--line2); }
.p3 .p3-wk tbody tr:last-child > * { border-bottom: 0; }
.p3 .p3-wk tr > * + * { border-inline-start: 1px solid var(--line2); }
.p3 .p3-wk thead th { background: #f7f9fc; border-bottom-color: var(--line); font-size: 13px; font-weight: 600; color: var(--soft2); }
.p3-wk thead th b { display: block; font-size: 14px; font-weight: 700; color: var(--ink); }
.p3-wk thead th span { font-size: 12px; color: var(--soft); }
.p3 .p3-wk thead th.today { background: var(--sky-bg); }
.p3-wk thead th.today b, .p3-wk thead th.today span { color: var(--sky-ink); }
.p3 .p3-wk td.today { background: #f7faff; }
.p3 .p3-wk .p3-wk-hc { width: 64px; text-align: center; }
.p3-wk-hc .p3-num { margin: 0 auto; }
.p3-wk-hc small { display: block; margin-top: 4px; font-size: 10px; font-weight: 500; color: var(--soft); white-space: nowrap; }
.p3-wk .p3-lesson { margin: 0 -4px; padding: 4px; }
.p3-wk .p3-lesson + .p3-lesson, .p3-wk .p3-achips { margin-top: 6px; }
.p3-wk .p3-lesson-h b { font-size: 14px; }
.p3-wk .p3-lesson-topic { margin-top: 2px; font-size: 13px; }
.p3-wk .p3-lesson-descr { font-size: 12px; }
.p3-wk .p3-hw { margin-top: 6px; padding: 5px 8px; font-size: 12px; }
.p3 .p3-wk button.p3-achip { font-size: 12px; min-height: 28px; padding: 3px 9px; }

@media (min-width: 900px) {
    .p3 .p3-daynav-t h2 { font-size: 19px; }
    .p3-lessons { padding: 16px 18px; }
    .p3-wk-days { display: none; }
    .p3-wk-scroll { display: block; }
}

@media print {
    .p3-card.lift { box-shadow: none; }
    .p3-wk-scroll { display: block !important; overflow: visible !important; }
    .p3-wk-days { display: none !important; }
    .p3 table.p3-wk { min-width: 0 !important; }
    .p3-daynav .p3-iconbtn { visibility: hidden; }
}

/* ---------------------------------------------- inbox / sent: one card -- */
.p3 .p3-msglist { padding: 14px; }
.p3-msglist > .p3-chips { margin-bottom: 6px; }
.p3-msglist > .p3-selbar { margin: 4px 0 6px; }
.p3-msglist > .p3-msg:nth-last-child(2) { border-bottom: 0; }
.p3-msglist .p3-fchip { height: 40px; }
.p3-msglist .p3-fchip:not([aria-selected="true"]):hover { background: var(--field); }
.p3-pager > .h5, .p3-pager .pager > .center { display: none !important; }
.p3-pager .pager { margin: 6px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line2); }
.p3 .p3-pager .pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0; padding: 0; }
.p3 .p3-pager .pagination > li > a {
    float: none; margin: 0; display: inline-flex; align-items: center; height: 40px; padding: 0 16px;
    border-radius: 12px !important; border: 1px solid #c9d6e8; background: #fff; color: #2a3a55;
    font-size: 14px; font-weight: 600; line-height: 1; text-decoration: none;
}
.p3 .p3-pager .pagination > li > a:hover { background: var(--field); color: #2a3a55; }
.p3 .p3-pager .pagination > li.active > a, .p3 .p3-pager .pagination > li.active > a:hover {
    background: var(--sky-bg); border-color: var(--sky-bg); color: var(--sky-ink); cursor: default;
}

/* ------------------------------------------------------ write to a teacher -- */
.p3-formcard { padding: 18px; }
.p3-form { display: flex; flex-direction: column; gap: 16px; }
.p3-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.p3 .p3-label { margin: 0; font-size: 13px; font-weight: 600; color: var(--soft2); }
.p3 .p3-form .form-control {
    width: 100%; height: auto; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid #c9d6e8;
    background: #fff; box-shadow: none; font-family: var(--font); font-size: 15px; color: var(--ink);
}
.p3 .p3-form select.form-control { height: 46px; padding-block: 0; }
.p3 .p3-form textarea.form-control { min-height: 150px; line-height: 1.5; resize: vertical; }
.p3 .p3-form .form-control:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(23, 91, 176, 0.15); outline: 0; }
.p3 .p3-form .h6 { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--field); color: var(--soft); font-size: 14px; font-weight: 500; }
.p3-radios { display: grid; gap: 8px; }
.p3 .p3-radio {
    position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; margin: 0; padding: 10px 14px;
    border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); font-weight: 400; cursor: pointer;
}
.p3 .p3-radio:hover { border-color: #c9d6e8; background: var(--field); }
.p3 .p3-radio.on { border: 2px solid var(--sky); padding: 9px 13px; background: var(--sky-tint); }
.p3 .p3-radio input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.p3-radio-dot {
    width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 2px solid #b8c6da; background: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.p3-radio.on .p3-radio-dot { border-color: var(--sky); }
.p3-radio.on .p3-radio-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sky); }
.p3-radio input:focus-visible + .p3-radio-dot { outline: 3px solid #f5b400; outline-offset: 2px; }
.p3-radio-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.p3-radio-tx b { font-size: 14px; font-weight: 600; }
.p3-radio.on .p3-radio-tx b { color: var(--sky-ink); font-weight: 700; }
.p3-radio-tx small { font-size: 12px; color: var(--soft); }
.p3-form-actions { display: flex; gap: 10px; padding-top: 4px; }
.p3-form-actions .p3-btn { flex: 1; }

@media (min-width: 900px) {
    .p3-radios { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .p3-form-actions .p3-btn { flex: 0 0 auto; min-width: 150px; }
}

/* ------------------------------------------------------------------ help -- */
.p3 .p3-help { padding: 4px 16px; }
.p3-help-item + .p3-help-item { border-top: 1px solid var(--line2); }
.p3 .p3-help-row {
    width: 100%; min-height: 60px; display: flex; align-items: center; gap: 12px; padding: 10px 0; border: 0;
    background: none; color: var(--ink); font-size: 15px; font-weight: 600; text-align: start;
}
.p3-help-row .p3-ibox { width: 40px; height: 40px; border-radius: 999px; }
.p3-help-t { flex: 1; min-width: 0; }
.p3-help-row:hover .p3-help-t { color: var(--sky-ink); }
.p3-help-item.on .p3-help-row .p3-ibox { background: var(--sky); color: #fff; }
.p3-help-body { padding: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--soft2); }
.p3-help-body ol { margin: 0; padding-inline-start: 20px; }
.p3-help-body ul { margin: 4px 0; padding-inline-start: 18px; }
.p3-help-body li { margin-bottom: 4px; }
.p3-help-body figure { margin: 12px 0 0; }
.p3-help-body img { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.p3-footnote { text-align: center; font-size: 12px; color: var(--mute); }

@media (min-width: 900px) {
    .p3 .p3-help { padding: 6px 18px; }
    .p3-help-body { padding-inline-start: 52px; }
}

/* ---- the logout confirmation inside the account sheet (19/10): window.confirm() is answered "no" by an app WebView
   with no confirm panel, so the sheet asks itself ---- */
.p3-sheet .p3-ask { padding: 14px 2px 6px; text-align: center; }
.p3-sheet .p3-ask > b { display: block; font-size: 18px; font-weight: 800; color: var(--ink); margin-bottom: 16px; }
.p3-ask-row { display: flex; gap: 10px; }
.p3-ask-row .p3-btn { flex: 1; height: 48px; }
.p3-btn.bad { background: var(--bad); color: #fff; }
.p3-btn.bad:hover { background: #8f1824; color: #fff; }
