:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #5f6e66;
  --paper: #f7f8f4;
  --panel: #ffffff;
  --line: #dce2da;
  --mint: #2f9d7e;
  --mint-strong: #12725b;
  --coral: #e56f4f;
  --blue: #466fd8;
  --amber: #d99a28;
  --shadow: 0 18px 42px rgba(30, 43, 35, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(47, 157, 126, 0.1), transparent 34%),
    linear-gradient(315deg, rgba(229, 111, 79, 0.12), transparent 30%),
    var(--paper);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.icon-sprite {
  display: none;
}

svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 40px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--mint-strong);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.status-pill,
.match-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill svg {
  color: var(--coral);
}

.planner {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.5fr);
  gap: 18px;
  align-items: start;
}

.controls,
.recommendation {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.controls {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 22px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend,
.label-row legend {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 780;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

output {
  border-radius: 999px;
  background: #eaf4ef;
  color: var(--mint-strong);
  padding: 7px 10px;
  font-size: 0.9rem;
  font-weight: 780;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.intensity-button {
  display: grid;
  place-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 10px 8px;
  font-weight: 800;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease, background 160ms ease;
}

.intensity-button svg {
  width: 1.45rem;
  height: 1.45rem;
}

.intensity-button:hover {
  transform: translateY(-1px);
}

.intensity-button.is-active {
  border-color: color-mix(in srgb, var(--active-color, var(--mint)) 74%, white);
  background: color-mix(in srgb, var(--active-color, var(--mint)) 12%, white);
  color: var(--active-color, var(--mint));
}

.intensity-button[data-intensity="easy"] {
  --active-color: var(--mint);
}

.intensity-button[data-intensity="steady"] {
  --active-color: var(--coral);
}

.intensity-button[data-intensity="hard"] {
  --active-color: var(--blue);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--mint-strong);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 720;
  margin-top: 6px;
}

.recommendation {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.recommendation-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.recommendation h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: 0;
}

.icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.icon-button:hover {
  background: #26352c;
}

.match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.match-copy {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.6;
}

.plan-block {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.plan-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.plan-title svg {
  color: var(--amber);
}

.plan-title h3 {
  margin: 0;
  font-size: 1rem;
}

.timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 13px;
}

.time-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 999px;
  background: #edf2ff;
  color: var(--blue);
  padding: 6px 8px;
  font-size: 0.82rem;
  font-weight: 820;
  white-space: nowrap;
}

.timeline strong {
  display: block;
  margin-bottom: 4px;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.alternatives {
  margin-top: 24px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: 0;
}

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

.option-card {
  min-height: 148px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 16px;
}

.option-card button {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 116px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.option-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.option-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.option-card .option-meta {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.option-meta span {
  border-radius: 999px;
  background: #f0f3ee;
  color: var(--muted);
  padding: 5px 8px;
  font-size: 0.75rem;
  font-weight: 760;
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 22px, 660px);
    padding-top: 20px;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .section-title {
    align-items: start;
    flex-direction: column;
    gap: 2px;
  }

  .planner,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .status-pill {
    align-self: stretch;
    justify-content: center;
  }
}

@media (max-width: 460px) {
  h1 {
    font-size: clamp(2rem, 13vw, 3.2rem);
  }

  .controls,
  .recommendation {
    padding: 16px;
  }

  .segmented {
    gap: 6px;
  }

  .intensity-button {
    min-height: 74px;
    padding: 8px 4px;
    font-size: 0.86rem;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }

  .time-chip {
    width: max-content;
  }
}
