/*
  buatbelajar — teacher dashboard prototype
  Direction: "Map Snelhecter" (see website/DESIGN.md), calmed down for daily use
  by teachers of any age.
  - Folder blue = navigation ground. Paper = every content surface.
  - Tab Yellow = the ONE next action on a screen. Never decoration.
  - Sharp corners everywhere. Atkinson Hyperlegible throughout: 700 for headings (28–36px titles, 22–26px sections), 400 body at 18px+ / 1.55.
  - Base text 18px, 48px tap targets, labels on every icon.
  Signature: the four-step folder-tab path on Beranda.
*/

:root {
  --folder-blue: #1d5fd1;
  --folder-blue-deep: #1749a6;
  --folder-blue-night: #123a85;
  --action-yellow: #f2c12e;
  --action-yellow-hi: #ffd34d;
  --student-green: #177a42;
  --ink: #17203a;
  --paper: #f6f7f2;
  --paper-shade: #eceee5;
  --white: #ffffff;
  --ruled: #d6d9cd;
  --pencil: #545c6e;
  --on-blue-soft: #dbe6fb;
  --red: #b4261b;

  /* Basecoat theme mapped onto the brand */
  --radius: 0px;
  --background: var(--paper);
  --foreground: var(--ink);
  --card: var(--white);
  --card-foreground: var(--ink);
  --popover: var(--white);
  --popover-foreground: var(--ink);
  --primary: var(--ink);
  --primary-foreground: var(--paper);
  --secondary: var(--paper-shade);
  --secondary-foreground: var(--ink);
  --muted: var(--paper-shade);
  --muted-foreground: var(--pencil);
  --accent: var(--paper-shade);
  --accent-foreground: var(--ink);
  --destructive: var(--red);
  --border: var(--ruled);
  --input: #b9bfb0;
  --ring: var(--folder-blue);
  --font-sans: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;

  --display: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rail-w: 264px;
  --gutter: clamp(16px, 3.5vw, 48px);
  --shadow-sheet: 0 1px 0 rgba(23, 32, 58, .06), 0 10px 24px -14px rgba(18, 58, 133, .45);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html { font-size: 112.5%; } /* 18px base: every Basecoat rem scales up with it */
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--action-yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--folder-blue); outline-offset: 2px; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 99;
  background: var(--action-yellow); color: var(--ink); padding: 10px 16px; font-weight: 700;
}
.skip:focus { left: 8px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0;
}
h1 { font-size: clamp(28px, 3vw, 36px); }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
p { margin: 0; }
.muted { color: var(--pencil); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail-w) 1fr; min-height: 100vh; }

.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 24px;
  padding: 24px 16px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 2px, transparent 2px 7px),
    linear-gradient(170deg, var(--folder-blue) 0%, var(--folder-blue-deep) 60%, var(--folder-blue-night) 100%);
  color: var(--white);
}
.brand {
  font-family: var(--display);
  font-weight: 700; font-size: 26px; color: var(--white); text-decoration: none; padding: 0 8px;
}
.brand span { color: var(--action-yellow); }

.class-pick {
  display: grid; gap: 2px; padding: 12px 14px;
  background: rgba(255,255,255,.1); border-left: 4px solid var(--action-yellow);
}
.class-pick__label { font-size: 14px; color: var(--on-blue-soft); }
.class-pick strong { font-size: 18px; }

.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 14px;
  min-height: 52px; padding: 0 14px;
  color: var(--white); text-decoration: none; font-size: 18px; font-weight: 600;
  border-left: 4px solid transparent;
  transition: background-color .15s var(--ease);
}
.nav a:hover { background: rgba(255,255,255,.1); }
.nav a[aria-current="page"] {
  background: var(--paper); color: var(--ink); border-left-color: var(--action-yellow);
}
.nav svg, .help-wa svg {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round;
}

.rail__foot { margin-top: auto; display: grid; gap: 12px; }
.credit {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 14px; border-top: 1px solid rgba(255,255,255,.25);
  font-size: 15px; color: var(--on-blue-soft);
}
.credit strong { color: var(--white); font-size: 18px; font-variant-numeric: tabular-nums; }
.help-wa {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px;
  background: var(--white); color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none;
}
.help-wa:hover { background: var(--paper); }
.reset {
  background: none; border: 0; color: var(--on-blue-soft); font: inherit; font-size: 14px;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; padding: 4px 14px;
}

main { padding: 32px var(--gutter) 96px; min-width: 0; outline: none; }
.page { max-width: 1040px; display: grid; gap: 28px; }
.page-head { display: grid; gap: 8px; }
.page-head .lede { font-size: 19px; color: var(--pencil); max-width: 60ch; }
.crumb { font-size: 16px; }
.crumb a { color: var(--folder-blue); text-underline-offset: 3px; }

