:root {
  --page-bg: #d9d9d5;
  --card-bg: #ececea;
  --text: #242424;
  --muted: #5b5b58;
  --line: #c3c3be;
  --button: #3f3f3d;
  --button-hover: #242424;
  --button-text: #ffffff;
  --soft: #deded9;
  --soft-strong: #d0d0ca;
  --focus: #6b6b68;
  --danger-soft: #e7e3e3;
  --danger-line: #8a8a86;
  --max-width: 860px;
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: "Quicksand", "Trebuchet MS", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(120, 120, 114, 0.18), transparent 32rem),
    linear-gradient(135deg, #d0d0cc 0%, #e0e0dc 48%, #c9c9c4 100%);
  line-height: 1.6;
}

button,
a,
input {
  font: inherit;
}

.tool-shell {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 48px);
  box-shadow: 0 18px 48px rgba(36, 36, 36, 0.14);
}

.kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.96rem;
  letter-spacing: 0.02em;
}

h1,
h2,
h3 {
  line-height: 1.18;
  margin: 0 0 18px;
  font-weight: 500;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.3rem);
}

h3 {
  font-size: 1.25rem;
  margin-top: 28px;
}

p {
  margin: 0 0 18px;
  font-size: clamp(1.03rem, 1.7vw, 1.16rem);
}

.small {
  color: var(--muted);
  font-size: 0.96rem;
}

.notice {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin: 24px 0;
}

.urgent {
  background: var(--danger-soft);
  border-color: var(--danger-line);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 28px;
}

button,
.button-link {
  border: 0;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}

button:hover,
.button-link:hover {
  background: var(--button-hover);
  transform: translateY(-1px);
}


button:disabled,
button:disabled:hover {
  background: #ababaa;
  color: #eeeeec;
  cursor: not-allowed;
  transform: none;
}

.secondary,
.button-link.secondary {
  background: transparent;
  color: var(--button);
  border: 1px solid var(--button);
}

.secondary:hover,
.button-link.secondary:hover {
  background: var(--soft);
  color: var(--button-hover);
}

.text-link {
  color: var(--button);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.progress-wrap {
  margin-bottom: 28px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.progress-bar {
  background: var(--soft);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.progress-fill {
  background: var(--button);
  height: 100%;
  width: 0;
  transition: width 0.2s ease;
}

.answers {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.answer-option {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f3f3f0;
  color: var(--text);
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.answer-option:hover,
.answer-option.selected,
.answer-option[aria-pressed="true"] {
  border-color: var(--button);
  background: var(--soft);
  transform: translateY(-1px);
}

.answer-option:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.question-text {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.35;
  margin-top: 8px;
}

.summary-box {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin: 28px 0;
  padding: 20px;
}

.summary-box p:last-child {
  margin-bottom: 0;
}

.cta-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.secondary-note {
  margin-top: 18px;
}

.footer-note {
  margin-top: 26px;
  color: var(--muted);
  font-size: 0.95rem;
}

.status-message {
  min-height: 1.5em;
  margin-top: 12px;
  color: var(--muted);
}

@media (max-width: 600px) {
  .tool-shell {
    width: min(100% - 22px, var(--max-width));
    padding-top: 18px;
  }

  .card {
    border-radius: 18px;
    padding: 22px;
  }

  .actions,
  .cta-grid {
    display: grid;
  }

  button,
  .button-link {
    width: 100%;
  }
}

@media print {
  body {
    background: #fff;
  }

  .tool-shell {
    width: 100%;
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: 0;
  }

  .actions,
  .cta-grid,
  .progress-wrap,
  .footer-note {
    display: none !important;
  }
}
