:root {
  --bg: #e3f2fd;
  --surface: #fff8f5;
  --surface-strong: #fffde7;
  --title: #0d47a1;
  --ink: #37474f;
  --muted: #37474f;
  --coral: #ff7a59;
  --coral-deep: #ef6040;
  --mustard: #f4c85a;
  --teal: #2f8f83;
  --teal-soft: #d7f2ec;
  --rose-soft: #ffe0d6;
  --card-shadow: #ffab91;
  --shadow: 10px 10px 0 var(--card-shadow);
  --range-active: #ffab91;
  --border: rgba(13, 71, 161, 0.18);
  --font-brand: clamp(1.25rem, 2.2vw, 1.625rem);
  --font-hero: clamp(2rem, 4vw, 3rem);
  --font-section-title: clamp(1.375rem, 2.4vw, 1.5rem);
  --font-card-title: 1.125rem;
  --font-body: 1rem;
  --font-body-small: 0.875rem;
  --font-service: 0.8125rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Trebuchet MS", sans-serif;
  font-size: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle, rgba(32, 48, 59, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 0 0;
  background-attachment: fixed;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  position: relative;
  overflow: clip;
}

.bg-orb {
  position: absolute;
  display: none;
  border-radius: 999px;
  filter: blur(0);
  opacity: 0.55;
  pointer-events: none;
  animation: drift 14s ease-in-out infinite;
}

.orb-coral {
  top: 110px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: rgba(255, 122, 89, 0.14);
}

.orb-teal {
  top: 420px;
  left: -60px;
  width: 180px;
  height: 180px;
  background: rgba(47, 143, 131, 0.16);
  animation-delay: -4s;
}

.orb-mustard {
  bottom: 100px;
  right: 6%;
  width: 160px;
  height: 160px;
  background: rgba(244, 200, 90, 0.22);
  animation-delay: -7s;
}

.site-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(32, 48, 59, 0.2);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.22);
  transform-origin: center;
  image-rendering: pixelated;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-text strong {
  font-size: var(--font-brand);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--title);
}

.brand-text span {
  color: var(--muted);
  font-size: var(--font-body-small);
  font-weight: 400;
}

.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 56px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 32px;
  align-items: start;
}

.left-column {
  display: grid;
  gap: 26px;
  min-width: 0;
  max-width: 620px;
}

.hero {
  display: block;
}

.hero-copy,
.filters-card,
.result-section {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--title);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 34px 34px 32px;
}

.hero-copy h1 {
  margin: 10px 0 16px;
  max-width: 11ch;
  font-size: var(--font-hero);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--title);
}

.hero-text,
.skill-description,
.result-note,
.activity-note,
.activity-materials,
.result-empty-text {
  color: var(--muted);
}

.hero-text {
  max-width: 52ch;
  margin: 0;
  font-size: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
}

.result-empty-tags,
.activity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-empty-tags span,
.activity-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: var(--font-service);
  font-weight: 400;
}

.result-empty-tags span {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(47, 143, 131, 0.16);
}

.eyebrow {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(244, 200, 90, 0.28);
  color: #78510b;
  font-size: var(--font-service);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.filters-card {
  width: min(100%, 560px);
  justify-self: start;
  padding: 30px;
}

.filters-form {
  display: grid;
  gap: 24px;
}

.field-group {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field-group > label,
.field-heading label,
.field-group > legend {
  font-size: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--title);
  text-transform: uppercase;
}

.field-group legend {
  margin-bottom: 8px;
  padding: 0 4px;
}

.field-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.range-output {
  font-size: var(--font-service);
  font-weight: 400;
  color: var(--ink);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "▾";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--font-body);
  color: var(--muted);
  pointer-events: none;
}

select {
  width: 100%;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 48px 16px 18px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

select:focus-visible,
.range-input:focus-visible,
.toggle-card:has(input:focus-visible),
.skill-card:has(input:focus-visible),
.primary-button:focus-visible {
  outline: 3px solid rgba(47, 143, 131, 0.2);
  outline-offset: 2px;
}

.range-input {
  appearance: none;
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      var(--range-active) 0%,
      var(--range-active) var(--fill-percent, 50%),
      rgba(32, 48, 59, 0.08) var(--fill-percent, 50%),
      rgba(32, 48, 59, 0.08) 100%
    );
  cursor: pointer;
}

.range-input::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #fffdf8;
  background: var(--range-active);
  box-shadow: 0 10px 20px rgba(255, 171, 145, 0.32);
}

.range-input::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 3px solid #fffdf8;
  border-radius: 50%;
  background: var(--range-active);
  box-shadow: 0 10px 20px rgba(255, 171, 145, 0.32);
}

.toggle-grid,
.skill-grid {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}

.toggle-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toggle-card,
.skill-card {
  position: relative;
  display: block;
  border: 1px solid rgba(32, 48, 59, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  cursor: pointer;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.toggle-card {
  padding: 16px 18px;
}

.toggle-card input,
.skill-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-card span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--font-body);
  font-weight: 600;
}

.toggle-card span::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(32, 48, 59, 0.18);
  background: #fffdf8;
  transition: all 0.22s ease;
}

.toggle-card input:checked + span::before {
  border-color: var(--teal);
  background:
    linear-gradient(180deg, var(--teal) 0%, #21786e 100%);
  box-shadow: inset 0 0 0 4px #fffdf8;
}

.toggle-card:hover,
.skill-card:hover,
select:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 143, 131, 0.28);
}

