:root {
  --navy: #071a3b;
  --navy-2: #0b2856;
  --blue: #147ff0;
  --blue-soft: #eaf4ff;
  --paper: #f2f6fa;
  --white: #fff;
  --text: #15243a;
  --muted: #66778c;
  --line: #dbe4ed;
  --success: #16845b;
  --warning: #b96312;
  --danger: #c13838;
  --font: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--font); }
button, input, select { font: inherit; }
.topbar { width: min(1180px, calc(100% - 40px)); margin: 0 auto; min-height: 78px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; font-size: 1.06rem; font-weight: 800; }
.brand img { width: 42px; height: 42px; border-radius: 11px; }
.environment-badge { padding: 7px 10px; border: 1px solid #b9d7f5; border-radius: 999px; background: #eef7ff; color: #2369a8; font-size: .75rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.workspace { width: min(1180px, calc(100% - 40px)); margin: 20px auto 48px; }
.intro { max-width: 720px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: .76rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.intro h1 { margin: 0; color: var(--navy); font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.02; letter-spacing: -.055em; }
.intro > p:last-child { max-width: 650px; margin: 14px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.tool-grid { display: grid; grid-template-columns: minmax(0, .94fr) minmax(420px, 1.06fr); gap: 18px; align-items: stretch; }
.what2wear-grid { align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 24px; background: var(--white); box-shadow: 0 18px 50px rgba(7, 26, 59, .06); }
.form-panel { padding: 26px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.panel-heading h2 { margin: 0; color: var(--navy); font-size: 1.22rem; letter-spacing: -.025em; }
.required-note { color: #8492a3; font-size: .72rem; font-weight: 700; }
.schedule-block { margin-bottom: 18px; }
.schedule-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(108px, .8fr) minmax(152px, 1.1fr); grid-template-areas: "time now duration"; gap: 12px; align-items: end; }
.schedule-row .field { margin-bottom: 0; }
.schedule-time-field { grid-area: time; }
.schedule-now-field { grid-area: now; }
.schedule-duration-field { grid-area: duration; }
.control-label-spacer { display: block; margin-bottom: 8px; visibility: hidden; font-size: .875rem; font-weight: 800; }
.now-button { width: 100%; min-width: 0; height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border: 1px solid var(--blue); border-radius: 12px; background: #fff; color: #0c66bc; cursor: pointer; font-weight: 800; transition: background .16s ease, transform .16s ease; }
.now-button:hover { background: var(--blue-soft); transform: translateY(-1px); }
.now-button:focus-visible { outline: 3px solid #91c8ff; outline-offset: 2px; }
.now-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.schedule-help { margin-top: 8px; }
.field, .choice-group { margin: 0 0 18px; padding: 0; border: 0; }
.field label, .choice-group legend, .scenario-label { display: block; margin-bottom: 8px; color: #36465b; font-size: .875rem; font-weight: 800; }
.label-note { color: #7b8998; font-weight: 600; }
.field-help { margin: 7px 2px 0; color: #6b7c90; font-size: .8rem; line-height: 1.45; }
input, select { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; color: var(--navy); padding: 0 13px; outline: none; }
input:focus, select:focus { border-color: #77b7f4; box-shadow: 0 0 0 3px rgba(20, 127, 240, .12); }
.input-with-icon { position: relative; }
.input-with-icon svg { position: absolute; left: 13px; top: 14px; width: 19px; height: 19px; fill: none; stroke: #6b7c90; stroke-width: 1.8; }
.input-with-icon input, .input-with-icon select { padding-left: 42px; }
.input-with-icon select { padding-right: 38px; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 48px; }
.input-suffix span { position: absolute; right: 13px; top: 15px; color: #7b8998; font-size: .8rem; font-weight: 700; }
.segmented { display: grid; gap: 7px; }
.segmented-workout { grid-template-columns: repeat(5, 1fr); }
.segmented-preference { grid-template-columns: repeat(3, 1fr); }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.segmented span { min-height: 44px; display: grid; place-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 11px; color: #526277; font-size: .875rem; font-weight: 700; text-align: center; transition: .16s ease; }
.segmented input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: #0c66bc; box-shadow: inset 0 0 0 1px var(--blue); }
.segmented input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.test-settings { margin: 3px 0 18px; border: 1px dashed #bdcbd9; border-radius: 14px; background: #f8fbfe; }
.test-settings summary { padding: 12px 14px; color: #4d6075; cursor: pointer; font-size: .78rem; font-weight: 800; }
.test-body { padding: 2px 14px 14px; }
.mode-row { display: flex; gap: 18px; margin-bottom: 13px; color: #4d6075; font-size: .76rem; font-weight: 700; }
.mode-row input { width: auto; height: auto; accent-color: var(--blue); }
.mode-option-unavailable { color: #8795a5; cursor: not-allowed; }
.mode-option-unavailable small { font-size: inherit; font-weight: 600; }
.test-body select { height: 42px; font-size: .78rem; }
.test-body p { margin: 9px 0 0; color: #758597; font-size: .7rem; line-height: 1.45; }
.submit-button { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 14px; background: var(--blue); color: var(--white); cursor: pointer; font-weight: 800; box-shadow: 0 10px 24px rgba(20, 127, 240, .22); transition: transform .16s ease, background .16s ease; }
.submit-button:hover { background: #076ed7; transform: translateY(-1px); }
.submit-button:focus-visible { outline: 3px solid #91c8ff; outline-offset: 3px; }
.submit-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.submit-button[disabled] { opacity: .65; cursor: wait; transform: none; }
.form-footnote { margin: 12px 8px 0; color: #69798c; font-size: .76rem; line-height: 1.5; text-align: center; }
.result-panel { position: relative; min-height: 620px; overflow: hidden; background: var(--navy); color: var(--white); }
.result-panel::before { content: "C2R"; position: absolute; right: -15px; top: -24px; color: rgba(124, 193, 255, .06); font-size: 10rem; font-weight: 800; letter-spacing: -.1em; pointer-events: none; }
.result-empty { position: relative; z-index: 1; max-width: 430px; margin: 0 auto; padding: 92px 34px 40px; text-align: center; }
.weather-mark { width: 92px; height: 92px; display: grid; place-items: center; margin: 0 auto 26px; border: 1px solid rgba(139, 199, 255, .22); border-radius: 28px; background: rgba(139, 199, 255, .08); }
.weather-mark svg { width: 55px; height: 55px; fill: none; stroke: #83c3ff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.result-empty .eyebrow { color: #7ac0ff; }
.result-empty h2 { margin: 0; font-size: 1.65rem; letter-spacing: -.035em; }
.result-empty > p:not(.eyebrow) { margin: 13px auto 0; color: #9eb2cb; font-size: .88rem; line-height: 1.65; }
.result-preview { margin: 30px 0 0; padding: 0; display: grid; gap: 10px; list-style: none; text-align: left; }
.result-preview li { padding: 12px 14px; display: flex; align-items: center; gap: 12px; border-top: 1px solid rgba(255,255,255,.08); color: #cfdaea; font-size: .8rem; font-weight: 700; }
.result-preview span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: rgba(124,193,255,.12); color: #8bc7ff; font-size: .68rem; }
.result-content { position: relative; z-index: 1; padding: 28px; }
.status-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 11px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #44d29d; box-shadow: 0 0 0 5px rgba(68,210,157,.11); }
.status-row div { display: flex; flex-direction: column; gap: 2px; }
.status-row small { color: #8fa8c5; font-size: .68rem; font-weight: 700; }
.status-row strong { font-size: .86rem; }
.status-row b { padding: 6px 8px; border: 1px solid rgba(68,210,157,.22); border-radius: 8px; background: rgba(68,210,157,.09); color: #75e2ba; font-size: .65rem; letter-spacing: .05em; }
.result-content > h2 { max-width: 500px; margin: 28px 0 0; color: #fff; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.1; letter-spacing: -.045em; }
.result-summary { margin: 13px 0 0; color: #b4c6db; font-size: .86rem; line-height: 1.6; }
.reason-row { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.reason-row span { padding: 6px 8px; border-radius: 7px; background: rgba(255,255,255,.07); color: #c9d6e6; font-size: .68rem; font-weight: 700; }
.context-card { margin-top: 24px; padding: 14px 16px; display: flex; justify-content: space-between; gap: 16px; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: rgba(255,255,255,.04); }
.context-card span { color: #8fa8c5; font-size: .74rem; }
.context-card strong { color: #e9f2fc; font-size: .74rem; text-align: right; }
.workout-comparison { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.workout-state { min-width: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: rgba(255,255,255,.04); }
.workout-state span { color: #8fa8c5; font-size: .66rem; font-weight: 700; }
.workout-state strong { color: #e9f2fc; font-size: .76rem; line-height: 1.35; }
.workout-state-recommended { border-color: rgba(124,193,255,.24); background: rgba(124,193,255,.09); }
.weather-strip { margin-top: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.outfit-grid + .weather-strip, .result-note + .weather-strip { margin-top: 16px; }
.weather-strip span { min-height: 48px; padding: 9px 8px; display: grid; place-items: center; border-radius: 10px; background: rgba(124,193,255,.08); color: #bdd9f3; font-size: .7rem; font-weight: 700; text-align: center; }
.section-label-row { margin-top: 27px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-label-row h3 { margin: 0; font-size: 1rem; }
.outfit-basis { margin: 10px 0 0; color: #9fb7d1; font-size: .69rem; line-height: 1.45; }
.outfit-grid { margin-top: 11px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.outfit-item { min-height: 56px; padding: 10px; display: flex; align-items: center; gap: 10px; border-radius: 11px; background: #fff; color: var(--navy); }
.outfit-item span { color: #7c9bbb; font-size: .63rem; font-weight: 800; }
.outfit-item div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.outfit-item small { color: #7088a2; font-size: .7rem; font-weight: 700; }
.outfit-item strong { font-size: .82rem; line-height: 1.35; }
.no-outfit { margin-top: 11px; padding: 15px; display: flex; flex-direction: column; gap: 4px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; background: rgba(255,255,255,.045); }
.no-outfit strong { font-size: .78rem; }
.no-outfit span { color: #91a9c3; font-size: .68rem; line-height: 1.45; }
.result-note { margin: 14px 0 0; padding-left: 13px; border-left: 2px solid #4ea4f6; color: #a9bdd4; font-size: .72rem; line-height: 1.5; }
.warmup-cooldown-layer { display: flex; flex-direction: column; gap: 3px; }
.warmup-cooldown-layer strong { color: #e9f2fc; font-size: .76rem; }
.reset-result { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; padding: 8px 0; border: 0; border-bottom: 1px solid rgba(139,199,255,.45); background: none; color: #8bc7ff; cursor: pointer; font-size: .72rem; font-weight: 800; }
.reset-result:focus-visible { outline: 3px solid #91c8ff; outline-offset: 3px; }
.retry-result { width: 100%; min-height: 46px; margin-top: 18px; border: 1px solid rgba(139,199,255,.34); border-radius: 12px; background: rgba(124,193,255,.12); color: #b9ddff; cursor: pointer; font-weight: 800; }
.advisory-section { margin-top: 20px; }
.advisory-section > h3 { margin: 0; font-size: .9rem; }
.advisory-list { margin-top: 9px; display: grid; gap: 6px; }
.advisory-card { padding: 11px 13px; border: 1px solid rgba(255,182,91,.22); border-radius: 12px; background: rgba(255,182,91,.08); }
.advisory-card strong { color: #ffd19a; font-size: .9rem; }
.advisory-card p { margin: 4px 0 0; color: #c9d6e6; font-size: .82rem; line-height: 1.45; }
.provider-note { margin: 18px 0 0; color: #91a9c3; font-size: .76rem; line-height: 1.55; }
.provider-note a { color: #8bc7ff; }
.tone-warning .status-dot { background: #ffb65b; box-shadow: 0 0 0 5px rgba(255,182,91,.11); }
.tone-warning .status-row b { border-color: rgba(255,182,91,.22); background: rgba(255,182,91,.09); color: #ffc77f; }
.tone-caution .status-dot { background: #ffb65b; box-shadow: 0 0 0 5px rgba(255,182,91,.11); }
.tone-caution .status-row b { border-color: rgba(255,182,91,.22); background: rgba(255,182,91,.09); color: #ffc77f; }
.tone-high .status-dot, .tone-avoid .status-dot { background: #ff6e6e; box-shadow: 0 0 0 5px rgba(255,110,110,.11); }
.tone-high .status-row b, .tone-avoid .status-row b { border-color: rgba(255,110,110,.22); background: rgba(255,110,110,.09); color: #ff9696; }
.tone-unknown .status-dot { background: #93a5b9; box-shadow: 0 0 0 5px rgba(147,165,185,.11); }
.tone-unknown .status-row b { border-color: rgba(147,165,185,.22); background: rgba(147,165,185,.09); color: #b8c6d5; }

@media (max-width: 900px) {
  .tool-grid { grid-template-columns: 1fr; }
  .result-panel { min-height: 520px; }
}
@media (max-width: 620px) {
  .topbar, .workspace { width: min(100% - 20px, 520px); }
  .topbar { min-height: 66px; }
  .workspace { margin-top: 8px; }
  .intro h1 { font-size: 2rem; }
  .intro > p:last-child { font-size: .9rem; }
  .panel { border-radius: 19px; }
  .form-panel { padding: 18px 14px; }
  .schedule-row { grid-template-columns: minmax(0, 1fr) minmax(102px, auto); grid-template-areas: "time now" "duration duration"; gap: 12px; }
  .now-button { min-width: 102px; padding-inline: 12px; }
  .segmented-workout { grid-template-columns: repeat(2, 1fr); }
  .segmented-workout label:last-child { grid-column: 1 / -1; }
  .segmented-preference { grid-template-columns: 1fr; }
  .required-note { display: none; }
  .result-empty { padding: 62px 22px 30px; }
  .result-content { padding: 22px 18px; }
  .context-card { flex-direction: column; gap: 5px; }
  .context-card strong { text-align: left; }
  .workout-comparison { grid-template-columns: 1fr; }
  .weather-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weather-strip span:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .outfit-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .schedule-row { grid-template-columns: 1fr; grid-template-areas: "time" "now" "duration"; }
  .control-label-spacer { display: none; }
  .now-button { width: 100%; }
}

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