@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #1b1c1f;
  --muted: #5a5f66;
  --accent: #e10600;
  --accent-2: #b40000;
  --accent-3: #2b2b2b;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --line: #e5e7eb;
  --bg: #f2f3f5;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.06);
  --green: #16a34a;
  --green-2: #15803d;
  --green-bg: #f0fdf4;
  --green-line: #bbf7d0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.container {
  max-width: 980px;
  margin: 40px auto 80px;
  padding: 0 20px;
}

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 18px 22px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  padding-right: 160px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px;
  flex-shrink: 0;
}

.brand-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 3px;
}

h1, h2, h3 {
  font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

/* ── Language Switch ── */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9rem;
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}

.lang-toggle a {
  text-decoration: none;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-toggle a.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 4px 8px rgba(225, 6, 0, 0.2);
}

.lang-toggle a:hover:not(.active) {
  color: var(--accent);
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  position: relative;
  animation: fadeUp 0.5s ease both;
}

.card + .card {
  margin-top: 16px;
}

/* ── Survey Form ── */
.survey-form {
  padding: 24px;
}

/* ── Stepper ── */
.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin: 0 0 16px;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  cursor: default;
  min-width: 80px;
}

.step-node.completed {
  cursor: pointer;
}

.step-bubble {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.step-check {
  display: none;
  width: 15px;
  height: 15px;
}

.step-node.active .step-bubble {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 6, 0, 0.28);
}

.step-node.completed .step-bubble {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.step-node.completed .step-num {
  display: none;
}

.step-node.completed .step-check {
  display: block;
}

.step-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-node.active .step-label {
  color: var(--accent);
}

.step-node.completed .step-label {
  color: var(--green);
}

.step-connector {
  flex: 1;
  height: 2px;
  background: var(--line);
  align-self: flex-start;
  margin-top: 18px;
  min-width: 32px;
  transition: background 0.4s ease;
}

.step-connector.filled {
  background: var(--green);
}

/* ── Progress bar ── */
.progress-wrap {
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px;
  width: 0%;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Step Heading ── */
.step-heading {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.step-heading-item.hidden { display: none; }

.step-of {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

/* ── Section / Question label ── */
.section-title {
  font-weight: 600;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.help {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 2px;
  line-height: 1.5;
}

/* ── Required dot ── */
.required-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

/* ── Field error ── */
.field-error {
  color: #c53030;
  font-size: 0.83rem;
  margin-top: 6px;
  font-weight: 500;
}

.question-card.has-error {
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.08);
}

/* ── Inputs ── */
input[type='text'],
input[type='date'],
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 0.97rem;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type='text']:focus,
input[type='date']:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.1);
  background: #fff;
}

input.input-error,
textarea.input-error {
  border-color: #fca5a5;
}

textarea { min-height: 100px; resize: vertical; }

/* ── Rating scale ── */
.rating-legend {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.rating-scale {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rating-opt {
  position: relative;
}

.rating-opt input[type='radio'] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.rating-opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 2px solid var(--line);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.18s ease;
  color: var(--muted);
  user-select: none;
}

.rating-opt span:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  background: #fff5f5;
}

.rating-opt input[type='radio']:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 14px rgba(225, 6, 0, 0.25);
  transform: translateY(-2px);
}

/* ── Options (radio/checkbox) ── */
.options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
  font-size: 0.93rem;
  background: var(--surface-2);
  user-select: none;
}

.option:hover {
  border-color: var(--accent);
  background: #fff5f5;
}

.option input {
  accent-color: var(--accent);
  flex-shrink: 0;
}

.option:has(input:checked) {
  border-color: var(--accent);
  background: #fff5f5;
  font-weight: 600;
}

/* ── Question cards grid ── */
.step-wrapper {
  margin-bottom: 12px;
}

.step-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.step-grid.step1 {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
}

.col-12 { grid-column: span 12; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }
.col-2  { grid-column: span 2; }

.question-card {
  background: #ffffff;
  border: 1px solid #ebecef;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: none;
}

.step-grid .question-card {
  padding: 14px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
}

.step-grid.step1 .question-card {
  min-height: 110px;
  align-self: stretch;
}

.step-grid.step1 .question-card input[type='text'],
.step-grid.step1 .question-card input[type='date'] {
  margin-top: auto;
}

/* ── Hidden states ── */
.hidden { display: none !important; }
.conditional-hidden { display: none !important; }

/* ── Navigation ── */
.nav-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.nav-left, .nav-right {
  display: flex;
  gap: 8px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.93rem;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn.primary,
.btn:not(.secondary) {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 6px 14px rgba(225, 6, 0, 0.2);
}

.btn.primary:hover,
.btn:not(.secondary):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(225, 6, 0, 0.28);
}

.btn.secondary {
  background: var(--surface);
  color: var(--accent-3);
  border: 1.5px solid var(--line);
  box-shadow: none;
}

.btn.secondary:hover {
  background: var(--surface-2);
  border-color: #ccc;
}

.btn.green {
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: white;
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.2);
}

/* ── Success Card ── */
.success-card {
  text-align: center;
  padding: 48px 32px;
  border-color: var(--green-line);
  background: var(--green-bg);
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  color: var(--green);
}

.success-icon svg {
  width: 100%;
  height: 100%;
}

.success-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
}

.success-card .help {
  margin-bottom: 20px;
}

.ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--green-line);
  border-radius: 10px;
  padding: 10px 20px;
  margin-bottom: 24px;
}

.ref-label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.ref-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.actions {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

/* ── Landing page ── */
.select-hero {
  padding: 28px 28px 24px;
  margin-bottom: 4px;
}

.select-hero h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.survey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.survey-select-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 24px 22px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.5s ease both;
}

