/* The demo school's screens. Tokens come from brand.css. Motion rules: transform and opacity only, strong curves,
   under 300ms for anything people see often, hover effects only where hover exists, reduced motion respected. */

body.app { background:
  radial-gradient(900px 520px at 92% -6%, var(--glow-a), transparent 62%),
  radial-gradient(1000px 640px at -6% 104%, var(--glow-b), transparent 62%),
  var(--bg); background-attachment: fixed; min-height: 100vh; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 99; border-radius: 8px; }
.sub { color: var(--muted); font-size: .9rem; margin: 3px 0 0; }
.muted { color: var(--muted); } .bad-text { color: var(--bad); } .good-text { color: var(--good); }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---- top bar ---- */
.demo-banner { background: var(--black); color: var(--tan); text-align: center; padding: 7px 14px; font-size: .8rem; letter-spacing: .01em; }
.demo-banner strong { color: var(--orange-300); font-weight: 700; }
.top { display: flex; align-items: center; gap: 16px; max-width: 1360px; margin: 0 auto; padding: 16px 20px 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand small { display: block; font-size: .72rem; line-height: 1.2; }
.roles { display: flex; gap: 4px; flex: 1; min-width: 0; justify-content: center; }
.roles-inner { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; }
.role { border: 0; background: transparent; border-radius: var(--r-pill); padding: 7px 16px 7px 8px; display: flex; align-items: center; gap: 9px; cursor: pointer; text-align: left; white-space: nowrap; color: var(--ink); transition: background-color var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out), transform var(--t-press) var(--ease-out); }
.role:active { transform: scale(.97); }
.role .rn { font-weight: 700; font-size: .85rem; line-height: 1.15; display: block; } .role small { font-size: .7rem; display: block; line-height: 1.15; color: inherit; opacity: .7; }
.role.on { background: var(--primary); color: var(--primary-ink); }
@media (hover: hover) and (pointer: fine) { .role:not(.on):hover { background: var(--soft); } }
.tools { display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-pill); padding: 9px 18px; cursor: pointer; text-decoration: none; color: var(--ink); font-weight: 650; font-size: .9rem; transition: background-color var(--t-hover) var(--ease-out), border-color var(--t-hover) var(--ease-out), transform var(--t-press) var(--ease-out); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .6; cursor: wait; }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--soft); } .btn.primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); } }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 750; }
.btn.dark { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.small { padding: 5px 13px; font-size: .82rem; } .btn.big { padding: 13px 20px; font-size: 1rem; width: 100%; }
.ticker { display: flex; align-items: center; gap: 10px; max-width: 1360px; margin: 0 auto; padding: 4px 24px 10px; font-size: .82rem; color: var(--muted); overflow: hidden; white-space: nowrap; }
.ticker span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; color: var(--ink-soft); }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; }
.ticker.live .pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--orange); animation: ping 2.4s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(2.6); opacity: 0; } }

/* ---- the frame (sidebar + page) ---- */
.frame { display: grid; grid-template-columns: 252px minmax(0, 1fr); max-width: 1360px; margin: 0 auto 56px; padding: 10px; gap: 6px; border-radius: 34px; background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow-3); backdrop-filter: blur(22px) saturate(1.25); -webkit-backdrop-filter: blur(22px) saturate(1.25); }
.frame.no-nav { grid-template-columns: 1fr; } .frame.no-nav .side { display: none; }
.side { padding: 14px 10px; display: flex; flex-direction: column; gap: 14px; }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.side a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .92rem; transition: background-color var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out); }
.side a:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .side a:hover { background: var(--soft); color: var(--ink); } }
.side a.on { background: var(--primary); color: var(--primary-ink); box-shadow: 0 10px 22px -12px rgba(21, 19, 20, .55); }
.side-promo { margin-top: auto; padding: 16px; border-radius: 20px; background: linear-gradient(150deg, var(--black) 0%, var(--black-800) 100%); color: #fff; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(245, 225, 201, .14); }
.side-promo strong { display: block; font-size: .95rem; margin-bottom: 4px; } .side-promo p { font-size: .8rem; color: var(--tan); margin: 0 0 12px; }
.side-promo::after { content: ''; position: absolute; width: 90px; height: 90px; right: -26px; top: -26px; border-radius: 50%; background: radial-gradient(circle at 32% 30%, var(--orange-300), var(--orange) 60%); opacity: .95; }
.nav-note { padding: 8px 12px; font-size: .88rem; color: var(--muted); }
main { min-width: 0; outline: none; background: var(--surface); border-radius: 26px; padding: 30px 32px 40px; border: 1px solid var(--line); }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 22px; flex-wrap: wrap; }
.eyebrow { color: var(--accent-text); font-weight: 700; font-size: .9rem; margin: 0 0 4px; }
h1 { font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.75rem); font-weight: 800; letter-spacing: -.035em; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-block; margin-bottom: 12px; text-decoration: none; font-size: .9rem; font-weight: 600; } .link { font-size: .88rem; font-weight: 650; }

