/* Shared slide styles for dars.maktab23.uz lessons (projector / smartboard, 16:9 and 4:3). */
:root {
  --blue: #0099b5; --blue-deep: #0b5d75; --green: #1eb53a; --green-deep: #13782a; --red: #ce1126; --gold: #e8a400;
  --ink: #0f172a; --muted: #475569; --card: #ffffff; --line: #e2e8f0;
  --radius: 24px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 30px -8px rgba(15, 23, 42, .14);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .06), 0 24px 60px -16px rgba(15, 23, 42, .28);
  /* faint eight-pointed star lattice (girih motif) */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%230099b5' stroke-opacity='.09' stroke-width='1.5'%3E%3Cpath d='M48 20l8 20 20 8-20 8-8 20-8-20-20-8 20-8z'/%3E%3Cpath d='M28 28h40v40H28z' transform='rotate(45 48 48)'/%3E%3Cpath d='M28 28h40v40H28z'/%3E%3C/g%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Noto Sans", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(70vw 60vh at -10% -10%, rgba(0, 153, 181, .20), transparent 60%),
    radial-gradient(60vw 60vh at 110% 110%, rgba(30, 181, 58, .18), transparent 60%),
    radial-gradient(40vw 40vh at 100% 0%, rgba(232, 164, 0, .10), transparent 60%),
    var(--pattern),
    #f6fafb;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(0, 153, 181, .25); }

