@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/open-sans-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/open-sans-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/open-sans-latin-700.woff2") format("woff2");
}

*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  font-family: "Open Sans", "Segoe UI", sans-serif;
  color: #212529;
  background: #fff;
  line-height: 1.5;
}

img { max-width: 100%; }

a { color: #007bff; text-decoration: none; }
a:hover { background-color: #aaa; color: #fff; }
a:active { background-color: #000; color: #fff; }

.container {
  width: min(1140px, calc(100vw - 2.5rem));
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  background: #fff;
  padding: 1.1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .9rem;
  color: #008000;
  text-decoration: none;
}
.brand:hover,
.brand:active { background: transparent; color: #008000; }
.logo-frame {
  width: 86px;
  height: 108px;
  overflow: hidden;
  flex: 0 0 auto;
}
.logo-frame img {
  width: 132px;
  max-width: none;
  height: auto;
  margin-left: -24px;
  margin-top: -30px;
  display: block;
}
.brand-title {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.1;
  color: #008000;
}
.brand-sub {
  display: block;
  margin-top: .15rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: #008000;
}

.nav-check {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}
.nav-toggle { display: none; }

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .35rem 1.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-links nav { display: flex; align-items: center; gap: 1.15rem; }
.nav-links a {
  color: #444;
  padding: .2rem .35rem;
}
.nav-links a.active { color: #008000; font-weight: 700; }

.op-label {
  color: #555;
  font-size: .85rem;
  max-width: 24rem;
  text-align: right;
  line-height: 1.3;
}

.content {
  background: #eee;
  border-top: 1px solid silver;
  border-bottom: 1px solid silver;
  padding: 2rem 0 2.5rem;
}

.jumbotron {
  background: #e9ecef;
  border-radius: .3rem;
  padding: 2rem 2.2rem;
}
.auth-form { display: flex; flex-direction: column; align-items: flex-start; }
.auth-form input { max-width: 24rem; width: min(24rem, 100%); }
.auth-form button { margin-top: .9rem; }

h1, h2, h3 { font-weight: 600; line-height: 1.3; }
h1 { font-size: 1.75rem; margin: 0 0 .4rem; }
h2 { font-size: 1.35rem; margin: 0 0 .7rem; }
h3 { font-size: 1.45rem; margin: 0 0 .7rem; }
.lead, p.hint { margin: 0 0 .9rem; }
.lead { font-size: 1.05rem; }
p.hint { color: #444; font-size: .95rem; }
.obs-line { margin: .2rem 0; }
.obs-line a, .kv a { word-break: break-all; }
.meta { color: #555; margin: 0 0 1rem; }

.prose { max-width: 52rem; margin: 0 auto; }
.prose h2 { font-size: 1.15rem; margin: 1.35rem 0 .4rem; }
.prose p, .prose li { margin-bottom: .55rem; }
.prose ul { margin: .2rem 0 .8rem; padding-left: 1.2rem; }
.prose table { margin: .5rem 0 1rem; }

label { display: block; margin: .15rem 0 .3rem; font-size: .92rem; color: #333; }

input, select, button { font: inherit; }
input, select {
  width: 100%;
  padding: .5rem .65rem;
  border: 1px solid #ced4da;
  border-radius: .25rem;
  background: #fff;
  color: #212529;
}

button {
  padding: .45rem .9rem;
  border: 1px solid #008000;
  border-radius: .25rem;
  background: #fff;
  color: #008000;
  cursor: pointer;
}
button:hover:not(:disabled) { background: #f4f4f4; }
button.danger {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #fff;
}
button.danger:hover:not(:disabled) { background: #991b1b; }
button:disabled { opacity: .45; cursor: default; }
.auth-form button { min-width: 9rem; padding: .55rem 1.15rem; }
.foot { margin: 1.1rem 0 0; font-size: .92rem; }

.page { display: none; }
.page.active { display: block; }

.step-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: .3rem;
  padding: 1.1rem 1.2rem 1.2rem;
  margin-bottom: 1rem;
}
.step-card h3 {
  display: flex;
  align-items: center;
  font-size: 1.05rem;
  margin-bottom: .45rem;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  margin-right: .5rem;
  border-radius: 50%;
  background: #008000;
  color: #fff;
  font-size: .8rem;
  flex-shrink: 0;
}

.row { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: .6rem; }
.row > * { flex: 1; min-width: 12rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .45rem 0 .8rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.section-head p { margin: 0; }

.table-wrap { overflow-x: auto; max-width: 100%; }
.table-wrap table { min-width: 36rem; }
.jumbotron, .step-card { max-width: 100%; min-width: 0; }
.jumbotron.prose { max-width: 52rem; }
table { width: 100%; border-collapse: collapse; background: #fff; margin: 0; }
th, td {
  padding: .6rem .7rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
  vertical-align: middle;
  word-wrap: break-word;
}
th {
  background: #f8f8f8;
  color: #555;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
tr.selected { background: #eef6ee; }
.empty-state { color: #777; }

.badge {
  display: inline-block;
  padding: .12rem .45rem;
  border-radius: .2rem;
  font-size: .78rem;
}
.badge.yes, .badge.live { background: #e6f4ea; color: #1a7f37; }
.badge.wait { background: #f4f4f4; color: #555; }
.flight-card {
  border: 1px solid #ddd;
  border-radius: .3rem;
  padding: .9rem 1rem 1rem;
  margin-top: .75rem;
  background: #fafafa;
}
.flight-card.followed { border-color: #008000; }
.flight-card h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin: 0 0 .65rem;
  font-size: 1rem;
}
.flight-card h4 button { padding: .28rem .7rem; white-space: nowrap; }
.card-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.id-link { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
.copy-id { padding: .12rem .45rem; font-size: .78rem; }
.drone-did .id-link a { word-break: break-all; }
.drone-did .copy-id { flex-shrink: 0; }
.obs-count { color: #555; }
.kv { display: grid; grid-template-columns: 7.2rem 1fr; gap: .35rem .7rem; margin: 0; }
.kv dt { color: #555; font-size: .85rem; }
.kv dd { margin: 0; min-width: 0; }
.telemetry-grid { display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; font-variant-numeric: tabular-nums; }
.telemetry-card .hint { margin-bottom: .45rem; }
@media (max-width: 720px) {
  .kv { grid-template-columns: 1fr; gap: .1rem .7rem; }
  .kv dd { margin-bottom: .45rem; }
  .flight-card h4 { align-items: flex-start; }
}

code { background: #f4f4f4; padding: .1rem .3rem; border-radius: .2rem; font-size: .85em; }
.trunc-wide {
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmd-block { margin: .4rem 0; }
.cmd-block:has(pre:empty) { display: none; }
.cmd-block pre {
  margin: 0;
  padding: .8rem .9rem;
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: .3rem;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
  font-size: .85rem;
}

#pool, #flightStatus {
  display: none;
  width: min(1140px, calc(100% - 2.5rem));
  margin: 0 auto 1rem;
  padding: .65rem .9rem;
  border-radius: .25rem;
  font-size: .92rem;
}
#pool.ok, #flightStatus.ok { display: block; background: #e6f4ea; color: #1a7f37; }
#pool.err, #flightStatus.err { display: block; background: #fce8e8; color: #b91c1c; }
#pool.inf, #flightStatus.inf { display: block; background: #e7f1e7; color: #146c2e; }
#flightStatus:not(:empty) { display: block; background: #fff8e6; color: #7a5b00; }
#flightStatus.ok { background: #e6f4ea; color: #1a7f37; }
#flightStatus.err { background: #fce8e8; color: #b91c1c; }
#flightStatus.inf { background: #e7f1e7; color: #146c2e; }

#page-login #status:empty { display: none; }
#page-login #status:not(:empty) {
  display: block;
  width: min(36rem, 100%);
  background: #fce8e8;
  color: #b91c1c;
  padding: .55rem .7rem;
  border-radius: .25rem;
  margin-bottom: .8rem;
}

.footer {
  background: #f5f5f5;
  padding: 1.6rem 0;
  font-weight: 300;
  font-size: .85rem;
}
.footer-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.1fr;
  align-items: center;
  gap: .55rem 1rem;
  text-align: center;
}
.footer-copy { text-align: left; }
.footer-updated { text-align: right; color: #333; }

:focus-visible { outline: 2px solid #008000; outline-offset: 2px; }

@media (max-width: 800px) {
  .footer-row { grid-template-columns: 1fr; }
  .footer-copy, .footer-updated { text-align: center; }
  .logo-frame { width: 72px; height: 84px; }
  .logo-frame img { width: 110px; margin-left: -20px; margin-top: -25px; }
  .brand-title { font-size: 1.3rem; }
  .jumbotron { padding: 1.25rem 1rem; }
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    border-radius: .25rem;
    cursor: pointer;
  }
  .nav-toggle span,
  .nav-toggle span::before,
  .nav-toggle span::after {
    display: block;
    width: 1.1rem;
    height: 2px;
    background: #333;
    position: relative;
  }
  .nav-toggle span::before,
  .nav-toggle span::after { content: ""; position: absolute; left: 0; }
  .nav-toggle span::before { top: -6px; }
  .nav-toggle span::after { top: 6px; }
  .header-inner { flex-wrap: wrap; }
  .nav-links {
    display: none;
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: flex-start;
    padding-top: .4rem;
  }
  .nav-check:checked ~ .nav-links { display: flex; }
  .op-label { text-align: left; max-width: none; }
  .trunc-wide { max-width: 12rem; }
  .prose .table-wrap table { min-width: 0; }
  .prose table,
  .prose thead,
  .prose tbody,
  .prose tr,
  .prose td { display: block; width: auto; }
  .prose thead { display: none; }
  .prose tr {
    margin-bottom: .7rem;
    border: 1px solid #ddd;
    background: #fff;
  }
  .prose td { border: 0; padding: .4rem .7rem; }
  .prose td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: .1rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #666;
  }
}

textarea {
  width: 100%;
  padding: .5rem .65rem;
  border: 1px solid #ced4da;
  border-radius: .25rem;
  background: #fff;
  color: #212529;
  font: inherit;
}
a.button {
  display: inline-block;
  margin-top: .4rem;
  padding: .55rem 1.15rem;
  border: 1px solid #008000;
  border-radius: .25rem;
  background: #fff;
  color: #008000;
}
a.button:hover, a.button:active { background: #f4f4f4; color: #008000; }
.banner {
  background: #fce8e8;
  color: #b91c1c;
  padding: .55rem .7rem;
  border-radius: .25rem;
  margin: 0 0 .8rem;
}
.nav-links form { margin: 0; }
.nav-links button { white-space: nowrap; }