/* ---------- Buttons (Basecoat .btn, sized up) ---------- */
.btn { min-height: 48px; padding-inline: 20px; font-size: 18px; font-weight: 700; gap: 8px; cursor: pointer; }
.btn[data-size="sm"] { min-height: 40px; padding-inline: 14px; font-size: 16px; }
.btn[data-variant="action"] {
  background: var(--action-yellow); color: var(--ink); border-color: var(--action-yellow);
  font-family: var(--display); font-weight: 700; font-size: 19px;
  min-height: 56px; padding-inline: 26px;
}
.btn[data-variant="action"]:hover { background: var(--action-yellow-hi); }
.btn[data-variant="outline"] { border: 2px solid var(--ink); background: transparent; color: var(--ink); }
.btn[data-variant="outline"]:hover { background: var(--ink); color: var(--paper); }
.btn[data-variant="ghost"] { color: var(--folder-blue); text-decoration: underline; text-underline-offset: 4px; padding-inline: 8px; }
.btn[data-variant="ghost"]:hover { background: transparent; color: var(--folder-blue-deep); }
.btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Sheet (paper clipped on a folder) ---------- */
.sheet {
  position: relative; background: var(--white); border: 1px solid var(--ruled);
  box-shadow: var(--shadow-sheet); padding: 28px;
}
.sheet > * + * { margin-top: 18px; }
.sheet--flat { box-shadow: none; }

/* ---------- Signature: four-step folder-tab path ---------- */
.path { display: grid; gap: 0; }
.path__intro { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 38px; }
.path__count { font-size: 18px; color: var(--pencil); }
.path__count strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.step {
  position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px;
  padding: 22px 20px 20px; background: var(--white); border: 1px solid var(--ruled);
  box-shadow: var(--shadow-sheet); min-height: 290px;
}
/* folder tab on top of each step */
.step::before {
  content: attr(data-n);
  position: absolute; top: -22px; left: -1px;
  height: 22px; padding: 0 14px; display: flex; align-items: center;
  font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .04em;
  background: var(--paper-shade); color: var(--pencil); border: 1px solid var(--ruled); border-bottom: 0;
}
.step[data-state="now"] { border: 2px solid var(--ink); }
.step[data-state="now"]::before { background: var(--action-yellow); color: var(--ink); border-color: var(--ink); }
.step[data-state="done"]::before { background: var(--folder-blue); color: var(--white); border-color: var(--folder-blue); }
.step[data-state="later"] { background: var(--paper); box-shadow: none; }
.step[data-state="later"] .step__art { opacity: .55; }
.step__art { height: 92px; display: flex; align-items: end; }
.step__art svg { height: 92px; width: auto; }
.step h3 { font-size: 21px; }
.step p { color: var(--pencil); font-size: 16px; }
.step .done-note { display: flex; gap: 8px; align-items: center; font-weight: 700; color: var(--folder-blue-deep); font-size: 16px; }
.step .done-note svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; }