/* ---- layout helpers ---- */
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.desk-top { grid-template-columns: 1.4fr 1fr; }
.stack { display: grid; gap: 14px; align-content: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); margin-bottom: 16px; min-width: 0; }
.grid > .card, .grid > .stack > .card { margin-bottom: 0; }
.card-head { display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px 0; align-items: flex-start; }
.card-head h2 { font-size: 1.02rem; }
.card-body { padding: 16px 20px 20px; }
.kpi { display: grid; gap: 2px; padding: 18px 20px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: var(--ink); align-content: start; position: relative; transition: border-color var(--t-hover) var(--ease-out), transform var(--t-press) var(--ease-out); }
a.kpi:active { transform: scale(.985); }
@media (hover: hover) and (pointer: fine) { a.kpi:hover { border-color: var(--line-strong); } }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kpi-label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.kpi-chip { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--soft-ink); }
.kpi-value { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.kpi-sub { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.kpi.good .kpi-value { color: var(--good); } .kpi.bad .kpi-value { color: var(--bad); } .kpi.warn .kpi-value { color: var(--warn); }
.kpi.fill-ink { background: linear-gradient(155deg, var(--black) 0%, var(--black-800) 100%); color: #fff; border-color: transparent; }
.kpi.fill-ink .kpi-label, .kpi.fill-ink .kpi-sub { color: var(--tan); } .kpi.fill-ink .kpi-chip { background: rgba(255, 255, 255, .14); color: #fff; } .kpi.fill-ink .kpi-value { color: #fff; }
.kpi.fill-orange { background: linear-gradient(155deg, var(--orange-light) 0%, var(--orange) 100%); color: var(--black); border-color: transparent; }
.kpi.fill-orange .kpi-label, .kpi.fill-orange .kpi-sub { color: var(--black); } .kpi.fill-orange .kpi-chip { background: rgba(255, 255, 255, .3); color: var(--black); } .kpi.fill-orange .kpi-value { color: var(--black); }
.kpi.fill-beige { background: var(--beige); border-color: transparent; color: var(--black); }
.kpi.fill-beige .kpi-label, .kpi.fill-beige .kpi-sub { color: var(--black-700); } .kpi.fill-beige .kpi-chip { background: rgba(255, 255, 255, .6); color: var(--black); } .kpi.fill-beige .kpi-value { color: var(--black); }
.badge { display: inline-block; padding: 2px 10px; border-radius: var(--r-pill); font-size: .76rem; font-weight: 650; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); border-color: transparent; } .badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; } .badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--beige); color: var(--black); font-weight: 750; flex: none; }
.avatar.a1 { background: var(--tan); } .avatar.a2 { background: var(--orange-100); color: var(--orange-700); } .avatar.a3 { background: var(--black); color: var(--beige); } .avatar.a4 { background: var(--orange); color: var(--black); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .avatar { background: #3a3029; color: var(--beige); } :root:not([data-theme='light']) .avatar.a1 { background: #4b4036; } :root:not([data-theme='light']) .avatar.a2 { background: #4a2418; color: var(--orange-300); } :root:not([data-theme='light']) .avatar.a3 { background: var(--beige); color: var(--black); } :root:not([data-theme='light']) .avatar.a4 { background: var(--orange); color: var(--black); } }
.who { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; } a.who { color: var(--ink); font-weight: 650; }
@media (hover: hover) and (pointer: fine) { a.who:hover span { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; } }
.who small { display: block; }
.empty { color: var(--muted); padding: 10px 0; margin: 0; }
.banner { background: var(--info-soft); color: var(--info); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: .9rem; font-weight: 550; } .banner.good { background: var(--good-soft); color: var(--good); }

/* promo card with a bouncing basketball (decorative; GSAP in js/ball.js; sits away from the data) */
.promo { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 26px 28px; margin-bottom: 16px; color: var(--black); background: radial-gradient(520px 260px at 92% 0%, rgba(241, 82, 40, .26), transparent 62%), linear-gradient(135deg, var(--beige-100) 0%, var(--beige) 58%, #efd5b6 100%); min-height: 168px; display: flex; align-items: center; }
.promo h2 { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 800; letter-spacing: -.03em; max-width: 16ch; } .promo h2 em { color: var(--orange-600); font-style: normal; }
.promo p { color: var(--black-700); max-width: 42ch; margin: 6px 0 16px; }
.promo-copy { position: relative; z-index: 2; }
.stage { position: absolute; inset: 0 0 0 auto; width: min(46%, 420px); pointer-events: none; }
.ball-court { position: absolute; right: clamp(24px, 14%, 90px); bottom: 20px; width: 72px; height: 72px; }
.ball-shadow { position: absolute; left: 50%; bottom: -7px; width: 70px; height: 12px; border-radius: 50%; background: radial-gradient(closest-side, rgba(21, 19, 20, .5), rgba(21, 19, 20, 0)); opacity: .5; }
.ball-wrap { position: absolute; inset: 0; will-change: transform; }
.ball { position: absolute; inset: 0; border-radius: 50%; will-change: transform;
  background: radial-gradient(circle at 34% 28%, #ffb27f 0%, #f77a43 26%, #f15228 56%, #b53a10 100%);
  box-shadow: inset -7px -9px 16px rgba(60, 14, 0, .38), inset 5px 5px 9px rgba(255, 236, 214, .28); }
.ball-seams { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #151314; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ball::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 34%); } /* the light does not turn with the ball */
@media (max-width: 520px) { .stage { display: none; } }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { tbody tr:hover td { background: var(--surface-2); } }
.right { text-align: right; } .center { text-align: center; }
.ok { color: var(--good); font-weight: 800; } .no { color: var(--warn); font-weight: 800; }
.progress { display: inline-block; width: 70px; height: 6px; border-radius: 9px; background: var(--track); vertical-align: middle; margin-left: 8px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--bar); border-radius: 9px; } .progress.good > span { background: var(--good); } .progress.warn > span { background: var(--orange); }
.pcard .progress { display: block; width: auto; margin: 8px 0; }

/* ---- forms ---- */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; } .filters.one { margin: 0 0 10px; } .filters .field { min-width: 180px; flex: 1; }
.field { display: grid; gap: 5px; margin-bottom: 14px; font-size: .88rem; } .field > span { font-weight: 700; } .field small { color: var(--muted); }
input[type=text], input[type=search], input[type=number], input[type=email], input[type=tel], select, textarea { width: 100%; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); transition: border-color var(--t-hover) var(--ease-out), box-shadow var(--t-hover) var(--ease-out); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(241, 82, 40, .28); }
textarea { resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.form-foot { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; } .form-foot small { margin-right: auto; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 14px; }
.tab, .chip { border: 0; background: transparent; border-radius: var(--r-pill); padding: 6px 16px; cursor: pointer; font-weight: 650; font-size: .88rem; color: var(--ink-soft); transition: background-color var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out), transform var(--t-press) var(--ease-out); }
.tab:active, .chip:active { transform: scale(.97); }
.tab.on { background: var(--primary); color: var(--primary-ink); }
.chip { border: 1px solid var(--line-strong); background: var(--surface); } .chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; } .chip small { margin-left: 6px; color: inherit; opacity: .7; }

/* ---- charts ---- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; } .chart .tick { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar.c1 { fill: var(--chart-1); } .chart .bar.c2 { fill: var(--chart-2); } .chart .line { fill: none; stroke: var(--chart-line); stroke-width: 2.5; stroke-linejoin: round; } .chart .area { fill: var(--chart-line); opacity: .1; } .chart .dot { fill: var(--surface); stroke: var(--chart-line); stroke-width: 2.5; }
.key { font-size: .8rem; margin-right: 12px; } .key::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; } .key.c1::before { background: var(--chart-1); } .key.c2::before { background: var(--chart-2); }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.hbars li { display: grid; grid-template-columns: 92px 1fr 64px; align-items: center; gap: 10px; font-size: .85rem; }
.hb-track { height: 9px; background: var(--track); border-radius: 9px; overflow: hidden; } .hb-fill { display: block; height: 100%; background: var(--bar); border-radius: 9px; } .hb-fill.bad { background: var(--orange); }
.hb-val { text-align: right; color: var(--muted); }

/* ---- lists ---- */
.attention { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.attention a { display: block; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); text-decoration: none; color: var(--ink); border-left: 4px solid var(--ink); transition: background-color var(--t-hover) var(--ease-out), transform var(--t-press) var(--ease-out); }
.attention a:active { transform: scale(.99); }
@media (hover: hover) and (pointer: fine) { .attention a:hover { background: var(--soft); } }
.attention .warn a { border-color: var(--orange); } .attention .bad a { border-color: var(--bad); } .attention small { display: block; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.feed-item { display: flex; gap: 11px; } .feed-item p { margin: 0; font-size: .9rem; } .feed-item.live p { font-weight: 700; }
.feed-ic { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--soft-ink); font-size: .8rem; font-weight: 700; }
.feed-ic.good { background: var(--good-soft); color: var(--good); } .feed-ic.warn { background: var(--warn-soft); color: var(--warn); } .feed-ic.info { background: var(--info-soft); color: var(--info); }
.feed.big { gap: 15px; }
.receipt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .9rem; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.results a { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); transition: border-color var(--t-hover) var(--ease-out), background-color var(--t-hover) var(--ease-out), transform var(--t-press) var(--ease-out); }
.results a:active { transform: scale(.99); }
@media (hover: hover) and (pointer: fine) { .results a:hover { border-color: var(--line-strong); background: var(--surface-2); } }
.results small { display: block; }
.profile { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; } .profile .head-actions { margin-left: auto; }
.strip { display: flex; gap: 3px; flex-wrap: wrap; margin: 8px 0; } .st { display: inline-block; width: 14px; height: 22px; border-radius: 4px; background: var(--track); }
.st.P { background: #7fd1a6; } .st.A { background: #f08a7e; } .st.L { background: #f3c46b; } .legend { font-size: .8rem; color: var(--muted); } .legend .st { width: 10px; height: 10px; vertical-align: middle; }
.stack .card.notice { margin: 0; } .notice-top { display: flex; gap: 8px; align-items: center; margin-bottom: 7px; } .notice h2 { margin-bottom: 4px; } .notice p { margin: 0; color: var(--muted); } .notice.live { border-color: var(--orange); }
.exam-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; } .exam { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: grid; gap: 5px; justify-items: start; }
.subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; } .subject { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; } .subject small { display: block; }
.reg-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-pill); overflow: hidden; background: var(--surface); } .seg label { cursor: pointer; } .seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 7px 14px; font-size: .84rem; font-weight: 650; transition: background-color var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out); } .seg input:checked + span { color: #fff; }
.seg .P input:checked + span { background: var(--good); } .seg .A input:checked + span { background: var(--bad); } .seg .L input:checked + span { background: #b7791f; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.week { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; } .week li { display: grid; gap: 2px; padding: 10px 14px; background: var(--surface-2); border-radius: 14px; font-size: .85rem; }
.grid-marks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; } .grid-marks label { display: grid; grid-template-columns: 1fr 78px; align-items: center; gap: 8px; font-size: .9rem; }

/* ---- dialogs and toasts: transitions (they can be interrupted), not keyframes ---- */
.modal-back { position: fixed; inset: 0; background: rgba(21, 19, 20, .55); display: grid; place-items: center; z-index: 50; padding: 16px; overflow: auto; opacity: 0; transition: opacity 150ms var(--ease-out); }
.modal-back.in { opacity: 1; transition-duration: var(--t-pop); }
.modal { position: relative; background: var(--surface); border-radius: 26px; padding: 26px; width: min(500px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow-3); transform: scale(.96); opacity: 0; transition: transform 150ms var(--ease-out), opacity 150ms var(--ease-out); } .modal.wide { width: min(740px, 100%); }
.modal-back.in .modal { transform: none; opacity: 1; transition-duration: var(--t-pop); }
.modal-x { position: absolute; right: 14px; top: 12px; border: 0; background: transparent; font-size: 1.6rem; cursor: pointer; color: var(--muted); line-height: 1; transition: transform var(--t-press) var(--ease-out); } .modal-x:active { transform: scale(.92); }
.modal h2 { margin-bottom: 4px; padding-right: 28px; font-size: 1.3rem; }
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 70; width: min(440px, calc(100vw - 24px)); }
.toast { background: var(--black); color: #fff; padding: 12px 18px; border-radius: 16px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .5); font-size: .9rem; font-weight: 550; border-left: 4px solid var(--tan); opacity: 0; transform: translateY(12px); transition: opacity var(--t-pop) var(--ease-out), transform var(--t-pop) var(--ease-out); }
.toast.in { opacity: 1; transform: none; } .toast.good { border-left-color: var(--orange); }
.toast.out { opacity: 0; transform: translateY(8px); transition-duration: 150ms; }
.scenes { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; } .scenes li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); } .scenes small { display: block; color: var(--accent-text); font-weight: 650; } .scenes p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
/* every "Show me" button is the same size, on one line, with a play icon; on a narrow screen it sits under the text */
.btn.show-me { width: 124px; height: 42px; padding: 0 16px; white-space: nowrap; font-size: .92rem; flex: none; }
.btn.show-me .ico { width: 16px; height: 16px; fill: currentColor; flex: none; }
@media (max-width: 520px) { .scenes li { grid-template-columns: minmax(0, 1fr); } .btn.show-me { width: 100%; } }
.pay-opts { display: grid; gap: 8px; margin: 14px 0; } .pay-opt { display: flex; gap: 12px; align-items: center; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 16px; cursor: pointer; transition: border-color var(--t-hover) var(--ease-out), background-color var(--t-hover) var(--ease-out); } .pay-opt:has(input:checked) { border-color: var(--ink); background: var(--soft); } .pay-opt small { display: block; }

