:root {
  --ink: #152019;
  --muted: #617067;
  --paper: #f6f8f2;
  --white: #ffffff;
  --green: #1e713a;
  --green-dark: #154f2a;
  --yellow: #e0a12d;
  --blue: #276c9b;
  --red: #b83d32;
  --line: #dbe4d6;
  --soft-green: #eaf3e5;
  --soft-blue: #e8f2f8;
  --soft-yellow: #fff5dd;
  --shadow: 0 20px 54px rgba(25, 47, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Noto Sans Devanagari", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.weather-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(219, 228, 214, 0.9);
  background: rgba(246, 248, 242, 0.94);
  backdrop-filter: blur(18px);
}

.weather-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.weather-brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--green);
  font-weight: 900;
}

.weather-brand strong,
.weather-brand small {
  display: block;
}

.weather-brand small {
  color: var(--muted);
  font-size: 12px;
}

.weather-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.weather-nav a {
  border-radius: 8px;
  padding: 10px 13px;
  color: #34463a;
  font-size: 14px;
  font-weight: 800;
}

.weather-nav a:hover,
.weather-nav a[aria-current="page"] {
  color: var(--white);
  background: var(--green);
}

.weather-menu {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.weather-menu span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  background: var(--ink);
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.weather-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr);
  align-items: end;
  gap: 34px;
  margin-bottom: 22px;
}

.weather-eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 610px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.06;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: 0;
}

.location-search {
  display: grid;
  gap: 8px;
}

.location-search label {
  color: #394d3d;
  font-size: 13px;
  font-weight: 850;
}

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

.search-row input {
  min-width: 0;
  border: 1px solid #cbd8c7;
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--white);
  outline: none;
}

.search-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(30, 113, 58, 0.14);
}

.action-button,
.secondary-button {
  min-height: 48px;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 850;
}

.action-button {
  border: 1px solid var(--green);
  color: var(--white);
  background: var(--green);
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--green-dark);
  background: var(--white);
}

.action-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.weather-status {
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--white);
}

.weather-status.is-error {
  color: var(--red);
  border-color: #edc7c3;
  background: #fff2f0;
}

.weather-status.is-error .status-spinner {
  display: none;
}

.status-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #d7e5d1;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.current-weather {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 360px;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  padding: clamp(26px, 5vw, 58px);
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(12, 42, 24, 0.94), rgba(14, 49, 67, 0.72)),
    url("../a.webp") center / cover;
  box-shadow: var(--shadow);
}

.current-copy,
.condition-mark,
.current-highlights {
  position: relative;
  z-index: 1;
}

.current-copy > p:first-child {
  margin: 0 0 8px;
  color: #f0c56a;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.current-temperature {
  display: flex;
  align-items: flex-start;
  line-height: 1;
}

.current-temperature strong {
  font-size: clamp(76px, 13vw, 128px);
  letter-spacing: 0;
}

.current-temperature span {
  margin-top: 15px;
  color: #dbe7df;
  font-size: 26px;
}

.current-copy h2 {
  font-size: clamp(24px, 3vw, 38px);
}

