:root {
  color-scheme: light;
  --navy: #101b2b;
  --navy-2: #19283b;
  --ink: #172337;
  --muted: #718096;
  --line: #e7ebf0;
  --paper: #f5f7fa;
  --white: #ffffff;
  --green: #17a779;
  --green-bright: #47d8a4;
  --green-pale: #e8f8f2;
  --red: #d14b52;
  --red-pale: #fff0ef;
  --blue-pale: #eff4fa;
  --shadow: 0 10px 35px rgba(25, 40, 59, .06);
  font-family: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); }
button, input { font: inherit; }
.shell { max-width: 1216px; padding: 0 28px; margin: 0 auto; }
.topbar { height: 78px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,.1); position: relative; z-index: 1; }
body::before { content: ""; position: absolute; z-index: -1; top: 0; left: 0; right: 0; height: 433px; background: var(--navy); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #f5f8fc; text-decoration: none; font: 800 13px Manrope, sans-serif; letter-spacing: .13em; }
.brand-light { color: #8391a5; font-weight: 600; }
.brand-mark { display: flex; width: 24px; height: 24px; padding: 4px; border: 1px solid #41615f; border-radius: 7px; align-items: end; gap: 2px; }
.brand-mark span { flex: 1; background: var(--green-bright); border-radius: 2px 2px 1px 1px; }
.brand-mark span:nth-child(1) { height: 7px; opacity: .66; }.brand-mark span:nth-child(2) { height: 12px; opacity: .84; }.brand-mark span:nth-child(3) { height: 15px; }
.topbar-note { color: #a4afbd; font-size: 12px; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-bright); box-shadow: 0 0 0 4px rgba(71,216,164,.12); }
.hero { padding: 48px 0 38px; color: #fff; max-width: 760px; }
.eyebrow, .step-label, .timeline-caption, .flow-title { font: 500 10px "DM Mono", monospace; letter-spacing: .14em; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: #93a2b6; }
.eyebrow-line { display: inline-block; width: 22px; height: 1px; background: var(--green-bright); }
h1 { margin: 15px 0 11px; font: 800 clamp(42px, 6vw, 60px)/1.05 Manrope, sans-serif; letter-spacing: -.045em; }
h1 span { color: var(--green-bright); }
.hero-copy { margin: 0; color: #b1bdcc; font-size: 15px; line-height: 1.55; max-width: 515px; }
.hero-assumption { display: flex; align-items: center; gap: 9px; margin-top: 19px; padding: 9px 12px; width: fit-content; max-width: 100%; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; color: #c4ced9; font-size: 11px; }
.assumption-icon { color: var(--green-bright); font-size: 14px; }
.workspace { display: grid; grid-template-columns: minmax(290px, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--shadow); }
.inputs-panel { padding: 24px; }
.panel-heading, .result-topline { display: flex; justify-content: space-between; align-items: flex-start; }
.step-label { color: #8a98a9; display: flex; align-items: center; gap: 8px; }
.step-label > span { color: var(--green); font-weight: 500; }
h2 { margin: 8px 0 0; font: 700 20px Manrope, sans-serif; letter-spacing: -.025em; }
.panel-icon { display: grid; place-items: center; color: var(--green); background: var(--green-pale); height: 34px; width: 34px; border-radius: 9px; font-size: 19px; }
.field-label { display: block; margin: 21px 0 8px; font-size: 12px; color: #3c4a5d; font-weight: 600; }
.help { display: inline-grid; place-items: center; margin-left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #edf1f5; color: #8997a8; font: 600 9px sans-serif; cursor: help; }
.input-wrap { display: flex; align-items: center; height: 43px; border: 1px solid #dfe5ec; border-radius: 7px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: #50b99b; box-shadow: 0 0 0 3px rgba(23,167,121,.10); }
.input-icon { flex: none; margin-left: 12px; color: #8897a7; font-size: 16px; }
.input-wrap input { min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: #243348; font-size: 13px; }
.date-wrap input { padding: 0 11px; color-scheme: light; }
.select-wrap { position: relative; }
.select-wrap input { padding: 0 28px 0 10px; }
.chevron { position: absolute; right: 12px; color: #748398; pointer-events: none; }
.field-hint { margin: 6px 0 0; color: #8a97a7; font-size: 10px; line-height: 1.5; }
.mono { font-family: "DM Mono", monospace; color: #67768a; }
.divider { height: 1px; background: var(--line); margin: 20px 0 18px; }
.compact { margin-bottom: 0; }
.allowance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.allowance-grid .field-label { margin-top: 15px; }
.number-wrap { height: 40px; padding-right: 10px; }
.number-wrap input { padding-left: 12px; font: 500 14px "DM Mono", monospace; }
.number-wrap input::-webkit-inner-spin-button { opacity: .5; }
.unit { color: #98a3b1; font-size: 10px; }
.allowance-hint { margin-top: 8px; }
.fixed-terms { margin-top: 19px; padding: 12px 13px; background: #f7f9fb; border: 1px solid #edf0f4; border-radius: 7px; }
.fixed-terms > div { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 7px; font-size: 10px; color: #8290a1; }
.fixed-terms > div + div { margin-top: 10px; }
.fixed-terms strong { font: 500 10px "DM Mono", monospace; color: #34435a; }
.fixed-icon { color: #8290a1; font-size: 13px; text-align: center; }
.results-panel { display: flex; flex-direction: column; gap: 16px; }
.result-card { padding: 23px 25px 17px; border-top: 3px solid var(--green); transition: border-color .2s; }
.result-card[data-status="negative"] { border-top-color: var(--red); }
.result-card[data-status="negative"] .window-value { color: var(--red); }
.result-card[data-status="negative"] .window-badge { background: var(--red-pale); color: var(--red); }
.result-card[data-status="negative"] .track-window { background: #f0c7c8; }
.status-pill { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 20px; background: var(--green-pale); color: #10835f; font: 500 9px "DM Mono", monospace; letter-spacing: .04em; }
.result-card[data-status="negative"] .status-pill { background: var(--red-pale); color: #b73e45; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.result-card[data-status="negative"] .status-dot { background: var(--red); }
.result-main { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.result-kicker { color: #77869a; font-size: 11px; }
.window-value { margin-top: 3px; color: #11875f; font: 700 clamp(34px, 4vw, 43px)/1.1 Manrope, sans-serif; letter-spacing: -.04em; }
.window-badge { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--green-pale); color: var(--green); font-size: 25px; }
.result-summary { min-height: 33px; margin: 8px 0 21px; color: #657489; font-size: 11px; line-height: 1.55; max-width: 580px; }
.timeline { border-top: 1px solid #eef1f4; padding-top: 15px; }
.timeline-labels { display: flex; justify-content: space-between; gap: 12px; }
.timeline-label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.right-label { text-align: right; align-items: flex-end; }
.timeline-caption { color: #9aa6b4; font-size: 8px; }
.timeline-label strong { color: #2c3b50; font: 600 12px "DM Mono", monospace; }
.timeline-label small { color: #8d9aab; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track { height: 22px; margin: 4px 4px 0; position: relative; }
.track-base, .track-window { position: absolute; top: 9px; height: 4px; border-radius: 5px; }
.track-base { left: 0; right: 0; background: #e8edf2; }
.track-window { left: 0; width: 62.5%; background: var(--green-bright); transition: width .2s; }
.track-marker { position: absolute; top: 3px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #fff; border: 2px solid #dce4eb; display: grid; place-items: center; }
.track-marker span { display: block; width: 5px; height: 5px; border-radius: 50%; background: #aab6c3; }
.start-marker { left: 0; border-color: var(--green); }.start-marker span { background: var(--green); }
.send-marker { left: 62.5%; border-color: #26b98a; }.send-marker span { background: #26b98a; }
.deadline-marker { right: -8px; border-color: #75859a; }.deadline-marker span { background: #75859a; }
.result-card[data-status="negative"] .start-marker { border-color: var(--red); }.result-card[data-status="negative"] .start-marker span { background: var(--red); }
.result-card[data-status="negative"] .send-marker { left: 0%; border-color: var(--red); }.result-card[data-status="negative"] .send-marker span { background: var(--red); }
.track-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 3px 0 16px; color: #8592a2; font-size: 8px; }
.track-foot span { display: inline-flex; align-items: center; gap: 5px; }
.track-foot i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.legend-check { background: var(--green); }.legend-window { background: var(--green-bright); }.legend-arrival { background: #75859a; }
.times-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #eef1f4; }
.time-cell { min-width: 0; display: flex; gap: 9px; padding: 13px 7px 11px 0; align-items: flex-start; }
.time-cell:nth-child(even) { padding-left: 12px; border-left: 1px solid #eef1f4; }
.time-cell:nth-child(n+3) { border-top: 1px solid #eef1f4; }
.time-cell-icon { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 11px; }
.checkpoint-icon { color: #12845f; background: var(--green-pale); }.send-icon { color: #3877a7; background: #edf5fc; }.arrive-icon { color: #687891; background: #f0f3f7; }.buffer-icon { color: #9b7a32; background: #fff7df; }
.time-title, .time-cell strong, .time-cell small { display: block; }
.time-title { color: #8996a5; font-size: 9px; }
.time-cell strong { margin-top: 4px; color: #2a394e; font: 600 12px "DM Mono", monospace; }
.time-cell small { margin-top: 3px; color: #98a4b2; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.formula-card { padding: 16px 19px 13px; }
.formula-heading { display: flex; align-items: center; gap: 10px; }
.formula-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--blue-pale); color: #567596; font: 600 11px "DM Mono", monospace; }
.formula-heading h3 { margin: 4px 0 0; color: #304056; font: 600 13px Manrope, sans-serif; }
.formula { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; margin: 13px 0 9px; padding: 9px 11px; border-radius: 6px; background: #f7f9fb; color: #69798c; font: 10px "DM Mono", monospace; }
.formula i { color: #b2bdc9; font-style: normal; }.formula b { color: #98a6b5; font-weight: 400; }.formula strong { color: #13815e; font-weight: 600; }
.formula-card p { margin: 0; color: #8592a1; font-size: 9px; line-height: 1.5; }
.result-card[data-status="negative"] ~ .formula-card .formula strong { color: var(--red); }
.flow-strip { margin-top: 18px; padding: 17px 21px; background: var(--navy-2); border-radius: 10px; color: #eaf0f6; display: flex; align-items: center; gap: 28px; }
.flow-title { white-space: nowrap; color: #8e9daf; display: flex; gap: 8px; align-items: center; font-size: 9px; }
.flow-title .eyebrow-line { width: 16px; }
.flow-steps { display: flex; align-items: center; flex: 1; justify-content: space-between; gap: 10px; }
.flow-step { display: flex; align-items: center; gap: 8px; min-width: 0; }
.flow-num { color: var(--green-bright); font: 10px "DM Mono", monospace; }
.flow-step strong, .flow-step small { display: block; white-space: nowrap; }
.flow-step strong { font-size: 10px; font-weight: 600; }.flow-step small { margin-top: 3px; color: #a0adbd; font-size: 8px; }
.flow-arrow { color: #62748a; font-size: 14px; }
.footer { display: flex; justify-content: space-between; gap: 16px; padding: 18px 2px 25px; color: #8592a1; font: 9px "DM Mono", monospace; letter-spacing: .04em; }
.footer-mark { color: var(--green); font-weight: 500; }.footer-sep { padding: 0 4px; color: #c1c9d2; }.footer-note { font: 9px "DM Sans", sans-serif; letter-spacing: 0; text-align: right; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .workspace { grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: 14px; }
  .inputs-panel { padding: 19px; }.result-card { padding: 19px 19px 15px; }
  .flow-strip { display: block; }.flow-steps { margin-top: 13px; }
}
@media (max-width: 700px) {
  .shell { padding: 0 17px; }.topbar { height: 65px; }.topbar-note { font-size: 10px; }
  body::before { height: 420px; }.hero { padding: 37px 0 26px; }.hero-copy { font-size: 13px; }.hero-assumption { font-size: 10px; line-height: 1.45; }
  .workspace { grid-template-columns: 1fr; }.inputs-panel { padding: 21px; }.result-card { padding: 20px 18px 14px; }
  .flow-strip { padding: 17px; }.flow-steps { display: grid; grid-template-columns: 1fr auto 1fr; row-gap: 15px; }.flow-step:nth-of-type(5) { grid-column: 1; }.flow-step:nth-of-type(7) { grid-column: 3; }.flow-arrow:nth-of-type(6) { display: none; }
  .footer { flex-direction: column; }.footer-note { text-align: left; }
}
@media (max-width: 400px) {
  .shell { padding: 0 12px; }.result-topline { gap: 7px; }.status-pill { font-size: 7px; padding: 6px; }
  .times-grid { grid-template-columns: 1fr; }.time-cell:nth-child(even) { padding-left: 0; border-left: 0; }.time-cell:nth-child(n+2) { border-top: 1px solid #eef1f4; }
  .formula { justify-content: flex-start; }.timeline-label small { max-width: 130px; }
}
