/* Operational tools: preflight, weather, flight plan, W&B, nav logs, checklists,
   Part 141 TCO, and foreign-student compliance. Screen + print. */

:root {
  --ops-ink: #12203a;
  --ops-line: #d5dbe6;
  --ops-soft: #f4f6fb;
  --ops-accent: #123a63;
  --ops-amber: #ffb43a;
  --ops-go: #1f7a3d;
  --ops-caution: #b8860b;
  --ops-stop: #b3261e;
}

.tool-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}
.tool-wrap.wide {
  max-width: 1240px;
}

.tool-card {
  background: #fff;
  border: 1px solid var(--ops-line);
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
  margin: 0 0 1.4rem;
  box-shadow: 0 1px 3px rgba(18, 32, 58, 0.06);
}
.tool-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  color: var(--ops-ink);
}
.tool-card h3 {
  margin: 1.1rem 0 0.5rem;
  font-size: 1.05rem;
  color: var(--ops-accent);
}
.tool-card p.lead-sm {
  color: #43506a;
  margin: 0 0 0.8rem;
}

.tool-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.tool-tile {
  display: block;
  border: 1px solid var(--ops-line);
  border-radius: 10px;
  padding: 1.1rem 1.15rem;
  text-decoration: none;
  color: var(--ops-ink);
  background: #fff;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s;
}
.tool-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(18, 32, 58, 0.12);
  border-color: var(--ops-accent);
}
.tool-tile strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}
.tool-tile span {
  font-size: 0.9rem;
  color: #566;
}
.tool-tile .ico {
  font-size: 1.3rem;
}

