:root {
  color-scheme: dark;

  --background: #080d16;
  --panel: #111827;
  --panel-soft: #172033;
  --border: #334155;
  --text: #f8fafc;
  --muted: #aab6c8;
  --subtle: #7f8ca3;
  --blue: #315be8;
  --blue-hover: #426bf3;
  --success: #86efac;
  --warning: #fde68a;
  --error: #fca5a5;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(
      circle at top,
      #18233a 0,
      #080d16 46%,
      #05080e 100%
    );
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: transparent;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 28px;
}

.site-header {
  margin-bottom: 22px;
}

.brand-label,
.section-kicker {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.05;
}

.site-description {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.generator-card,
.information-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(
      145deg,
      rgba(23, 32, 51, 0.98),
      rgba(15, 23, 42, 0.98)
    );
  box-shadow:
    0 22px 65px rgba(0, 0, 0, 0.35);
}

.generator-card {
  padding: clamp(20px, 4vw, 34px);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 5px 0 0;
  font-size: 25px;
}

.form-section {
  margin-bottom: 22px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 750;
}

.location-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #475569;
  border-radius: 8px;
  outline: none;
  color: var(--text);
  background: #0f172a;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

input {
  padding: 0 14px;
}

select {
  padding: 0 40px 0 14px;
}

input:focus,
select:focus {
  border-color: #60a5fa;
  box-shadow:
    0 0 0 3px rgba(59, 130, 246, 0.18);
}

input::placeholder {
  color: #64748b;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button {
  width: 100%;
  border: 1px solid #5d7cff;
  color: white;
  background: var(--blue);
}

.primary-button:hover:not(:disabled) {
  background: var(--blue-hover);
}

.primary-button:disabled {
  cursor: not-allowed;
  border-color: #334155;
  color: #718096;
  background: #1e293b;
}

.secondary-button {
  min-width: 104px;
  padding: 0 18px;
  border: 1px solid #53637a;
  color: #e2e8f0;
  background: #1e293b;
}

.secondary-button:hover {
  background: #273449;
}

.field-help,
.location-message,
.form-message {
  font-size: 12px;
  line-height: 1.5;
}

.field-help {
  margin-top: 7px;
  color: var(--subtle);
}

.field-help span {
  color: #a5b4fc;
}

.location-message {
  min-height: 20px;
  margin-top: 10px;
  color: var(--muted);
}

.location-message.success {
  color: var(--success);
}

.location-message.warning {
  color: var(--warning);
}

.location-message.error,
.form-message.error {
  color: var(--error);
}

.resolved-location {
  margin: 4px 0 24px;
  padding: 15px 16px;
  border: 1px solid #3b82f6;
  border-radius: 9px;
  background: rgba(30, 64, 175, 0.13);
}

.resolved-label {
  margin-bottom: 4px;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.resolved-name {
  font-size: 16px;
  font-weight: 800;
}

.resolved-coordinates {
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 13px;
}

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

.form-message {
  min-height: 20px;
  margin-top: 10px;
  text-align: center;
  color: var(--muted);
}

.information-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.information-card {
  padding: 20px;
}

.information-card h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.information-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.site-footer {
  padding: 28px 0 8px;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 650px) {
  .page-shell {
    width: min(100% - 20px, 920px);
    padding-top: 20px;
  }

  .location-row,
  .selection-grid,
  .information-grid {
    grid-template-columns: 1fr;
  }

  .secondary-button {
    width: 100%;
  }

  .generator-card {
    border-radius: 11px;
  }
}

.job-status-panel {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(
      145deg,
      rgba(23, 32, 51, 0.98),
      rgba(15, 23, 42, 0.98)
    );
  box-shadow:
    0 22px 65px rgba(0, 0, 0, 0.28);
}

.job-status-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.job-status-heading h3 {
  margin: 5px 0 0;
  font-size: 19px;
}

.job-status-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #475569;
  border-radius: 999px;
  color: #cbd5e1;
  background: #1e293b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.job-status-badge.running {
  border-color: #60a5fa;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.20);
}

