/* Group formation uses the established green, mint and coral site palette.
   Screen-only styling leaves generated print sheets unchanged. */
@media screen {
  body.wm-grouping-overview .grouping-hero-layout {
    width:calc(100% - 48px)!important;
    max-width:1440px!important;
    grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)!important;
    gap:28px!important;
    margin:30px auto 42px!important;
    padding:28px!important;
    border:1px solid #c8e1d3;
    border-radius:28px;
    background:#e2f1e8;
  }
  body.wm-grouping-overview .grouping-hero-layout>.page-hero {
    padding:22px 14px!important;
  }
  body.wm-grouping-overview .grouping-hero-layout .page-hero .eyebrow {color:#ad4027!important}
  body.wm-grouping-overview .grouping-hero-layout .page-hero h1 {
    max-width:680px!important;
    margin:18px 0!important;
    color:#123f35!important;
    font-size:48px!important;
    font-size:clamp(34px,3.7vw,54px)!important;
    line-height:1.08!important;
  }
  body.wm-grouping-overview .grouping-hero-layout .page-hero>p {
    max-width:650px!important;
    color:#355c4e!important;
    font-size:17px!important;
    line-height:1.65!important;
  }
  body.wm-grouping-overview .grouping-hero-layout>.grouping-intro {
    gap:18px!important;
    margin:0!important;
    padding:32px!important;
    border:1px solid #176c55!important;
    border-radius:20px!important;
    background:#176c55!important;
    box-shadow:none!important;
  }
  body.wm-grouping-overview .grouping-hero-layout .grouping-intro h2 {
    color:#fff!important;
    font-size:32px!important;
    line-height:1.15!important;
  }
  body.wm-grouping-overview .grouping-hero-layout .grouping-intro>p {
    color:#e5f3ec!important;
    font-size:16px!important;
    line-height:1.65!important;
  }
  body.wm-grouping-overview .grouping-intro .eyebrow {
    color:#fff!important;
  }
  body.wm-grouping-overview .grouping-intro .eyebrow::before {
    background:#ffa17e!important;
  }
  body.wm-grouping-overview .grouping-hero-layout .grouping-generator-button {
    max-width:100%;
    background:#fff!important;
    background-image:none!important;
    border-color:#fff!important;
    color:#176c55!important;
    box-shadow:none!important;
    white-space:normal!important;
  }
  body.wm-grouping-overview .grouping-hero-actions {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:25px;
  }
  body.wm-grouping-overview .grouping-hero-actions a {
    display:inline-block;
    max-width:100%;
    padding:12px 17px;
    border:1px solid #176c55;
    border-radius:12px;
    color:#fff;
    background:#176c55;
    font-size:14px;
    font-weight:700;
    text-decoration:none;
    text-align:center;
  }
  body.wm-grouping-overview .grouping-hero-actions a:last-child {
    color:#176c55;
    background:#fff;
  }
  body.wm-grouping-overview .grouping-phase-grid article {
    --phase-color:#176c55;
    --phase-soft:#e0f1e7;
    min-height:245px;
    padding:22px;
    border:1px solid transparent;
    border-radius:18px;
    background:var(--phase-soft);
    box-shadow:none;
  }
  body.wm-grouping-overview .grouping-phase-grid article:nth-child(2) {--phase-color:#a13f24;--phase-soft:#ffe5da}
  body.wm-grouping-overview .grouping-phase-grid article:nth-child(3) {--phase-color:#355d91;--phase-soft:#e0edff}
  body.wm-grouping-overview .grouping-phase-grid article:nth-child(4) {--phase-color:#176c55;--phase-soft:#dcefe8}
  body.wm-grouping-overview .grouping-phase-grid article:nth-child(5) {--phase-color:#704790;--phase-soft:#eee1fa}
  body.wm-grouping-overview .grouping-phase-grid article>span {background:var(--phase-color);border-radius:10px}
  body.wm-grouping-overview .grouping-phase-grid strong {color:var(--phase-color)}
  body.wm-grouping-overview .grouping-phase-grid p {color:#36564a}
  body.wm-grouping-overview .grouping-theory__reset {
    padding:20px 22px;
    border-color:#c8e1d3;
    background:#edf6f0;
  }
  body.wm-grouping-overview .grouping-theory__reset strong {color:#176c55}
  body.wm-grouping-overview .grouping-theory__reset p {color:#466357}

  body.wm-grouping-generator {
    --ink:#123f35;
    --muted:#5a7468;
    --paper:#fbf8f1;
    --surface-soft:#f1f8f4;
    --line:#c9ddd3;
    --accent:#176c55;
    --accent-dark:#105342;
    --accent-soft:#e1f1e8;
    --gold:#176c55;
    --gold-dark:#176c55;
    --gold-soft:#e7f4ed;
  }
  body.wm-house-style.wm-grouping-generator .hero {
    margin:24px 0;
    padding:28px!important;
    border:1px solid #c8e1d3;
    border-radius:22px;
    background:#e2f1e8;
  }
  body.wm-grouping-generator .hero h1 {max-width:1000px!important}
  body.wm-grouping-generator .hero .eyebrow {color:#b34526!important}
  body.wm-grouping-generator .phase-picker {
    min-width:0;
    background:#fff;
    border-color:#c8e1d3;
    box-shadow:0 4px 16px #123f3506;
  }
  body.wm-grouping-generator .phase-choice {background:#f1f8f4;border-color:#c9ddd3}
  body.wm-grouping-generator .phase-picker>*,
  body.wm-grouping-generator .field-grid,
  body.wm-grouping-generator .field,
  body.wm-grouping-generator .segment,
  body.wm-grouping-generator select,
  body.wm-grouping-generator input[type="number"] {min-width:0;max-width:100%}
  body.wm-grouping-generator .phase-choice {width:100%;min-width:0;white-space:normal}
  body.wm-grouping-generator .segmented {grid-template-columns:repeat(2,minmax(0,1fr))}
  body.wm-house-style.wm-grouping-generator .field select,
  body.wm-house-style.wm-grouping-generator .field input[type="number"] {border-color:#c9ddd3!important;background:#fff!important}
  body.wm-grouping-generator .phase-choice[aria-pressed="true"] {color:#fff;background:#176c55;border-color:#176c55}
  body.wm-grouping-generator .generator-shell {
    border-color:#c8e1d3;
    background:#edf5ef;
    box-shadow:0 4px 20px #123f3506;
  }
  body.wm-grouping-generator .settings-panel {border-color:#c9ddd3;background:#fff}
  body.wm-grouping-generator .panel-kicker {color:#176c55!important}
  body.wm-grouping-generator .results-head {background:#e1f1e8;border-color:#c8e1d3}
  body.wm-grouping-generator .result-status {color:#355c4b;background:#f0f8f3;border-color:#c9e2d4}
  body.wm-grouping-generator .switch-row {background:#e7f4ed;border-color:#c9e2d4}
  body.wm-grouping-generator .switch-row p,
  body.wm-grouping-generator .availability {color:#466357}
  body.wm-grouping-generator .week-options {border-color:#c9e2d4}
  body.wm-grouping-generator .empty-icon {color:#fff;background:#176c55}
  body.wm-grouping-generator .empty-state {padding:46px 24px}
  body.wm-grouping-generator .day-column h4 {color:#176c55}
  body.wm-grouping-generator .plan-slot {border-color:#bad6c7}
  body.wm-grouping-generator .info-card:nth-child(1) {background:#e1f1e8}
  body.wm-grouping-generator .info-card:nth-child(2) {background:#e6efff}
  body.wm-grouping-generator .info-card:nth-child(3) {background:#eee4f8}
  body.wm-grouping-generator .info-card {border-color:transparent}

  @media(max-width:980px) {
    body.wm-grouping-generator .phase-picker,
    body.wm-grouping-generator .generator-shell {grid-template-columns:minmax(0,1fr)}
  }

  @media(max-width:1100px) {
    body.wm-grouping-overview .grouping-phase-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
    body.wm-grouping-overview .grouping-phase-grid article:last-child {grid-column:auto;min-height:245px}
  }
  @media(max-width:860px) {
    body.wm-grouping-overview .grouping-hero-layout {grid-template-columns:minmax(0,1fr)!important;padding:22px!important;gap:22px!important}
    body.wm-grouping-overview .grouping-hero-layout>.page-hero {padding:6px!important}
    body.wm-grouping-overview .grouping-hero-layout>.grouping-intro {margin:0!important;padding:26px!important}
    body.wm-grouping-overview .grouping-phase-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
    body.wm-grouping-generator .phase-options {grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible}
    body.wm-grouping-generator .phase-choice {min-width:0;padding:10px 6px;font-size:13px}
  }
  @media(max-width:620px) {
    body.wm-grouping-overview .grouping-hero-layout {width:calc(100% - 28px)!important;margin:18px auto 30px!important;padding:18px!important;border-radius:22px}
    body.wm-grouping-overview .grouping-hero-layout .page-hero h1 {font-size:34px!important;font-size:clamp(29px,8vw,38px)!important}
    body.wm-grouping-overview .grouping-hero-layout .page-hero>p {font-size:16px!important}
    body.wm-grouping-overview .grouping-hero-layout>.grouping-intro {padding:22px!important}
    body.wm-grouping-overview .grouping-hero-layout .grouping-intro h2 {font-size:27px!important}
    body.wm-grouping-overview .grouping-hero-actions {display:grid}
    body.wm-grouping-overview .grouping-phase-grid {grid-template-columns:minmax(0,1fr)}
    body.wm-grouping-overview .grouping-phase-grid article,
    body.wm-grouping-overview .grouping-phase-grid article:last-child {min-height:0}
    body.wm-house-style.wm-grouping-generator .hero {padding:22px!important}
    body.wm-grouping-generator .phase-options {grid-template-columns:repeat(2,minmax(0,1fr))}
    body.wm-grouping-generator .phase-guidance {display:block}
    body.wm-grouping-generator .phase-guidance strong {margin-right:5px}
    body.wm-grouping-generator .empty-state {padding:34px 8px}
    body.wm-grouping-generator .settings-panel,
    body.wm-grouping-generator .results-panel {min-width:0}
  }
}
