:root {
  --ink: #19332d;
  --muted: #64716d;
  --forest: #315f53;
  --forest-dark: #244a40;
  --sage: #dce9e2;
  --cream: #f7f3e9;
  --paper: #fffdf8;
  --line: #d9ddd6;
  --gold: #d49a3a;
  --rose: #d45e86;
  --purple: #6657d9;
  --teal: #168a80;
  --danger: #a64c3f;
  --shadow: 0 18px 60px rgba(34, 61, 53, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 2%, rgba(212, 154, 58, 0.12), transparent 24rem),
    linear-gradient(180deg, #fbf8f0 0, #f4f0e7 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.wf-lab-nav { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; font-size: .9rem; }
.wf-lab-nav a { color: var(--forest); font-weight: 700; }

button, select, textarea { font: inherit; }
button { color: inherit; }

.wf-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.wf-hero {
  max-width: 880px;
  margin-bottom: 40px;
}

.wf-how {
  margin-bottom: 22px;
  padding: 26px 30px;
  border: 1px solid rgba(49, 95, 83, 0.15);
  border-radius: 22px;
  background: rgba(220, 233, 226, 0.48);
}

.wf-how h2 { font-size: clamp(1.55rem, 2.5vw, 2rem); }
.wf-how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.wf-how-grid li { position: relative; padding-left: 42px; }
.wf-how-grid li > span {
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--forest);
  font-size: 0.78rem;
  font-weight: 700;
}
.wf-how-grid strong { display: block; font-size: 0.94rem; }
.wf-how-grid p { margin: 7px 0 0; color: #536762; font-size: 0.84rem; line-height: 1.55; }

.wf-kicker, .wf-eyebrow {
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.wf-kicker span {
  display: inline-block;
  margin-right: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--forest);
  letter-spacing: 0.08em;
}

h1, h2 { font-family: "Fraunces", serif; }

h1 {
  max-width: 850px;
  margin: 18px 0 18px;
  font-size: clamp(3rem, 7vw, 5.65rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h2 { margin: 6px 0 0; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.08; }

.wf-lede {
  max-width: 760px;
  margin: 0;
  color: #49605a;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.wf-sample {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(49, 95, 83, 0.15);
  border-radius: 30px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.wf-sample-heading, .wf-result-intro, .wf-timeline-heading, .wf-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.wf-sample-heading > p, .wf-section-heading > p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  text-align: right;
}

.wf-sample-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 28px 0;
}

.wf-sample-grid article {
  position: relative;
  min-height: 88px;
  padding: 18px 18px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.wf-sample-grid article > i {
  position: absolute;
  top: 20px;
  right: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--person);
}

.wf-sample-grid strong, .wf-sample-grid span { display: block; }
.wf-sample-grid strong { margin-bottom: 6px; font-size: 0.96rem; }
.wf-sample-grid span { color: var(--muted); font-size: 0.84rem; line-height: 1.4; }

.wf-button, .wf-text-button, .wf-day-tabs button, .wf-day-card {
  border: 0;
  cursor: pointer;
}

.wf-button {
  min-height: 46px;
  padding: 0 19px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.wf-button:hover { transform: translateY(-1px); box-shadow: 0 8px 25px rgba(35, 65, 57, 0.12); }
.wf-button:disabled { cursor: wait; opacity: 0.65; transform: none; }
.wf-button-primary { border-color: var(--forest); color: #fff; background: var(--forest); }
.wf-button-primary:hover { background: var(--forest-dark); }
.wf-button-warning { border-color: #efd0a0; color: #744f16; background: #fff7e6; }
.wf-build { min-height: 56px; padding: 0 28px; font-size: 1rem; }

.wf-text-button {
  padding: 8px 0;
  color: var(--forest);
  background: transparent;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(49, 95, 83, 0.35);
  text-underline-offset: 4px;
}

.wf-action-status { display: inline; margin-left: 14px; color: var(--muted); font-size: 0.86rem; }

#results { margin-top: 64px; }
.wf-result-intro { margin-bottom: 22px; }

.wf-status {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 17px 20px;
  border-radius: 15px;
  line-height: 1.45;
}

.wf-status.is-good { color: #244c41; background: #e3eee8; }
.wf-status.is-warning { color: #6f4916; background: #fff0d4; }
.wf-status span { opacity: 0.88; }

.wf-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 12px 0 36px;
}

.wf-metric {
  min-height: 94px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.wf-metric span, .wf-metric strong { display: block; }
.wf-metric span { margin-bottom: 9px; color: var(--muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.wf-metric strong { font-family: "Fraunces", serif; font-size: 1.34rem; }
.wf-metric.good { border-top: 3px solid var(--teal); }
.wf-metric.needs-attention { border-top: 3px solid var(--gold); }
.wf-metric.neutral { border-top: 3px solid var(--purple); }

.wf-timeline-section {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid rgba(49, 95, 83, 0.2);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 12px 40px rgba(34, 61, 53, 0.08);
}

.wf-legend { display: flex; flex-wrap: wrap; gap: 14px; color: #52635f; font-size: 0.82rem; }
.wf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wf-legend i { width: 10px; height: 10px; border-radius: 3px; }
.wf-legend .parent { background: #f4c86d; }
.wf-legend .solo { background: #b8ded5; }
.wf-legend .group { background: #bfb8ef; }

.wf-day-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 25px 0 30px;
  padding: 5px;
  border-radius: 14px;
  background: #edf1ed;
}

.wf-day-tabs button {
  min-height: 58px;
  padding: 8px;
  border-radius: 10px;
  color: #61716d;
  background: transparent;
}
.wf-day-tabs button strong, .wf-day-tabs button span { display: block; }
.wf-day-tabs button strong { font-size: 0.84rem; }
.wf-day-tabs button span { margin-top: 3px; font-size: 0.68rem; }
.wf-day-tabs button.is-active { color: var(--ink); background: #fff; box-shadow: 0 3px 12px rgba(45, 67, 61, 0.1); }

.wf-timeline-tip { margin: -17px 0 26px; color: #52635f; font-size: 0.84rem; line-height: 1.5; }

.wf-resource-timeline { min-width: 860px; }
.wf-timeline-section { overflow-x: auto; }

.wf-time-axis, .wf-resource-row {
  display: grid;
  grid-template-columns: 118px 1fr;
}

.wf-time-axis { height: 32px; }
.wf-time-axis > time { position: absolute; transform: translateX(-50%); color: #596864; font-size: 0.74rem; font-weight: 600; }
.wf-time-axis { position: relative; margin-left: 118px; display: block; }

.wf-resource-row { min-height: 82px; border-top: 1px solid #eceee9; }
.wf-resource-name { display: flex; align-items: center; gap: 9px; padding-right: 14px; }
.wf-resource-name i { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--person); }
.wf-resource-name strong { font-size: 0.9rem; }
.wf-resource-track { position: relative; min-height: 82px; background: linear-gradient(180deg, rgba(247, 248, 244, 0.8), rgba(255,255,255,0)); }
.wf-gridline { position: absolute; top: 0; bottom: 0; width: 1px; background: #edf0eb; }

.wf-time-block {
  position: absolute;
  top: 8px;
  bottom: 8px;
  z-index: 2;
  min-width: 5px;
  padding: 8px 9px;
  overflow: hidden;
  border: 1px solid rgba(31, 58, 51, 0.12);
  border-radius: 9px;
  color: #203c35;
}
.wf-time-block strong, .wf-time-block span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-time-block strong { font-size: 0.76rem; }
.wf-time-block span { margin-top: 4px; font-size: 0.68rem; opacity: 0.86; }
.wf-time-block.parent { background: #f8d890; }
.wf-time-block.solo { background: #cce9e2; }
.wf-time-block.group { background: #d5d0f3; }
.wf-time-block.event { color: #fff; background: #69736f; }

.wf-mobile-timeline { display: none; }

.wf-disruption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  margin: 32px 0;
  padding: 26px 28px;
  border: 1px solid #ecd4a9;
  border-radius: 20px;
  background: #fff9ed;
}
.wf-disruption h2 { font-size: 1.7rem; }
.wf-disruption p { max-width: 660px; margin: 9px 0 0; color: #775f39; line-height: 1.5; }
.wf-disruption-actions { display: flex; flex: 0 0 auto; gap: 8px; }

.wf-change-summary {
  margin: 34px 0;
  padding: 26px;
  border-left: 5px solid var(--gold);
  border-radius: 4px 18px 18px 4px;
  background: #fffdf8;
}
.wf-change-summary h2 { font-size: 1.75rem; }
.wf-change-summary > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.wf-change-summary article { padding: 14px; border-radius: 12px; background: #f3f0e8; }
.wf-change-summary strong, .wf-change-summary span { display: block; }
.wf-change-summary strong { margin-bottom: 5px; font-family: "Fraunces", serif; font-size: 1.5rem; }
.wf-change-summary span { color: var(--muted); font-size: 0.76rem; line-height: 1.4; }

.wf-week-overview, .wf-explanations { margin-top: 54px; }
.wf-week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 20px; }
.wf-day-card { padding: 18px; border: 1px solid var(--line); border-radius: 15px; text-align: left; background: var(--paper); }
.wf-day-card:hover { border-color: #98aaa4; }
.wf-day-card > span, .wf-day-card > strong, .wf-day-card > small { display: block; }
.wf-day-card > span { color: var(--forest); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.wf-day-card > strong { margin: 8px 0 12px; }
.wf-day-card > small { color: var(--muted); }
.wf-load-bar { height: 7px; margin-bottom: 7px; overflow: hidden; border-radius: 99px; background: #e9ebe6; }
.wf-load-bar i { display: block; height: 100%; border-radius: inherit; background: var(--gold); }

.wf-explanation-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; }
.wf-explanation-list article { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.wf-explanation-list strong { font-size: 0.86rem; }
.wf-explanation-list p { margin: 9px 0 0; color: var(--muted); font-size: 0.84rem; line-height: 1.55; }

.wf-feedback {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  margin-top: 80px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.wf-feedback h2 { font-size: 1.7rem; }
.wf-feedback p { color: var(--muted); line-height: 1.5; }
.wf-feedback form { display: grid; gap: 12px; }
.wf-feedback label, .wf-feedback label > span { display: block; }
.wf-feedback label > span { margin-bottom: 6px; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.wf-feedback select, .wf-feedback textarea { width: 100%; border: 1px solid #cfd5ce; border-radius: 10px; color: var(--ink); background: #fff; }
.wf-feedback select { height: 44px; padding: 0 12px; }
.wf-feedback textarea { padding: 12px; resize: vertical; }
.wf-feedback .wf-button { justify-self: start; }
#feedbackStatus { color: var(--muted); font-size: 0.82rem; }

.wf-no-work { padding: 18px; color: var(--muted); text-align: center; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid rgba(102, 87, 217, 0.45); outline-offset: 3px; }

@media (max-width: 820px) {
  .wf-shell { width: min(100% - 28px, 680px); padding-top: 44px; }
  .wf-sample-grid { grid-template-columns: repeat(2, 1fr); }
  .wf-metrics { grid-template-columns: repeat(2, 1fr); }
  .wf-change-summary > div { grid-template-columns: repeat(2, 1fr); }
  .wf-week { grid-template-columns: repeat(2, 1fr); }
  .wf-explanation-list { grid-template-columns: 1fr; }
  .wf-disruption { align-items: flex-start; flex-direction: column; }
  .wf-feedback { grid-template-columns: 1fr; gap: 12px; }
  .wf-how-grid { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 620px) {
  .wf-shell { width: min(100% - 22px, 560px); padding: 32px 0 64px; }
  h1 { font-size: clamp(2.65rem, 14vw, 4rem); }
  .wf-lede { font-size: 1rem; }
  .wf-sample { padding: 20px; border-radius: 22px; }
  .wf-sample-heading, .wf-result-intro, .wf-timeline-heading, .wf-section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .wf-sample-heading > p, .wf-section-heading > p { text-align: left; }
  .wf-sample-grid { grid-template-columns: 1fr; }
  .wf-action-status { display: block; margin: 10px 0 0; }
  #results { margin-top: 46px; }
  .wf-status { align-items: flex-start; flex-direction: column; gap: 4px; }
  .wf-metrics { grid-template-columns: 1fr 1fr; }
  .wf-metric { min-height: 88px; padding: 14px; }
  .wf-timeline-section { padding: 17px; overflow: visible; }
  .wf-legend { gap: 9px; }
  .wf-day-tabs { overflow-x: auto; grid-template-columns: repeat(5, minmax(76px, 1fr)); }
  .wf-resource-timeline { display: none; }
  .wf-mobile-timeline { display: grid; gap: 7px; }
  .wf-mobile-moment { display: grid; grid-template-columns: 76px 1fr; gap: 11px; padding: 12px; border-left: 4px solid var(--gold); border-radius: 5px 11px 11px 5px; background: #f7e8c5; }
  .wf-mobile-moment.solo { border-color: var(--teal); background: #e0f0ec; }
  .wf-mobile-moment.group { border-color: var(--purple); background: #e8e5f8; }
  .wf-mobile-moment.event { border-color: #68736f; background: #eceeeb; }
  .wf-mobile-moment time { font-size: 0.78rem; font-weight: 700; }
  .wf-mobile-moment time small { display: block; margin-top: 2px; color: var(--muted); font-weight: 500; }
  .wf-mobile-moment strong, .wf-mobile-moment span { display: block; }
  .wf-mobile-moment strong { font-size: 0.84rem; }
  .wf-mobile-moment span { margin-top: 4px; color: var(--muted); font-size: 0.74rem; }
  .wf-disruption { padding: 21px; }
  .wf-disruption-actions { width: 100%; flex-direction: column; }
  .wf-disruption-actions .wf-button { width: 100%; }
  .wf-change-summary > div, .wf-week { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 390px) {
  .wf-metrics, .wf-change-summary > div, .wf-week { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
