.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions form {
  margin: 17px 0 0;
}

.header-actions button,
.header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted-bright);
  font: 700 9px "Segoe UI", sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.header-link {
  margin-top: 17px;
}

.header-actions button:hover,
.header-link:hover,
.header-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.access-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
  background: radial-gradient(circle at 50% 20%, #102b38 0, transparent 30rem), var(--app-bg);
}

.access-card {
  width: min(430px, 100%);
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 24px 70px #0008;
}

.access-brand {
  margin: 0 0 38px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: .03em;
}

.app-header h1 {
  font-weight: 800;
}

.access-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.access-card h1 {
  margin: 0;
  font-size: 29px;
}

.access-copy {
  margin: 9px 0 25px;
  color: var(--muted-bright);
}

.access-copy code {
  color: var(--accent);
  font-size: 12px;
}

.access-form {
  display: grid;
  gap: 8px;
}

.access-form label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.access-form input {
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #102533;
  color: var(--text);
  font: inherit;
  outline: none;
}

.access-form input:focus {
  border: 2px solid var(--accent);
}

.access-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 48px;
  margin-top: 5px;
  border: 0;
  background: var(--accent);
  color: var(--accent-dark);
  font: 800 12px "Segoe UI", sans-serif;
  cursor: pointer;
}

.access-form button:hover {
  background: #58dfc4;
}

.access-error {
  margin-top: 13px;
  padding: 10px 12px;
  background: #4b2025;
  color: var(--danger);
}

.details-panel li {
  margin: 0 0 10px;
  line-height: 1.5;
}

.details-panel li:last-child {
  margin-bottom: 0;
}

.details-panel #explanation-section {
  margin-top: 0;
  padding-top: 18px;
}

.selected-meta {
  margin: 0 0 17px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-bright);
  font-weight: 400;
  line-height: 1.6;
}

.search-form button {
  height: 44px;
  margin-block: 1px;
}

.access-about-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--muted-bright);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
}

.access-about-link:hover,
.access-about-link:focus-visible {
  color: var(--accent);
}

.wind-card {
  height: 76px;
  overflow: hidden;
  font-size: 10px;
  transition: width .16s ease, height .16s ease, border-color .16s ease;
}

.wind-card-title {
  font-size: 9px;
  line-height: 1.15;
  text-transform: uppercase;
}

.wind-card-title span {
  color: var(--muted-bright);
}

.wind-direction-row {
  margin-top: 4px;
}

.wind-direction-row strong {
  font-size: 11px;
}

.wind-compact-values {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wind-compact-speed {
  color: #dceaf0;
  white-space: nowrap;
}

.wind-arrow {
  font-size: 18px;
}

.wind-card-selected {
  display: none;
}

.wind-card.is-selected {
  width: 286px;
  height: 95px;
  border-color: #56e6cc;
}

.wind-card.is-selected .wind-card-compact {
  display: none;
}

.wind-card.is-selected .wind-card-selected {
  display: block;
}

.wind-selected-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 27px;
  padding: 0 1px 7px;
  border-bottom: 1px solid #244852;
  color: #fff;
  font-size: 11px;
}

.wind-selected-header #wind-selected-score {
  color: #c8fff3;
}

.wind-selected-body {
  display: grid;
  grid-template-columns: 130px 1px minmax(0, 1fr);
  height: 51px;
  padding-top: 7px;
}

.wind-selected-body dl {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: start;
  gap: 5px 8px;
  margin: 0;
  font-size: 10px;
}

.chart-help-row {
  position: absolute;
  z-index: 3;
  top: 9px;
  left: 9px;
  right: 154px;
  color: var(--muted);
  font-size: 10px;
  pointer-events: none;
}

.chart-panel:has(.wind-card.is-selected) .chart-help-row {
  right: 312px;
}

.chart-help-row .chart-help {
  position: static;
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.chart-best-label {
  font-size: 11px;
}

.chart-zoom-controls {
  display: none;
}

.wind-selected-body dt {
  color: #8fa7b6;
  font-weight: 700;
}

.wind-selected-body dd {
  margin: 0;
  color: #dceaf0;
  font-weight: 700;
  white-space: nowrap;
}

.wind-selected-divider {
  height: 42px;
  background: #244852;
}

.wind-selected-values {
  position: relative;
  min-width: 0;
  padding-left: 10px;
}

.wind-selected-values dl {
  grid-template-columns: 34px auto;
  gap: 2px 7px;
  padding-right: 31px;
}

.wind-selected-arrow {
  position: absolute;
  top: 5px;
  right: 0;
}

@media (min-width: 901px) {
  .forecast-grid {
    grid-template-rows: minmax(0, 1fr);
  }

  .chart-column,
  .side-column {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .details-section {
    min-height: 0;
    overflow: hidden;
  }

  .details-panel {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 620px) {
  .header-actions .app-badge {
    display: none;
  }

  .chart-title {
    align-items: center;
  }

  .chart-zoom-controls {
    display: flex;
    gap: 6px;
  }

  .chart-zoom-controls button {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font: 700 17px/1 "Segoe UI", Arial, sans-serif;
    cursor: pointer;
    touch-action: manipulation;
  }

  .chart-zoom-controls button:disabled {
    opacity: .35;
    cursor: default;
  }

  .chart-help-row {
    left: 12px;
    right: 12px;
    line-height: 1.4;
  }

  .chart-panel:has(.wind-card.is-selected) .chart-help-row {
    left: 12px;
    right: 12px;
  }

  .chart-panel {
    height: 400px;
  }

  .chart-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .wind-card {
    top: 40px;
    right: 12px;
    transform: none;
  }

  .wind-card.is-selected {
    top: 40px;
    width: min(360px, calc(100% - 24px));
  }

  .chart-band-label {
    font-size: 9px;
  }

  .wind-card.is-selected .wind-selected-body {
    grid-template-columns: minmax(0, .8fr) 1px minmax(0, 1fr);
  }

  .wind-card.is-selected .wind-selected-values dl {
    grid-template-columns: 32px minmax(0, 1fr);
    padding-right: 44px;
  }

  .wind-card.is-selected #wind-selected-direction {
    white-space: nowrap;
  }

  .side-column {
    grid-auto-rows: max-content;
    gap: 18px;
  }

  .side-column > section {
    min-width: 0;
  }

  .best-card {
    height: auto;
  }

  .details-section {
    grid-template-rows: 30px auto;
    min-height: 0;
  }
}
