:root {
  --bg: #f5f7ef;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --line: rgba(74, 74, 74, 0.12);
  --text: #4a4a4a;
  --muted: #66705e;
  --brand: #99cc1d;
  --brand-soft: #e5f2c6;
  --brand-strong: #7eb10f;
  --warm: #d11e2f;
  --shadow: 0 18px 44px rgba(74, 74, 74, 0.12);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(153, 204, 29, 0.16), transparent 24%),
    linear-gradient(180deg, #f8fbf1 0%, var(--bg) 100%);
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 56px;
}

.hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background:
    linear-gradient(90deg, rgba(74, 74, 74, 0.56), rgba(74, 74, 74, 0.18)),
    url("header.jpg") center center / cover no-repeat;
  color: #fff;
}

.hero-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 48px;
}

.eyebrow,
.section-label,
.question-kicker,
.detail-alias {
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow,
.hero .eyebrow {
  color: rgba(255, 255, 255, 0.9);
}

.section-label,
.question-kicker,
.detail-alias {
  color: var(--brand-strong);
}

.hero h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.1rem, 4vw, 3.25rem);
  line-height: 1.02;
  font-weight: 800;
}

.hero-copy {
  max-width: 760px;
  margin: 16px 0 0;
  font-size: 1.02rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  grid-template-areas:
    "steps question"
    "results results";
  gap: 24px;
  align-items: start;
  margin-top: 28px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel-steps,
.panel-question,
.panel-results {
  padding: 24px;
}

.panel-steps {
  grid-area: steps;
}

.panel-question {
  grid-area: question;
}

.panel-results {
  grid-area: results;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header h2,
.detail-panel h2 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
}

.steps-summary,
.progress-card,
.question-frame,
.tool-card,
.tool-empty,
.filter-chip,
.filter-empty {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.steps-summary,
.progress-card {
  padding: 16px 18px;
}

.steps-summary p {
  margin: 0;
}

.steps-summary p + p {
  margin-top: 8px;
  color: var(--muted);
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  width: 100%;
  margin: 0;
  padding-bottom: 24px;
}

.progress-label-row span:last-child {
  margin-left: auto;
  text-align: right;
}

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

.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #edf4db;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  transition: width 180ms ease;
}

.question-tabs {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.question-tab,
.ghost-button,
.secondary-button,
.primary-button,
.clear-selection,
.tool-button,
.drawer-close {
  border: 0;
  cursor: pointer;
}

.question-tab {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f0f0f0;
  color: #4a4a4a;
  text-align: left;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.question-tab:hover,
.ghost-button:hover,
.secondary-button:hover,
.primary-button:hover,
.tool-button:hover {
  transform: translateY(-1px);
}

.question-tab.is-current {
  background: var(--brand);
  color: #fff;
}

.question-tab.is-answered:not(.is-current) {
  background: var(--brand-soft);
}

.step-index {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.72;
}

.step-label {
  font-weight: 700;
}

.step-status {
  font-size: 0.9rem;
  color: inherit;
  opacity: 0.84;
}

.question-frame {
  padding: 24px;
}

.question-copy h3 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
}

.question-copy p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.options-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.option-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fffcf6;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.option-card:hover {
  transform: translateY(-1px);
  border-color: rgba(153, 204, 29, 0.42);
}

.option-card.is-selected {
  border-color: rgba(153, 204, 29, 0.7);
  background: #f6faea;
}

.option-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.option-title {
  font-weight: 600;
}

.option-meta {
  font-size: 0.92rem;
  color: var(--muted);
}

.clear-selection {
  margin-top: 18px;
  padding: 0;
  background: transparent;
  color: var(--warm);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.question-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.ghost-button,
.secondary-button,
.primary-button {
  padding: 12px 18px;
  border-radius: 10px;
}

.ghost-button,
.secondary-button {
  background: rgba(153, 204, 29, 0.12);
  color: var(--brand-strong);
}

.primary-button {
  background: var(--brand);
  color: #fff;
}

.secondary-button:disabled,
.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  transform: none;
}

.results-badge {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.export-button {
  white-space: nowrap;
}

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

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-chip,
.filter-empty {
  padding: 10px 12px;
  font-size: 0.95rem;
}

.tool-list {
  display: grid;
  gap: 14px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 28px;
  padding: 8px max(16px, calc((100vw - 1240px) / 2)) 0 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.footer-logo {
  display: block;
  width: auto;
  max-width: 270px;
  height: 90px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: auto;
  justify-content: flex-end;
  text-align: right;
}

.footer-nav a {
  color: var(--brand-strong);
  text-decoration: none;
  font-weight: 300;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.tool-card,
.tool-empty {
  padding: 18px;
}

.tool-card.is-active {
  border-color: rgba(153, 204, 29, 0.7);
  box-shadow: 0 10px 24px rgba(153, 204, 29, 0.12);
}

.tool-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.tool-copy {
  margin: 10px 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.tool-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.tool-button {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.loading-state,
.tool-empty,
.error-state,
.link-empty {
  color: var(--muted);
}

.detail-drawer {
  position: fixed;
  inset: 0;
  display: none;
}

.detail-drawer.is-open {
  display: block;
}

.detail-scrim {
  position: absolute;
  inset: 0;
  background: rgba(22, 31, 29, 0.45);
}

.detail-panel {
  position: absolute;
  right: 0;
  top: 0;
  width: min(560px, 100%);
  height: 100%;
  padding: 28px 24px 40px;
  background: #fffaf1;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
  overflow-y: auto;
}

.drawer-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(153, 204, 29, 0.12);
  color: var(--brand-strong);
  font-size: 1.8rem;
  line-height: 1;
}

.detail-short,
.detail-longtext p {
  color: var(--muted);
  line-height: 1.7;
}

.detail-links {
  margin-top: 28px;
}

.detail-links h3 {
  margin-bottom: 12px;
}

.detail-links > div {
  display: grid;
  gap: 12px;
}

.link-card {
  display: grid;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  margin-top: 8px;
}

.link-title {
  font-weight: 600;
}

.link-copy,
.link-url {
  color: var(--muted);
  font-size: 0.94rem;
  word-break: break-word;
}

@media (max-width: 960px) {
  .app-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "steps"
      "question"
      "results";
  }

  .hero-inner {
    padding: 42px 0 36px;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .page-shell,
  .hero-inner {
    width: min(100% - 20px, 1240px);
  }

  .panel-steps,
  .panel-question,
  .panel-results,
  .detail-panel,
  .site-footer {
    padding: 18px;
  }

  .question-frame {
    padding: 18px;
  }

  .panel-header,
  .question-actions,
  .tool-meta,
  .progress-meta,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .results-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .footer-nav {
    margin-left: 0;
    justify-content: flex-start;
    text-align: left;
  }

  .site-footer {
    padding-right: 16px;
  }

  .footer-logo {
    height: 30px;
  }
}
