:root {
  color-scheme: light;
  --bg: #efeae2;
  --paper: #fffdf8;
  --ink: #1e2430;
  --muted: #5c6570;
  --line: #e3d9cc;
  --green: #146c54;
  --green-dark: #0e4d3c;
  --green-soft: #e7f4ef;
  --warn: #8a3b24;
  --warn-bg: #f8ece6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.5 "Segoe UI", sans-serif;
}

a { color: var(--green-dark); }

main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

h1, h2 {
  font-family: Georgia, "Palatino Linotype", serif;
  font-weight: 600;
  line-height: 1.25;
}

h1 { font-size: 2rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.35rem; margin: 0 0 0.5rem; }

.lead, .hint, .meta, .crumb { color: var(--muted); }
.item { font-size: 1.55rem; }

.prompt-slot {
  height: 11rem;
  overflow: auto;
  margin: 0 0 1rem;
}

.prompt-slot .item,
.prompt-slot .hint {
  margin-top: 0;
}

.captcha { margin-top: 0.75rem; }
.captcha p { margin: 0; color: var(--muted); }

.cards { display: grid; gap: 1rem; }
.card, .flash, .problem, .resume {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.problem {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: #efd2c6;
}

.resume { margin-bottom: 1rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--green-dark);
  background: var(--green);
  color: white;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: transparent;
  color: var(--green-dark);
}

.button:disabled { opacity: 0.45; cursor: not-allowed; }

.button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.stack { display: grid; gap: 0.9rem; margin-top: 1rem; }
.stack.tight { margin-top: 1.5rem; }

fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.choice { display: block; margin: 0.35rem 0; }

.answers {
  display: grid;
  gap: 0.75rem;
  grid-auto-rows: 5.25rem;
}
.answers.two { grid-template-columns: 1fr 1fr; }

.button.answer {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  text-align: left;
  line-height: 1.35;
  align-items: center;
}

.button.answer:hover, .button.answer.is-chosen {
  background: var(--green-soft);
  border-color: var(--green);
}

.progress {
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--green);
}

.table-wrap { overflow-x: auto; margin: 1rem 0; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0.6rem;
  text-align: left;
}

.back { margin-top: 1.25rem; }

.cookie-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(30, 36, 48, 0.08);
}

.cookie-notice p {
  margin: 0;
  max-width: 42rem;
}

body.has-cookie-notice main {
  padding-bottom: 7.5rem;
}

.text-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .cookie-notice { flex-direction: column; align-items: stretch; }
  .answers,
  .answers.two { grid-template-columns: 1fr; grid-auto-rows: 6.5rem; }
  .prompt-slot { height: 13rem; }
  h1 { font-size: 1.7rem; }
}
