:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  margin: 0; background: #0e1726; color: #e6edf6;
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: #7cc4ff; text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: #16223a; border-bottom: 1px solid #243352;
  position: sticky; top: 0; z-index: 10;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 18px; color: #e6edf6;
}
.brand:hover { text-decoration: none; }
.brand img { display: block; border-radius: 50%; }
.topbar nav { display: flex; align-items: center; gap: 16px; }
.topbar .who { color: #8aa0c0; }

.wrap { max-width: 820px; margin: 0 auto; padding: 26px 18px 60px; }
h1 { font-size: 26px; margin: 6px 0 18px; }
h2 { font-size: 19px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 6px; }
.lead { color: #b7c6dc; font-size: 16px; }
.muted { color: #7d92b2; }
.err { color: #ff8a8a; background: #2a1720; border: 1px solid #5a2634; padding: 9px 12px; border-radius: 8px; }
.ok  { color: #74e29a; background: #12241a; border: 1px solid #2a5a3a; padding: 9px 12px; border-radius: 8px; }

.card {
  background: #16223a; border: 1px solid #243352; border-radius: 14px;
  padding: 18px 20px; margin: 16px 0;
}
.hero { padding: 20px 0 6px; }
/* Big enough that the badge's own "VIRTUAL WIND INFO" line stays readable -
   below ~120px it turns to mush, so don't shrink this much further. */
.hero-logo { display: block; width: 140px; height: auto; margin-bottom: 14px; }
.hero h1 { font-size: 32px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.step p { color: #b7c6dc; }

.btn {
  display: inline-block; background: #2f6bd6; color: #fff; border: 0; border-radius: 9px;
  padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { background: #3a7bee; text-decoration: none; }
.btn.ghost { background: #1d2c49; color: #cfe0f6; border: 1px solid #2c4066; }
.btn.danger { background: #b23a4a; }
.btn.small { padding: 6px 11px; font-size: 13px; }

.form { display: flex; flex-direction: column; gap: 12px; max-width: 380px; }
.form.card { max-width: 420px; }
label { display: block; font-size: 13px; color: #9fb3d1; }
input[type=text], input[type=email], input[type=password], input:not([type]) {
  width: 100%; margin-top: 5px; background: #0f1a2e; border: 1px solid #2c4066;
  color: #e6edf6; border-radius: 8px; padding: 9px 11px; font: inherit;
}
.inline { display: inline; }

.fleet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fid { color: #7d92b2; font-size: 13px; font-weight: 400; }
.kv { margin: 12px 0; }
.kv label { margin-bottom: 4px; }
.kv code.copy {
  display: inline-block; background: #0f1a2e; border: 1px solid #2c4066; border-radius: 7px;
  padding: 6px 10px; word-break: break-all; cursor: text; user-select: all;
}
.dl { margin-top: 12px; }

/* wind panel */
.wind-panel { margin-top: 16px; border-top: 1px solid #243352; padding-top: 14px; }
.wind-panel .now {
  background: #0f1a2e; border: 1px solid #243352; border-radius: 9px;
  padding: 10px 12px; margin-bottom: 12px; font-size: 14px;
}
.wind-panel .now b { color: #7cc4ff; }
.seg { display: flex; gap: 6px; margin: 8px 0; }
.seg button {
  flex: 1; background: #1d2c49; color: #cfe0f6; border: 1px solid #2c4066;
  border-radius: 8px; padding: 8px 0; font: inherit; cursor: pointer;
}
.seg button:hover { background: #26395e; }
.seg button.active { background: #2f6bd6; border-color: #3f7fee; color: #fff; }
.compass { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.compass button {
  background: #1d2c49; color: #cfe0f6; border: 1px solid #2c4066; border-radius: 8px;
  padding: 8px 0; font: inherit; cursor: pointer;
}
.compass button:hover { background: #26395e; }
input[type=range] { width: 100%; }
.dirVal, .spdVal, .stepVal, .rdirVal, .rspdVal {
  float: right; font-variant-numeric: tabular-nums; font-weight: 600;
}
.wind-panel .fixed, .wind-panel .dyn { transition: opacity .15s; }
.wind-panel .fixedTitle {
  margin: 10px 0 2px; text-transform: uppercase; letter-spacing: .04em; font-size: 11px;
}
.wind-panel .dyn { margin-top: 14px; border-top: 1px dashed #243352; padding-top: 10px; }
.wind-panel .preview {
  width: 100%; height: auto; margin-top: 10px;
  background: #0f1a2e; border: 1px solid #243352; border-radius: 9px;
}
.dyn-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 6px; font-size: 12px;
}
.wind-panel .apply { margin-top: 12px; }
.panel-msg { margin-left: 10px; font-size: 13px; }
.panel-msg.ok { color: #74e29a; }
.panel-msg.err { color: #ff8a8a; }

.filelist { list-style: none; padding: 0; margin: 0; }
.filelist li { padding: 8px 0; border-bottom: 1px solid #1e2c46; }
.filelist li:last-child { border-bottom: 0; }
.filelist .muted { display: block; font-size: 13px; }
.notecard {
  width: 100%; background: #0f1a2e; border: 1px solid #2c4066; color: #cfe0f6;
  border-radius: 9px; padding: 12px; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px; resize: vertical;
}
.compat { width: 100%; border-collapse: collapse; margin: 14px 0 6px; }
.compat th, .compat td {
  text-align: left; vertical-align: top; padding: 10px 12px 10px 0;
  border-top: 1px solid #243352; font-weight: 400;
}
.compat th { color: #e6edf6; font-weight: 600; width: 30%; }
.compat td:nth-child(2) { width: 1%; white-space: nowrap; font-weight: 600; }
.compat .yes   { color: #6ee7a0; }
.compat .maybe { color: #f0c05a; }
@media (max-width: 640px) {
  .compat, .compat tr, .compat th, .compat td { display: block; width: auto; }
  .compat td { padding-top: 2px; }
  .compat th { border-top: 1px solid #243352; padding-bottom: 2px; }
  .compat td:nth-child(2) { border-top: 0; }
  .compat td:last-child { border-top: 0; padding-bottom: 10px; }
}

/* --- fleet lifecycle badges + admin tables --- */
.state {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  padding: 1px 7px; border-radius: 9px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.state.active  { background: #14532d; color: #6ee7a0; }
.state.comped  { background: #1e3a5f; color: #7cc4ff; }
.state.pending { background: #4a3a12; color: #f0c05a; }
.state.expired { background: #4a1f1f; color: #f08a8a; }

.stats { display: flex; flex-wrap: wrap; gap: 18px; margin: 0 0 12px; }
.stats strong { font-size: 20px; }
.searchbar { margin: 18px 0; }
.inline { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }

.admin { width: 100%; border-collapse: collapse; }
.admin th, .admin td {
  text-align: left; vertical-align: top; padding: 9px 10px 9px 0;
  border-top: 1px solid #243352;
}
.admin th { color: #8aa0c0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.admin .actions { text-align: right; white-space: nowrap; }
.btn.danger, .btn.ghost.danger { color: #f08a8a; border-color: #5a2a2a; }
.admin td code { color: #7cc4ff; }
@media (max-width: 700px) {
  .admin .actions { text-align: left; white-space: normal; }
}

.foot { text-align: center; color: #5f7391; padding: 24px; font-size: 13px; }