/* ---------- Generic blocks ---------- */
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.stack { display: grid; gap: 16px; }
.hint {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; background: #eef3fc; border-left: 4px solid var(--folder-blue); font-size: 18px;
}
.hint svg { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--folder-blue); stroke-width: 2; }
.warn { background: #fff7db; border-left-color: var(--action-yellow); }
.warn svg { stroke: var(--ink); }

.empty-art { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 24px 12px; }
.empty-art > svg { width: 180px; height: auto; }
.empty-art p { max-width: 44ch; color: var(--pencil); font-size: 18px; }

/* Form fields */
.field-x { display: grid; gap: 8px; }
.field-x label, .field-x .label-x { font-weight: 700; font-size: 18px; }
.field-x .help { font-size: 16px; color: var(--pencil); }
.input, .textarea, select.input {
  font-size: 18px !important; min-height: 50px; border: 2px solid var(--input) !important;
  background: var(--white) !important; padding: 10px 14px !important; width: 100%; box-sizing: border-box;
  font-family: inherit; color: var(--ink);
}
.textarea { min-height: 220px; line-height: 1.6; resize: vertical; }
.input:focus, .textarea:focus { border-color: var(--folder-blue) !important; outline: none; box-shadow: 0 0 0 3px rgba(29,95,209,.25); }

/* Choice tiles (radio as big cards) */
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.choice { position: relative; cursor: pointer; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice__body {
  display: grid; gap: 8px; height: 100%; box-sizing: border-box;
  padding: 18px; background: var(--white); border: 2px solid var(--ruled);
}
.choice__body svg { height: 64px; width: auto; justify-self: start; }
.choice__body strong { font-family: var(--display); font-size: 19px; font-weight: 700; }
.choice__body span { color: var(--pencil); font-size: 16px; }
.choice__body em { font-style: normal; font-size: 15px; font-weight: 700; color: var(--folder-blue-deep); }
.choice input:checked + .choice__body { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fffbea; }
.choice input:focus-visible + .choice__body { outline: 3px solid var(--folder-blue); outline-offset: 2px; }

/* Check rows (topics, questions) */
.checks { display: grid; border-top: 1px solid var(--ruled); }
.check-row {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; align-items: start;
  padding: 14px 4px; border-bottom: 1px solid var(--ruled); cursor: pointer;
}
.check-row input[type="checkbox"] { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--ink); cursor: pointer; }
.check-row strong { font-size: 18px; display: block; }
.check-row small { font-size: 15px; color: var(--pencil); display: block; margin-top: 2px; }

/* Topic block in curriculum */
.topic { border: 1px solid var(--ruled); background: var(--white); }
.topic + .topic { margin-top: 12px; }
.topic header { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--paper); border-bottom: 1px solid var(--ruled); }
.topic header strong { font-size: 19px; }
.topic header small { color: var(--pencil); font-size: 15px; display: block; font-weight: 400; }
.topic ul { list-style: none; margin: 0; padding: 4px 18px 10px; }
.topic li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--ruled); font-size: 18px; }
.topic li:last-child { border-bottom: 0; }
.topic li .tp { flex: none; font-size: 13px; font-weight: 700; color: var(--folder-blue-deep); background: #eef3fc; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.topic li input.inline-edit { flex: 1; border: 0; border-bottom: 2px solid transparent; font: inherit; color: inherit; background: transparent; padding: 4px 0; }
.topic li input.inline-edit:hover { border-bottom-color: var(--ruled); }
.topic li input.inline-edit:focus { border-bottom-color: var(--folder-blue); outline: none; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--ruled); background: var(--white); }
.tbl { width: 100%; border-collapse: collapse; font-size: 18px; }
.tbl th { text-align: left; font-size: 15px; color: var(--pencil); font-weight: 600; padding: 12px 16px; background: var(--paper); border-bottom: 2px solid var(--ink); }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--ruled); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; letter-spacing: .04em; }

/* Status tags (shape + text, not color alone) */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; padding: 3px 10px; border: 1.5px solid currentColor; white-space: nowrap; }
.tag::before { content: ""; width: 8px; height: 8px; background: currentColor; }
.tag[data-s="draf"] { color: var(--pencil); }
.tag[data-s="draf"]::before { background: transparent; border: 1.5px solid currentColor; width: 6px; height: 6px; }
.tag[data-s="terjadwal"] { color: var(--folder-blue-deep); }
.tag[data-s="berlangsung"] { color: var(--student-green); }
.tag[data-s="berlangsung"]::before { border-radius: 50%; }
.tag[data-s="selesai"] { color: var(--ink); }
.tag[data-s="ok"] { color: var(--student-green); border-color: transparent; padding-inline: 0; }
.tag[data-s="cek"] { color: #8a5a00; }

/* Wizard progress */
.wizard-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.wizard-steps li {
  padding: 10px 18px 8px; font-weight: 700; font-size: 16px; color: var(--pencil);
  background: var(--paper-shade); margin-right: 4px; display: flex; gap: 8px; align-items: center;
}
.wizard-steps li b { font-family: var(--display); font-variant-numeric: tabular-nums; }
.wizard-steps li[aria-current="step"] { background: var(--ink); color: var(--paper); }
.wizard-steps li.done { background: var(--folder-blue); color: var(--white); }
.wizard-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--ruled); }

/* Question preview */
.q { padding: 16px 18px; border: 1px solid var(--ruled); background: var(--white); display: grid; gap: 10px; }
.q + .q { margin-top: 10px; }
.q__head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.q__no { font-family: var(--display); font-weight: 700; font-size: 16px; }
.q__meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--pencil); }
.q__stem { font-size: 18px; }
.q ol { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 4px; }
.q ol li { font-size: 18px; padding: 4px 10px; display: flex; gap: 10px; }
.q ol li b { width: 18px; flex: none; }
.q ol li.key { background: #e8f4ec; font-weight: 600; }
.q ol li.key::after { content: "Kunci"; margin-left: auto; font-size: 13px; font-weight: 700; color: var(--student-green); }
.q__actions { display: flex; gap: 4px; flex-wrap: wrap; }

/* Summary list */
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 0; border-top: 1px solid var(--ruled); }
.summary dt, .summary dd { padding: 12px 0; border-bottom: 1px solid var(--ruled); margin: 0; font-size: 18px; }
.summary dt { color: var(--pencil); padding-right: 32px; }
.summary dd { font-weight: 600; }