.job-status-badge.complete {
  border-color: #4ade80;
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.18);
}

.job-status-badge.error {
  border-color: #f87171;
  color: #fecaca;
  background: rgba(185, 28, 28, 0.18);
}

.job-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #0f172a;
}

.job-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      #2563eb,
      #60a5fa
    );
  transition: width 300ms ease;
}

.job-progress-bar.indeterminate {
  width: 35%;
  animation:
    plume-progress 1.15s ease-in-out infinite;
}

.job-progress-bar.complete {
  width: 100%;
  background:
    linear-gradient(
      90deg,
      #16a34a,
      #4ade80
    );
}

.job-status-message {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.result-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 16px;
  padding: 0 16px;
  border: 1px solid #5d7cff;
  border-radius: 8px;
  color: white;
  background: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.result-link:hover {
  background: var(--blue-hover);
}

@keyframes plume-progress {
  0% {
    transform: translateX(-110%);
  }

  50% {
    transform: translateX(190%);
  }

  100% {
    transform: translateX(-110%);
  }
}

.location-results {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.location-result {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #3f4f67;
  border-radius: 8px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.82);
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.location-result:hover,
.location-result:focus-visible {
  border-color: #60a5fa;
  background: rgba(30, 64, 175, 0.20);
  transform: translateY(-1px);
}

.location-result-name {
  display: block;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.location-result-detail {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.35;
}

.location-results-empty {
  padding: 12px;
  border: 1px dashed #475569;
  border-radius: 8px;
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.10);
  font-size: 12px;
}

.location-attribution {
  margin-top: 8px;
  color: #64748b;
  font-size: 10px;
}

.location-attribution a {
  color: #93c5fd;
}


/* Standalone plume Version 1 finishing styles */

.resolved-details {
  margin-top: 4px;
  color: #a5b4fc;
  font-size: 12px;
  line-height: 1.45;
}

.job-stage-list {
  display: grid;
  grid-template-columns:
    repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.job-stage-list li {
  padding: 8px 7px;
  border: 1px solid #334155;
  border-radius: 7px;
  color: #64748b;
  background: rgba(15, 23, 42, 0.74);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.job-stage-list li.active {
  border-color: #60a5fa;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.18);
}

.job-stage-list li.done {
  border-color: #4ade80;
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.15);
}

.job-stage-list li.done::before {
  content: "✓ ";
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.result-actions .result-link {
  margin-top: 0;
}

.secondary-result-link {
  border-color: #475569;
  color: #e2e8f0;
  background: #1e293b;
}

.secondary-result-link:hover {
  background: #273449;
}

.recent-plumes-panel {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(
      145deg,
      rgba(23, 32, 51, 0.98),
      rgba(15, 23, 42, 0.98)
    );
}

.recent-plumes-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.recent-plumes-heading h3 {
  margin: 5px 0 0;
  font-size: 19px;
}

.clear-recent-button {
  padding: 7px 11px;
  border: 1px solid #475569;
  border-radius: 7px;
  color: #cbd5e1;
  background: #1e293b;
  font-size: 11px;
  font-weight: 700;
}

.recent-plumes-list {
  display: grid;
  gap: 8px;
}

.recent-plume-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
}

.recent-plume-title {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
}

.recent-plume-detail {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
}

.recent-plume-open {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid #5d7cff;
  border-radius: 7px;
  color: white;
  background: var(--blue);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 650px) {
  .job-stage-list {
    grid-template-columns: 1fr;
  }

  .job-stage-list li {
    text-align: left;
  }

  .result-actions {
    display: grid;
  }

  .result-actions .result-link {
    width: 100%;
  }

  .recent-plume-item {
    align-items: flex-start;
  }
}


/* Location-field clear button */

.location-input-wrap {
  position: relative;
  min-width: 0;
}

.location-input-wrap #locationInput {
  padding-right: 48px;
}

.clear-location-button {
  position: absolute;
  top: 50%;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #f8fafc;
  background: #64748b;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 160ms ease,
    visibility 160ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.clear-location-button.visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.clear-location-button:hover {
  background: #94a3b8;
}

.clear-location-button:active {
  transform:
    translateY(-50%)
    scale(0.92);
}

.clear-location-button:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}


/* ==========================================================
   SKC WEATHER HEADER BRANDING
   ========================================================== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 22px;
}

.site-header-text {
  min-width: 0;
}

.skc-header-logo {
  display: block;
  flex: 0 0 auto;

  width: 380px;
  padding: 8px 12px;

  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 9px;

  background: rgba(2, 12, 28, 0.92);

  box-shadow:
    0 5px 18px rgba(0, 0, 0, 0.30);

  text-decoration: none;

  transition:
    transform 0.15s ease,
    filter 0.15s ease;
}

.skc-header-logo:hover {
  transform: translateY(-1px);
  filter: brightness(1.10);
}

.skc-header-logo img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    gap: 16px;
  }

  .skc-header-logo {
    width: 165px;
  }
}

@media (max-width: 560px) {
  .site-header {
    display: block;
  }

  .skc-header-logo {
    width: 180px;
    margin-top: 16px;
  }
}

/* =========================================================
   Optional plume pop-out
   ========================================================= */

.popout-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    width: auto;
    margin: 10px 0 14px;
    padding: 7px 11px;

    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;

    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(100, 116, 139, 0.42);
    border-radius: 8px;

    cursor: pointer;
    user-select: none;

    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.popout-option:hover {
    background: rgba(30, 41, 59, 0.62);
    border-color: rgba(96, 165, 250, 0.58);
}


/*
 * Override the site's normal full-width input styling.
 */
.popout-option input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;

    position: relative;

    flex: 0 0 auto;

    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;

    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: #334155;

    border: 1px solid #64748b;
    border-radius: 999px;

    outline: none;
    cursor: pointer;

    box-shadow: none;

    transition:
        background 0.18s ease,
        border-color 0.18s ease;
}

.popout-option input[type="checkbox"]::after {
    content: "";

    position: absolute;
    top: 2px;
    left: 2px;

    width: 14px;
    height: 14px;

    background: #e2e8f0;
    border-radius: 50%;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.45);

    transition:
        transform 0.18s ease,
        background 0.18s ease;
}

