.rule-legend{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%;margin:0 0 18px}
.rule-legend>div{border:1px solid #e2e8f0;border-radius:14px;padding:14px 16px;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.04)}
.rule-legend>div:first-child{border-left:4px solid #4f46e5}
.rule-legend>div:last-child{border-left:4px solid #64748b}
.rule-legend strong,.baseline-comparison strong,.real-trip-cost strong,.handoff-confidence strong{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.07em;margin-bottom:5px;color:#64748b;font-weight:700}
.rule-legend span,.baseline-comparison span,.real-trip-cost span,.handoff-confidence span{display:block;font-size:13px;line-height:1.5;color:#0f172a}
.result-card,article.result-card,#results article{position:relative;border-radius:20px!important;border:1px solid #e2e8f0!important;background:#fff!important;box-shadow:0 4px 6px -1px rgba(15,23,42,.05),0 2px 4px -2px rgba(15,23,42,.05)!important;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease!important}
#results article:hover{transform:translateY(-2px);border-color:#cbd5e1!important;box-shadow:0 12px 24px -4px rgba(15,23,42,.08),0 4px 8px -4px rgba(15,23,42,.03)!important}
.strategy-tag{display:inline-flex;align-items:center;margin:0 0 10px;padding:5px 10px;border-radius:999px;background:#0f172a;color:#fff;border:0;font-size:11px;font-weight:700;letter-spacing:.02em}
.baseline-comparison{margin:12px 0 14px;border:1px solid #e2e8f0;border-radius:14px;padding:12px 14px;background:linear-gradient(135deg,#f8fafc,#fff)}
.baseline-comparison span{font-weight:650;color:#0f172a}
.baseline-comparison span::first-letter{font-weight:800}
.seat-confidence{display:inline-flex;align-items:center;margin:6px 6px 0 0;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:700;line-height:1.2}
.seat-confidence.confirmed{background:#ecfdf5;color:#047857;border:1px solid #a7f3d0}
.seat-confidence.confirmed:before{content:'✓';margin-right:4px}
.seat-confidence.likely{background:#fffbeb;color:#b45309;border:1px solid #fde68a}
.seat-confidence.likely:before{content:'~';margin-right:4px}
.seat-confidence.unknown{background:#f1f5f9;color:#64748b;border:1px solid #e2e8f0}
.seat-confidence.unknown:before{content:'?';margin-right:4px}
.direction-timelines{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}
.direction-timelines section{border:1px solid #e2e8f0;border-radius:14px;padding:12px 14px;background:#f8fafc}
.direction-timelines section>strong{display:flex;align-items:center;margin-bottom:8px;font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:#64748b;font-weight:700}
.direction-timelines section>strong:before{content:'✈';font-size:12px;margin-right:6px;color:#4f46e5}
.direction-timelines section>div{padding:8px 0;border-bottom:1px solid #e2e8f0}
.direction-timelines section>div:last-child{border-bottom:0}
.direction-timelines .economy-warning{border:1px solid #fca5a5;background:#fef2f2;border-radius:10px;padding:8px 10px;margin:6px 0}
.direction-timelines .economy-warning:before{content:'⚠ Economy segment — check carefully';display:block;font-size:10px;font-weight:800;color:#dc2626;margin-bottom:4px}
.real-trip-cost{margin:10px 0;border:1px solid #e2e8f0;border-radius:14px;padding:12px 14px;background:#f8fafc}
.real-trip-cost span{font-weight:700;color:#0f172a}
.real-trip-cost small,.handoff-confidence small{display:block;margin-top:6px;line-height:1.4;color:#64748b}
.handoff-confidence{margin:14px 0;border:1px solid #e2e8f0;border-radius:14px;padding:14px;background:#f8fafc}
.handoff-confidence span{margin:4px 0}
.result-price{letter-spacing:-.03em}
.result-actions button,.result-actions a{border-radius:12px!important}
.result-tools{align-items:flex-start!important}
.result-filters{gap:8px!important}
.result-filters button{border-radius:999px!important;padding:8px 14px!important}
.result-filters button.active{background:#0f172a!important;color:#fff!important;border-color:#0f172a!important}
@media(max-width:800px){.direction-timelines{grid-template-columns:1fr}}
@media(max-width:700px){.rule-legend{grid-template-columns:1fr}.baseline-comparison,.real-trip-cost,.handoff-confidence{padding:10px 12px}.strategy-tag{margin-bottom:8px}#results article:hover{transform:none}}
.segment-times{display:flex;align-items:center;gap:8px;margin:6px 0;flex-wrap:wrap}
.segment-endpoint{display:inline-flex;align-items:baseline;gap:6px;font-size:13px;color:#0f172a}
.segment-endpoint time{font-weight:700;color:#0f172a}
.segment-times-arrow{color:#94a3b8;font-size:12px}
.day-offset-badge{display:inline-flex;align-items:center;padding:2px 7px;border-radius:999px;background:#fffbeb;color:#b45309;border:1px solid #fde68a;font-size:10px;font-weight:800;letter-spacing:.02em}
.day-offset-badge:before{content:'▲ '}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#search-freshness{display:inline-flex;align-items:center;gap:4px}
#search-freshness time{font-weight:700}
@media(max-width:700px){.segment-times{gap:6px}.segment-endpoint{font-size:11px}}
.itinerary-date-summary{display:flex;flex-direction:column;gap:5px;margin-top:8px}
.direction-date-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.direction-date-label{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#64748b;min-width:54px}
.ladder-row-dates{border-top:1px dashed #e2e8f0;padding-top:8px}
.comparison-grid-dates{border-top:1px dashed #e2e8f0;padding-top:8px}
.freshness-note{display:block;margin-top:10px;color:#64748b;font-size:10px}
.freshness-note time{font-weight:700}
@media(max-width:700px){.direction-date-row{gap:6px}.direction-date-label{min-width:44px;font-size:9px}}
.card-header-bar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:8px}
.card-header-meta{flex:1;min-width:0}
.card-header-price{text-align:right;flex-shrink:0}
.result-price-top{display:block;font-size:28px;font-weight:800;color:#0f172a;letter-spacing:-.04em;line-height:1.1}
.effective-price-note-top{display:block;font-size:11px;color:#64748b;margin-top:3px}
.card-header-savings{display:inline-block;font-size:11px;font-weight:700;color:#047857;background:#ecfdf5;border:1px solid #a7f3d0;border-radius:999px;padding:3px 9px;margin-top:4px;text-align:right;white-space:nowrap}
.card-face-schedule{margin:12px 0 14px;padding:12px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px}
.card-face-schedule .direction-date-row+.direction-date-row{margin-top:6px;padding-top:6px;border-top:1px dashed #e2e8f0}
.card-face-schedule .segment-endpoint time{font-weight:700;color:#0f172a}
.card-face-schedule .direction-date-label{min-width:64px;color:#334155;font-weight:800}
.direction-schedule-meta{font-size:12px;font-weight:600;color:#64748b}
@media(max-width:700px){.result-price-top{font-size:24px}.card-face-schedule{padding:10px 12px}}
.btn-view-seat-map{display:inline-flex;align-items:center;gap:6px;padding:9px 15px;font-size:13px;font-weight:600;color:#0f172a;background:#ffffff;border:1px solid #cbd5e1;border-radius:12px;cursor:pointer;transition:all .15s ease;white-space:nowrap;text-decoration:none}
.btn-view-seat-map:hover{background:#f1f5f9;border-color:#94a3b8;transform:translateY(-1px);color:#0f172a}
.btn-view-route-map{display:inline-flex;align-items:center;gap:6px;padding:9px 15px;font-size:13px;font-weight:600;color:#0284c7;background:#f0f9ff;border:1px solid #bae6fd;border-radius:12px;cursor:pointer;transition:all .15s ease;white-space:nowrap;text-decoration:none}
.btn-view-route-map:hover{background:#e0f2fe;border-color:#7dd3fc;transform:translateY(-1px);color:#0369a1}
dialog.seat-map-dialog{padding:0;border:none;border-radius:24px;box-shadow:0 25px 60px rgba(15,23,42,.25);max-width:1040px;width:94vw;max-height:90vh;background:#fff;overflow:hidden;margin:auto}
dialog.seat-map-dialog::backdrop{background:rgba(15,23,42,.6);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.seat-map-dialog-header{display:flex;align-items:center;justify-content:space-between;padding:18px 26px;background:#f8fafc;border-bottom:1px solid #e2e8f0}
.seat-map-dialog-header-title{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.seat-map-dialog-header-title strong{font-size:17px;font-weight:800;color:#0f172a}
.seat-map-dialog-header-title a{font-size:12px;font-weight:600;color:#0284c7;text-decoration:none;padding:5px 12px;background:#e0f2fe;border-radius:8px;transition:background .15s ease}
.seat-map-dialog-header-title a:hover{background:#bae6fd}
.seat-map-dialog-close{background:none;border:none;font-size:24px;font-weight:300;line-height:1;color:#64748b;cursor:pointer;padding:6px 10px;border-radius:10px;transition:background .15s ease,color .15s ease}
.seat-map-dialog-close:hover{background:#e2e8f0;color:#0f172a}
.seat-map-dialog-body{padding:26px;overflow-y:auto;max-height:calc(90vh - 76px)}