/* Settings rows */
.set-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.toggle-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--ruled); }
.toggle-row strong { display: block; font-size: 18px; }
.toggle-row small { color: var(--pencil); font-size: 15px; }
.toggle-row input[type="checkbox"] { width: 52px; height: 30px; accent-color: var(--ink); cursor: pointer; flex: none; }
details.more { border-top: 1px solid var(--ruled); }
details.more summary { cursor: pointer; padding: 14px 0; font-weight: 700; font-size: 18px; color: var(--folder-blue); list-style: none; display: flex; align-items: center; gap: 8px; }
details.more summary::before { content: "+"; font-family: var(--display); font-size: 22px; width: 18px; }
details.more[open] summary::before { content: "–"; }

/* WhatsApp slip */
.wa-slip {
  background: #e7f6dd; border: 1px solid #c4e2b0; padding: 18px 20px; white-space: pre-wrap;
  font-size: 18px; line-height: 1.55; max-width: 560px;
  box-shadow: 0 8px 18px -12px rgba(0,0,0,.35); transform: rotate(-.4deg);
}

/* Stamp (teacher decision) */
.stamp {
  display: inline-block; padding: 8px 18px 6px; border: 3px double var(--folder-blue-deep);
  color: var(--folder-blue-deep); font-family: var(--display);
  font-weight: 700; font-size: 26px; letter-spacing: .06em; transform: rotate(-4deg); mix-blend-mode: multiply;
}
@media (prefers-reduced-motion: no-preference) {
  .stamp.land { animation: land .45s var(--ease) both; }
  @keyframes land { from { transform: rotate(-4deg) scale(1.6); opacity: 0; } to { transform: rotate(-4deg) scale(1); opacity: 1; } }
}

/* Tests list on home */
.test-list { display: grid; border-top: 2px solid var(--ink); }
.test-row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--ruled); }
.test-row strong { font-size: 18px; display: block; }
.test-row small { color: var(--pencil); font-size: 15px; }

/* Login cards (print) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.login-card { border: 2px dashed var(--ink); padding: 14px 16px; background: var(--white); display: grid; gap: 4px; font-size: 16px; }
.login-card strong { font-size: 19px; font-family: var(--display); }
.login-card .row { display: flex; justify-content: space-between; }
.login-card .row b { font-family: ui-monospace, Menlo, monospace; letter-spacing: .06em; }

/* Loading */
.working { display: flex; gap: 14px; align-items: center; padding: 24px; background: var(--white); border: 1px solid var(--ruled); font-size: 18px; }
.working .bar { flex: 1; height: 10px; background: var(--paper-shade); overflow: hidden; position: relative; }
.working .bar span { position: absolute; inset: 0; width: 40%; background: var(--folder-blue); }
@media (prefers-reduced-motion: no-preference) {
  .working .bar span { animation: slide 1.1s ease-in-out infinite; }
  @keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
}

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--ink); color: var(--paper); padding: 14px 22px; font-weight: 700; font-size: 18px;
  border-left: 6px solid var(--action-yellow); max-width: calc(100vw - 32px);
}

