:root {
  --bg: #EEF2EF; --card: #FFFFFF; --ink: #12201B; --muted: #5A6B64; --line: #D5DED9; --soft: #F5F8F6;
  --accent: #0D7459; --accent-ink: #fff; --accent-soft: #DCEEE7;
  --mark: #A86A12; --mark-soft: #F8ECD3; --bad: #B3261E; --bad-soft: #F9E3E1; --ok: #1E7A3C; --ok-soft: #DDF1E3;
  --r: 10px; --shadow: 0 1px 2px rgba(18,32,27,.06), 0 6px 24px rgba(18,32,27,.07);
  --f: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, "SFMono-Regular", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--f); min-height: 100vh; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); } .center { text-align: center; } .pad { padding: 40px 0; } .small { font-size: 13.5px; }
.mono { font-family: var(--mono); font-size: .92em; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.brand b { display: block; font-size: 16px; } .brand small { display: block; color: var(--muted); font-size: 12.5px; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); position: relative; flex: none; }
.logo::before, .logo::after { content: ""; position: absolute; width: 9px; height: 9px; background: #fff; border-radius: 2px; }
.logo::before { left: 7px; top: 8px; } .logo::after { left: 14px; top: 13px; }
.top-right { display: flex; gap: 10px; align-items: center; font-size: 14px; }
main { max-width: 1060px; margin: 0 auto; padding: 28px 20px 80px; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 20px; margin: 0 0 12px; } h3 { font-size: 16px; margin: 18px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 24px; margin-bottom: 18px; }
.narrow { max-width: 620px; margin-left: auto; margin-right: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card); padding: 9px 16px; border-radius: 8px; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn.danger { color: var(--bad); border-color: #E7B8B4; } .btn.danger:hover { background: var(--bad-soft); }
.btn.big { padding: 13px 22px; font-size: 17px; }
.btn.sm { padding: 4px 9px; font-size: 13px; border-radius: 6px; }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .opt:focus-within, .tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } .top { padding: 10px 14px; } main { padding: 18px 12px 80px; } .card { padding: 18px; } }
label.f { display: block; font-weight: 500; margin: 14px 0 6px; font-size: 14.5px; }
input[type=text], input[type=email], input[type=number], select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; }
textarea { resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; }
.check input { margin-top: 4px; }
.note { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 14px; color: var(--muted); }
.warn { background: var(--mark-soft); border-left: 3px solid var(--mark); border-radius: 0 8px 8px 0; padding: 10px 14px; font-size: 14.5px; }
.err { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 10px 14px; font-size: 14.5px; margin-top: 12px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.pill.mark { background: var(--mark-soft); color: var(--mark); } .pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.grey { background: #ECEFED; color: var(--muted); } .pill.ok { background: var(--ok-soft); color: var(--ok); }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.room { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--card); cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.room:hover { border-color: var(--accent); }
.room b { font-size: 17px; }
.list { list-style: none; margin: 0; padding: 0; } .list li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.list li:first-child { border-top: 0; }
.rules { margin: 0; padding-left: 20px; } .rules li { margin: 4px 0; }
.wait-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse 1.6s infinite; margin-right: 8px; vertical-align: 0; }
@keyframes pulse { 0%,100% { opacity: .25 } 50% { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .wait-dot, .timer.crit { animation: none !important; } }

/* vizsga */
.examhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.examhead .t { font-size: 14px; color: var(--muted); }
.timer { position: fixed; top: 64px; right: 18px; z-index: 30; font-family: var(--mono); font-size: 14px; color: var(--muted); background: rgba(255,255,255,.88); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; }
.timer.warn { color: var(--mark); border-color: var(--mark); background: var(--mark-soft); font-weight: 600; }
.timer.crit { color: var(--bad); border-color: var(--bad); background: var(--bad-soft); font-weight: 700; animation: pulse 1.4s infinite; }
.savestate { font-size: 13px; color: var(--muted); } .savestate.bad { color: var(--bad); font-weight: 600; }
.qcard { min-height: 320px; }
.qnum { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.qprompt { font-size: 19px; line-height: 1.5; margin: 8px 0 18px; }
.qhint { font-size: 13.5px; color: var(--muted); margin: -8px 0 14px; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px; cursor: pointer; background: #fff; }
.opt:hover { border-color: var(--accent); }
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt .ltr { font-family: var(--mono); font-weight: 700; color: var(--accent); min-width: 18px; }
.opt input { margin-top: 5px; accent-color: var(--accent); }
.tfrow, .mrow { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; background: #fff; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 7px 14px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: #fff; }
.mrow select { width: auto; min-width: 240px; max-width: 100%; }
@media (max-width: 720px) { .tfrow, .mrow { grid-template-columns: 1fr; } .mrow select { min-width: 0; width: 100%; } }
.ord { display: flex; flex-direction: column; gap: 8px; }
.ord .it { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #fff; }
.ord .it .k { font-family: var(--mono); font-weight: 700; color: var(--accent); }
.numin { max-width: 260px; display: flex; gap: 10px; align-items: center; } .numin input { font-family: var(--mono); font-size: 18px; }
.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.markbtn.on { background: var(--mark-soft); border-color: var(--mark); color: var(--mark); }
.gridbox { margin-top: 6px; }
.remain { font-size: 14px; color: var(--muted); margin-bottom: 8px; } .remain b { color: var(--ink); }
.tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.tile { min-width: 38px; height: 38px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-family: var(--mono); font-size: 14px; position: relative; }
.tile.done { background: var(--accent-soft); border-color: #9CCDBB; color: var(--accent); font-weight: 600; }
.tile.marked::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--mark); }
.tile.cur { outline: 2px solid var(--ink); outline-offset: 1px; }
.tile.wide { font-family: var(--f); font-weight: 600; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--line); }
.legend .l1::before { background: var(--accent-soft); border-color: #9CCDBB; } .legend .l2::before { background: var(--mark); border-radius: 50%; border: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.topicbox { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--soft); font-size: 14.5px; margin-top: 10px; }
.essay { min-height: 380px; line-height: 1.6; font-size: 16px; }
.wc { font-size: 13.5px; color: var(--muted); } .wc.ok { color: var(--ok); } .wc.low { color: var(--mark); }
.res-q { border-top: 1px solid var(--line); padding: 14px 0; } .res-q:first-child { border-top: 0; }
.res-q .a { font-size: 14px; margin-top: 6px; } .res-q .why { font-size: 14px; color: var(--muted); margin-top: 4px; }
.score-big { font-size: 40px; font-weight: 700; color: var(--accent); }
.receipt { font-family: var(--mono); font-size: 22px; letter-spacing: .08em; background: var(--soft); border: 1px dashed var(--line); border-radius: 8px; padding: 10px 16px; display: inline-block; }

/* oktatói */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
table.t td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.sub td { background: #FAFCFB; }
.tablewrap { overflow-x: auto; }
.stat { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.stat div { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.stat b { display: block; font-size: 22px; } .stat span { font-size: 12.5px; color: var(--muted); }
.topicpick { columns: 2; column-gap: 24px; font-size: 14px; } .topicpick label { display: flex; gap: 8px; break-inside: avoid; padding: 3px 0; }
@media (max-width: 720px) { .topicpick { columns: 1; } }
.scorein { display: grid; grid-template-columns: 1fr 90px; gap: 10px; align-items: center; margin: 6px 0; }
.essaytext { white-space: pre-wrap; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 16px; line-height: 1.6; max-height: 560px; overflow: auto; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14.5px; z-index: 50; max-width: 90vw; }
.code-show { font-family: var(--mono); font-size: 30px; letter-spacing: .12em; font-weight: 700; }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--accent); }
.mt { margin-top: 14px; } .jc { justify-content: center; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; min-width: 150px; }
@media (max-width: 720px) {
  .brand small, .top-right .addr { display: none; }
  .brand b { font-size: 15px; }
  .timer { top: auto; bottom: 12px; right: 12px; font-size: 15px; box-shadow: var(--shadow); }
}