/* Forms */
.field-row {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 0.9rem;
}
.field label,
label.field {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #35415c;
  margin-bottom: 0.3rem;
}
.field input,
.field select,
.field textarea,
.tool-card input:not([type="checkbox"]):not([type="radio"]),
.tool-card select,
.tool-card textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  font: inherit;
  color: var(--ops-ink);
  background: #fff;
}
.field .hint {
  font-size: 0.75rem;
  color: #74809a;
  font-weight: 400;
  margin-top: 0.2rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.btn-slim {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  border: 1px solid var(--ops-accent);
  background: var(--ops-accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
}
.btn-slim.ghost {
  background: #fff;
  color: var(--ops-accent);
}
.btn-slim.warn {
  background: #fff;
  border-color: var(--ops-stop);
  color: var(--ops-stop);
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th,
.data-table td {
  border: 1px solid var(--ops-line);
  padding: 0.5rem 0.6rem;
  text-align: left;
  vertical-align: top;
}
.data-table th {
  background: var(--ops-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #47536e;
}
.data-table td input,
.data-table td select {
  border: none;
  padding: 0.3rem;
  width: 100%;
  background: transparent;
}
.table-scroll {
  overflow-x: auto;
}

/* Status pills */
.status-pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-pill.go,
.status-pill.cleared_to_train,
.status-pill.eligible,
.status-pill.verified {
  background: #e2f4e8;
  color: var(--ops-go);
}
.status-pill.caution,
.status-pill.in_review,
.status-pill.pending,
.status-pill.received {
  background: #fbf1d8;
  color: var(--ops-caution);
}
.status-pill.stop,
.status-pill.blocked,
.status-pill.denied,
.status-pill.expired,
.status-pill.action_required,
.status-pill.missing {
  background: #fbe1df;
  color: var(--ops-stop);
}

/* Course tabs (lesson plans 0→ATP) */
.course-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
}
.course-tab {
  border: 1px solid var(--ops-line);
  background: #fff;
  color: #123a63;
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.course-tab:hover {
  border-color: #123a63;
}
.course-tab.is-active {
  background: #123a63;
  border-color: #123a63;
  color: #fff;
}

/* Pathway steps (conversion) */
.pathway-step {
  border: 1px solid var(--ops-line);
  border-left: 5px solid #123a63;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin-bottom: 0.6rem;
}
.pathway-step h4 {
  margin: 0 0 0.25rem;
  color: #123a63;
  font-size: 0.95rem;
}
.pathway-step p {
  margin: 0;
  font-size: 0.9rem;
}

/* Weather cards */
.wx-card {
  border: 1px solid var(--ops-line);
  border-left: 6px solid #999;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.8rem;
}
.wx-card.VFR { border-left-color: var(--ops-go); }
.wx-card.MVFR { border-left-color: #1d6fb8; }
.wx-card.IFR { border-left-color: var(--ops-stop); }
.wx-card.LIFR { border-left-color: #8e24aa; }
.wx-card .raw {
  font-family: "Consolas", "Courier New", monospace;
  background: var(--ops-soft);
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.wx-flag {
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  color: #fff;
}
.wx-flag.VFR { background: var(--ops-go); }
.wx-flag.MVFR { background: #1d6fb8; }
.wx-flag.IFR { background: var(--ops-stop); }
.wx-flag.LIFR { background: #8e24aa; }

/* Checklists */
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.checklist li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px dotted var(--ops-line);
}
.checklist li .item {
  font-weight: 600;
  color: var(--ops-ink);
}
.checklist li .val {
  color: #445;
  text-align: right;
  border-bottom: 1px solid transparent;
}
.checklist li .val::before {
  content: "……… ";
  color: #b8c0d0;
}
.checklist input[type="checkbox"] {
  margin-right: 0.5rem;
}

.callout {
  border-left: 4px solid var(--ops-amber);
  background: #fff8ec;
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 0.9rem 0;
  font-size: 0.92rem;
}
.callout.legal {
  border-left-color: #7a8699;
  background: var(--ops-soft);
  font-size: 0.85rem;
  color: #55607a;
}

.result-box {
  background: var(--ops-soft);
  border: 1px solid var(--ops-line);
  border-radius: 10px;
  padding: 1rem 1.15rem;
}
.result-box .big {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ops-ink);
}
.wb-envelope {
  width: 100%;
  height: auto;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  background: #fff;
}

/* Compliance progress */
.clearance-banner {
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  color: #fff;
}
.clearance-banner.cleared_to_train { background: var(--ops-go); }
.clearance-banner.in_review { background: var(--ops-caution); }
.clearance-banner.action_required,
.clearance-banner.blocked { background: var(--ops-stop); }
.clearance-banner h2 { color: #fff; margin: 0 0 0.3rem; }

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--ops-line);
  font-size: 0.92rem;
}
.check-list li .mark { font-weight: 800; width: 1.4rem; text-align: center; }
.check-list li.ok .mark { color: var(--ops-go); }
.check-list li.bad .mark { color: var(--ops-stop); }

.print-only { display: none; }

@media print {
  header.subpage-hero,
  .nav,
  .footer,
  .no-print,
  .btn-row,
  .site-nav,
  [data-site-nav] {
    display: none !important;
  }
  body { background: #fff; }
  .tool-wrap { padding: 0; max-width: 100%; }
  .tool-card {
    box-shadow: none;
    border: 1px solid #333;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 0.6rem;
  }
  .print-only { display: block; }
  .print-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #000;
    padding-bottom: 0.4rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
  }
  .data-table th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .checklist input[type="checkbox"] { -webkit-print-color-adjust: exact; }
  a[href]:after { content: ""; }
}

/* Route hazards: TFRs / MOA-SUA / NOTAMs */
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--ops-soft);
  border: 1px solid var(--ops-line);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ops-ink);
}
.hazard-group { margin: 1rem 0 0.5rem; font-family: Oswald, sans-serif; color: var(--ops-accent); }
.hazard-card {
  border: 1px solid var(--ops-line);
  border-left: 4px solid var(--ops-caution);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin: 0 0 0.7rem;
  background: #fff;
}
.hazard-card.tfr { border-left-color: var(--ops-stop); }
.hazard-card.sua { border-left-color: #6d28d9; }
.hazard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.hazard-body { font-size: 0.92rem; line-height: 1.45; }
.hazard-body.raw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; white-space: pre-wrap; }
.tag {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--ops-accent);
  color: #fff;
}
.tag.muted-tag { background: var(--ops-soft); color: var(--ops-ink); border: 1px solid var(--ops-line); }
.tag.sua-tag { background: #6d28d9; }
.btn-slim.sm { padding: 0.32rem 0.6rem; font-size: 0.8rem; margin-top: 0.4rem; }
.ok-note { color: var(--ops-go); font-size: 0.9rem; margin: 0.2rem 0; }

/* Controller.com fleet listing cards */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.listing-card {
  border: 1px solid var(--ops-line);
  border-radius: 10px;
  padding: 1rem 1.05rem 1.1rem;
  background: var(--ops-soft);
  border-left: 4px solid var(--ops-accent);
}
.listing-card.listing-warn { border-left-color: var(--ops-caution); }
.listing-card.listing-muted { border-left-color: #64748b; }
.listing-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.listing-role {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ops-accent);
}
.listing-status {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
}
.listing-card.listing-ok .listing-status { color: var(--ops-go); }
.listing-card.listing-warn .listing-status { color: var(--ops-caution); }
.listing-card strong {
  display: block;
  font-family: Oswald, sans-serif;
  color: var(--ops-ink);
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}
.listing-meta, .listing-highlights, .listing-use {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #475569;
  margin: 0.25rem 0;
}
.listing-price {
  font-family: Oswald, sans-serif;
  font-size: 1.35rem;
  color: var(--ops-ink);
  margin: 0.35rem 0 0.15rem;
}
.listing-tail {
  font-weight: 700;
  color: var(--ops-accent);
}
.listing-card .btn-slim {
  margin-top: 0.65rem;
}
