:root {
  color-scheme: light;
  --ink: #19322c;
  --muted: #596c63;
  --paper: #f5f4ec;
  --panel: #fffefa;
  --line: #dedfd4;
  --green: #245c49;
  --green-dark: #194533;
  --lime: #d6ed91;
  --orange: #e18b4b;
  --shadow: 0 16px 48px rgb(34 55 42 / 7%);
  font-family: 'Segoe UI', 'Noto Sans Devanagari', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(ellipse at 87% 1%, rgb(219 232 193 / 33%), transparent 29rem), var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}
a {
  color: var(--green-dark);
}

:focus-visible {
  outline: 3px solid #a34a10;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  z-index: 3;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-160%);
  border-radius: 0.35rem;
  padding: 0.7rem 1rem;
  background: #fff;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  border-bottom: 1px solid rgb(25 50 44 / 11%);
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-family: 'Segoe UI', 'Noto Sans Devanagari', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50% 50% 50% 12%;
  background: var(--green);
  color: white;
  font-size: 0.95rem;
  letter-spacing: 0;
}

.brand-accent {
  color: var(--green);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.edition-label,
.eyebrow {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.language-toggle {
  min-width: 62px;
  min-height: 44px;
  border: 1px solid #b8c5b4;
  border-radius: 999px;
  background: transparent;
  color: var(--green-dark);
  cursor: pointer;
  font-weight: 700;
}

.language-toggle:hover {
  background: #e6eadb;
}

main {
  padding-bottom: 3.5rem;
}

.hero {
  position: relative;
  display: grid;
  min-height: 350px;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  overflow: hidden;
  padding: 3.4rem 0 3rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 580px;
}
.eyebrow {
  margin: 0 0 0.7rem;
}
h1,
h2,
p {
  margin-top: 0;
}
h1,
h2 {
  font-family: 'Segoe UI', 'Noto Sans Devanagari', sans-serif;
  letter-spacing: -0.045em;
}
h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.6rem, 5.3vw, 4.5rem);
  line-height: 1.04;
}
h1 span {
  color: var(--green);
}
.hero-description {
  max-width: 475px;
  margin-bottom: 1.15rem;
  color: #435c50;
  font-size: 1.08rem;
}
.hero-note {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.note-icon {
  color: #9a5c1f;
  font-size: 1.2rem;
}

.hero-art {
  position: relative;
  height: 280px;
  align-self: stretch;
  overflow: hidden;
  border-radius: 48% 48% 26px 26px;
  background: linear-gradient(160deg, #e6edda 4%, #d9e3ce 52%, #b8cdb4 100%);
}

.sun {
  position: absolute;
  top: 39px;
  right: 88px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e7b974;
  opacity: 0.9;
}
.hill {
  position: absolute;
  right: -15%;
  bottom: -27%;
  left: -12%;
  height: 67%;
  border-radius: 50% 50% 0 0;
}
.hill-back {
  bottom: -21%;
  left: -37%;
  background: #8eaa8b;
  transform: rotate(-13deg);
}
.hill-front {
  background: #476d56;
  transform: rotate(9deg);
}
.art-label {
  position: absolute;
  right: 22px;
  bottom: 20px;
  color: #f3f5e8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.panel {
  border: 1px solid rgb(48 75 54 / 10%);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.planner {
  padding: clamp(1.3rem, 4vw, 2.2rem);
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.4rem;
}
h2 {
  margin-bottom: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}
.section-aside {
  max-width: 340px;
  margin-bottom: 0.15rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.25rem;
}
.field {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  color: #30483e;
  font-size: 0.87rem;
  font-weight: 600;
}
.location-input-row {
  display: flex;
  gap: 0.55rem;
}
.location-input-row input {
  min-width: 0;
  flex: 1;
}
.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cbd2c7;
  border-radius: 9px;
  padding: 0.65rem 0.8rem;
  background: #fff;
  color: var(--ink);
}
.field input:hover,
.field select:hover {
  border-color: #839989;
}
.field-help {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
  line-height: 1.4;
}
.location-button {
  min-height: 48px;
  border: 1px solid #b8c5b4;
  border-radius: 9px;
  padding: 0.55rem 0.75rem;
  background: #edf2e8;
  color: var(--green-dark);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
}
.location-button:hover {
  background: #e2ead8;
}
.location-button:disabled {
  cursor: wait;
  opacity: 0.7;
}
.form-error {
  margin: 0.9rem 0 0;
  color: #8d2f22;
  font-size: 0.85rem;
  font-weight: 600;
}
[aria-invalid='true'] {
  border-color: #b73f2f !important;
}
.ai-settings {
  margin-top: 1.1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}
.ai-settings summary {
  width: fit-content;
  min-height: 44px;
  align-content: center;
  color: var(--green-dark);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
}
.ai-settings-content {
  max-width: 520px;
  padding-top: 1rem;
}
.primary-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.3rem;
  border: 0;
  border-radius: 9px;
  padding: 0.8rem 1rem;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  text-align: left;
}
.primary-button:hover {
  background: var(--green-dark);
}
.primary-button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.status-message {
  margin: 1rem 0;
  border: 1px solid #d5bd85;
  border-radius: 9px;
  padding: 0.85rem 1rem;
  background: #fff8df;
  color: #5d4516;
  font-size: 0.88rem;
}
.status-message[data-kind='error'] {
  border-color: #c97b6d;
  background: #fff0ed;
  color: #6a271f;
}

.air-section,
.guidance-section {
  margin-top: 3rem;
}
.air-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}
.air-heading h2 {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
}
.reading-time {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}
.source-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid #bdcbb7;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  background: #edf2e8;
  color: #31503c;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}