/* Dialog */
dialog.dlg { border: 0; padding: 0; max-width: min(560px, calc(100vw - 32px)); background: var(--white); color: var(--ink); box-shadow: 0 24px 60px -20px rgba(0,0,0,.5); }
dialog.dlg::backdrop { background: rgba(18, 58, 133, .55); }
dialog.dlg .dlg__body { padding: 28px; display: grid; gap: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .grid-2 { grid-template-columns: 1fr; }
  .choices { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 40;
    flex-direction: row; padding: 0; gap: 0;
  }
  .brand, .class-pick, .rail__foot { display: none; }
  .nav { grid-template-columns: repeat(4, 1fr); width: 100%; gap: 0; }
  .nav a { flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; font-size: 13px; padding: 4px; border-left: 0; border-top: 4px solid transparent; }
  .nav a[aria-current="page"] { border-top-color: var(--action-yellow); }
  main { padding: 20px 16px 110px; }
  .mobile-top { display: flex !important; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  .set-row { grid-template-columns: 1fr; }
  .sheet { padding: 20px 16px; }
  .test-row { grid-template-columns: 1fr; gap: 8px; }
  .summary { grid-template-columns: 1fr; }
  .summary dt { border-bottom: 0; padding-bottom: 0; }
  .toast { bottom: 84px; }
}
.mobile-top { display: none; justify-content: space-between; align-items: center; margin: -4px 0 16px; }
.mobile-top .brand { display: block; color: var(--ink); padding: 0; font-size: 22px; }
.mobile-top .brand span { color: var(--folder-blue); }
.mobile-top a.wa { font-size: 15px; font-weight: 700; color: var(--folder-blue); }

@media print {
  .rail, .no-print, .toast { display: none !important; }
  .shell { display: block; }
  main { padding: 0; }
  .login-card { break-inside: avoid; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.sheet.btn-row > * + * { margin-top: 0; }
.sheet.btn-row { padding-block: 20px; }
.wizard-foot.sticky { position: sticky; bottom: 0; z-index: 5; background: var(--paper); padding: 14px 0; box-shadow: 0 -10px 18px -14px rgba(23,32,58,.35); }
@media (max-width: 820px) { .wizard-foot.sticky { bottom: 68px; } }
.q.flag { border: 2px solid var(--action-yellow); border-left-width: 8px; background: #fffbea; }
.test-row .tag { justify-self: start; }
details.more > .path { padding: 12px 0 24px; }
@media (max-width: 820px) {
  .wizard-foot.sticky { flex-wrap: nowrap; padding: 10px 0; }
  .wizard-foot.sticky > :last-child { flex: 1; }
  .wizard-foot.sticky .btn[data-variant="action"] { width: 100%; font-size: 18px; padding-inline: 12px; }
  .wizard-foot.sticky .btn[data-variant="outline"] { padding-inline: 14px; }
  .wizard-steps li { padding: 8px 10px 6px; font-size: 14px; }
}

/* Locked feature tiles (Free tier) */
.choice--locked { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; }
.choice--locked .choice__body { background: var(--paper); border-style: dashed; }
.choice--locked .choice__body svg:first-child { opacity: .45; filter: grayscale(1); }
.choice--locked .choice__body > strong, .choice--locked .choice__body > span { color: var(--pencil); }
.choice--locked:hover .choice__body { border-color: var(--ink); }
.lock, .lock-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--ink) !important; }
.lock svg, .lock-badge svg { width: 18px !important; height: 18px !important; fill: none; stroke: currentColor; stroke-width: 2; opacity: 1 !important; filter: none !important; }
.lock-badge { justify-self: start; font-weight: 700; font-size: 15px; background: var(--action-yellow); padding: 4px 10px; }
.perks { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 18px; }
.perks li { padding-left: 28px; position: relative; }
.perks li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 12px; height: 7px; border-left: 3px solid var(--student-green); border-bottom: 3px solid var(--student-green); transform: rotate(-45deg); }
.sheet .wizard-foot.sticky { background: var(--white); }
dialog.dlg { margin: auto; }

/* ===== v3: multi-class + after-exam ===== */
a.class-pick { color: var(--white); text-decoration: none; }
a.class-pick:hover { background: rgba(255,255,255,.16); }
#class-switch { color: var(--action-yellow); font-weight: 700; }
.no-class .nav, .no-class .class-pick { display: none; }

.welcome { grid-template-columns: 200px 1fr; align-items: center; gap: 24px; }
.welcome svg { width: 200px; height: auto; }

.subjects { display: flex; flex-wrap: wrap; gap: 10px; }
.subj { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border: 2px solid var(--ink); background: #fffbea; font-weight: 700; font-size: 18px; }
.subj input { width: 20px; height: 20px; accent-color: var(--ink); }
.subj--soon { border: 2px dashed var(--ruled); background: var(--paper); color: var(--pencil); font-weight: 600; }
.subj--soon em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--folder-blue-deep); background: #eef3fc; padding: 2px 8px; }
.check-row input[type="radio"] { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--ink); cursor: pointer; }

/* class strip on home */
.class-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.class-chip { display: grid; gap: 2px; min-width: 160px; padding: 14px 18px; background: var(--white); border: 1px solid var(--ruled); border-top: 5px solid var(--folder-blue); text-align: left; font: inherit; color: inherit; cursor: pointer; text-decoration: none; }
.class-chip:hover { border-color: var(--ink); border-top-color: var(--folder-blue); }
.class-chip strong { font-family: var(--display); font-size: 22px; font-weight: 700; }
.class-chip span { font-size: 15px; color: var(--pencil); }
.class-chip--add { border-style: dashed; border-top: 1px dashed var(--ruled); background: var(--paper); }
.class-chip--add strong { font-size: 18px; color: var(--folder-blue); }
.class-chip--add svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2; }

/* classes page */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.class-card { background: var(--white); border: 1px solid var(--ruled); box-shadow: var(--shadow-sheet); display: grid; }
.class-card.is-active { border: 2px solid var(--ink); }
.class-card header { padding: 16px 20px; background: var(--folder-blue); color: var(--white); display: grid; gap: 2px; }
.class-card header strong { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1; }
.class-card header span { color: var(--on-blue-soft); font-size: 15px; }
.class-card dl { display: grid; grid-template-columns: max-content 1fr; margin: 0; padding: 8px 20px; }
.class-card dt, .class-card dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--ruled); font-size: 16px; }
.class-card dt { color: var(--pencil); padding-right: 20px; }
.class-card dd small { color: var(--pencil); }
.class-card .mono { font-family: ui-monospace, Menlo, monospace; letter-spacing: .05em; }
.class-card footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px 18px; }
.class-card--add { place-content: center; justify-items: center; gap: 8px; padding: 28px; border: 2px dashed var(--ruled); background: var(--paper); box-shadow: none; text-decoration: none; color: var(--ink); text-align: center; }
.class-card--add:hover { border-color: var(--ink); }
.class-card--add svg { width: 140px; height: auto; }
.class-card--add strong { font-family: var(--display); font-size: 20px; color: var(--folder-blue); }

