:root {
  --flight-bg: var(--on-bg, #f3f6f4);
  --flight-surface: var(--on-surface, #ffffff);
  --flight-surface-soft: var(--on-surface-soft, #f4f7f5);
  --flight-ink: var(--on-ink, #172922);
  --flight-muted: var(--on-muted, #64736d);
  --flight-faint: var(--on-faint, #93a09a);
  --flight-line: var(--on-line, #dde5e1);
  --flight-line-strong: var(--on-line-strong, #cbd8d2);
  --flight-accent: var(--on-accent, #287967);
  --flight-accent-strong: var(--on-accent-strong, #173f36);
  --flight-accent-soft: var(--on-accent-soft, #e6f3ef);
  --flight-info-soft: var(--on-info-soft, #eaf2fa);
  --flight-danger-soft: var(--on-danger-soft, #fbe9e7);
  --flight-radius: var(--on-radius, 14px);
  --flight-radius-lg: var(--on-radius-lg, 20px);
  --flight-shadow-sm: var(--on-shadow-sm, 0 5px 18px rgba(26, 51, 42, .055));
  --flight-shadow: var(--on-shadow, 0 16px 44px rgba(26, 51, 42, .09));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--flight-ink);
  background:
    radial-gradient(circle at 84% 7%, rgba(230, 243, 239, .92), transparent 31rem),
    var(--flight-bg);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

button,
input,
select { font: inherit; }

button { cursor: pointer; }

/* Home / OurNest shared header fallback. The shared stylesheet supplies the
   canonical version in production; these rules keep local development usable. */
.on-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid var(--flight-line);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
}

.on-header__inner {
  width: min(1260px, calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.on-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--flight-ink);
  text-decoration: none;
}

.on-brand__mark {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  overflow: hidden;
  place-items: center;
  border-radius: 14px;
}

.on-brand__mark img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--flight-accent-strong);
  color: #fff;
  font-family: Georgia, serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.on-brand__name,
.on-brand__subtitle { display: block; }
.on-brand__name { font-size: 1.26rem; line-height: 1.1; }
.on-brand__subtitle { margin-top: 3px; color: var(--flight-muted); font-size: .72rem; }

.on-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 3px;
}

.on-nav-link {
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--flight-muted);
  font-size: .8rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.on-nav-link:hover {
  color: var(--flight-accent-strong);
  background: var(--flight-accent-soft);
}

.on-nav-link.active {
  color: #fff;
  background: var(--flight-accent);
}

.on-nav-toggle {
  width: 42px;
  height: 42px;
  margin-left: auto;
  display: none;
  padding: 10px;
  border: 1px solid var(--flight-line);
  border-radius: 11px;
  background: var(--flight-surface);
}

.on-nav-toggle > span:not(.on-sr-only) {
  width: 100%;
  display: block;
  border-top: 2px solid var(--flight-ink);
}

.on-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.flights-shell {
  width: min(1260px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 72px;
}

.hero {
  min-height: 350px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 72px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--flight-accent);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--flight-ink);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(3rem, 5.5vw, 5.2rem);
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: 1.02;
}

.hero h1 span { color: var(--flight-accent); }

.hero-copy > p:not(.eyebrow) {
  max-width: 610px;
  margin: 24px 0 0;
  color: var(--flight-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.hero-meta {
  margin-top: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--flight-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .68);
  color: var(--flight-muted);
  font-size: .7rem;
  font-weight: 750;
}

.hero-meta i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38a77e;
  box-shadow: 0 0 0 4px rgba(56, 167, 126, .13);
}

.route-visual {
  position: relative;
  min-height: 220px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr 28px;
  align-items: center;
  gap: 16px;
  padding: 34px 38px;
  border: 1px solid rgba(40, 121, 103, .18);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(230,243,239,.8));
  box-shadow: var(--flight-shadow-sm);
}

.route-code {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 1px solid var(--flight-line-strong);
  border-radius: 22px;
  background: var(--flight-surface);
  color: var(--flight-accent-strong);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1.35rem;
  font-weight: 850;
  letter-spacing: .07em;
  box-shadow: var(--flight-shadow-sm);
}

.route-path {
  position: relative;
  border-top: 2px dashed rgba(40, 121, 103, .38);
}

.route-path i {
  position: absolute;
  top: -23px;
  left: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--flight-accent);
  color: #fff;
  font-style: normal;
  transform: translateX(-50%) rotate(4deg);
  box-shadow: 0 8px 20px rgba(40, 121, 103, .24);
}

.route-visual small {
  color: var(--flight-muted);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.route-visual small:last-child { grid-column: 3; }

.metrics {
  margin-bottom: 58px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metrics article {
  min-height: 132px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--flight-line) !important;
  border-radius: var(--flight-radius-lg) !important;
  background: var(--flight-surface) !important;
  box-shadow: var(--flight-shadow-sm) !important;
}

.metrics span {
  color: var(--flight-muted);
  font-size: .76rem;
  font-weight: 750;
}

.metrics strong {
  margin: auto 0 10px;
  color: var(--flight-ink);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 2.15rem;
  font-weight: 600;
  line-height: 1;
}

.metrics small {
  color: var(--flight-accent);
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .11em;
}

.settings-launcher {
  margin: -34px 0 42px;
  display: flex;
  justify-content: flex-end;
}

.settings-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid var(--flight-line-strong);
  border-radius: 12px;
  background: var(--flight-surface);
  color: var(--flight-ink);
  box-shadow: var(--flight-shadow-sm);
}

.settings-button:hover,
.settings-button[aria-expanded="true"] {
  border-color: rgba(40, 121, 103, .42);
  background: var(--flight-accent-soft);
  color: var(--flight-accent-strong);
}

.settings-button > span { color: var(--flight-accent); font-size: 1rem; }
.settings-button strong { font-size: .72rem; }

.settings-button small {
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf0ee;
  color: var(--flight-muted);
  font-size: .58rem;
  font-weight: 800;
}

.settings-button small.configured {
  background: var(--flight-accent-soft);
  color: var(--flight-accent-strong);
}

.credential-panel {
  margin: -24px 0 42px;
  padding: 24px;
}

.credential-panel .section-heading { margin-bottom: 10px; }

.settings-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--flight-line);
  border-radius: 10px;
  background: var(--flight-surface-soft);
  color: var(--flight-muted);
  font-size: 1.35rem;
  line-height: 1;
}

.settings-close:hover {
  border-color: var(--flight-line-strong);
  color: var(--flight-ink);
}

.credential-note,
.credential-empty {
  color: var(--flight-muted);
  font-size: .7rem;
  line-height: 1.6;
}

.credential-note { margin: 0 0 15px; }

.credential-form {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.credential-wide { grid-column: 1 / -1; }

.credential-form textarea,
.credential-form input {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .68rem;
}

.credential-form__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.credential-form__actions > span {
  min-width: 0;
  margin-right: auto;
  color: var(--flight-muted);
  font-size: .67rem;
  overflow-wrap: anywhere;
}

.credential-form__actions > span.configured {
  color: var(--flight-accent-strong);
  font-weight: 800;
}

.credential-save {
  width: auto;
  min-height: 40px;
  padding: 0 14px;
  font-size: .68rem;
}

.credential-clear {
  border-color: rgba(191, 85, 77, .24);
  color: #94413b;
}

.credential-usage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.credential-empty {
  padding: 18px;
  border: 1px dashed var(--flight-line-strong);
  border-radius: 12px;
  background: var(--flight-surface-soft);
  text-align: center;
}

.credential-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--flight-line);
  border-radius: 12px;
  background: var(--flight-surface-soft);
}

.credential-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.credential-card__top strong,
.credential-card__top small { display: block; }
.credential-card__top strong { color: var(--flight-ink); font-size: .8rem; }
.credential-card__top small { margin-top: 3px; color: var(--flight-muted); font-size: .6rem; }

.credential-status {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--flight-info-soft);
  color: #35688f;
  font-size: .6rem;
  font-weight: 850;
  white-space: nowrap;
}

.credential-status.success {
  background: var(--flight-accent-soft);
  color: var(--flight-accent-strong);
}

.credential-status.failed {
  background: var(--flight-danger-soft);
  color: #94413b;
}

.credential-stats {
  margin: 13px 0 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.credential-stats span {
  padding: 8px;
  border: 1px solid var(--flight-line);
  border-radius: 8px;
  color: var(--flight-muted);
  font-size: .6rem;
}

.credential-stats b {
  display: block;
  margin-top: 3px;
  color: var(--flight-ink);
  font-size: .8rem;
}

.credential-card p {
  margin: 7px 0 0;
  color: var(--flight-muted);
  font-size: .61rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.credential-fingerprints {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.credential-card details { margin-top: 9px; color: #94413b; font-size: .63rem; }
.credential-card summary { cursor: pointer; font-weight: 800; }
.credential-card pre {
  max-height: 100px;
  margin: 7px 0 0;
  padding: 8px;
  overflow: auto;
  border-radius: 8px;
  background: var(--flight-danger-soft);
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.surface,
.creator,
.history-panel {
  border: 1px solid var(--flight-line);
  border-radius: var(--flight-radius-lg);
  background: var(--flight-surface);
  box-shadow: var(--flight-shadow-sm);
}

.creator {
  position: sticky;
  top: 96px;
  padding: 28px;
}

.section-heading {
  min-height: 48px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.section-heading p { margin-bottom: 5px; }

.section-heading h2 {
  margin: 0;
  color: var(--flight-ink);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -.025em;
}

.section-index {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--flight-line-strong);
  border-radius: 13px;
  color: var(--flight-accent);
  background: var(--flight-accent-soft);
  font-size: .7rem;
  font-weight: 850;
}

form { display: grid; gap: 18px; }

label,
legend {
  color: var(--flight-muted);
  font-size: .74rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  margin-top: 7px;
  padding: 8px 11px;
  border: 1px solid var(--flight-line-strong) !important;
  border-radius: 10px !important;
  outline: none;
  background: var(--flight-surface) !important;
  color: var(--flight-ink) !important;
  transition: border-color .15s, box-shadow .15s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(40, 121, 103, .65) !important;
  box-shadow: 0 0 0 3px rgba(40, 121, 103, .11);
}

input::placeholder { color: var(--flight-faint); }
textarea::placeholder { color: var(--flight-faint); }

textarea {
  resize: vertical;
  line-height: 1.45;
}

input[name="origin"],
input[name="destination"] {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.airport-pair {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 8px;
  align-items: end;
}

.airport-pair > span {
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--flight-accent);
  font-size: 1.25rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.field-row.three { grid-template-columns: .7fr .8fr 1.15fr; }

fieldset {
  min-width: 0;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--flight-line);
  border-radius: 12px;
  background: var(--flight-surface-soft);
}

legend { padding: 0 7px; }

.weekday-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.weekday-grid label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.weekday-grid input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  margin: 0;
  opacity: 0;
}

.weekday-grid span {
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 5px;
  border: 1px solid var(--flight-line-strong);
  border-radius: 9px;
  background: var(--flight-surface);
  color: var(--flight-muted);
  font-size: .63rem;
  text-align: center;
  transition: border-color .15s, background .15s, color .15s;
}

.weekday-grid input:checked + span {
  border-color: rgba(40, 121, 103, .5);
  background: var(--flight-accent-soft);
  color: var(--flight-accent-strong);
}

.weekday-grid input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(40, 121, 103, .14);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox input {
  width: 17px;
  min-height: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--flight-accent);
}

.primary {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border: 1px solid var(--flight-accent) !important;
  border-radius: 11px !important;
  background: var(--flight-accent) !important;
  color: #fff !important;
  font-weight: 850;
  transition: background .15s, transform .15s, box-shadow .15s;
}

.primary:hover {
  border-color: var(--flight-accent-strong) !important;
  background: var(--flight-accent-strong) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(23, 63, 54, .18) !important;
}

.primary:disabled { cursor: wait; opacity: .55; }
.primary b { font-size: 1.1rem; }

.form-note {
  margin: -6px 0 0;
  color: var(--flight-faint);
  font-size: .68rem;
  line-height: 1.55;
}

.workspace > *,
.monitor-area,
.monitor-list,
.monitor-card { min-width: 0; }

.monitor-list,
.monitor-card { max-width: 100%; }

.text-button,
.icon-button {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--flight-line);
  border-radius: 10px;
  background: var(--flight-surface);
  color: var(--flight-muted);
  font-size: .73rem;
  font-weight: 800;
}

.text-button:hover,
.icon-button:hover {
  border-color: rgba(40, 121, 103, .38);
  background: var(--flight-accent-soft);
  color: var(--flight-accent-strong);
}

.icon-button {
  width: 38px;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.monitor-list { display: grid; gap: 14px; }

.empty-state {
  min-height: 290px;
  padding: 30px;
  display: grid;
  place-content: center;
  border: 1px dashed var(--flight-line-strong);
  border-radius: var(--flight-radius-lg);
  background: rgba(255, 255, 255, .52);
  color: var(--flight-muted);
  text-align: center;
}

.empty-state b {
  color: var(--flight-ink);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.empty-state p {
  max-width: 350px;
  margin: 10px auto 0;
  line-height: 1.65;
}

.monitor-card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--flight-line);
  border-radius: var(--flight-radius-lg);
  background: var(--flight-surface);
  box-shadow: var(--flight-shadow-sm);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}

.monitor-card:hover {
  border-color: var(--flight-line-strong);
  transform: translateY(-2px);
  box-shadow: var(--flight-shadow);
}

.card-top,
.route,
.card-metrics,
.card-actions {
  display: flex;
  align-items: center;
}

.card-top { justify-content: space-between; gap: 12px; }
.card-name { font-size: .93rem; font-weight: 850; }

.status-pill {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--flight-accent-strong);
  background: var(--flight-accent-soft);
  font-size: .64rem;
  font-weight: 850;
  white-space: nowrap;
}

.status-pill.paused { color: #6c746f; background: #edf0ee; }
.status-pill.failed { color: #94413b; background: var(--flight-danger-soft); }
.status-pill.running { color: #35688f; background: var(--flight-info-soft); }
.status-pill.empty { color: #76601e; background: #f7f1dc; }

.route { margin: 22px 0; gap: 14px; }

.route strong {
  color: var(--flight-accent-strong);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1.85rem;
  font-weight: 750;
  letter-spacing: .05em;
}

.route-track {
  position: relative;
  flex: 1;
  border-top: 1px dashed rgba(40, 121, 103, .5);
}

.route-track::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: var(--route-progress, 0%);
  border-top: 3px solid var(--flight-accent);
  transition: width .35s ease;
}

.route-track::after {
  content: "›";
  position: absolute;
  top: -14px;
  right: -2px;
  color: var(--flight-accent);
  font-size: 1.3rem;
}

.route.is-running .route-track::before {
  animation: route-progress-pulse 1.4s ease-in-out infinite;
}

.route-progress-label {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: clamp(30px, var(--route-progress, 0%), calc(100% - 30px));
  padding: 3px 7px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--flight-line-strong);
  border-radius: 999px;
  background: var(--flight-surface);
  color: var(--flight-accent-strong);
  box-shadow: 0 2px 8px rgba(24, 54, 46, .08);
  font-size: .6rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  transition: left .35s ease;
}

@keyframes route-progress-pulse {
  0%, 100% { opacity: .62; }
  50% { opacity: 1; }
}

.card-metrics {
  overflow: hidden;
  border: 1px solid var(--flight-line);
  border-radius: 12px;
  background: var(--flight-surface-soft);
}

.card-metrics div {
  min-width: 0;
  flex: 1;
  padding: 12px;
  border-right: 1px solid var(--flight-line);
}

.card-metrics div:last-child { border-right: 0; }
.card-metrics small,
.card-metrics strong { display: block; }

.card-metrics small {
  margin-bottom: 7px;
  overflow: hidden;
  color: var(--flight-muted);
  font-size: .62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-metrics strong {
  overflow: hidden;
  color: var(--flight-ink);
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-accent { color: var(--flight-accent) !important; }

.card-meta {
  margin: 13px 0 0;
  color: var(--flight-muted);
  font-size: .7rem;
  line-height: 1.6;
}

.date-price-chart {
  min-width: 0;
  margin-top: 15px;
  padding: 13px 14px 8px;
  overflow: hidden;
  border: 1px solid var(--flight-line);
  border-radius: 12px;
  background: var(--flight-surface-soft);
}

.date-chart-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--flight-muted);
  font-size: .64rem;
}

.date-chart-header strong {
  color: var(--flight-accent-strong);
  font-size: .68rem;
  white-space: nowrap;
}

.date-price-chart svg {
  width: 100%;
  height: 180px;
  display: block;
  overflow: visible;
}

.date-chart-grid {
  stroke: var(--flight-line);
  stroke-width: 1;
}

.date-chart-line {
  fill: none;
  stroke: var(--flight-accent);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.date-chart-area { fill: rgba(40, 121, 103, .08); }

.date-chart-dot {
  fill: var(--flight-surface);
  stroke: var(--flight-accent);
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
}

.date-chart-label {
  fill: var(--flight-muted);
  font: 10px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.card-error {
  max-width: 100%;
  margin: 13px 0 0;
  border: 1px solid rgba(191, 85, 77, .2);
  border-radius: 10px;
  background: var(--flight-danger-soft);
  color: #94413b;
}

.card-empty {
  max-width: 100%;
  margin: 13px 0 0;
  padding: 11px 12px;
  border: 1px solid rgba(160, 126, 36, .2);
  border-radius: 10px;
  background: #fbf7e9;
  color: #6f5b20;
  font-size: .7rem;
  font-weight: 750;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.card-error summary {
  padding: 10px 12px;
  cursor: pointer;
  font-size: .7rem;
  font-weight: 800;
}

.card-error summary span { margin-right: 8px; }

.card-error summary small {
  color: rgba(148, 65, 59, .72);
  font-size: .62rem;
  font-weight: 700;
}

.card-error pre {
  max-width: 100%;
  max-height: 150px;
  margin: 0;
  padding: 11px 12px;
  overflow: auto;
  border-top: 1px solid rgba(191, 85, 77, .16);
  font: inherit;
  font-size: .66rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}

.card-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 17px;
}

.card-actions button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--flight-line-strong);
  border-radius: 9px;
  background: var(--flight-surface);
  color: var(--flight-ink);
  font-size: .68rem;
  font-weight: 800;
}

.card-actions button:hover {
  border-color: rgba(40, 121, 103, .42);
  background: var(--flight-accent-soft);
  color: var(--flight-accent-strong);
}

.card-actions .run-button {
  border-color: var(--flight-accent);
  background: var(--flight-accent);
  color: #fff;
}

.card-actions .run-button:hover {
  border-color: var(--flight-accent-strong);
  background: var(--flight-accent-strong);
  color: #fff;
}

.card-actions .delete-button {
  border-color: rgba(191, 85, 77, .24);
  color: #94413b;
}

.history-panel {
  margin-top: 34px;
  padding: 28px;
}

.history-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 22px;
}

.chart-wrap,
.offer-wrap {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--flight-line);
  border-radius: var(--flight-radius);
  background: var(--flight-surface);
}

.chart-wrap { padding: 20px; }

.chart-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--flight-muted);
  font-size: .72rem;
}

.chart-header strong {
  color: var(--flight-accent);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 1.35rem;
  font-weight: 600;
}

#price-chart {
  width: 100%;
  height: 280px;
  overflow: visible;
}

.chart-grid { stroke: var(--flight-line); stroke-width: 1; }
.chart-line { fill: none; stroke: var(--flight-accent); stroke-width: 3; vector-effect: non-scaling-stroke; }
.chart-area { fill: rgba(40, 121, 103, .09); }
.chart-dot { fill: var(--flight-surface); stroke: var(--flight-accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-label { fill: var(--flight-muted); font: 11px ui-monospace, monospace; }
.chart-empty { fill: var(--flight-muted); font: 14px system-ui, sans-serif; }

.offer-wrap h3 {
  margin: 0;
  padding: 17px;
  border-bottom: 1px solid var(--flight-line);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 1rem;
  font-weight: 600;
}

.table-scroll { max-height: 330px; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .72rem; }

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--flight-line);
  text-align: left;
}

th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: var(--flight-surface-soft) !important;
  color: var(--flight-muted) !important;
  font-size: .62rem;
}