.air-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}
.aqi-card,
.pm-card {
  min-height: 220px;
  border-radius: 15px;
  padding: 1.4rem;
}
.aqi-card {
  background: #234f3d;
  color: #fff;
}
.aqi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #e1eadc;
  font-size: 0.84rem;
}
.aqi-marker {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #e3eda7;
  color: #294a38;
}
.aqi-reading {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-top: 0.85rem;
}
.aqi-reading strong {
  font-family: 'Segoe UI', sans-serif;
  font-size: clamp(3.2rem, 7vw, 4.7rem);
  font-weight: 600;
  line-height: 1;
}
.aqi-band {
  display: inline-block;
  border: 1px solid rgb(255 255 255 / 54%);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}
.aqi-scale {
  margin: 0.85rem 0 0.45rem;
  color: #e1eadc;
  font-size: 0.8rem;
}
.aqi-meter {
  display: block;
  width: 100%;
  height: 10px;
  appearance: none;
  border: 0;
  border-radius: 99px;
  background: #ffffff3b;
}
.aqi-meter::-webkit-meter-bar {
  border: 0;
  border-radius: 99px;
  background: #ffffff3b;
}
.aqi-meter::-webkit-meter-optimum-value,
.aqi-meter::-webkit-meter-suboptimum-value,
.aqi-meter::-webkit-meter-even-less-good-value {
  border-radius: 99px;
  background: #d6ed91;
}
.aqi-meter::-moz-meter-bar {
  border-radius: 99px;
  background: #d6ed91;
}
.meter-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  color: #e1eadc;
  font-size: 0.7rem;
}
.pm-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fffefa;
}
.pm-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.pm-reading {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.45rem;
}
.pm-reading strong {
  font-family: 'Segoe UI', sans-serif;
  font-size: clamp(2.7rem, 6vw, 3.7rem);
  line-height: 1.2;
}
.pm-reading span {
  color: var(--muted);
  font-size: 0.9rem;
}
.pm-card p {
  margin: 0.55rem 0 1.1rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.pm-source {
  color: #506159;
  font-size: 0.75rem;
}
.aqi-caveat,
.impact-note {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.forecast-section {
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 1.1rem;
  background: var(--panel);
}
.forecast-section h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}
.forecast-best-time {
  margin: 0 0 0.8rem;
  color: var(--green-dark);
  font-weight: 700;
}
.forecast-chart {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.forecast-row {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) 7rem;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
}
.forecast-row meter {
  width: 100%;
  min-width: 0;
  height: 0.85rem;
}
.forecast-hour,
.forecast-value {
  min-width: 0;
  overflow-wrap: anywhere;
}
.forecast-value {
  color: var(--muted);
  text-align: right;
}
.forecast-caveat {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.guidance-section .section-heading {
  margin-bottom: 1.1rem;
}
.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.recommendation-card {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 1.1rem;
  background: var(--panel);
}
.recommendation-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.recommendation-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}
.recommendation-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  background: #edf2e8;
  color: var(--green-dark);
  font-size: 1rem;
}
.recommendation-card h3 {
  margin: 0;
  font-family: 'Segoe UI', 'Noto Sans Devanagari', sans-serif;
  font-size: 1rem;
  letter-spacing: -0.025em;
}
.recommendation-card > p {
  margin-bottom: 0.8rem;
  color: #42584d;
  font-size: 0.9rem;
}
.impact {
  border-top: 1px solid #e6e7dc;
  padding-top: 0.65rem;
}
.impact-label {
  display: block;
  color: #586d62;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.impact-value {
  display: block;
  margin-top: 0.15rem;
  color: var(--green-dark);
  font-size: 0.87rem;
  font-weight: 700;
}
.impact-detail {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}
.ai-explanation {
  margin: 0 0 1rem;
  border-left: 3px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 0.8rem 1rem;
  background: #eaf0e4;
  color: #30483e;
  white-space: pre-line;
}

