:root {
  --ink: #17211d;
  --muted: #60706a;
  --paper: #f6f4ee;
  --panel: #fffdf7;
  --line: rgba(23, 33, 29, 0.13);
  --leaf: #2f684d;
  --leaf-dark: #1d4734;
  --amber: #c98335;
  --sky: #dcecf0;
  --rose: #a7473f;
  --blue: #416f86;
  --shadow: 0 18px 55px rgba(31, 38, 34, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(246, 244, 238, 0.82);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  left: 0;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 58px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-weight: 800;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 46px;
  max-width: 46px;
  object-fit: contain;
  width: 46px;
}

.brand-logo:not([hidden]) ~ .brand-mark {
  display: none;
}

.brand-name {
  font-size: 1.02rem;
  line-height: 1;
}

.brand-mark {
  background:
    radial-gradient(circle at 58% 34%, #fff 0 10%, transparent 11%),
    linear-gradient(135deg, var(--leaf), var(--amber));
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
  height: 34px;
  width: 34px;
}

.top-nav {
  align-items: center;
  display: flex;
  gap: 8px;
}

.top-nav a {
  border-radius: 999px;
  color: var(--ink);
  padding: 10px 14px;
  text-decoration: none;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  background: rgba(47, 104, 77, 0.1);
}

.header-language {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 8px;
  margin-left: 6px;
  text-transform: uppercase;
}

.header-language select {
  min-height: 40px;
  min-width: 142px;
}

.hero {
  min-height: max(640px, calc(100svh - 140px));
  overflow: hidden;
  position: relative;
}

.hero img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(15, 26, 20, 0.86), rgba(15, 26, 20, 0.42) 46%, rgba(15, 26, 20, 0.06)),
    linear-gradient(0deg, rgba(246, 244, 238, 0.95), rgba(246, 244, 238, 0) 36%);
  inset: 0;
  position: absolute;
}

.hero-content {
  color: #fffdf7;
  max-width: 760px;
  padding: clamp(54px, 7vw, 96px) clamp(20px, 5vw, 76px) 96px;
  position: relative;
  z-index: 1;
}

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

.hero h1 {
  font-size: clamp(2.75rem, 6.8vw, 5.7rem);
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0;
  max-width: 720px;
}

.hero-copy {
  color: rgba(255, 253, 247, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.55;
  max-width: 640px;
}

.location-panel {
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--ink);
  max-width: 680px;
  padding: 18px;
}

.location-panel label,
.setting-block > label {
  color: var(--muted);
  display: block;
  font-size: 0.86rem;
  font-weight: 800;
  margin-bottom: 8px;
}

select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--leaf-dark) 50%) calc(100% - 18px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--leaf-dark) 50%, transparent 50%) calc(100% - 13px) 50% / 7px 7px no-repeat,
    #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 46px;
  padding: 0 38px 0 12px;
  width: 100%;
}

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

input[type="search"],
input[type="text"] {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 52px;
  padding: 0 14px;
  width: 100%;
}

button {
  background: var(--leaf);
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  min-height: 52px;
  padding: 0 18px;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

button:hover,
button:focus-visible {
  background: var(--leaf-dark);
  transform: translateY(-1px);
}

.ghost-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--leaf-dark);
}

.ghost-button:hover,
.ghost-button:focus-visible {
  background: rgba(47, 104, 77, 0.08);
  color: var(--leaf-dark);
}

.location-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 12px;
}

.save-default {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  gap: 8px;
  margin: 0;
}

.status-strip {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
}

.status-strip > div {
  border-right: 1px solid var(--line);
  min-width: 0;
  padding: 22px clamp(18px, 4vw, 58px);
}

.status-strip > div:last-child {
  border-right: 0;
}

.meta-label {
  color: var(--muted);
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.status-strip strong {
  display: block;
  overflow-wrap: anywhere;
}

.forecast-section,
.settings-section {
  padding: clamp(46px, 7vw, 86px) clamp(18px, 4vw, 58px);
}

.section-heading,
.settings-intro {
  max-width: 760px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0;
  line-height: 1;
  margin: 0 0 18px;
}

.loading {
  background: var(--sky);
  border: 1px solid rgba(65, 111, 134, 0.2);
  border-radius: 8px;
  color: #244456;
  margin-top: 24px;
  padding: 18px;
}

.loading[hidden] {
  display: none;
}

.forecast-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  margin-top: 26px;
}

.day-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(31, 38, 34, 0.08);
  display: flex;
  flex-direction: column;
  min-height: 380px;
  overflow: hidden;
}

.advice-band {
  color: #fff;
  padding: 18px;
}