.skill-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skill-card {
  min-height: 136px;
  padding: 18px;
}

.skill-card-any {
  background: rgba(255, 255, 255, 0.74);
}

.skill-card input:checked ~ .skill-title {
  color: var(--title);
}

.toggle-card input:checked + span {
  color: var(--ink);
}

.toggle-card:has(input:checked) {
  border-color: rgba(47, 143, 131, 0.36);
  background: rgba(255, 255, 255, 0.96);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(47, 143, 131, 0.08);
}

.skill-card:has(input:checked) {
  border-color: rgba(47, 143, 131, 0.72);
  background: linear-gradient(180deg, rgba(223, 248, 243, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
  transform: translateY(-3px);
  box-shadow:
    0 18px 36px rgba(47, 143, 131, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.skill-card:has(input:checked) .skill-title {
  color: var(--title);
}

.skill-card:has(input:checked) .skill-description {
  color: var(--ink);
}

.skill-title {
  display: block;
  margin-bottom: 8px;
  font-size: var(--font-card-title);
  font-weight: 600;
  color: var(--title);
}

.skill-description {
  display: block;
  font-size: var(--font-body-small);
  font-weight: 400;
  line-height: 1.55;
}

.form-message {
  min-height: 1.4em;
  margin: -6px 0 0;
  color: var(--coral-deep);
  font-size: var(--font-service);
  font-weight: 400;
}

.primary-button {
  justify-self: center;
  border: 0;
  min-width: min(100%, 360px);
  border-radius: 24px;
  padding: 20px 36px;
  background:
    linear-gradient(135deg, var(--coral) 0%, var(--mustard) 100%);
  color: #20303b;
  font-size: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 18px 36px rgba(255, 122, 89, 0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 46px rgba(255, 122, 89, 0.28);
  filter: saturate(1.05);
}

.result-section {
  position: sticky;
  top: 28px;
  padding: 30px;
  display: grid;
  gap: 22px;
  align-content: start;
  min-height: auto;
  overflow: hidden;
  background: var(--surface-strong);
}

.result-section:not(.is-ready) .result-empty {
  min-height: clamp(190px, 28vw, 280px);
}

.result-header {
  display: grid;
  gap: 16px;
}

.result-section.is-ready .result-header {
  display: none;
}

.result-header h2 {
  margin: 12px 0 0;
  font-size: var(--font-section-title);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--title);
}

.result-note {
  max-width: 42ch;
  margin: 0;
  line-height: 1.55;
  text-align: left;
}

.result-empty {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  background: var(--surface-strong);
  border: 0;
  box-shadow: none;
  overflow: hidden;
}

.result-empty-sticker {
  margin: 0;
  width: min(62%, 260px);
}

.result-empty-sticker img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.result-empty-title,
.result-empty-text {
  margin: 0;
}

.result-empty-title {
  font-size: var(--font-card-title);
  font-weight: 600;
  line-height: 1.55;
  color: var(--title);
}

.activity-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 0;
  border-radius: 0;
  background: var(--surface-strong);
  border: 0;
  box-shadow: none;
  animation: lift-in 0.42s ease;
}

.activity-card h3 {
  margin: 0;
  font-size: var(--font-section-title);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--title);
}

.activity-description,
.activity-story,
.activity-result-note {
  margin: 0;
  font-size: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
}

.activity-meta strong,
.activity-story strong,
.activity-note strong,
.activity-materials strong {
  color: var(--ink);
  font-weight: 600;
}

.activity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.activity-tags span {
  background: var(--teal-soft);
  color: #16554d;
}

.activity-tags span:nth-child(2n) {
  background: var(--rose-soft);
  color: #7d3f31;
}

.activity-tags span:nth-child(3n) {
  background: rgba(244, 200, 90, 0.24);
  color: #7c5a06;
}

.activity-meta,
.activity-materials,
.activity-note,
.activity-result-note {
  margin: 0;
  line-height: 1.65;
}

.activity-meta {
  color: var(--ink);
}

.activity-meta span {
  color: var(--muted);
}

.activity-result-note {
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(13, 71, 161, 0.14);
  color: var(--muted);
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, 10px, 0) scale(1.03);
  }
}

@keyframes lift-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .left-column {
    gap: 22px;
    max-width: none;
  }

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

  .result-header {
    gap: 14px;
  }

  .result-note {
    text-align: left;
    max-width: none;
  }

  .result-section {
    position: static;
    min-height: auto;
  }

  .skill-grid {
    grid-template-columns: 1fr;
  }

  .filters-card {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding: 24px 14px 2px;
  }

  .layout {
    padding: 20px 14px 40px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 17px;
  }

  .brand-text strong {
    font-size: var(--font-brand);
  }

  .brand-text span {
    font-size: var(--font-service);
  }

  .hero-copy,
  .filters-card,
  .result-section {
    border-radius: 18px;
  }

  .hero-copy,
  .filters-card,
  .result-section {
    padding: 22px;
  }

  .result-empty {
    padding: 0;
    border-radius: 0;
  }

  .toggle-grid {
    grid-template-columns: 1fr;
  }

  .field-heading {
    gap: 8px;
    flex-direction: column;
    align-items: start;
  }

  .primary-button {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }
}