.disclaimer {
  display: flex;
  gap: 0.8rem;
  margin-top: 3rem;
  border: 1px solid #d8d8ca;
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  background: #eeede2;
}
.disclaimer-icon {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  place-items: center;
  border: 1px solid #5b654d;
  border-radius: 50%;
  color: #3b4e37;
  font-family: serif;
  font-weight: 700;
}
.disclaimer h2 {
  margin-bottom: 0.25rem;
  font-size: 0.94rem;
  letter-spacing: 0;
}
.disclaimer p {
  margin: 0;
  color: #4a594d;
  font-size: 0.82rem;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgb(25 50 44 / 11%);
  padding-block: 1.2rem 1.7rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.site-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-weight: 600;
}

[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 32px, 560px);
  }
  .site-header {
    min-height: 66px;
  }
  .edition-label {
    display: none;
  }
  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding: 2.4rem 0 2rem;
  }
  .hero-art {
    height: 180px;
  }
  .sun {
    top: 26px;
    right: 22%;
    width: 55px;
    height: 55px;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }
  .section-aside {
    max-width: none;
  }
  .form-grid,
  .air-grid,
  .recommendation-grid,
  .forecast-chart {
    grid-template-columns: 1fr;
  }
  .forecast-row {
    grid-template-columns: 3rem minmax(0, 1fr) 6.5rem;
    gap: 0.3rem;
  }
  .recommendation-card:last-child:nth-child(odd) {
    grid-column: auto;
  }
  .air-heading {
    align-items: flex-start;
  }
  .source-pill {
    white-space: normal;
    text-align: center;
  }
  .air-section,
  .guidance-section {
    margin-top: 2.2rem;
  }
  .aqi-card,
  .pm-card {
    min-height: 195px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #e7eee8;
    --muted: #b6c4b8;
    --paper: #17211d;
    --panel: #202c26;
    --line: #405047;
    --green: #84ad8e;
    --green-dark: #bed6bf;
    --lime: #d6ed91;
    --shadow: 0 16px 48px rgb(0 0 0 / 24%);
  }
  body {
    background: radial-gradient(ellipse at 87% 1%, rgb(91 118 91 / 18%), transparent 29rem), var(--paper);
  }
  a {
    color: #c1e0c3;
  }
  .brand,
  .field,
  .hero-description,
  .recommendation-card > p,
  .disclaimer p {
    color: var(--ink);
  }
  .language-toggle,
  .location-button {
    border-color: #6a806e;
    background: #293a30;
    color: #e7eee8;
  }
  .language-toggle:hover,
  .location-button:hover {
    background: #35493b;
  }
  .primary-button {
    background: #356448;
    color: #fff;
  }
  .primary-button:hover {
    background: #2b543b;
  }
  .field input,
  .field select {
    border-color: #627369;
    background: #18231d;
    color: var(--ink);
  }
  .source-pill {
    border-color: #607767;
    background: #293a30;
    color: #d7e8d6;
  }
  .pm-card,
  .recommendation-card,
  .forecast-section {
    background: var(--panel);
  }
  .pm-source,
  .impact-label,
  .impact-value,
  .recommendation-card > p {
    color: var(--muted);
  }
  .recommendation-icon {
    background: #344639;
    color: #d7e8d6;
  }
  .impact {
    border-color: var(--line);
  }
  .ai-explanation {
    border-color: #91bb98;
    background: #2a3b30;
    color: var(--ink);
  }
  .disclaimer {
    border-color: #536356;
    background: #27332b;
  }
  .disclaimer-icon {
    border-color: #a7bba7;
    color: #d7e8d6;
  }
  .status-message {
    border-color: #806b37;
    background: #39321f;
    color: #f0dda0;
  }
  .status-message[data-kind='error'] {
    border-color: #98594e;
    background: #3a2522;
    color: #ffd1c9;
  }
  .form-error {
    color: #ffb9ad;
  }
  .forecast-best-time {
    color: #c1e0c3;
  }
}

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