.current-copy > p:last-child {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.condition-mark {
  padding-right: clamp(0px, 5vw, 50px);
  color: #ffd36f;
  font-size: clamp(72px, 11vw, 126px);
  line-height: 1;
}

.current-highlights {
  position: absolute;
  right: clamp(20px, 4vw, 50px);
  bottom: 26px;
  display: flex;
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.current-highlights div {
  min-width: 112px;
  padding: 11px 14px;
  background: rgba(7, 29, 20, 0.34);
}

.current-highlights dt {
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
}

.current-highlights dd {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 900;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.metric-grid article {
  min-width: 0;
  padding: 18px 16px;
  background: var(--white);
}

.metric-grid span,
.metric-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.metric-grid strong {
  display: block;
  margin: 5px 0 2px;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.1;
  white-space: nowrap;
}

.weather-alerts,
.forecast-section,
.advisory-section {
  padding: clamp(46px, 7vw, 82px) 0 0;
}

.compact-title {
  margin-bottom: 18px;
}

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

.alert-item {
  border-left: 5px solid var(--yellow);
  border-radius: 8px;
  padding: 16px 18px;
  background: var(--soft-yellow);
}

.alert-item.danger {
  border-left-color: var(--red);
  background: #fff0ee;
}

.alert-item strong,
.alert-item span {
  display: block;
}

.alert-item span {
  margin-top: 4px;
  color: #67583e;
  font-size: 14px;
}

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

.hourly-strip {
  display: grid;
  grid-auto-columns: minmax(118px, 1fr);
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.hour-card {
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: var(--white);
}

.hour-card time,
.hour-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.hour-card .weather-symbol {
  display: block;
  margin: 11px 0;
  color: var(--blue);
  font-size: 28px;
}

.hour-card strong {
  display: block;
  font-size: 21px;
}

.hour-card .rain-value {
  margin-top: 5px;
  color: var(--blue);
  font-weight: 850;
}

.forecast-band {
  margin-top: clamp(40px, 6vw, 70px);
  border-top: 1px solid var(--line);
}

.daily-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.day-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 17px 14px;
  background: var(--white);
}

.day-card.is-today {
  color: var(--white);
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.day-card time,
.day-card small,
.day-card span {
  display: block;
}

.day-card time {
  font-size: 13px;
  font-weight: 850;
}

.day-card .weather-symbol {
  margin: 14px 0 10px;
  color: var(--yellow);
  font-size: 32px;
}

.day-card strong {
  font-size: 22px;
}

.day-card small,
.day-card .rain-value {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.day-card.is-today small,
.day-card.is-today .rain-value {
  color: rgba(255, 255, 255, 0.72);
}

.advisory-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.crop-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crop-tabs button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 13px;
  color: #3d5041;
  background: var(--white);
  cursor: pointer;
  font-weight: 800;
}

.crop-tabs button[aria-selected="true"] {
  color: var(--white);
  border-color: var(--green);
  background: var(--green);
}

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

.advice-card {
  min-height: 210px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--green);
  border-radius: 8px;
  padding: 20px;
  background: var(--white);
  box-shadow: 0 12px 32px rgba(25, 47, 31, 0.07);
}

.advice-card.warn {
  border-top-color: var(--yellow);
}

.advice-card.stop {
  border-top-color: var(--red);
}

.advice-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.advice-card h3 {
  margin: 12px 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.advice-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.safety-note {
  margin-top: 28px;
  border: 1px solid #ead19b;
  border-radius: 8px;
  padding: 17px 18px;
  color: #604b20;
  background: var(--soft-yellow);
  font-size: 14px;
}

.safety-note a {
  margin-left: 8px;
  color: var(--blue);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.weather-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 5vw, 72px);
  color: var(--white);
  background: var(--green-dark);
}

.weather-footer span {
  font-weight: 900;
}

.weather-footer a {
  color: #f3c869;
  font-weight: 850;
}

@media (max-width: 1020px) {
  .weather-toolbar {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .daily-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .advisory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .weather-header {
    min-height: 68px;
  }

  .weather-menu {
    display: block;
  }

  .weather-nav {
    position: absolute;
    top: 68px;
    right: 16px;
    left: 16px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .weather-nav.is-open {
    display: flex;
  }

  main {
    width: min(100% - 24px, 1240px);
    padding-top: 24px;
  }

  .search-row {
    grid-template-columns: 1fr 1fr;
  }

  .search-row input {
    grid-column: 1 / -1;
  }

  .current-weather {
    min-height: 480px;
    align-items: start;
    grid-template-columns: 1fr auto;
    padding: 28px 22px;
  }

  .condition-mark {
    padding: 8px 0 0;
    font-size: 62px;
  }

  .current-highlights {
    right: 18px;
    bottom: 18px;
    left: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .current-highlights div {
    min-width: 0;
    padding: 10px;
  }

  .current-highlights dd {
    font-size: 17px;
  }

  .alert-list,
  .advisory-grid {
    grid-template-columns: 1fr;
  }

  .daily-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .advisory-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .crop-tabs {
    width: 100%;
  }

  .crop-tabs button {
    flex: 1 1 auto;
  }

  .weather-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .weather-brand small {
    display: none;
  }

  h1 {
    font-size: 34px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .search-row input,
  .search-row button {
    grid-column: auto;
    width: 100%;
  }

  .current-weather {
    min-height: 455px;
  }

  .condition-mark {
    font-size: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