.survey-select-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.1);
}

/* Done state */
.survey-select-card.is-done {
  border-color: var(--green-line);
  background: var(--green-bg);
}

.survey-select-card.is-done:hover {
  border-color: var(--green);
}

/* Done badge (top-right corner) */
.scard-done-badge {
  display: none;
  align-items: center;
  gap: 5px;
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--green);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.scard-done-badge svg {
  width: 12px;
  height: 12px;
}

.survey-select-card.is-done .scard-done-badge {
  display: flex;
}

/* Icon */
.scard-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #fff3f2;
  border: 1.5px solid #ffd6d2;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: background 0.2s ease;
}

.scard-icon svg {
  width: 100%;
  height: 100%;
}

.survey-select-card.is-done .scard-icon {
  background: var(--green-bg);
  border-color: var(--green-line);
  color: var(--green);
}

/* Body */
.scard-body h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.scard-body .help {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer */
.scard-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scard-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.scard-cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.survey-select-card:hover .scard-cta svg {
  transform: translateX(3px);
}

.scard-cta-start {
  color: var(--accent);
}

.scard-cta-retake {
  display: none;
  color: var(--green);
}

.scard-done-at {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.survey-select-card.is-done .scard-cta-start { display: none; }
.survey-select-card.is-done .scard-cta-retake { display: inline-flex; }
.survey-select-card.is-done .scard-done-at { display: block; }

/* Back link above form */
.form-back-row {
  margin-bottom: 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link svg {
  width: 14px;
  height: 14px;
}

.back-link:hover {
  color: var(--ink);
}

/* ── Table (admin) ── */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: #6b6f76;
}

/* ── Already-done Modal (landing page) ── */
.ls-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ls-modal-box {
  background: var(--surface);
  border-radius: 18px;
  padding: 36px 28px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  animation: modal-pop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.ls-modal-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  color: var(--green);
  background: var(--green-bg);
  border: 2px solid var(--green-line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.ls-modal-icon svg {
  width: 100%;
  height: 100%;
}

.ls-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
}

.ls-modal-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0 0 20px;
}

.ls-modal-ref {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--green-bg);
  border: 1.5px solid var(--green-line);
  border-radius: 10px;
  padding: 12px 20px;
  margin-bottom: 6px;
}

.ls-modal-ref-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.ls-modal-ref-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.ls-modal-date {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 24px;
  min-height: 1em;
}

.ls-modal-actions {
  display: flex;
  justify-content: center;
}

/* ── Already-done overlay (form page) ── */
.done-overlay {
  background: var(--green-bg);
  border: 1.5px solid var(--green-line);
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
  animation: fadeUp 0.4s ease both;
}

.done-overlay h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
}

.done-overlay .help {
  margin-bottom: 0;
}

.done-overlay-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  color: var(--green);
  background: #fff;
  border: 2px solid var(--green-line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.done-overlay-icon svg {
  width: 100%;
  height: 100%;
}

.done-overlay .ref-badge {
  margin: 20px auto 4px;
  display: inline-flex;
  background: #fff;
}

.done-overlay-date {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 6px;
  margin-bottom: 4px;
  min-height: 1em;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Toast notification ── */
.toast-wrap {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
  width: min(440px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  background: var(--surface);
  border: 1.5px solid #fde68a;
  border-left: 5px solid #f59e0b;
  border-radius: 12px;
  padding: 13px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fffbeb;
  color: #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon svg { width: 18px; height: 18px; }

.toast-body { flex: 1; min-width: 0; padding-top: 1px; }

.toast-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.toast-text {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.5;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #b9bec4;
  padding: 2px;
  border-radius: 6px;
  line-height: 1;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.toast-close:hover { background: var(--surface-2); color: var(--ink); }

/* ── Responsive ── */
@media (max-width: 720px) {
  .container { margin: 20px auto 60px; }
  .header { flex-direction: column; align-items: flex-start; padding: 48px 18px 18px; padding-right: 18px; }
  .lang-switch { top: 14px; gap: 0; }
  .lang-switch span { display: none; }
  .lang-toggle { background: transparent; border-color: transparent; padding: 0; }
  .lang-toggle a { padding: 4px 10px; }

  .stepper { gap: 0; }
  .step-node { min-width: 64px; }
  .step-label { font-size: 0.72rem; max-width: 72px; }
  .step-connector { min-width: 16px; }

  .nav-actions { flex-direction: column; }
  .nav-left, .nav-right { width: 100%; }
  .btn { width: 100%; justify-content: center; }

  .options { flex-direction: column; }
  .rating-scale { gap: 6px; }
  .rating-opt span { width: 40px; height: 40px; font-size: 0.95rem; }

  .step-grid { grid-template-columns: 1fr; }
  .step-grid.step1 { grid-template-columns: 1fr; }
  .col-12, .col-6, .col-4, .col-3, .col-2 { grid-column: span 1; }
}

@media (max-width: 480px) {
  .card { padding: 18px; }
  .survey-form { padding: 18px; }
  .success-card { padding: 36px 20px; }
  .step-title { font-size: 1rem; }
  h1 { font-size: 1rem; }
}

@media (min-width: 1000px) {
  .step-grid:not(.step1) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── ตัวกรองปีในหน้ารายการแบบสอบถาม ─────────────────────────────────── */
.year-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
}

.year-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted, #5a5f66);
}

.year-chip {
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid var(--border, #e3e5e8);
    background: #fff;
    color: var(--muted, #5a5f66);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}

.year-chip:hover {
    border-color: var(--accent, #e10600);
    color: var(--accent, #e10600);
}

.year-chip.active {
    background: var(--accent, #e10600);
    border-color: var(--accent, #e10600);
    color: #fff;
}
