:root {
  color-scheme: dark;
  --bg: #101312;
  --panel: #181d1b;
  --panel-2: #202623;
  --text: #f3f1e8;
  --muted: #a9b2aa;
  --line: #34403a;
  --accent: #d8ff3f;
  --accent-2: #34c4a3;
  --danger: #ff8a65;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(16, 19, 18, 0.82), rgba(16, 19, 18, 0.92)),
    url("https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=1800&q=80") center/cover fixed;
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.top-bar,
.panel,
.weather-strip {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(24, 29, 27, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 104px;
  padding: 24px;
  border-radius: 8px;
}

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

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 4.6rem);
  line-height: 0.95;
}

h2 {
  font-size: 1rem;
}

.status-pill {
  min-width: 108px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  text-align: center;
  font-weight: 800;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(320px, 430px) 1fr;
  gap: 18px;
  margin-top: 18px;
}

.panel {
  border-radius: 8px;
  padding: 20px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #0f1311;
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(52, 196, 163, 0.18);
}

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

.inline-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.input-with-action {
  display: grid;
  grid-template-columns: 1fr 112px;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.input-with-action label {
  margin-bottom: 0;
}

.primary-button,
.secondary-button,
.icon-button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 900;
}

.primary-button {
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  background: var(--accent);
  color: #101312;
}

.secondary-button {
  min-height: 42px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
}

.compact-button {
  min-height: 44px;
}

.icon-button {
  width: 40px;
  height: 40px;
  background: var(--panel-2);
  color: var(--accent);
  border: 1px solid var(--line);
  font-size: 1.25rem;
}

.result-panel {
  min-height: 100%;
  display: grid;
  align-content: start;
}

#updatedAt {
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-number {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px 0 22px;
}

.hero-number span {
  color: var(--accent);
  font-size: clamp(4rem, 13vw, 9rem);
  font-weight: 950;
  line-height: 0.9;
}

.hero-number small {
  color: var(--muted);
  font-size: 1.3rem;
  font-weight: 800;
}

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

.metric-grid div,
.weather-strip div,
.confidence {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 19, 17, 0.74);
}

.metric-grid div,
.weather-strip div {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 14px;
}

.metric-grid span,
.weather-strip span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-grid strong,
.weather-strip strong {
  font-size: 1.3rem;
}

.confidence {
  margin-top: 14px;
  padding: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.confidence.warn {
  border-color: rgba(255, 138, 101, 0.55);
  color: #ffd1c2;
}

.weather-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 20px, 560px);
    padding-top: 10px;
  }

  .top-bar,
  .tool-grid,
  .weather-strip {
    display: grid;
    grid-template-columns: 1fr;
  }

  .field-grid,
  .inline-actions,
  .input-with-action,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .top-bar {
    min-height: 0;
  }
}
