:root {
  color-scheme: light;
  --bg: #f4f7f5;
  --panel: #ffffff;
  --ink: #17211f;
  --muted: #60706b;
  --line: #d9e2de;
  --accent: #0d766f;
  --accent-dark: #095d58;
  --soft: #e7f3f0;
  --warn: #8b4c12;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(23, 33, 31, 0.08);
}

.search-panel {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 28px;
  align-items: start;
  padding: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1;
  letter-spacing: 0;
}

.intro {
  max-width: 58ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.briefing-form {
  display: grid;
  gap: 14px;
}

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

.briefing-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.wide-field {
  grid-column: span 3;
}

input,
select,
button,
a {
  font: inherit;
}

input,
select {
  min-width: 0;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  background: white;
}

select {
  appearance: none;
  padding-right: 34px;
  overflow: hidden;
  text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
}

input:disabled,
select:disabled {
  background-color: #f4f7f5;
  color: #8a9793;
}

button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.briefing-form button {
  height: 48px;
  padding: 0 18px;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.briefing-form button:hover {
  background: var(--accent-dark);
}

.status,
.summary {
  margin-top: 18px;
  border-radius: 8px;
}

.status {
  padding: 16px 18px;
  background: #fff9ee;
  border: 1px solid #ead5b7;
  color: var(--warn);
}

.status.is-error {
  background: #fff1f1;
  border-color: #efc3c3;
  color: #9a1f1f;
}

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px;
  background: var(--soft);
  border: 1px solid #cbe4df;
}

.summary span {
  border-radius: 999px;
  padding: 7px 11px;
  background: white;
  color: var(--accent-dark);
  font-weight: 800;
}

.results {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.briefing-section {
  display: grid;
  gap: 14px;
}

.briefing-section h2 {
  margin: 10px 0 0;
  font-size: 1.2rem;
  letter-spacing: 0;
}

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

.airport-card,
.procedure-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.airport-card header,
.procedure-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
}

.airport-card strong,
.procedure-card strong {
  display: block;
  font-size: 1.1rem;
}

.airport-card span,
.procedure-card span,
.procedure-card small {
  color: var(--muted);
}

.weather-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.weather-grid > div {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  background: white;
}

.weather-grid small {
  color: var(--accent-dark);
  font-weight: 800;
}

.weather-grid pre {
  min-height: 54px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
  font: 0.92rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.procedure-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.chart {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  background: white;
}

.empty {
  margin: 0;
  padding: 16px 18px;
  background: white;
  color: var(--muted);
}

.chart h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.chart p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.chart-meta {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.chart-actions {
  display: flex;
  gap: 8px;
}

.chart-actions a {
  display: inline-flex;
  min-width: 70px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.chart-actions a:hover {
  border-color: var(--accent);
  background: var(--soft);
}

.chart-actions a[hidden] {
  display: none;
}

.source-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding-top: 16px;
  }

  .search-panel,
  .field-grid,
  .airport-grid,
  .chart {
    grid-template-columns: 1fr;
  }

  .search-panel {
    padding: 20px;
  }

  .wide-field {
    grid-column: auto;
  }

  .chart-meta {
    white-space: normal;
  }
}