/* callouts (next action blocks) */
.callout { display: grid; grid-template-columns: 120px 1fr auto; gap: 20px; align-items: center; padding: 18px 22px; background: var(--white); border: 2px solid var(--ink); border-left: 8px solid var(--action-yellow); box-shadow: var(--shadow-sheet); }
.callout svg { width: 120px; height: auto; }
.callout h3 { font-size: 21px; margin-bottom: 4px; }
.callout p { color: var(--pencil); font-size: 18px; }
.callout--quiet { border: 1px solid var(--ruled); border-left: 8px solid var(--ruled); box-shadow: none; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--white); border: 1px solid var(--ruled); }
.tile { display: grid; gap: 2px; padding: 18px 22px; border-left: 1px solid var(--ruled); }
.tile:first-child { border-left: 0; }
.tile span { font-size: 15px; color: var(--pencil); font-weight: 600; }
.tile strong { font-family: var(--display); font-size: 44px; font-weight: 700; line-height: 1; }
.tile strong small { font-size: 22px; color: var(--pencil); font-weight: 700; }
.tile > small { font-size: 14px; color: var(--pencil); }

/* answer distribution (item check) */
.dist { display: grid; gap: 4px; }
.dist__row { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 48px; gap: 12px; align-items: center; padding: 6px 10px; font-size: 18px; }
.dist__row em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--student-green); border: 1.5px solid currentColor; padding: 0 6px; margin-left: 6px; }
.dist__row.is-alt { background: #fff3c4; }
.dist__bar { height: 14px; background: var(--paper-shade); position: relative; }
.dist__bar span { position: absolute; inset: 0 auto 0 0; background: var(--folder-blue); border-radius: 0 4px 4px 0; }
.dist__row.is-key .dist__bar span { background: var(--student-green); }
.dist__row .num { text-align: right; font-weight: 700; }

/* horizontal bars (single series, mastery band shade) */
.hbars { display: grid; gap: 14px; }
.hbar { display: grid; grid-template-columns: minmax(150px, 220px) 1fr 108px; gap: 16px; align-items: center; }
.hbar__label { font-weight: 700; font-size: 18px; display: grid; }
.hbar__label small { font-weight: 400; font-size: 14px; color: var(--pencil); }
.hbar__track { position: relative; height: 22px; background: var(--paper-shade); }
.hbar__fill { position: absolute; inset: 0 auto 0 0; border-radius: 0 4px 4px 0; }
.hbar__na { position: absolute; inset: 0; display: flex; align-items: center; padding-left: 10px; font-size: 14px; color: var(--pencil);
  background: repeating-linear-gradient(45deg, transparent 0 5px, rgba(185,192,201,.6) 5px 7px); }
.hbar__kkm, .hbar__avg { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.hbar__avg { background: var(--pencil); width: 2px; }
.hbar__val { font-family: var(--display); font-size: 22px; font-weight: 700; display: grid; }
.hbar__val small { font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--pencil); }
[data-b="lemah"] { background: #dce6f8; }
[data-b="cukup"] { background: #7fa4e6; }
[data-b="kuat"] { background: #1749a6; }
.hbar__fill[data-b="lemah"] { background: #a9c0ec; }

/* heatmap table */
.tbl.heat th { white-space: normal; min-width: 92px; font-size: 14px; }
.tbl.heat td.cell { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; border: 2px solid var(--white); padding: 10px 8px; }
.tbl.heat td.cell[data-b="kuat"] { color: var(--white); }
.tbl.heat td.cell[data-b="na"] { background: repeating-linear-gradient(45deg, var(--paper) 0 5px, var(--prong, #b9c0c9) 5px 7px); }
.tbl.heat td.cell[data-b="abs"] { background: var(--paper); }
.tbl.heat td a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 15px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 22px; height: 16px; display: inline-block; border: 1px solid var(--ruled); }
.legend i[data-b="na"] { background: repeating-linear-gradient(45deg, var(--paper) 0 4px, #b9c0c9 4px 6px); }

/* per-question rows */
.item-row { display: grid; grid-template-columns: 80px 1fr auto; gap: 14px; align-items: start; padding: 10px 4px; border-bottom: 1px solid var(--ruled); font-size: 16px; }
.item-row small { display: block; color: var(--pencil); font-size: 14px; margin-top: 2px; }
.item-row.is-void { opacity: .55; text-decoration: line-through; }
.item-row .mark { font-weight: 700; font-size: 15px; }
.item-row.is-ok .mark { color: var(--student-green); }
.item-row.is-bad .mark { color: var(--red); }
.item-row.is-bad .mark::before { content: "✕ "; }
.item-row.is-ok .mark::before { content: "✓ "; }

/* student report */
.report-top { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: stretch; }
.score-card { display: grid; align-content: center; gap: 4px; padding: 22px; background: var(--white); border: 2px solid var(--ink); }
.score-card span { color: var(--pencil); font-size: 16px; font-weight: 600; }
.score-card strong { font-family: var(--display); font-size: 72px; font-weight: 700; line-height: .95; }
.score-card em { font-style: normal; font-weight: 700; font-size: 18px; color: #8a5a00; display: inline-flex; gap: 6px; align-items: center; }
.score-card.is-pass em { color: var(--student-green); }
.score-card em svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; }
.score-card small { color: var(--pencil); font-size: 15px; }
.mat-link { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 10px 14px; border: 1px solid var(--ruled); background: var(--paper); text-decoration: none; color: var(--ink); }
.mat-link:hover { border-color: var(--ink); }
.mat-link svg { width: 64px; height: auto; }
.mat-link small { display: block; color: var(--pencil); font-size: 14px; }
.for-who { font-size: 18px; padding: 12px 16px; background: var(--white); border-left: 4px solid var(--student-green); }

/* demo box */
.demo-box { display: grid; gap: 10px; padding: 16px 18px; border: 2px dashed var(--folder-blue); background: #eef3fc; }
.demo-box p { font-size: 16px; }
.demo-tag { justify-self: start; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--white); background: var(--folder-blue); padding: 3px 8px; }
.numbered { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 18px; list-style: decimal; }

.tag[data-s="periksa"] { color: #8a5a00; }
.tag[data-s="dirilis"] { color: var(--student-green); }
.material-sheet h2 { font-size: 28px; }
.answer-key { border-top: 3px solid var(--ink); }
.print-only { display: none; }
.lock { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; }
.btn .lock, .btn svg + * { }
.over { color: #8a5a00; }

/* mobile top: class switch */
.mobile-top .m-class { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; border: 2px solid var(--ink); padding: 4px 10px; }
.mobile-top .m-class span { font-family: var(--font-sans); font-size: 13px; color: var(--folder-blue); font-weight: 700; margin-left: 4px; }

@media (max-width: 1080px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile:nth-child(3) { border-left: 0; }
  .tile:nth-child(n+3) { border-top: 1px solid var(--ruled); }
  .report-top { grid-template-columns: 1fr; }
  .callout { grid-template-columns: 80px 1fr; }
  .callout svg { width: 80px; }
  .callout > :last-child { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 820px) {
  .nav { grid-template-columns: repeat(5, 1fr); }
  .no-class .rail { display: none; }
  .welcome { grid-template-columns: 1fr; }
  .welcome svg { width: 140px; }
  .hbar { grid-template-columns: 1fr 64px; row-gap: 4px; }
  .hbar__label { grid-column: 1 / -1; }
  .hbar__val { font-size: 18px; }
  .dist__row { grid-template-columns: 1fr 44px; }
  .dist__bar { grid-column: 1 / -1; grid-row: 2; }
  .tile strong { font-size: 36px; }
  .item-row { grid-template-columns: 1fr auto; }
  .item-row .q__no { grid-column: 1 / -1; }
}
@media print {
  .print-only { display: block; }
  details.more { display: none; }
  .q__actions, .btn-row { display: none !important; }
}
.toast { bottom: 100px; }
.subj > svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.6; }

/* own curriculum */
.choices--2 { grid-template-columns: repeat(2, 1fr); }
button.choice { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.choice:not(.choice--locked):hover .choice__body { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
button.choice:focus-visible { outline: 3px solid var(--folder-blue); outline-offset: 2px; }
.choice--na { cursor: not-allowed; }
.choice--na em { font-style: normal; font-size: 15px; font-weight: 700; color: var(--pencil); }
.topic--own header { align-items: flex-start; }
.own-head { display: grid; gap: 2px; flex: 1; }
.own-no { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--folder-blue-deep); }
.own-name { font-size: 19px !important; font-weight: 700; }
.own-note { font-size: 15px !important; color: var(--pencil); }
@media (max-width: 1080px) { .choices--2 { grid-template-columns: 1fr; } }
.help-wa { white-space: nowrap; font-size: 15px; gap: 8px; padding: 0 12px; }

/* Student list: detail + actions menu */
.students-tbl td:nth-last-child(-n+2) { width: 1%; white-space: nowrap; }
.menu-wrap { display: inline-block; }
.menu-wrap .btn svg { width: 18px; height: 18px; transition: transform .15s var(--ease); }
.menu-wrap .btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.menu-wrap .btn[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
.menu { position: fixed; z-index: 60; min-width: 220px; display: grid; padding: 6px 0; background: var(--white); border: 2px solid var(--ink); box-shadow: 0 16px 32px -16px rgba(18, 58, 133, .55); }
.menu[hidden] { display: none; }
.menu__item { all: unset; box-sizing: border-box; display: flex; align-items: center; min-height: 48px; padding: 0 18px; font-size: 18px; font-weight: 700; color: var(--ink); cursor: pointer; }
.menu__item:hover, .menu__item:focus-visible { background: var(--paper-shade); }
.menu__item:focus-visible { outline: 3px solid var(--folder-blue); outline-offset: -3px; }
.menu__item.is-danger { color: var(--red); border-top: 1px solid var(--ruled); }

/* Student detail */
.id-strip { display: flex; flex-wrap: wrap; gap: 0; margin: 4px 0 0; border: 1px solid var(--ruled); background: var(--white); width: fit-content; max-width: 100%; }
.id-strip > div { padding: 10px 18px; border-left: 1px solid var(--ruled); }
.id-strip > div:first-child { border-left: 0; }
.id-strip dt { font-size: 14px; color: var(--pencil); }
.id-strip dd { margin: 0; font-size: 18px; font-weight: 700; }
.id-strip .mono { font-family: ui-monospace, Menlo, monospace; letter-spacing: .05em; }
.tiles--3 { grid-template-columns: repeat(3, 1fr); }
.hbar-group { display: grid; gap: 4px; }
.tp-list { margin-left: 0; }
.tp-list summary { cursor: pointer; font-size: 15px; color: var(--folder-blue); font-weight: 700; width: fit-content; }
.tp-list ul { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; gap: 4px; }
.tp-list li { display: flex; gap: 10px; align-items: baseline; font-size: 16px; }
.tp-list .tp { flex: none; font-size: 13px; font-weight: 700; color: var(--folder-blue-deep); background: #eef3fc; padding: 2px 8px; }
.sw { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 0; align-items: start; }
.sw dt { font-weight: 700; padding-top: 4px; }
.sw dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; font-size: 16px; font-weight: 700; color: var(--ink); }
.chip[data-b="kuat"] { color: var(--white); }
@media (max-width: 820px) {
  .tiles--3 { grid-template-columns: 1fr; }
  .tiles--3 .tile { border-left: 0; border-top: 1px solid var(--ruled); }
  .tiles--3 .tile:first-child { border-top: 0; }
  .sw { grid-template-columns: 1fr; }
}
.help a { color: var(--folder-blue); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 820px) {
  .students-tbl thead { display: none; }
  .students-tbl, .students-tbl tbody { display: block; }
  .students-tbl tr { display: grid; grid-template-columns: auto 1fr 1fr; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--ruled); align-items: center; }
  .students-tbl td { display: block; padding: 0; border: 0; }
  .students-tbl .st-no { grid-row: 1; color: var(--pencil); }
  .students-tbl .st-name { grid-row: 1; grid-column: 2 / -1; font-weight: 700; font-size: 19px; }
  .students-tbl td[data-label] { grid-column: span 1; font-size: 17px; }
  .students-tbl td[data-label]::before { content: attr(data-label); display: block; font-family: var(--font-sans); font-size: 13px; color: var(--pencil); letter-spacing: 0; }
  .students-tbl td[data-label="Nama pengguna"] { grid-column: 2; }
  .students-tbl td[data-label="PIN"] { grid-column: 3; }
  .students-tbl .st-act { grid-column: span 1; margin-top: 8px; width: auto; }
  .students-tbl .st-act:nth-last-child(2) { grid-column: 1 / 3; }
  .students-tbl .st-act .btn { width: 100%; }
  .students-tbl .st-act .menu-wrap { display: block; }
}
@media (max-width: 820px) { .students-tbl td.st-act { width: auto !important; white-space: normal; } }

/* SPEC alignment additions */
.st-name .nis, .nis { display: block; font-size: 14px; font-weight: 400; color: var(--pencil); }
.used-tag { flex: none; font-size: 13px; font-weight: 700; color: var(--folder-blue-deep); background: #eef3fc; padding: 2px 8px; }
.topic.is-archived { opacity: .75; border-style: dashed; }
.topic.is-archived .used-tag { color: var(--pencil); background: var(--paper-shade); }
.arch-list { margin: 0 0 12px; padding-left: 22px; list-style: disc; font-size: 18px; color: var(--pencil); }
.wm { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 1; font-size: 64px; font-weight: 700; color: rgba(23, 32, 58, .05); transform: rotate(-24deg); white-space: nowrap; }
@media (max-width: 820px) { .wm { font-size: 34px; } }
@media print { .wm { color: rgba(23, 32, 58, .08); } }