td:last-child {
  color: var(--flight-accent);
  font-weight: 850;
  white-space: nowrap;
}

.flights-footer {
  width: min(1260px, calc(100% - 48px));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--flight-line);
  color: var(--flight-muted);
  font-size: .72rem;
}

.toast {
  position: fixed;
  z-index: 1200;
  right: 24px;
  bottom: 24px;
  max-width: min(430px, calc(100vw - 48px));
  padding: 14px 17px;
  border: 1px solid rgba(40, 121, 103, .24);
  border-radius: var(--flight-radius);
  background: var(--flight-surface);
  color: var(--flight-accent-strong);
  box-shadow: var(--flight-shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: .2s;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(191, 85, 77, .3); color: #94413b; }

@media (max-width: 1080px) {
  .hero { gap: 36px; }
  .workspace { grid-template-columns: minmax(320px, 390px) minmax(0, 1fr); gap: 24px; }
  .card-metrics { display: grid; grid-template-columns: 1fr 1fr; }
  .card-metrics div:nth-child(2) { border-right: 0; }
  .card-metrics div:nth-child(-n+2) { border-bottom: 1px solid var(--flight-line); }
}

@media (max-width: 920px) {
  .on-header__inner { position: relative; width: calc(100% - 30px); }
  .on-brand__subtitle { display: none; }
  .on-nav-toggle { display: grid; align-content: space-around; }
  .on-nav {
    position: absolute;
    z-index: 1001;
    top: 64px;
    right: 0;
    left: 0;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--flight-line);
    border-radius: 16px;
    background: rgba(255,255,255,.98);
    box-shadow: var(--flight-shadow);
  }
  .on-nav.is-open,
  .on-nav.open { display: grid; }
  .on-nav-link { width: 100%; }
  .flights-shell { width: calc(100% - 30px); }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 58px 0; }
  .route-visual { display: none; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .creator { position: static; }
  .history-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .on-header__inner,
  .flights-shell,
  .flights-footer { width: calc(100% - 24px); }
  .on-brand__mark { width: 40px; height: 40px; flex-basis: 40px; }
  .hero { min-height: 0; padding: 46px 0; }
  .hero h1 { font-size: 2.75rem; }
  .hero-copy > p:not(.eyebrow) { font-size: .92rem; }
  .hero-meta span:nth-child(n+2) { display: none; }
  .metrics { gap: 10px; }
  .metrics article { min-height: 112px; padding: 17px; }
  .metrics strong { font-size: 1.75rem; }
  .creator,
  .history-panel { padding: 19px; }
  .credential-panel { padding: 19px; }
  .credential-form { grid-template-columns: minmax(0, 1fr); }
  .credential-wide { grid-column: auto; }
  .credential-form__actions {
    align-items: stretch;
    flex-direction: column;
  }
  .credential-form__actions > span { margin: 0; }
  .credential-form__actions button { width: 100%; }
  .field-row,
  .field-row.three { grid-template-columns: minmax(0, 1fr); }
  .monitor-card { padding: 19px; }
  .weekday-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .date-chart-header { align-items: flex-start; flex-direction: column; }
  .card-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .card-actions button { width: 100%; }
  .chart-header { align-items: flex-start; flex-direction: column; }
  .flights-footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}

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