:root {
  color-scheme: light;
  --bg: #f3efe7;
  --paper: #fffaf0;
  --ink: #251b14;
  --muted: #715f50;
  --accent: #8c3f22;
  --accent-dark: #64250f;
  --line: #dfd0bd;
  --ok: #306847;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at top left, #ffe0b7, transparent 32rem), var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0; }
.hero { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 24px; }
.hero h1 { margin: 0; font-size: clamp(32px, 6vw, 64px); line-height: 0.95; letter-spacing: -0.05em; max-width: 780px; }
.hero p { color: var(--muted); max-width: 680px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); font-size: 12px; font-weight: 800; }

.card, .message {
  background: color-mix(in srgb, var(--paper) 92%, white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 60px rgb(72 42 19 / 12%);
}

.layout { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 20px; }
.grid { display: grid; gap: 16px; margin-top: 16px; align-items: end; }
.grid.two { grid-template-columns: 1fr auto; }
.hidden { display: none !important; }

label { display: grid; gap: 8px; margin: 14px 0; color: var(--muted); font-weight: 700; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px;
  background: #fffdf8; color: var(--ink); font: inherit;
}
textarea { resize: vertical; }

button {
  border: 0; border-radius: 999px; padding: 13px 18px; background: var(--accent); color: #fff;
  font-weight: 800; cursor: pointer; transition: transform 0.15s ease, opacity 0.15s ease;
}
button:hover { transform: translateY(-1px); }
button:disabled { opacity: 0.55; cursor: wait; transform: none; }
.secondary { background: var(--ok); }
.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }

.message { margin-bottom: 18px; border-color: #d7a17f; }
.list { display: grid; gap: 10px; }
.checkList { display: grid; gap: 8px; }
.checkItem { display: flex; gap: 10px; align-items: center; color: var(--ink); font-weight: 600; }
.checkItem input { width: auto; }
.topicMeta { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; font-weight: 600; }
.dangerText { color: #9b2f1c; }
.listItem { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: #fffdf8; }
.listItem button { margin-top: 10px; }
.examTop { display: flex; justify-content: space-between; gap: 16px; }
.statusGroup { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.pill { align-self: flex-start; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--muted); }
.pill.danger { border-color: #c45138; color: #9b2f1c; background: #ffe6de; }
.hint { color: var(--muted); }
.dialog { display: grid; gap: 12px; margin: 18px 0; }
.bubble { border-radius: 18px; padding: 14px; background: #fffdf8; border: 1px solid var(--line); white-space: pre-wrap; }
.bubble strong { color: var(--accent-dark); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 10px; vertical-align: top; }
.details { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; }

@media (max-width: 760px) {
  .shell { width: min(100% - 20px, 1120px); padding: 18px 0; }
  .hero, .examTop { display: grid; }
  .layout, .grid.two { grid-template-columns: 1fr; }
  .card { border-radius: 18px; padding: 18px; }
}