/* ---- documents (always on white paper) ---- */
.doc-wrap { display: grid; gap: 12px; }
.doc { background: #fff; color: #151314; border: 1px solid #e4d9c6; border-radius: 10px; padding: 28px 32px; font-family: Georgia, 'Times New Roman', serif; }
.doc header { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid #151314; padding-bottom: 12px; margin-bottom: 14px; } .doc header h2 { font-size: 1.3rem; font-family: var(--font); } .doc header p { margin: 0; font-size: .85rem; color: #4a423b; }
.crest { width: 52px; height: 52px; border-radius: 50%; border: 2px solid #151314; display: grid; place-items: center; font-weight: 800; flex: none; font-family: var(--font); color: #151314; }
.doc .meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 20px; margin: 0 0 14px; } .doc dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #675e55; font-family: var(--font); } .doc dd { margin: 0 0 6px; font-weight: 700; }
.doc table { border: 1px solid #d9cdb8; } .doc th, .doc td { border: 1px solid #e7dfd0; color: #151314; padding: 7px 10px; } .doc th { background: #faf5ec; } .doc tr.total td { background: #fdfaf5; }
.doc footer { display: flex; justify-content: space-between; margin-top: 44px; font-size: .85rem; } .doc footer span { border-top: 1px solid #151314; padding-top: 4px; min-width: 150px; text-align: center; }
.doc .words { margin: 10px 0; font-style: italic; } .doc-note { font-size: .75rem; color: #75695d; margin-top: 12px; text-align: center; font-family: var(--font); }
.cert h3 { text-align: center; letter-spacing: .1em; margin: 20px 0 4px; font-family: var(--font); } .cert-no { text-align: center; color: #675e55; font-size: .85rem; } .cert-body { font-size: 1.05rem; line-height: 1.85; margin: 20px 0; text-align: justify; }

/* ---- parent app ---- */
.phone-wrap { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 36px; align-items: start; justify-content: center; }
.phone { width: 380px; max-width: 100%; height: min(760px, calc(100vh - 190px)); min-height: 580px; display: flex; flex-direction: column; background: var(--bg); border: 11px solid var(--black); border-radius: 42px; overflow: hidden; box-shadow: var(--shadow-3); }
.phone-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 12px; background: linear-gradient(140deg, var(--black), var(--black-800) 80%); color: #fff; } .phone-top small { color: var(--tan); display: block; } .phone-top strong { font-size: 1.15rem; letter-spacing: -.02em; }
.kid-chips { display: flex; gap: 8px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
.phone-body { flex: 1; overflow-y: auto; padding: 14px; display: grid; gap: 11px; align-content: start; }
.ptabs { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); }
.ptab { display: grid; justify-items: center; gap: 2px; padding: 9px 0 11px; font-size: .68rem; font-weight: 650; text-decoration: none; color: var(--muted); transition: color var(--t-hover) var(--ease-out), transform var(--t-press) var(--ease-out); } .ptab:active { transform: scale(.94); } .ptab.on { color: var(--accent-text); }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: grid; gap: 4px; box-shadow: var(--shadow-1); } .pcard.due { border-color: var(--orange); } .pcard.live { border-color: var(--orange); } .pcard p { margin: 0; color: var(--muted); font-size: .88rem; }
.p-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .p-h { margin: 8px 0 0; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; } .p-foot { text-align: center; font-size: .9rem; }
.p-msgs, .p-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .p-msgs li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; font-size: .88rem; } .p-msgs li.live { border-color: var(--orange); } .p-msgs small { display: block; }
.p-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; font-size: .9rem; } .p-list small { display: block; text-align: right; } .p-list li > span:first-child small { text-align: left; } .p-list.tight li { padding: 5px 0; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: .78rem; } .cal b { color: var(--muted); font-weight: 700; } .day { padding: 7px 0; border-radius: 9px; background: var(--surface-2); } .day.P { background: #c8efd6; color: #14532d; } .day.A { background: #f8c7c1; color: #7a1d14; } .day.L { background: #f8e1ac; color: #6b4403; } .day.sun { opacity: .4; }
.phone-side { padding-top: 6px; } .phone-side h2 { margin-bottom: 6px; } .phone-side .btn { margin: 0 6px 8px 0; }

@media (max-width: 960px) {
  .frame { grid-template-columns: minmax(0, 1fr); padding: 6px; border-radius: 26px; } .side { padding: 8px 6px 4px; min-width: 0; } .side ul { display: flex; overflow-x: auto; gap: 4px; } .side a { white-space: nowrap; padding: 9px 14px; } .side-promo { display: none; }
  main { padding: 22px 18px 32px; }
  .grid.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.two, .grid.desk-top, .exam-row { grid-template-columns: 1fr; }
  .phone-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; } .phone-side { order: -1; width: 100%; } .grid-marks { grid-template-columns: 1fr; } .stage { opacity: .55; }
}
@media (max-width: 560px) {
  .top { padding: 12px 12px 6px; } .tools { width: 100%; } .roles { order: 3; flex-basis: 100%; justify-content: flex-start; } .role small { display: none; } .role { padding-right: 12px; }
  .frame { margin: 0 8px 40px; } main { padding: 18px 14px 28px; border-radius: 20px; } .hbars li { grid-template-columns: 74px 1fr 56px; } .doc { padding: 18px; } .doc .meta { grid-template-columns: 1fr; } .promo { padding: 20px; } .stage { display: none; }
  .kpi { padding: 14px 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker.live .pulse::after { animation: none; }
  .modal, .toast, .modal-back.in .modal, .toast.in, .toast.out { transform: none; transition: opacity 150ms var(--ease-out); }
}
@media print {
  body.app { background: #fff; } .demo-banner, .top, .ticker, .side, .no-print, .modal-x, #toasts, .back { display: none !important; }
  .frame { display: block; box-shadow: none; border: 0; padding: 0; background: none; backdrop-filter: none; } main { border: 0; padding: 0; } .modal-back { position: static; background: none; padding: 0; display: block; opacity: 1; } .modal { box-shadow: none; max-height: none; width: auto; padding: 0; transform: none; opacity: 1; }
  .doc { border: 0; }
}