.advice-band.outside {
  background: linear-gradient(135deg, var(--leaf), #5b8b58);
}

.advice-band.watch {
  background: linear-gradient(135deg, var(--amber), #b35b46);
}

.advice-band.inside {
  background: linear-gradient(135deg, var(--rose), #6d3237);
}

.day-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0.85;
  text-transform: uppercase;
}

.advice-title {
  display: block;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.05;
  margin-top: 8px;
}

.weather-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  display: flex;
  font-size: 2rem;
  height: 58px;
  justify-content: center;
  margin-top: 18px;
  width: 58px;
}

.day-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.metric-row {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.metric {
  background: #f3f0e7;
  border-radius: 8px;
  padding: 12px;
}

.metric small {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.metric strong {
  font-size: 1.08rem;
}

.reasons {
  color: var(--muted);
  line-height: 1.45;
  margin: 16px 0 0;
  padding-left: 18px;
}

.reasons li + li {
  margin-top: 7px;
}

.score-bar {
  background: #e7e1d4;
  border-radius: 999px;
  height: 8px;
  margin-top: auto;
  overflow: hidden;
}

.score-bar span {
  display: block;
  height: 100%;
}

.score-bar .outside {
  background: var(--leaf);
}

.score-bar .watch {
  background: var(--amber);
}

.score-bar .inside {
  background: var(--rose);
}

.settings-section {
  background: #eaf1ed;
  border-top: 1px solid var(--line);
}

.settings-intro p {
  color: var(--muted);
  line-height: 1.6;
}

.settings-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 28px;
}

.setting-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 20px;
}

.setting-block legend {
  font-size: 1.1rem;
  font-weight: 900;
  padding: 0 0 14px;
}

.choice {
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  margin: 0 0 10px;
  padding: 14px;
}

.choice input {
  accent-color: var(--leaf);
  margin-top: 4px;
}

.choice strong,
.choice small {
  display: block;
}

.choice small {
  color: var(--muted);
  line-height: 1.4;
  margin-top: 3px;
}

.compact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compact button {
  margin-top: 8px;
}

.save-note {
  color: var(--leaf-dark);
  font-weight: 800;
  min-height: 24px;
}

footer {
  background: var(--ink);
  color: rgba(255, 253, 247, 0.76);
  line-height: 1.6;
  padding: 28px clamp(18px, 4vw, 58px);
}

footer p {
  margin: 0;
  max-width: 980px;
}

.not-found-page {
  min-height: 100svh;
}

.not-found {
  min-height: calc(100svh - 72px);
}

.not-found-hero {
  align-items: center;
  display: flex;
  min-height: calc(100svh - 72px);
  overflow: hidden;
  padding: clamp(42px, 7vw, 96px) clamp(20px, 5vw, 76px);
  position: relative;
}

.not-found-hero img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.not-found-shade {
  background:
    linear-gradient(90deg, rgba(15, 26, 20, 0.9), rgba(15, 26, 20, 0.5) 55%, rgba(15, 26, 20, 0.08)),
    linear-gradient(0deg, rgba(23, 33, 29, 0.58), rgba(23, 33, 29, 0));
  inset: 0;
  position: absolute;
}

.not-found-content {
  color: #fffdf7;
  max-width: 760px;
  position: relative;
  z-index: 1;
}

.not-found-content h1 {
  font-size: clamp(3rem, 8vw, 6.2rem);
  letter-spacing: 0;
  line-height: 0.96;
  margin: 0;
}

.not-found-content p {
  color: rgba(255, 253, 247, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.6;
  max-width: 680px;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button-link,
.ghost-link {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 900;
  min-height: 52px;
  padding: 0 18px;
  text-decoration: none;
}

.button-link {
  background: var(--amber);
  color: #1d211d;
}

.button-link:hover,
.button-link:focus-visible {
  background: #e0a04d;
}

.ghost-link {
  border: 1px solid rgba(255, 253, 247, 0.44);
  color: #fffdf7;
}

.ghost-link:hover,
.ghost-link:focus-visible {
  background: rgba(255, 253, 247, 0.12);
}

@media (max-width: 1120px) {
  .forecast-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 12px;
    padding-top: 12px;
  }

  .brand-logo {
    height: 42px;
    max-width: 42px;
    width: 42px;
  }

  .hero {
    min-height: max(640px, calc(100svh - 170px));
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(15, 26, 20, 0.84), rgba(15, 26, 20, 0.46)),
      linear-gradient(0deg, rgba(246, 244, 238, 0.96), rgba(246, 244, 238, 0) 34%);
  }

  .search-row,
  .status-strip,
  .forecast-grid {
    grid-template-columns: 1fr;
  }

  .top-nav {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .header-language {
    width: 100%;
  }

  .header-language select {
    min-width: min(210px, 100%);
  }

  .status-strip > div {
    border-right: 0;
  }

  .location-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}