.popout-option input[type="checkbox"]:checked {
    background: #2563eb;
    border-color: #60a5fa;
}

.popout-option input[type="checkbox"]:checked::after {
    transform: translateX(16px);
    background: #ffffff;
}

.popout-option input[type="checkbox"]:focus-visible {
    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.28);
}

.popout-option span {
    display: inline-block;
    white-space: nowrap;
}


/*
 * Keep it comfortable on narrow screens.
 */
@media (max-width: 640px) {
    .popout-option {
        font-size: 12px;
    }

    .popout-option span {
        white-space: normal;
    }
}


/* ==========================================================
   SKC WEATHER PREMIUM PLUME NOTICE
   ========================================================== */

.premium-notice {
  margin: 14px 0;
  padding: 16px 17px;

  border:
    1px solid rgba(96, 165, 250, 0.65);
  border-radius: 10px;

  background:
    linear-gradient(
      135deg,
      rgba(30, 64, 175, 0.18),
      rgba(15, 23, 42, 0.92)
    );

  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.22);
}

.premium-notice-badge {
  margin-bottom: 5px;

  color: #93c5fd;

  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.09em;

  text-transform: uppercase;
}

.premium-notice-title {
  margin-bottom: 6px;

  color: #f8fafc;

  font-size: 16px;
  font-weight: 850;
}

.premium-notice-text {
  color: #cbd5e1;

  font-size: 13px;
  line-height: 1.5;
}

.premium-upgrade-button {
  margin-top: 12px;
  padding: 9px 13px;

  border:
    1px solid #60a5fa;
  border-radius: 7px;

  color: white;
  background: #1d4ed8;

  font-size: 12px;
  font-weight: 800;

  cursor: pointer;
}

.premium-upgrade-button:hover {
  background: #2563eb;
}

@media (max-width: 650px) {

  .premium-notice {
    padding: 14px;
  }

  .premium-upgrade-button {
    width: 100%;
  }

}
