:root {
  --bg: #fffdf8;
  --bg-soft: #fff4e8;
  --surface: #ffffff;
  --line: #eadfcd;
  --text: #1f2328;
  --muted: #5c6670;
  --brand: #d8661a;
  --brand-dark: #a44a12;
  --accent: #1f7a68;
  --max: 1040px;
  --radius: 16px;
  --shadow: 0 14px 34px rgba(61, 34, 9, 0.1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fffdf8 0%, #fff8ee 45%, #ffffff 100%);
  line-height: 1.55;
}

img { max-width: 100%; }
a { color: var(--brand-dark); }

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
  background: rgba(255, 253, 248, 0.92);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 14px;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn {
  display: inline-block;
  padding: 11px 16px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
}

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

.btn-primary:hover { background: var(--brand-dark); }

.btn-secondary {
  border-color: var(--line);
  color: var(--text);
  background: #fff;
}
.btn + .btn { margin-left: 10px; }

main { padding-bottom: 56px; }
section { padding: 48px 0; }

.hero { padding-top: 54px; }
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}
.hero p {
  margin: 0 0 24px;
  color: var(--muted);
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions .btn + .btn {
  margin-left: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card h3, .card h2 { margin-top: 0; }

.entry-card p { margin: 0; }

.section-title {
  margin: 0 0 8px;
}

.section-lead {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 760px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.list { margin: 0; padding-left: 18px; }
.list li { margin-bottom: 8px; }

.muted { color: var(--muted); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

th, td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  vertical-align: top;
  white-space: normal;
  min-width: 140px;
}

th { font-size: 0.87rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }

.disclosure {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  font-size: 0.9rem;
  color: var(--muted);
}

.guide-form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-weight: 600;
  font-size: 0.92rem;
}

.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.field select[multiple] {
  min-height: 134px;
  padding: 8px;
}

.field select:focus {
  outline: 2px solid rgba(216, 102, 26, 0.25);
  border-color: var(--brand);
}

.field-help {
  color: var(--muted);
  font-size: 0.82rem;
}

.field-wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-actions .btn + .btn {
  margin-left: 0;
}

.guide-result p {
  margin-top: 0;
}

.result-disclaimer {
  margin-top: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf3;
  color: var(--muted);
  font-size: 0.92rem;
}

.result-priority {
  margin: 8px 0 14px;
  padding-left: 18px;
}

.result-priority li {
  margin-bottom: 8px;
}

.result-score {
  color: var(--muted);
  font-size: 0.86rem;
}

.guide-category {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.guide-category.is-top {
  border-color: var(--brand);
  box-shadow: 0 16px 36px rgba(168, 78, 18, 0.18);
  transform: translateY(-2px);
}

.guide-category.is-secondary {
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(31, 122, 104, 0.12);
}

@media (max-width: 840px) {
  .nav-links { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
