@font-face { font-family: Lexend; src: url(/fonts/lexend/lexend-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Lexend; src: url(/fonts/lexend/lexend-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Baloo 2'; src: url(/fonts/baloo-2/baloo-2-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Baloo 2'; src: url(/fonts/baloo-2/baloo-2-latin-800-normal.woff2) format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: OpenDyslexic; src: url(/fonts/opendyslexic/opendyslexic-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: OpenDyslexic; src: url(/fonts/opendyslexic/opendyslexic-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #fdf6e3; --fg: #1f2933; --font: Lexend, Verdana, sans-serif; --size: 20px; --spacing: 1.7;
  --card: rgba(255, 255, 255, .72); --line: rgba(0, 0, 0, .18); --accent: #0e7c73; --accent-fg: #fff;
  --hl: #ffd84a; --hl-fg: #111; --sel: #0e7c73;
}
:root[data-tint="dark"] { --card: rgba(255, 255, 255, .07); --line: rgba(255, 255, 255, .25); --accent: #5ed6c8; --accent-fg: #0b2421; --sel: #5ed6c8; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: var(--size); line-height: var(--spacing); letter-spacing: .03em; word-spacing: .12em; }
body.teacher { --size: 16px; --spacing: 1.5; --bg: #f4f6f8; background: #f4f6f8; letter-spacing: 0; word-spacing: 0; }
#app { max-width: 1000px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5em; line-height: 1.3; margin: 0 0 .5em; }
h2 { font-size: 1.15em; margin: 1em 0 .4em; }
h3 { font-size: 1em; margin: 0 0 .4em; }
a { color: var(--accent); }
em { font-style: normal; }
.muted { opacity: .7; } .small { font-size: .8em; } .center { text-align: center; } .huge { font-size: 4em; line-height: 1; }
.error { color: #b3261e; font-weight: 700; margin: .3em 0; } .error:empty { display: none; } .ok { color: #1b7a3d; font-weight: 700; }
.pre { white-space: pre-wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin: 14px 0; }
.narrow { max-width: 620px; margin-left: auto; margin-right: auto; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.row.two > * { flex: 1 1 260px; } .grow { flex: 1 1 240px; } .tiny { flex: 0 0 90px; }
.nav { justify-content: space-between; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; margin: .4em 0; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
/* Every kind of text box: email, search and date boxes too (they were left at the small browser default). */
input[type=text], input[type=password], input[type=number], input[type=email], input[type=search], input[type=datetime-local], select, textarea {
  font: inherit; font-weight: 400; color: var(--fg); background: var(--bg); border: 2px solid var(--line); border-radius: 10px; padding: .45em .6em; width: 100%; letter-spacing: inherit;
}
body.teacher input, body.teacher select, body.teacher textarea { background: #fff; }
textarea { resize: vertical; line-height: var(--spacing); }
input:focus, select:focus, textarea:focus, button:focus-visible, [role=button]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
input[type=checkbox] { width: 1.2em; height: 1.2em; }

.btn { font: inherit; font-weight: 700; color: var(--fg); background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: .4em .9em; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.big { padding: .6em 1.3em; font-size: 1.05em; }
.btn.small { font-size: .85em; }
.btn.danger { color: #b3261e; }
.btn.live { background: #b3261e; border-color: #b3261e; color: #fff; }
.btn:disabled { opacity: .4; cursor: default; }
.icon { font: inherit; background: none; border: 2px solid var(--line); border-radius: 10px; padding: .1em .5em; cursor: pointer; color: var(--fg); flex: none; }
.icon:hover { border-color: var(--accent); }
.x { font: inherit; font-size: .7em; border: 0; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 50%; width: 1.9em; height: 1.9em; cursor: pointer; margin-left: .4em; line-height: 1; }

.bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 6px 2px; }
.bar.sticky { position: sticky; top: 0; z-index: 5; background: #f4f6f8; border-bottom: 1px solid var(--line); }
.progress { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.progress div { height: 100%; background: var(--accent); }

/* reading aloud */
.speakable { margin: .5em 0; }
.w { border-radius: 6px; padding: .05em .12em; margin: 0 -.12em; cursor: pointer; }
.w.on { background: var(--hl); color: var(--hl-fg); box-shadow: 0 0 0 3px var(--hl); }
.reading { border-left: 5px solid var(--accent); padding-left: 12px; }
span.reading, .item .reading, .option .reading { border-left: 0; padding-left: 0; }
.readback { background: var(--card); border: 2px dashed var(--line); border-radius: 10px; padding: .4em .7em; }

.question .read { align-self: flex-start; margin-bottom: .4em; }
.qhead { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; margin-top: .4em; }
.marks { opacity: .7; font-weight: 400; }
.qimg { display: block; max-width: 100%; max-height: 60vh; margin: 12px 0; border-radius: 8px; background: #fff; }
.ref { border: 2px dashed var(--line); border-radius: 10px; padding: .3em .8em; margin: .6em 0; }
summary { cursor: pointer; font-weight: 700; }
.answer { font-size: 1.05em; }

.options { display: flex; flex-direction: column; gap: 12px; margin-top: .8em; }
.option, .item { display: flex; align-items: center; gap: 12px; border: 3px solid var(--line); border-radius: 999px; padding: .35em 1em; cursor: pointer; background: var(--card); }
.option > .speakable, .item > .speakable { flex: 1; margin: 0; }
.option.sel { border-color: var(--sel); box-shadow: 0 0 0 3px var(--sel); font-weight: 700; }
.tag { font-weight: 700; flex: none; min-width: 1.6em; height: 1.6em; line-height: 1.6em; text-align: center; border-radius: 50%; background: var(--line); }
.sentence { font-size: 1.15em; line-height: 2.4; }
.sentence .w { padding: .15em .25em; margin: 0; border: 2px dotted var(--line); }
.sentence .w.sel { border-color: transparent; border-bottom: 5px solid var(--sel); border-radius: 0; font-weight: 700; }

.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: .8em; }
.pairs.monkey { grid-template-columns: 1fr; }
.pairs .col, .stackitems { display: flex; flex-direction: column; gap: 10px; }
.item { border-radius: 14px; }
.item.sel { border-color: var(--sel); box-shadow: 0 0 0 3px var(--sel); }
.bank { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0; border: 3px solid var(--fg); border-radius: 6px; overflow: hidden; }
.bank .item { border-radius: 0; border: 1px solid var(--fg); justify-content: center; text-align: center; min-height: 3.2em; }
.chip { flex: none; font-weight: 700; border-radius: 999px; padding: 0 .6em; background: var(--c, var(--line)); color: #111; display: inline-flex; align-items: center; }
.c0 { --c: #ffd84a; } .c1 { --c: #9ad0f5; } .c2 { --c: #b7e4a8; } .c3 { --c: #f7b2c4; } .c4 { --c: #d3bdf0; } .c5 { --c: #ffc48a; } .c6 { --c: #a6e3dc; } .c7 { --c: #d9d9d9; }
.item.done, .item.used { border-color: var(--c); }
.item.used { background: var(--c); color: #111; }

.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 18px; align-items: end; }
.settingsbox { margin: 18px 0; opacity: .9; }

/* teacher */
.crumb { font-weight: 700; }
.notice { background: #fff4cc; border: 1px solid #e0c060; border-radius: 10px; padding: .6em .9em; }
table.list { width: 100%; border-collapse: collapse; }
table.list td { padding: 10px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge { font-size: .8em; font-weight: 700; padding: .15em .7em; border-radius: 999px; background: #e3e6ea; white-space: nowrap; }
.badge.on { background: #cdeed6; color: #14532d; }
.qedit { border-left: 6px solid var(--accent); }
.pics { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.pic { position: relative; }
.pic img { max-height: 120px; max-width: 220px; border: 1px solid var(--line); border-radius: 6px; display: block; }
.pic .x { position: absolute; top: -8px; right: -8px; }
.ans { border-top: 1px solid var(--line); padding: 10px 0; }
.ans > div:first-child { white-space: pre-wrap; }
u.picked { text-decoration-thickness: 3px; font-weight: 700; }
ol.plain { margin: .2em 0; padding-left: 1.4em; }
.home { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.home a { text-align: center; padding: 1.6em 1em; font-size: 1.2em; }

@media (max-width: 700px) { .pairs { grid-template-columns: 1fr; } #app { padding: 10px; } .card { padding: 14px; } }
@media print { .noprint, .bar { display: none !important; } body { background: #fff !important; } .card { border: 0; padding: 0; } }

/* Learner login cards (printed by the teacher) */
.pincards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 12px; }
.pincard { border: 2px dashed #888; border-radius: 10px; padding: 12px 16px; background: #fff; color: #1f2933; break-inside: avoid; }
.pincard h2 { margin: .2em 0; }
.pincard p { margin: .3em 0; }
.pincard .big, .pin { font-size: 1.4em; letter-spacing: .15em; }
.pinrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pincard .qr { width: 104px; height: 104px; flex: none; image-rendering: pixelated; }
.notice .big { font-size: 1.3em; letter-spacing: .12em; }
.notice .btn { margin-top: .4em; }
.btn.done { opacity: .75; cursor: default; }
@media print { .pincards { grid-template-columns: repeat(2, 1fr); padding: 0; } }

/* Countdown */
.timer { font-weight: 800; font-variant-numeric: tabular-nums; padding: .15em .7em; border-radius: 999px; background: #e3e6ea; color: #1f2933; white-space: nowrap; }
.timer.warn { background: #ffe8a3; color: #5c3d00; }
.timer.last { background: #b3261e; color: #fff; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .75; } }
@media (prefers-reduced-motion: reduce) { .timer.last { animation: none; } }
.timenote { margin: .5em auto; max-width: 900px; padding: .5em 1em; border-radius: 8px; background: #ffe8a3; color: #5c3d00; font-weight: 700; }
.timenote:empty { display: none; }
.timelimit { align-items: center; }

/* Class tiles (Tests page) and class cards (Learners page) */
.tiles { display: flex; flex-wrap: wrap; gap: 10px; margin: .8em 0; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 110px; padding: .6em .8em; border: 2px solid #d5d9de; border-radius: 12px; background: #fff; color: #1f2933; cursor: pointer; font: inherit; }
.tile:hover { border-color: #8aa4c8; }
.tile.sel { border-color: #2457a6; background: #e3f0fb; }
.tile.add { border-style: dashed; color: #555; }
.tile-emoji { font-size: 2em; line-height: 1.1; }
.tile-name { font-weight: 700; }
.subject h2 { margin: 1em 0 .3em; }
.classcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: .5em 0 1em; }
.classcard { display: flex; align-items: center; gap: 12px; padding: .6em .8em; border: 1px solid #d5d9de; border-radius: 12px; background: #fff; }
.classcard .actions { margin-left: auto; display: flex; flex-direction: column; gap: 4px; }
.emojis { display: flex; flex-wrap: wrap; gap: 6px; margin: .3em 0; }
.emoji { font-size: 1.6em; width: 2em; height: 2em; border: 2px solid transparent; border-radius: 10px; background: #f3f4f6; cursor: pointer; }
.emoji.sel { border-color: #2457a6; background: #e3f0fb; }
.emoji.none { font-size: 1.1em; color: #666; }
.pickrow { padding: .2em 0; }
select.extra { background: #ffe8a3; font-weight: 700; }
.chip { display: inline-block; margin: 0 4px 4px 0; padding: .1em .55em; border-radius: 999px; background: #eef1f4; white-space: nowrap; }

/* Dragging (order, word bank) */
.grip { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.orderitem .grip { font-size: 1.3em; opacity: .6; padding: 0 .2em; }
.ghost { position: fixed; z-index: 50; pointer-events: none; opacity: .9; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.dragging { opacity: .35; }
.over { outline: 3px dashed var(--accent); outline-offset: 3px; }
.hint { font-weight: 700; }

/* Choose more than one: square boxes instead of round circles */
.option.multi .tag { border-radius: 6px; }

/* Put in the correct order */
ol.order { list-style: none; padding: 0; margin: .5em 0; display: flex; flex-direction: column; gap: 10px; }
.orderitem { user-select: none; -webkit-user-select: none; }
.orderitem .icon:disabled { opacity: .3; cursor: default; }

/* Fill in the missing words */
.gapped { line-height: 2.6; }
.gap { display: inline-block; min-width: 5em; text-align: center; padding: 0 .5em; margin: 0 .15em; border: 2px dashed var(--line); border-radius: 8px; cursor: pointer; line-height: 1.6; }
.gap.filled { border-style: solid; border-color: var(--sel); font-weight: 700; }
.gap.sel { box-shadow: 0 0 0 3px var(--sel); }
.wordbank { display: flex; flex-wrap: wrap; gap: 10px; padding: .6em; border: 2px solid var(--line); border-radius: 12px; }
.wordcard { padding: .3em .9em; border: 3px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font-weight: 700; }
.wordcard .speakable { margin: 0; }
.wordcard.used { opacity: .3; cursor: default; text-decoration: line-through; }

/* Maths */
math-field.mathfield { display: block; width: 100%; font-size: 1.3em; padding: .3em .5em; border: 2px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); }
body.teacher math-field.mathfield { background: #fff; font-size: 1.15em; }
.math { white-space: nowrap; }
.mathrow { align-items: center; flex-wrap: nowrap; }
.mathpanel { border: 2px dashed var(--accent); border-radius: 10px; padding: .6em .8em; margin: .4em 0; }
.mathpreview:empty { display: none; }
.mathpreview { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .4em .7em; }
.mathans { font-size: 1.2em; }

/* Upload */
ul.files { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
ul.files li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
ul.files .speakable { margin: 0; }

/* Editor: answer keys */
.fieldname { font-weight: 700; display: block; margin: .5em 0 .2em; }
.keynote { color: #1b5e20; background: #eaf6ec; border-radius: 8px; padding: .35em .7em; margin: .4em 0; font-size: .9em; }
.optrow { display: flex; gap: 8px; align-items: center; }
.optrow label.check { margin: 0; flex: none; min-width: 3em; }
.optrow input[type=text] { flex: 1; }
.wordpicks { display: flex; flex-wrap: wrap; gap: 6px; }
.wordpick { font: inherit; border: 2px solid #d5d9de; background: #fff; border-radius: 8px; padding: .1em .5em; cursor: pointer; }
.wordpick.sel { border-color: #1b7a3d; background: #cdeed6; font-weight: 700; text-decoration: underline; }
.keyrows { display: flex; flex-direction: column; gap: 4px; margin-top: .4em; }
.keyrow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }

/* Answers and marking */
.anshead { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.markbox { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: none; }
.markbox label.check { margin: 0; font-weight: 700; }
input.markin { width: 5em; text-align: center; font-weight: 700; }
.verdict { font-weight: 800; width: 1.6em; height: 1.6em; line-height: 1.6em; text-align: center; border-radius: 50%; color: #fff; flex: none; }
.verdict.right { background: #1b7a3d; } .verdict.part { background: #b7791f; } .verdict.wrong { background: #b3261e; }
.todo { font-weight: 700; color: #8a5a00; background: #fff4cc; border-radius: 999px; padding: .05em .6em; font-size: .85em; }
.total { font-size: 1.15em; }
.keyline { font-size: .9em; color: #1b5e20; margin-top: .3em; }
li.right::marker, u.blank.right { color: #1b7a3d; }
li.wrong { color: #b3261e; }
u.blank { text-decoration-thickness: 2px; font-weight: 700; padding: 0 .2em; }
u.blank.wrong { color: #b3261e; }
@media print { .markbox .btn, .markbox .muted { display: none; } input.markin { border: 0; } }

/* Homework */
.badge.hw { background: #dbe8ff; color: #1e3a8a; }
.hwstatus { white-space: nowrap; }
.hwstatus.unsaved { color: #8a5a00; font-weight: 700; }

/* Reading pieces */
.badge.rd { background: #e6f4ea; color: #14532d; }
.card.reading { font-size: 1.08em; }
.rblock { position: relative; padding: .4em 0 .4em 2.6em; border-bottom: 1px dashed var(--line); }
.rblock:last-child { border-bottom: 0; }
.rblock .rfrom { position: absolute; left: 0; top: .5em; }
.rblock .qimg { max-width: 100%; }

/* Maths quiz */
.badge.qz { background: #f3e8ff; color: #581c87; }
.quizq { font-size: 1.5em; margin: .6em 0; }
.quizicon { font-size: 2.2em; line-height: 1; }
.quizfb { font-size: 1.25em; font-weight: 700; margin: .3em 0; }
.quizfb.right { color: #1b7a3d; }
.quizfb.again { color: #8a5a00; }
.quizfb.wrong { color: #1e3a8a; }
.btn.level { display: block; text-align: left; }

/* Anything marked hidden stays hidden, even buttons and cards that set their own display. */
[hidden] { display: none !important; }

/* Word search */
.wscard { display: grid; gap: 12px; }
.wsgrid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; width: min(100%, calc(var(--n) * 52px)); margin: 0 auto;
  touch-action: none; user-select: none; -webkit-user-select: none; }
.wscell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-weight: 800;
  font-size: clamp(14px, calc(min(100vw, 1000px) / var(--n) / 2.4), 30px); border: 2px solid var(--line); border-radius: 8px;
  background: var(--card); cursor: pointer; }
.wscell.sel { outline: 4px solid var(--accent); outline-offset: -2px; }
.wscell.hint { animation: wshint 1s ease-in-out infinite; }
@keyframes wshint { 50% { background: #ffe08a; transform: scale(1.12); } }
.wscell.found.c0, .wswords .found.c0 { background: #cdeed6; } .wscell.found.c1, .wswords .found.c1 { background: #dbe8ff; }
.wscell.found.c2, .wswords .found.c2 { background: #fde2c8; } .wscell.found.c3, .wswords .found.c3 { background: #f3e8ff; }
.wscell.found.c4, .wswords .found.c4 { background: #fff4b8; } .wscell.found.c5, .wswords .found.c5 { background: #ffd6de; }
.wscell.found { color: #1f2933; border-color: transparent; }
.wswords { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wswords li { padding: .2em .6em; border-radius: 8px; border: 1px solid var(--line); }
.wswords li.found { text-decoration: line-through; color: #1f2933; }
.wsmsg { font-weight: 700; min-height: 1.4em; }
.wsmsg.yes { color: #1b7a3d; } .wsmsg.nope { color: #b3261e; }

/* Crossword */
.cwcard { display: grid; gap: 12px; }
.cwgrid { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 2px; width: min(100%, calc(var(--cols) * 50px)); margin: 0 auto; }
.cwblock { aspect-ratio: 1; }
.cwcell { aspect-ratio: 1; position: relative; border: 2px solid #1f2933; border-radius: 4px; background: #fff; }
.cwcell .cwnum { position: absolute; top: 1px; left: 3px; font-size: 11px; font-weight: 700; color: #1f2933; pointer-events: none; }
.cwin { width: 100%; height: 100%; border: 0; background: transparent; text-align: center; font: inherit; font-weight: 800; color: #1f2933;
  font-size: clamp(14px, calc(min(100vw, 900px) / var(--cols) / 2.2), 26px); text-transform: uppercase; padding: 0; caret-color: transparent; }
.cwin:focus { outline: none; }
.cwcell.cur { background: #dbe8ff; }
.cwcell:focus-within { background: #ffe08a; }
.cwcell.given .cwin, .cwcell.helped .cwin { color: #1e3a8a; }
.cwcell.ok { background: #cdeed6; }
.cwcell.bad { background: #fde2c8; border-color: #b7791f; }
.cwcell.shown .cwin { color: #b3261e; }
.cwlists { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.cwclues { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.cwclues li { padding: .3em .5em; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.cwclues li.cur { background: #dbe8ff; border-color: #9db8e8; }
.cwclues li.found { text-decoration: line-through; color: #1b7a3d; }

/* Word list library */
.libcard h2 { margin: 0; }
.libcard .wswords li { font-size: .9em; }

/* Printed word searches and crosswords (black and white, one puzzle per page) */
.printpage { background: #fff; color: #000; padding: 16px; margin: 12px 0; border: 1px dashed #999; }
.printpage h1 { font-size: 1.5em; margin: 0 0 .2em; }
.printpage .pline { margin: .6em 0; }
.pgrid { border-collapse: collapse; margin: 12px auto; }
.pgrid td { width: 1.25cm; height: 1.25cm; border: 1px solid #000; text-align: center; vertical-align: middle; font-size: 22px; font-weight: 700; color: #000; }
.pgrid td.ans { background: #ccc; text-decoration: underline; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pgrid.cw td { position: relative; width: 1.1cm; height: 1.1cm; }
.pgrid.cw td.blk { border: 0; }
.pgrid.cw sup { position: absolute; top: 1px; left: 3px; font-size: 10px; font-weight: 400; }
.plist { list-style: none; padding: 0; columns: 3; font-size: 18px; }
.pbank { font-size: 18px; word-spacing: .4em; }
.pclues2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pclues { list-style: none; padding: 0; font-size: 16px; }
@media print {
  .printpage { border: 0; margin: 0; padding: 0; break-after: page; }
  .printpage:last-child { break-after: auto; }
}

/* Teacher: Activities page */
.dash-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-head h1 { margin: 0; }
.dash-head .grade-pick { width: auto; min-width: 10em; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.chip-btn { font: inherit; font-size: .9em; font-weight: 600; color: var(--fg); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .25em .8em; cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); }
.chip-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.chip-btn.on .muted { color: inherit; opacity: .85; }
.chip-btn.add { border-style: dashed; background: transparent; }
.filter-bar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 8px 0 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.filter-bar .chips { margin: 0; flex: 1 1 auto; }
.filter-bar .search { width: 14em; flex: 0 1 14em; padding: .3em .7em; font: inherit; font-size: .9em; color: var(--fg); background: #fff;
  border: 1px solid var(--line); border-radius: 999px; }
.items .subject { margin-top: 14px; }
.items .subject h3 { font-size: .8em; text-transform: uppercase; letter-spacing: .06em; color: #5f6b7a; margin: 0 0 4px; }
.items .empty { padding: 1.5em 0; text-align: center; }
.item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; margin-bottom: 6px; }
.item:hover { border-color: #9db8e8; }
.item-icon { width: 44px; height: 44px; border-radius: 10px; border: 0; font-size: 22px; cursor: pointer; background: #eef2f6; }
.item.k-test .item-icon { background: #fde2c8; } .item.k-homework .item-icon { background: #dbe8ff; }
.item.k-reading .item-icon { background: #d9f2e1; } .item.k-practice .item-icon { background: #f0e4ff; }
.item-main { min-width: 0; }
.item-title { font: inherit; font-weight: 700; color: var(--fg); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.item-title:hover { color: var(--accent); text-decoration: underline; }
.item-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-actions { display: flex; gap: 6px; align-items: center; }
.item-actions .btn { padding: .3em .8em; white-space: nowrap; }
.pill { font-size: .78em; font-weight: 700; padding: .15em .7em; border-radius: 999px; white-space: nowrap; }
.pill.open { background: #cdeed6; color: #14532d; } .pill.draft { background: #e3e6ea; color: #3d4650; } .pill.locked { background: #fff4cc; color: #7a5200; }

/* Drop-down menus ("+ New" and "⋯") */
details.menu { position: relative; }
details.menu > summary { list-style: none; user-select: none; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu .menu-list { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 15em; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); padding: 6px; display: grid; gap: 2px; }
details.menu.right .menu-list { left: auto; right: 0; }
details.menu.primary .menu-list { min-width: 21em; }
.menu-item { font: inherit; text-align: left; display: flex; gap: 10px; align-items: flex-start; background: none; border: 0; border-radius: 8px; padding: .45em .6em;
  cursor: pointer; color: var(--fg); }
.menu-item:hover, .menu-item:focus-visible { background: #eef2f6; }
.menu-item .mi-icon { width: 1.4em; text-align: center; }
.menu-item strong { display: block; font-weight: 600; }
.menu-item .muted { display: block; line-height: 1.3; }
.menu-item.danger { color: #b3261e; }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
@media (max-width: 700px) {
  .item { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .item .pill { grid-column: 3; grid-row: 1; }
  .item-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .filter-bar .search { flex: 1 1 100%; width: auto; }
}

/* Word Guess: round tiles; colour AND a symbol for every mark, so it works for colour-blind learners */
.wgcard { display: grid; gap: 10px; justify-items: center; }
.wgcard > * { justify-self: stretch; }
.wginfo { font-size: 1.1em; font-weight: 600; text-align: center; }
.wgboard { display: grid; gap: 6px; justify-content: center; }
.wgrow { display: grid; grid-template-columns: repeat(var(--len), clamp(34px, calc((100vw - 80px) / var(--len)), 58px)); gap: 6px; }
.wgtile { aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center;
  position: relative; font-weight: 800; font-size: clamp(16px, 4vw, 26px); color: #1f2933; text-transform: uppercase; }
.wgrow.cur .wgtile { border-color: #9db8e8; }
.wgtile.filled { border-color: #1f2933; }
.wgtile.right { background: #0f766e; border-color: #0f766e; color: #fff; }
.wgtile.near { background: #f59e0b; border-color: #f59e0b; color: #1f2933; }
.wgtile.no { background: #6b7280; border-color: #6b7280; color: #fff; }
.wgmark { position: absolute; right: -4px; bottom: -4px; font-size: 12px; line-height: 1; background: #fff; color: #1f2933; border-radius: 50%;
  width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border: 1px solid #1f2933; }
.wgtile.mini { display: inline-flex; width: 1.6em; height: 1.6em; font-size: .9em; vertical-align: middle; }
.wglegend { text-align: center; }
.wgkeys { display: grid; gap: 6px; justify-content: center; }
.wgkeyrow { display: flex; gap: 5px; justify-content: center; }
.wgkey { font: inherit; font-weight: 700; min-width: 34px; height: 46px; padding: 0 .4em; border-radius: 8px; border: 1px solid var(--line); background: #e9edf2;
  color: #1f2933; cursor: pointer; }
.wgkey.wide { min-width: 64px; }
.wgkey.right { background: #0f766e; color: #fff; } .wgkey.near { background: #f59e0b; } .wgkey.no { background: #6b7280; color: #fff; opacity: .7; }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-decoration: underline dotted; }
@media (max-width: 500px) { .wgkey { min-width: 26px; height: 42px; font-size: .85em; } .wgkey.wide { min-width: 48px; } }

/* Sudoku */
.sucard { display: grid; gap: 10px; }
.sugrid { display: grid; grid-template-columns: repeat(var(--n), 1fr); width: min(100%, calc(var(--n) * 64px)); margin: 0 auto; border: 3px solid #1f2933;
  border-radius: 6px; overflow: hidden; background: #1f2933; gap: 1px; }
.sucell { aspect-ratio: 1; border: 0; background: #fff; font: inherit; font-weight: 600; color: #1d5fa8; cursor: pointer; padding: 0;
  font-size: clamp(18px, calc(min(100vw, 700px) / var(--n) / 2), 30px); }
.sugrid.pics .sucell { font-size: clamp(20px, calc(min(100vw, 700px) / var(--n) / 1.8), 34px); }
.sucell.br { margin-right: 2px; }
.sucell.bb { margin-bottom: 2px; }
.sucell.given { color: #1f2933; font-weight: 800; background: #f1f3f5; }
.sucell.peer { background: #e3f6f3; }
.sucell.same { background: #dbe8ff; }
.sucell.sel { background: #ffe08a; outline: 3px solid #1d5fa8; outline-offset: -3px; }
.sucell.clash { color: #b3261e; background: #ffe1e1; }
.sucell.wrong { background: #fde2c8; }
.sucell.helped { color: #0f766e; }
.sucell.shown { color: #b3261e; }
.supad { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.supad .sukey { min-width: 52px; font-size: 1.3em; }
/* Printed sudoku: thick lines around the boxes */
.pgrid.su td { width: 1.4cm; height: 1.4cm; font-size: 26px; }
.pgrid.su9 td { width: 1.1cm; height: 1.1cm; font-size: 20px; }
.pgrid.su td.br { border-right: 3px solid #000; } .pgrid.su td.bb { border-bottom: 3px solid #000; }
.pgrid.su { border: 3px solid #000; }
.pgrid.su td.ans { text-decoration: none; }

/* Learner home: one section at a time */
.home-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 760px; margin: 14px auto 0; }
.home-tab { font: inherit; display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 16px; border: 3px solid transparent;
  background: var(--card); color: var(--fg); cursor: pointer; position: relative; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.home-tab .ht-icon { font-size: 2em; line-height: 1.1; }
.home-tab .ht-name { font-weight: 700; }
.home-tab:hover { border-color: var(--line); }
.home-tab.on { border-color: var(--accent); background: #fff; }
.home-tab.t-tests.on { background: #fff1e4; } .home-tab.t-homework.on { background: #e6efff; }
.home-tab.t-reading.on { background: #e4f6ea; } .home-tab.t-games.on { background: #f3e9ff; }
.ht-count { position: absolute; top: 6px; right: 8px; min-width: 1.6em; padding: 0 .4em; border-radius: 999px; background: #e3e6ea; color: #1f2933;
  font-size: .75em; font-weight: 800; line-height: 1.6em; }
.ht-count.dot { background: #d97706; color: #fff; }
.home-body { margin-top: 10px; }
.empty-note { padding: 1em 0; }
.game-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 12px; }
.game-tile { font: inherit; display: grid; justify-items: center; gap: 4px; padding: 16px 8px; border-radius: 20px; border: 3px solid transparent;
  cursor: pointer; color: #1f2933; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); transition: transform .1s; }
.game-tile:hover { transform: translateY(-2px); }
.game-tile .gt-icon { font-size: 3em; line-height: 1.1; }
.game-tile .gt-name { font-weight: 800; font-size: 1.05em; }
.game-tile .gt-count { font-size: .8em; opacity: .8; }
.game-tile.on { border-color: #1f2933; transform: scale(1.03); }
.g-mathquiz { background: #ffe3c2; } .g-wordsearch { background: #d6e8ff; } .g-crossword { background: #d8f5df; }
.g-wordguess { background: #ffd9e5; } .g-sudoku { background: #efe2ff; }
@media (max-width: 560px) {
  .home-tabs { grid-template-columns: repeat(2, 1fr); }
  .game-tiles { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Teacher pages: a lighter, more modern look ===== */
body.teacher { --bg: #f3f5f9; background: #f3f5f9; --line: #e2e6ee; --accent: #0e7c73; color: #1f2937; }
body.teacher #app { max-width: 1080px; }
body.teacher .card { background: #fff; border: 0; border-radius: 16px; box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06); }
body.teacher .btn { border-width: 1px; border-radius: 10px; font-weight: 600; background: #fff; padding: .45em .95em; }
body.teacher .btn:hover { border-color: #b9c4d6; background: #f8fafc; }
body.teacher .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(14, 124, 115, .3); }
body.teacher .btn.primary:hover { background: #0b6a62; }
body.teacher .btn.subtle { background: transparent; border-color: transparent; } /* not .ghost: that is the drag-and-drop copy */
body.teacher .btn.danger { color: #b42318; }
body.teacher input, body.teacher select, body.teacher textarea { border-width: 1px; border-radius: 10px; }
/* top bar */
body.teacher header.bar:not(.sticky) { background: #fff; border-radius: 14px; padding: 8px 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); margin-bottom: 8px; }
body.teacher header.bar:not(.sticky) > strong { font-size: 1.05em; }
body.teacher header.bar:not(.sticky) .row .btn { border-color: transparent; background: transparent; color: #475467; border-radius: 999px; }
body.teacher header.bar:not(.sticky) .row .btn.primary { background: #e3f6f3; color: var(--accent); box-shadow: none; }
body.teacher .bar.sticky { background: rgba(243, 245, 249, .95); backdrop-filter: blur(6px); }
/* Activities: header, tabs, panel */
body.teacher .dash-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 18px 4px 12px; }
body.teacher .dash-head h1 { font-size: 1.7em; margin: 0 0 6px; letter-spacing: -.01em; }
body.teacher .dash-head .chips { margin: 0; align-items: center; }
body.teacher .dash-head .grade-pick { width: auto; font-weight: 700; padding: .3em .6em; border-radius: 999px; }
body.teacher .new-btn { padding: .65em 1.2em; font-size: 1.02em; border-radius: 12px; }
.t-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 6px; background: #e8ecf3; border-radius: 16px; }
.t-tab { font: inherit; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 8px; border: 0; border-radius: 12px;
  background: transparent; color: #475467; cursor: pointer; font-weight: 600; }
.t-tab:hover { background: rgba(255, 255, 255, .6); }
.t-tab.on { background: #fff; color: #111827; box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.t-tab .tt-icon { font-size: 1.3em; }
.t-tab .tt-count { font-size: .78em; font-weight: 700; padding: .05em .55em; border-radius: 999px; background: #d5dbe6; color: #344054; }
.t-tab.on .tt-count { background: #e3f6f3; color: var(--accent); }
.panel { background: #fff; border-radius: 16px; margin-top: 12px; padding: 12px 16px 16px; box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06); }
.panel-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.panel-tools .chips { margin: 0; }
body.teacher .chip-btn { background: #f2f4f7; border-color: transparent; color: #344054; }
body.teacher .chip-btn:hover { background: #e7eaf0; }
body.teacher .chip-btn.on { background: #111827; color: #fff; }
body.teacher .chip-btn.add { background: transparent; border: 1px dashed #c3cad6; }
.panel .item { border: 0; border-bottom: 1px solid #eef1f5; border-radius: 0; margin: 0; padding: 10px 6px; background: transparent; }
.panel .item:hover { background: #f8fafc; border-color: #eef1f5; }
.panel .subject:last-child .item:last-child { border-bottom: 0; }
.panel .items .subject h3 { margin: 10px 6px 2px; color: #667085; }
.empty-state { text-align: center; padding: 2.5em 1em; color: #475467; }
.empty-state .es-icon { font-size: 3em; }
/* the "+ New" window */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(16, 24, 40, .45); display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh 16px 16px; animation: fadein .12s ease-out; }
@keyframes fadein { from { opacity: 0; } }
.modal { background: #fff; border-radius: 18px; width: min(560px, 100%); padding: 18px; box-shadow: 0 20px 50px rgba(16, 24, 40, .25); font-size: 16px; }
.modal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.modal-head h2 { margin: 0; flex: 1; font-size: 1.25em; }
.icon-btn { font: inherit; width: 36px; height: 36px; border-radius: 10px; border: 0; background: #f2f4f7; cursor: pointer; }
.icon-btn:hover { background: #e7eaf0; }
.choices { display: grid; gap: 8px; }
.choices.grid { grid-template-columns: repeat(2, 1fr); }
.choices.grid .choice.wide { grid-column: 1 / -1; }
.choice { font: inherit; text-align: left; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid #e4e7ec;
  background: #fff; cursor: pointer; color: #1f2937; }
.choice:hover, .choice:focus-visible { border-color: var(--accent); background: #effaf8; }
.choice .ch-icon { font-size: 1.8em; width: 1.6em; text-align: center; }
.choice .ch-text { display: grid; }
.choice.g-mathquiz .ch-icon, .choice.g-wordsearch .ch-icon, .choice.g-crossword .ch-icon, .choice.g-wordguess .ch-icon, .choice.g-sudoku .ch-icon
  { border-radius: 12px; padding: 4px 0; }
.choice.g-mathquiz .ch-icon { background: #ffe3c2; } .choice.g-wordsearch .ch-icon { background: #d6e8ff; } .choice.g-crossword .ch-icon { background: #d8f5df; }
.choice.g-wordguess .ch-icon { background: #ffd9e5; } .choice.g-sudoku .ch-icon { background: #efe2ff; }
@media (max-width: 640px) {
  .t-tabs { grid-template-columns: repeat(2, 1fr); }
  .choices.grid { grid-template-columns: 1fr; }
  body.teacher .dash-head { align-items: stretch; }
  body.teacher .new-btn { width: 100%; }
}
body.teacher .panel-tools .search { width: 16em; padding: .4em .9em; font: inherit; font-size: .9em; color: #1f2937; background: #f8fafc; border: 1px solid #d0d5dd; border-radius: 999px; }
body.teacher .panel-tools .search:focus { background: #fff; }

/* Teacher forms: a comfortable width, and buttons only as wide as their text */
body.teacher .card > form.stack { max-width: 640px; }
body.teacher form.stack > .btn { align-self: flex-start; min-width: 10em; }

/* ScribblePal: the logo (pencil pal + name) and the brand font for teacher headings */
.brand { display: inline-flex; align-items: center; gap: .35em; font-family: 'Baloo 2', var(--font); font-weight: 800; letter-spacing: 0; word-spacing: 0;
  color: var(--fg); line-height: 1; margin: 0 0 .4em; }
.brand img { width: 1.7em; height: 1.7em; }
.brand b { color: #ff6b5b; font-weight: 800; }
.brand.big { font-size: 2.4em; margin: 0; }
.brand.small { font-size: .85em; margin: 0; }
.tagline { margin: .2em 0 1em; font-weight: 600; color: var(--accent); }
:root[data-tint="dark"] .brand b { color: #ff8a7d; }
.bar-brand { display: inline-flex; align-items: center; gap: .5em; }
.bar-brand img { width: 28px; height: 28px; }
body.teacher h1, body.teacher .modal-head h2 { font-family: 'Baloo 2', var(--font); font-weight: 800; letter-spacing: 0; }

/* Test editor, Forms style: one block open at a time, the rest one line each; contents down the side */
.qlayout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .qlayout { grid-template-columns: 1fr; } .outline { display: none; } }
.qmain { min-width: 0; }
.outline { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; margin-top: 14px; display: grid; gap: 1px; }
.outline-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #6b7280; font-weight: 700; padding: 2px 8px 6px; }
.oitem { all: unset; cursor: pointer; display: block; padding: 4px 8px; border-radius: 8px; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #374151; }
.oitem:hover { background: #f1f5f9; }
.oitem.ohead { font-weight: 700; color: #111827; margin-top: 6px; }
.oitem.on { background: #e3f6f3; color: #0b6a62; font-weight: 600; }
.oitem.warn { color: #a15c00; }
.oitem:focus-visible, .qline:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.totals { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; margin: 14px 0 10px; font-size: .92rem; color: #4b5563; }
.totals strong { color: #111827; font-size: 1.05rem; }
.linkish { all: unset; cursor: pointer; text-decoration: underline; }
.qline { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 6px 0; font-size: .95rem; }
.qline:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(15, 23, 42, .06); }
.qline.warn { border-left: 5px solid #e0a100; }
.qnum { flex: none; min-width: 2.6em; text-align: center; font-weight: 700; background: #e3f6f3; color: #0b6a62; border-radius: 8px; padding: 2px 6px; font-variant-numeric: tabular-nums; }
.qline-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1f2937; }
.qtype { font-size: .74rem; font-weight: 600; color: #6b7280; background: #f1f5f9; border-radius: 6px; padding: 1px 6px; margin-right: 8px; }
.qline-meta { flex: none; display: flex; gap: 10px; align-items: center; font-size: .8rem; }
.qmarks { color: #374151; font-weight: 600; min-width: 4.5em; text-align: right; font-variant-numeric: tabular-nums; }
.qmark.auto { color: #0b6a62; }
.qmark.self { color: #6b7280; }
.qwarn { color: #a15c00; font-weight: 600; }
.qline.qhead { background: #0e7c73; color: #fff; border-color: #0e7c73; margin-top: 18px; font-weight: 700; }
.qline.qhead .qline-text { color: #fff; white-space: normal; }
.qline.qhead .qline-edit { color: #d7f3ef; }
.qline.qinfo { background: #f8fafc; font-style: italic; }
.qline-edit { color: #9ca3af; }
.qedit.open { box-shadow: 0 6px 24px rgba(15, 23, 42, .12); border-left-width: 6px; scroll-margin-top: 80px; }
.qline { scroll-margin-top: 80px; }
.qedit-foot { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.qedit-foot .addhere { margin-right: auto; width: auto; }
.notice ul.plain { margin: .4em 0 0; padding-left: 0; list-style: none; display: grid; gap: .25em; }

/* Test editor header, Forms style: a big title, one row of settings, a small switch for the kind */
.bar-right { display: inline-flex; align-items: center; gap: 14px; }
.card.test-head { display: grid; gap: 14px; padding: 22px 24px; border-top: 8px solid var(--accent); }
.title-big { font-family: 'Baloo 2', var(--font); font-size: 1.9rem !important; font-weight: 800; border: none !important; border-bottom: 2px solid var(--line) !important; border-radius: 0 !important; padding: 4px 2px !important; background: transparent !important; }
.title-big:focus { outline: none; border-bottom-color: var(--accent) !important; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; align-items: start; }
@media (max-width: 800px) { .settings-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 4px; margin: 0; font-weight: 400; min-width: 0; }
.set-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: #6b7280; }
.field-static { padding: .45em .2em; color: #1f2937; cursor: help; }
.class-ticks { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.class-ticks label.check { margin: 0; font-weight: 500; }
.kind-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.kind-row > div:empty { display: none; }
.seg { display: inline-flex; background: #eef1f5; border-radius: 12px; padding: 4px; gap: 2px; }
.seg button { all: unset; cursor: pointer; padding: 6px 14px; border-radius: 9px; font-weight: 600; font-size: .92rem; color: #4b5563; }
.seg button.on { background: #fff; color: #0b6a62; box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }
.seg button:focus-visible { outline: 3px solid var(--accent); }
.inline-set { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.inline-set label.check { margin: 0; }
.inline-set input[type=number] { width: 5.5em; }
.inline-set input[type=datetime-local] { width: auto; }
.inline-set .muted[title] { cursor: help; }
.inline-set select { width: auto; }
details.instr summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .92rem; width: fit-content; }
details.instr textarea { margin-top: 8px; width: 100%; }
.switch { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; cursor: pointer; font-weight: 600; font-size: .9rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 22px; border-radius: 11px; background: #cbd2dc; position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }
.switch-text { color: #4b5563; }
