/* Druid Edu: answer-sheet look. Green "drop-out ink" rules on white paper, graphite for marks. */
:root {
  --paper: #ffffff;
  --ink: #1d6b4c;          /* form-line green */
  --ink-soft: #d7eadf;     /* form fill */
  --ink-faint: #eef6f1;
  --graphite: #2a2d2c;     /* pencil marks and body text */
  --graphite-2: #5b615e;
  --pencil: #f3c331;       /* HB pencil yellow, used for focus only */
  --rule: 1.5px solid var(--ink);
  --font: "Public Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--graphite);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  font-feature-settings: "tnum" 1;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--pencil); outline-offset: 2px; }

.sheet { max-width: 1040px; margin: 0 auto; padding: 0 24px 72px; }

/* Header strip, like the top band of a test form */
.masthead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 22px 0 14px; border-bottom: 3px solid var(--ink);
}
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.masthead .note { font-size: 14px; color: var(--graphite-2); }

.intro { padding: 56px 0 40px; max-width: 40em; }
.intro h1 {
  margin: 0 0 14px; font-size: clamp(34px, 5.4vw, 56px); line-height: 1.12;
  font-weight: 800; letter-spacing: -0.02em;
}
.intro h1 .en { display: block; font-weight: 400; color: var(--graphite-2); font-size: 0.5em; letter-spacing: 0; margin-top: 8px; }
.intro p { margin: 0; color: var(--graphite-2); max-width: 34em; }

/* A part of the sheet */
.part { margin-top: 48px; }
.part-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  border-top: var(--rule); border-bottom: var(--rule);
  background: var(--ink-faint); padding: 10px 16px;
}
.part-head h2 { margin: 0; font-size: 22px; font-weight: 800; color: var(--ink); }
.part-head .en { font-size: 15px; color: var(--ink); opacity: .8; }
.part-head .hint { margin-left: auto; font-size: 14px; color: var(--graphite-2); }

/* Subject columns: IELTS / DET / SAT */
.subjects { display: grid; grid-template-columns: 1fr 1.5fr 1fr; border-bottom: var(--rule); }
.subject { padding: 18px 16px 22px; border-right: 1px solid var(--ink-soft); }
.subject:last-child { border-right: 0; }
.subject h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.subject h3 small { font-weight: 400; color: var(--graphite-2); font-size: 14px; margin-left: 6px; }
.subject .empty { margin: 14px 0 0; font-size: 15px; color: var(--graphite-2); }

/* One answer row: a bubble and the item */
.rows { list-style: none; margin: 10px 0 0; padding: 0; }
.row a {
  display: grid; grid-template-columns: 30px 1fr; column-gap: 10px;
  padding: 12px 6px; margin: 0 -6px; text-decoration: none; border-radius: 6px;
}
.row + .row a { border-top: 1px dashed var(--ink-soft); border-radius: 0; }
.bubble {
  width: 24px; height: 24px; margin-top: 2px; border-radius: 50%;
  border: 1.5px solid var(--ink); background: var(--paper);
  transition: background-color .15s ease, border-color .15s ease;
}
.row-title { font-weight: 700; line-height: 1.35; }
.row-desc { grid-column: 2; font-size: 15px; color: var(--graphite-2); line-height: 1.5; margin-top: 3px; }
.row a:hover .bubble, .row a:focus-visible .bubble { background: var(--graphite); border-color: var(--graphite); }
.row a:hover .row-title { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* Student code field, styled like the candidate-number boxes on a form */
.codebox { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: var(--rule); }
.codebox .explain { padding: 22px 16px; border-right: 1px solid var(--ink-soft); color: var(--graphite-2); font-size: 15px; }
.codebox .explain p { margin: 0 0 10px; max-width: 32em; }
.codebox form { padding: 22px 16px; }
.codebox label { display: block; font-weight: 700; margin-bottom: 10px; }
.codebox label span { font-weight: 400; color: var(--graphite-2); font-size: 14px; margin-left: 6px; }
.code-line { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.code-input {
  --box: 46px;
  width: calc(var(--box) * 6 + 3px); height: 56px; padding: 0 0 0 calc((var(--box) - 0.6em) / 2);
  font: 700 26px/56px "Courier Prime", ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: calc(var(--box) - 0.6em);
  text-transform: uppercase; color: var(--graphite); caret-color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 0;
  background:
    repeating-linear-gradient(to right, transparent 0 calc(var(--box) - 1.5px), var(--ink-soft) calc(var(--box) - 1.5px) var(--box)),
    var(--paper);
  background-clip: padding-box;
}
.code-input::placeholder { color: #c3d9cc; }
.code-input:focus { outline: 3px solid var(--pencil); outline-offset: 2px; }
.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none; display: inline-block;
  background: var(--ink); color: #fff; font: 700 16px/1 var(--font);
  padding: 18px 22px; border-radius: 4px;
}
.btn:hover { background: #155238; }
.msg { min-height: 1.6em; margin: 10px 0 0; font-size: 15px; color: #a03a2a; }

/* The Century Room: a doorway into the game's own world */
.door {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; border-bottom: var(--rule);
}
.door .scene {
  background: #f4efe6; color: #1a1a1a; padding: 34px 28px;
  font-family: "IM Fell English", Georgia, "Songti SC", serif;
  border-right: 1px solid var(--ink-soft);
}
.door .scene h3 { margin: 0 0 6px; font-size: clamp(30px, 4vw, 42px); font-weight: 400; line-height: 1.1; }
.door .scene .years { font-size: 19px; color: #6b2e23; margin: 0 0 18px; }
.door .scene p { margin: 0; max-width: 28em; font-size: 18px; line-height: 1.65; }
.door .info { padding: 30px 22px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.door .info ul { margin: 0; padding-left: 1.1em; color: var(--graphite-2); font-size: 15px; }
.door .info li + li { margin-top: 4px; }
.door .btn { align-self: flex-start; }

.footer { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--ink-soft); font-size: 14px; color: var(--graphite-2); }
.footer p { margin: 0 0 6px; max-width: 46em; }

/* Student page */
.back { display: inline-block; margin-top: 24px; font-size: 15px; color: var(--ink); }
.student-rows { border-bottom: var(--rule); padding: 6px 16px 14px; }

@media (max-width: 860px) {
  .subjects, .codebox, .door { grid-template-columns: 1fr; }
  .subject, .codebox .explain, .door .scene { border-right: 0; border-bottom: 1px solid var(--ink-soft); }
  .subject:last-child { border-bottom: 0; }
  .part-head .hint { margin-left: 0; width: 100%; }
}
@media (max-width: 420px) {
  .sheet { padding: 0 16px 56px; }
  .code-input { --box: 40px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
