/* Direction: clean desk and good stationery — warm paper, deep ink-blue, one marigold accent */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #faf8f3;
  --surface: #ffffff;
  --surface-2: #f3f0e8;
  --border: #e4dfd3;
  --border-strong: #b0b0ae;
  --ink: #14213d;
  --muted: #5e6573;
  --accent: #1f3a5f;
  --accent-hover: #1a3151;
  --accent-ink: #ffffff;
  --accent-text: #1f3a5f;
  --accent-strong: #1f3a5f;
  --accent-soft: #e6ecf5;
  --accent-border: #97a3b0;
  --success: #1e7f4f;
  --success-ink: #ffffff;
  --success-soft: #e0e9df;
  --success-strong: #1c7549;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #f2e4d7;
  --warning-strong: #a64c08;
  --danger: #b42318;
  --danger-ink: #ffffff;
  --danger-soft: #f2ded9;
  --danger-strong: #b42318;
  --chart-1: #1f3a5f;
  --chart-2: #6d3680;
  --chart-3: #852533;
  --chart-4: #5c4c01;
  --chart-5: #00703e;
  --chart-6: #14688b;

  --font-display: "Plus Jakarta Sans", "Noto Sans Devanagari", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans Devanagari", system-ui, sans-serif;
  --display-weight: 700;
  --display-tracking: -0.01em;
  --radius-card: 10px;
  --radius-btn: 10px;
  --radius-input: 6px;
  --x-marigold: #d98e04;
  --x-marigold-text: #8f5a00;
  --x-marigold-bg: #fdf1d8;
  --x-info: #1d5fa8;
  --x-info-bg: #e2edf9;
  --x-violet: #5b3fc4;
  --x-violet-bg: #eee8fb;
  --x-ok: #17663f;
  --x-ok-bg: #e3f4ea;
  --x-warn: #9a4505;
  --x-warn-bg: #fdf0dc;
  --x-bad: #b42318;
  --x-bad-bg: #fbe7e5;
  --x-on-photo: #ffffff;
  --x-paper: #ffffff;
  --x-paper-ink: #111827;
  --x-band: #14213d;
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "Inter", "Noto Sans Devanagari", system-ui, sans-serif;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="dark"] {
  --canvas: #04080d;
  --surface: #1d2125;
  --surface-2: #111419;
  --border: #272b2f;
  --border-strong: #4f5256;
  --ink: #faf8f3;
  --muted: #989897;
  --accent: #1f3a5f;
  --accent-hover: #415877;
  --accent-ink: #ffffff;
  --accent-text: #8290a6;
  --accent-strong: #77869e;
  --accent-soft: #0a131f;
  --accent-border: #101e32;
  --success: #1e7f4f;
  --success-ink: #ffffff;
  --success-soft: #0a221c;
  --success-strong: #509b76;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #2b190c;
  --warning-strong: #c57a40;
  --danger: #b42318;
  --danger-ink: #ffffff;
  --danger-soft: #2b0e0f;
  --danger-strong: #ca6259;
  --chart-1: #4f6c95;
  --chart-2: #a46ab8;
  --chart-3: #c15c64;
  --chart-4: #a87514;
  --chart-5: #58923f;
  --chart-6: #16a8ab;
}

/* Paper Plan — the printed sheet and the login backdrop. Tokens only. */

.a4 {
  position: relative;
  width: 210mm;
  max-width: 100%;
  min-height: 297mm;
  margin: 0 auto;
  padding: 18mm 15mm;
  background: var(--x-paper);
  color: var(--x-paper-ink);
  font-family: "Tinos", "Times New Roman", "Noto Serif Devanagari", serif;
  font-size: 12pt;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.a4 .wm {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 56pt;
  font-weight: 700;
  line-height: 1.1;
  transform: rotate(-30deg);
  opacity: 0.06;
  pointer-events: none;
}
.a4 .hd { display: grid; grid-template-columns: 22mm 1fr auto; gap: 6mm; align-items: start; border-bottom: 1.5px solid var(--x-paper-ink); padding-bottom: 3mm; }
.a4 .hd .school { font-size: 18pt; font-weight: 700; text-align: center; line-height: 1.15; }
.a4 .hd .addr { font-size: 10pt; text-align: center; }
.a4 .roll { display: flex; }
.a4 .roll span { width: 6mm; height: 7mm; border: 1px solid var(--x-paper-ink); margin-left: -1px; }
.a4 .rollcap { font-size: 9pt; text-align: right; }
.a4 .exam { text-align: center; font-size: 14pt; font-weight: 700; margin: 3mm 0 1mm; }
.a4 .meta { display: grid; grid-template-columns: 1fr 1fr; font-size: 11pt; border-bottom: 1px solid var(--x-paper-ink); padding-bottom: 2mm; gap: 0 8mm; }
.a4 .meta div:nth-child(even) { text-align: right; }
.a4 .gi { font-size: 11pt; margin: 3mm 0; }
.a4 .gi ol { margin: 1mm 0 0 5mm; padding: 0; list-style: decimal; }
.a4 .sec { text-align: center; font-weight: 700; text-transform: uppercase; font-size: 12pt; margin: 6mm 0 1mm; letter-spacing: 0.04em; }
.a4 .secnote { text-align: center; font-style: italic; font-size: 11pt; margin-bottom: 3mm; }
.a4 .q { break-inside: avoid; margin: 3mm 0; display: grid; grid-template-columns: 8mm 1fr auto; gap: 0 2mm; }
.a4 .q .mk { font-weight: 700; white-space: nowrap; }
.a4 .q .body { white-space: pre-line; }
.a4 .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 1mm 6mm; margin-top: 1mm; }
.a4 .opts.long { grid-template-columns: 1fr; }
.a4 .or { text-align: center; font-weight: 700; margin: 2mm 0; }
.a4 .ans { margin-top: 1mm; padding-left: 3mm; border-left: 2px solid var(--x-paper-ink); font-size: 11pt; white-space: pre-line; }
.a4 .ftr { display: flex; justify-content: space-between; border-top: 1px solid var(--x-paper-ink); margin-top: 8mm; padding-top: 2mm; font-size: 9pt; }
.a4 .end { text-align: center; margin-top: 6mm; font-weight: 700; }
.a4 table.mt { width: 100%; border-collapse: collapse; margin-top: 1mm; }
.a4 table.mt td { padding: 0.5mm 2mm; width: 50%; }

.desk-grain {
  background-image: linear-gradient(135deg, transparent 0 48%, var(--x-marigold) 48% 52%, transparent 52% 100%);
  background-size: 28px 28px;
  opacity: 0.18;
}
.paper-stack { transform: rotate(-3deg); }
.paper-stack > div:nth-child(2) { transform: rotate(4deg) translate(14px, -6px); }
.outline-link { display: flex; justify-content: space-between; gap: 8px; padding: 4px 8px; border-radius: 6px; font-size: 13px; }
.outline-link:hover { background: var(--accent-soft); }
.qblock:target { outline: 2px solid var(--x-marigold); outline-offset: 2px; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary .chev { transform: rotate(180deg); }

@keyframes pp-rise { from { transform: translateY(10px); } to { transform: none; } }
.pp-rise { animation: pp-rise 0.24s cubic-bezier(0.2, 0, 0, 1) both; }
html.reduced-motion .pp-rise { animation: none; }

@media print {
  .no-print { display: none !important; }
  body { background: var(--x-paper) !important; }
  .a4 { box-shadow: none; margin: 0; padding: 0; width: auto; min-height: 0; }
  @page { size: A4; margin: 18mm 15mm; }
}