/* thin flag stripe on top of every slide */
.flagbar { position: fixed; inset: 0 0 auto 0; height: 10px; z-index: 5;
  background: linear-gradient(180deg, var(--blue) 0 32%, var(--red) 32% 36%, #fff 36% 64%, var(--red) 64% 68%, var(--green) 68%);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .12); }

.slide { position: absolute; inset: 0; padding: 5vh 5vw 13vh; display: none; flex-direction: column; gap: 2.2vh; }
.slide.active { display: flex; animation: enter .55s cubic-bezier(.2, .8, .2, 1); }
.slide.active > * { animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.slide.active > :nth-child(2) { animation-delay: .06s; }
.slide.active > :nth-child(3) { animation-delay: .12s; }
.slide.active > :nth-child(4) { animation-delay: .18s; }
.slide.active > :nth-child(n+5) { animation-delay: .24s; }
@keyframes enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

h1 { font-size: clamp(38px, 7vw, 116px); margin: 0; line-height: 1.02; letter-spacing: -.03em; font-weight: 900;
  background: linear-gradient(100deg, var(--blue-deep) 0%, var(--blue) 40%, var(--green) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
h2 { font-size: clamp(26px, 3.6vw, 58px); margin: 0; line-height: 1.1; letter-spacing: -.015em; font-weight: 800; }
h3 { font-size: clamp(20px, 2vw, 32px); margin: 0 0 .4em; font-weight: 800; }
p, li { font-size: clamp(17px, 1.65vw, 28px); line-height: 1.4; }
b { font-weight: 700; }
.kicker { align-self: flex-start; display: inline-flex; align-items: center; gap: .6em; font-size: clamp(14px, 1.3vw, 22px); font-weight: 800;
  color: var(--blue-deep); text-transform: uppercase; letter-spacing: .07em; padding: .45em 1em; border-radius: 999px;
  background: rgba(0, 153, 181, .1); border: 1px solid rgba(0, 153, 181, .22); }
.kicker::before { content: ""; width: .6em; height: .6em; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 .25em rgba(0, 153, 181, .2); }
.center .kicker { align-self: center; }
.muted { color: var(--muted); }
.source { margin-top: auto; font-size: clamp(12px, .95vw, 16px); color: #64748b; display: flex; gap: .5em; align-items: baseline; }
.source::before { content: "📚"; }
.card { position: relative; background: rgba(255, 255, 255, .92); border: 1px solid rgba(226, 232, 240, .9); border-radius: var(--radius);
  padding: 2.6vh 2vw; box-shadow: var(--shadow); backdrop-filter: blur(4px); }
.grid { display: grid; gap: 2vw; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.center { align-items: center; justify-content: center; text-align: center; }
.grow { flex: 1; min-height: 0; }
.pill { display: inline-block; padding: .25em .9em; border-radius: 999px; font-weight: 800; font-size: clamp(14px, 1.2vw, 20px); }

/* title */
.hero { display: flex; flex-direction: column; align-items: center; gap: 2.4vh; }
.title-flag { width: min(44vw, 58vh * 2); aspect-ratio: 2 / 1; border-radius: 12px; box-shadow: var(--shadow-lg); animation: wave 5s ease-in-out infinite; transform-origin: left center; }
@keyframes wave { 0%, 100% { transform: perspective(900px) rotateY(0); } 50% { transform: perspective(900px) rotateY(-7deg); } }
.badge-row { display: flex; gap: 1vw; flex-wrap: wrap; justify-content: center; }
.badge-row span { padding: .4em 1em; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 700; font-size: clamp(14px, 1.3vw, 22px); color: #334155; }
.sparkles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sparkles i { position: absolute; color: var(--gold); font-style: normal; opacity: .55; animation: twinkle 3.2s ease-in-out infinite; font-size: clamp(14px, 1.6vw, 28px); }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.8); } 50% { opacity: .7; transform: scale(1.15); } }

/* big date */
.bigdate { font-size: clamp(54px, 9vw, 160px); font-weight: 900; line-height: 1; letter-spacing: -.03em; color: var(--blue-deep); }
.years-wrap { position: relative; display: grid; place-items: center; }
.years-wrap::before { content: ""; position: absolute; width: 120%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 164, 0, .22), transparent 65%); animation: glow 3s ease-in-out infinite; }
@keyframes glow { 50% { transform: scale(1.08); opacity: .7; } }
.years { position: relative; font-size: clamp(110px, 21vw, 340px); font-weight: 900; line-height: .9; letter-spacing: -.04em;
  background: linear-gradient(180deg, var(--blue) 0 46%, var(--red) 46% 50%, var(--green) 50%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 10px 24px rgba(0, 153, 181, .25)); }

/* three symbols */
.sym { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1vh; overflow: hidden; }
.sym::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; background: var(--accent, var(--blue)); }
.sym:nth-child(2) { --accent: var(--gold); }
.sym:nth-child(3) { --accent: var(--green); }
.sym .icon { height: 19vh; display: flex; align-items: center; justify-content: center; }
.sym .icon img { max-height: 100%; max-width: 100%; }
.sym .date { font-size: clamp(22px, 2.4vw, 40px); font-weight: 900; color: var(--accent, var(--blue)); font-variant-numeric: tabular-nums; }
.note-icon { width: 17vh; height: 17vh; border-radius: 50%; display: grid; place-items: center; font-size: 9vh;
  background: radial-gradient(circle at 30% 30%, #ecfdf3, #bbf7d0); box-shadow: inset 0 0 0 6px #fff, var(--shadow); }
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 1vh; }
.timeline::before { content: ""; position: absolute; left: 12%; right: 12%; top: 13px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--blue), var(--gold), var(--green)); }
.tl { text-align: center; position: relative; }
.tl .dot { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 6px solid var(--blue); margin: 0 auto 1vh; box-shadow: 0 0 0 6px rgba(0, 153, 181, .12); }
.tl b { display: block; font-size: clamp(18px, 1.8vw, 30px); }
.tl span { font-size: clamp(14px, 1.3vw, 22px); color: var(--muted); }

/* people */
.person { display: flex; flex-direction: column; gap: 1.2vh; overflow: hidden; }
.person::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--blue), var(--green)); }
.person header { display: flex; align-items: center; gap: 1vw; }
.avatar { flex: none; width: 9vh; height: 9vh; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 3.2vh; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--green)); box-shadow: 0 0 0 4px #fff, 0 0 0 7px rgba(0, 153, 181, .25); }
.person ul { list-style: none; margin: 0; padding: 0; border-left: 4px solid #cbd5e1; }
.person li { position: relative; padding: .35vh 0 .35vh 1.4vw; font-size: clamp(14px, 1.3vw, 22px); }
.person li::before { content: ""; position: absolute; left: -9px; top: .72em; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); }
.person li b { color: var(--blue-deep); }
.quote { font-size: clamp(18px, 1.8vw, 30px); font-style: italic; text-align: center; color: #334155; position: relative; padding: 0 1.2em; }
.quote::before, .quote::after { font-family: Georgia, serif; font-size: 2em; line-height: 0; color: var(--gold); vertical-align: -.35em; }
.quote::before { content: "“"; margin-right: .1em; }
.quote::after { content: "”"; margin-left: .1em; }

/* interactive flag & emblem */
.explore { display: grid; grid-template-columns: 1.35fr 1fr; gap: 2.5vw; align-items: center; }
.flagbox { position: relative; width: 100%; aspect-ratio: 2 / 1; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lg); }
.flagbox img { width: 100%; height: 100%; display: block; }
.hot { position: absolute; border: 0; background: transparent; cursor: pointer; padding: 0; border-radius: 6px; transition: box-shadow .2s, background .2s; }
.hot:hover { background: rgba(255, 255, 255, .16); }
.hot:focus-visible { outline: 3px solid #facc15; outline-offset: -3px; }
.hot.on { box-shadow: inset 0 0 0 4px #facc15, 0 0 0 4px rgba(250, 204, 21, .45); background: rgba(250, 204, 21, .12); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: inset 0 0 0 4px #facc15, 0 0 0 9px rgba(250, 204, 21, .2); } }
.chips { display: flex; flex-wrap: wrap; gap: .7vw; margin-top: 2vh; }
.chip { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: .5em 1em; font: inherit; font-size: clamp(14px, 1.25vw, 21px); font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: .5em; color: var(--ink); box-shadow: 0 2px 6px rgba(15, 23, 42, .06); transition: transform .15s, border-color .15s, background .15s; }
.chip:hover { transform: translateY(-2px); border-color: #94d6e3; }
.chip.on { border-color: var(--blue); background: #e0f5fa; color: var(--blue-deep); }
.sw { width: 1em; height: 1em; border-radius: 50%; border: 1px solid #94a3b8; }
.panel { min-height: 34vh; display: flex; flex-direction: column; justify-content: center; border-left: 8px solid var(--blue); }
.panel h3 { color: var(--blue-deep); }
.panel > * { animation: rise .35s ease both; }
.panel .law { margin-top: 1.4vh; padding: 1.2vh 1vw 1.2vh 2.6em; border-radius: 14px; background: #f1f5f9; font-size: clamp(13px, 1.15vw, 19px); color: #334155; position: relative; }
.panel .law::before { content: "⚖️"; position: absolute; left: .8em; top: 1vh; }
.emblem { height: 58vh; display: flex; justify-content: center; position: relative; }
.emblem::before { content: ""; position: absolute; inset: 6% 0; border-radius: 50%; background: radial-gradient(circle, rgba(232, 164, 0, .22), transparent 65%); }
.emblem img { position: relative; height: 100%; filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .2)); }
.emblem-grid { display: grid; grid-template-columns: auto 1fr; gap: 3vw; align-items: center; }

/* sizes diagram */
.sizes { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2vw; align-items: center; }
.sizes svg { width: 100%; height: auto; }
.sizes text { font-family: inherit; font-weight: 800; fill: #0f172a; }
.check { list-style: none; padding: 0; margin: 0; }
.check li { padding-left: 1.8em; position: relative; margin: .5em 0; }
.check li::before { content: "✓"; position: absolute; left: 0; top: .15em; width: 1.25em; height: 1.25em; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: #fff; font-weight: 900; font-size: .8em; }

/* anthem */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4vh; }
.steps li { counter-increment: s; display: flex; gap: 1vw; align-items: center; }
.steps li::before { content: counter(s); flex: none; width: 2em; height: 2em; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--green), var(--green-deep)); color: #fff; font-weight: 900; box-shadow: 0 4px 10px rgba(30, 181, 58, .35); }
.fact-row { display: flex; align-items: center; gap: 1vw; }
.fact-row .ico { flex: none; width: 2.4em; height: 2.4em; border-radius: 14px; display: grid; place-items: center; font-size: clamp(18px, 1.8vw, 30px); }

/* groups */
.group { border-top: 10px solid var(--blue); text-align: center; }
.group:nth-child(2) { border-top-color: var(--gold); }
.group:nth-child(3) { border-top-color: var(--green); }
.group .gicon { font-size: clamp(36px, 4.4vw, 72px); line-height: 1.1; }
.roles { display: flex; flex-wrap: wrap; gap: .8vw; justify-content: center; }
.roles span { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: .6em 1.1em; font-size: clamp(15px, 1.4vw, 24px); font-weight: 700; box-shadow: var(--shadow); }

/* timer */
.timer { display: flex; flex-direction: column; align-items: center; gap: 2vh; }
.ring { position: relative; width: min(46vh, 40vw); aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: var(--shadow-lg); }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring .track { stroke: #eef2f6; }
.ring .bar { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.timer.warn .bar { stroke: var(--gold); }
.timer.done .bar { stroke: var(--red); }
.digits { position: absolute; inset: 0; display: grid; place-items: center; font-size: min(11vh, 9vw); font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timer.done .digits { color: var(--red); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.tmsg { font-size: clamp(20px, 2.2vw, 36px); font-weight: 800; min-height: 1.4em; color: var(--red); }
.round { font-size: clamp(18px, 1.8vw, 30px); font-weight: 800; color: var(--muted); }
.btns { display: flex; gap: 1vw; flex-wrap: wrap; justify-content: center; }
.btn { font: inherit; font-weight: 800; font-size: clamp(16px, 1.5vw, 24px); border: 0; border-radius: 16px; padding: .65em 1.5em; cursor: pointer;
  background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line), 0 2px 6px rgba(15, 23, 42, .06); transition: transform .12s, box-shadow .15s, filter .15s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--blue), var(--blue-deep)); color: #fff; box-shadow: 0 8px 20px -6px rgba(0, 153, 181, .6); }
.btn:focus-visible, .chip:focus-visible, .nav:focus-visible, .qopt:focus-visible, .qpill:focus-visible { outline: 3px solid #facc15; outline-offset: 2px; }

/* gallery */
.gallery { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3vw; align-items: center; }
.orbit svg { width: 100%; height: auto; }
.orbit text { font-family: inherit; font-weight: 800; }
.fb { display: flex; gap: 1vw; }
.fb div { flex: 1; background: #fef9c3; border-radius: 6px; padding: 1.2vh 1vw; transform: rotate(-1.5deg); box-shadow: 0 6px 14px rgba(0, 0, 0, .1); font-size: clamp(15px, 1.4vw, 23px); font-weight: 700; }
.fb div + div { transform: rotate(1.5deg); background: #dcfce7; }

/* homework */
.hw { text-align: left; overflow: hidden; }
.hw .num { width: 2.2em; height: 2.2em; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: clamp(18px, 1.8vw, 30px); margin-bottom: 1.2vh;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep)); }
.hw:nth-child(2) .num { background: linear-gradient(135deg, var(--gold), #b45309); }
.hw:nth-child(3) .num { background: linear-gradient(135deg, var(--green), var(--green-deep)); }

/* footer */
.footer { position: fixed; left: 50%; transform: translateX(-50%); bottom: 1.6vh; width: min(96vw, 1700px); height: 8vh; min-height: 48px; display: flex; align-items: center; gap: 1vw;
  padding: 0 1.2vw; background: rgba(255, 255, 255, .82); backdrop-filter: blur(10px); border: 1px solid rgba(226, 232, 240, .9); border-radius: 999px; box-shadow: var(--shadow-lg); z-index: 6; }
.stages { display: flex; gap: .5vw; flex: 1; overflow: hidden; }
.stage { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: clamp(11px, 1vw, 17px); font-weight: 700; padding: .4em .9em; border-radius: 999px; background: #f1f5f9; color: #64748b; white-space: nowrap; transition: background .2s, color .2s; }
.stage.on { flex-shrink: 0; background: linear-gradient(135deg, var(--blue), var(--blue-deep)); color: #fff; }
.nav { font: inherit; font-size: clamp(18px, 1.8vw, 28px); width: 2.1em; height: 2.1em; flex: none; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: transform .12s, background .15s; }
.nav:hover { transform: scale(1.06); background: #f0fafc; }
#next { background: linear-gradient(135deg, var(--blue), var(--blue-deep)); color: #fff; border-color: transparent; }
.count { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--muted); min-width: 4.5em; text-align: center; }
.progress { position: fixed; left: 0; top: 10px; height: 4px; background: linear-gradient(90deg, var(--gold), #facc15); z-index: 6; transition: width .3s; border-radius: 0 4px 4px 0; }

@media (max-aspect-ratio: 4/3) {
  .explore, .sizes, .gallery, .emblem-grid, .g2 { grid-template-columns: 1fr; }
  .emblem { height: 32vh; }
}
@media (max-width: 760px) {
  html, body { overflow: auto; }
  .slide { position: relative; min-height: 100%; padding: 6vh 5vw 16vh; }
  .g3, .timeline { grid-template-columns: 1fr; }
  .timeline::before { display: none; }
  .stages { display: none; }
}
a.nav { display: inline-grid; place-items: center; text-decoration: none; color: inherit; }

/* Class quiz ([data-quiz]) */
[hidden] { display: none !important; }
.quiz { width: 100%; display: flex; flex-direction: column; gap: 2.2vh; }
.qpills { display: flex; gap: .6vw; flex-wrap: wrap; }
.qpill { font: inherit; font-weight: 800; font-size: clamp(14px, 1.3vw, 22px); width: 2.6em; height: 2.6em; border-radius: 50%; border: 2px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: transform .12s; }
.qpill:hover:not(:disabled) { transform: scale(1.08); }
.qpill:disabled { cursor: default; }
.qpill.picked { background: #e0f2fe; border-color: var(--blue); }
.qpill.on { outline: 3px solid var(--blue); outline-offset: 2px; }
.qpill.ok { background: var(--green); border-color: var(--green); color: #fff; }
.qpill.bad { background: var(--red); border-color: var(--red); color: #fff; }
.qtext { margin: 0; }
.qopts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8vh 1.4vw; }
.qopt { font: inherit; font-size: clamp(16px, 1.8vw, 30px); font-weight: 600; text-align: left; display: flex; gap: .7em; align-items: center; padding: .75em 1em; border-radius: 18px;
  border: 3px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; box-shadow: var(--shadow); transition: transform .12s, border-color .15s, background .15s; }
.qopt:hover:not(:disabled) { transform: translateY(-2px); border-color: #94d6e3; }
.qopt b { flex: none; display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 12px; color: #fff; background: var(--blue); }
.qopt:nth-child(2) b { background: var(--gold); }
.qopt:nth-child(3) b { background: var(--green); }
.qopt:nth-child(4) b { background: var(--red); }
.qopt.picked { border-color: var(--blue); background: #e0f2fe; }
.qopt.ok { border-color: var(--green); background: #dcfce7; }
.qopt.bad { border-color: var(--red); background: #fee2e2; }
.qopt:disabled { cursor: default; }
.qbar { display: flex; gap: 1vw; align-items: center; flex-wrap: wrap; }
.qscore { margin-left: auto; font-weight: 900; font-size: clamp(18px, 2vw, 34px); }
.quiz.great .qscore { color: var(--green-deep); }
.qtimer { position: relative; height: clamp(26px, 3.4vh, 40px); border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.qtimer-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: inherit; transition: width .1s linear; }
.qtimer.warn .qtimer-fill { background: linear-gradient(90deg, var(--red), #f97316); }
.qtimer.reveal .qtimer-fill { background: #94a3b8; }
.qtimer-sec { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: clamp(14px, 1.4vw, 22px); color: var(--ink); }
.qmsg { font-weight: 900; font-size: clamp(18px, 2vw, 34px); }
.qmsg.ok { color: var(--green-deep); }
.qmsg.bad { color: var(--red); }
@media (max-width: 700px) { .qopts { grid-template-columns: 1fr; } }

/* confetti on a strong quiz result */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9; overflow: hidden; }
.confetti i { position: absolute; top: -4vh; width: 12px; height: 18px; border-radius: 3px; animation: fall 2.8s cubic-bezier(.3, .6, .4, 1) forwards; }
@keyframes fall { to { transform: translateY(112vh) rotate(720deg); opacity: .9; } }

/* Anthem player */
audio.anthem { width: 100%; margin-top: 2vh; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* lesson clock (footer) and per-slide budget chip */
.clock { font: inherit; flex: none; display: grid; grid-template-columns: auto auto; column-gap: .5em; align-items: center; padding: .25em .9em; border-radius: 999px; cursor: pointer;
  border: 2px solid rgba(30, 181, 58, .35); background: #ecfdf3; color: var(--green-deep); line-height: 1.1; text-align: left; }
.clock::before { content: "⏱"; grid-row: span 2; font-size: clamp(18px, 1.8vw, 28px); }
.clock-time { font-weight: 900; font-variant-numeric: tabular-nums; font-size: clamp(14px, 1.35vw, 22px); }
.clock-status { font-weight: 700; font-size: clamp(10px, .85vw, 14px); opacity: .85; }
.clock.paused { background: #f1f5f9; border-color: var(--line); color: var(--muted); }
.clock.behind { background: #fffbeb; border-color: rgba(232, 164, 0, .5); color: #92400e; }
.clock.over { background: #fef2f2; border-color: rgba(206, 17, 38, .45); color: var(--red); }
.clock-reset { font: inherit; flex: none; border: 1px solid var(--line); background: #fff; border-radius: 50%; width: 2em; height: 2em; cursor: pointer; color: var(--muted); }
.slidetime { position: fixed; top: 22px; right: 2vw; z-index: 6; min-width: 12em; padding: .5em .9em .6em; border-radius: 16px; background: rgba(255, 255, 255, .9); border: 1px solid var(--line);
  box-shadow: var(--shadow); backdrop-filter: blur(8px); font-size: clamp(12px, 1vw, 17px); }
.slidetime .st-row { display: flex; justify-content: space-between; gap: 1em; font-weight: 700; color: var(--muted); }
.slidetime .st-time { font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.slidetime .st-bar { margin-top: .4em; height: 6px; border-radius: 3px; background: #eef2f6; overflow: hidden; }
.slidetime .st-fill { height: 100%; width: 0; background: var(--green); border-radius: 3px; transition: width .5s linear, background .3s; }
.slidetime.warn .st-fill { background: var(--gold); }
.slidetime.over { border-color: rgba(206, 17, 38, .4); background: #fff5f5; }
.slidetime.over .st-fill { background: var(--red); }
.slidetime.over .st-label { color: var(--red); }
@media (max-width: 760px) { .slidetime { display: none; } }

/* "What the law says" cards */
.law-grid { grid-auto-rows: 1fr; }
.law-card { display: flex; flex-direction: column; gap: .6vh; border-top: 6px solid var(--blue); }
.law-card:nth-child(3n+2) { border-top-color: var(--gold); }
.law-card:nth-child(3n) { border-top-color: var(--green); }
.law-card .ico { font-size: clamp(26px, 2.8vw, 46px); line-height: 1; }
.law-card p { margin: 0; font-size: clamp(15px, 1.4vw, 24px); }
.law-card small { margin-top: auto; font-weight: 700; color: var(--blue-deep); font-size: clamp(12px, 1vw, 17px); }
