:root {
  color-scheme: dark;
  --forest: #174c38;
  --green: #34785a;
  --gold: #c5a451;
  --ivory: #f7f7f2;
  --charcoal: #202923;
  --muted: rgb(247 247 242 / 78%);
  font-family: Inter, "Noto Sans Devanagari", "Kohinoor Devanagari", "Devanagari Sangam MN", Mukta, system-ui, sans-serif;
  background: var(--forest);
  color: var(--ivory);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 4fr 1fr;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.3em; }
a:focus-visible { outline: 2px solid var(--ivory); outline-offset: 6px; }
.stage { padding: 1.75rem 1.5rem 3.5rem; }
.site-header, .main-layout, .footer-inner { max-width: 80rem; margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand-link { display: inline-block; padding: 0.5rem; margin: -0.5rem; }
.brand-logo { width: 160px; }
.main-layout { position: relative; margin-block-start: 3rem; }
.intro { position: relative; z-index: 1; max-width: 40rem; }
p, h1 { margin: 0; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--green);
  border-radius: 2rem;
  font-size: 0.875rem;
  line-height: 1.6;
}
.status-dot { flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--ivory); }
h1 { margin-block-start: 1.625rem; font-size: clamp(2rem, 6vw, 4rem); font-weight: 700; line-height: 1.4; text-wrap: balance; }
.tagline { margin-block-start: 0.875rem; color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.6; }
.description { max-width: 36rem; margin-block-start: 2rem; font-size: 1rem; line-height: 1.8; }
.description p + p { margin-block-start: 1rem; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; padding: 0; margin: 2.25rem 0 0; list-style: none; font-size: 0.875rem; line-height: 1.8; color: var(--muted); }
.facts li { padding-inline-start: 0.875rem; border-inline-start: 1px solid rgb(247 247 242 / 25%); }
.ruler { display: none; position: absolute; right: 2rem; top: 1rem; overflow: visible; }
.ruler-axis, .ruler-ticks { fill: none; stroke: var(--ivory); stroke-width: 1; }
.ruler-axis { opacity: 0.18; }
.ruler-ticks { opacity: 0.32; }
.ruler-notch { fill: none; stroke: var(--gold); stroke-width: 3; }
.site-footer { display: flex; align-items: center; padding: 2.25rem 1.5rem; background: var(--ivory); color: var(--charcoal); color-scheme: light; }
.footer-inner { display: flex; width: 100%; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.75rem 2.5rem; }
.endorsement { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.endorsement span { font-size: 0.75rem; line-height: 1.5; font-weight: 600; letter-spacing: 0.13em; }
.endorsement img { width: 100px; }
.site-footer small { font-size: 0.75rem; line-height: 1.5; }
.not-found h1 { max-width: 40rem; }
.home-link { display: inline-block; margin-block-start: 2rem; line-height: 1.8; }

@media (min-width: 48rem) {
  .stage { padding: 2.5rem 4rem 4rem; }
  .brand-logo { width: 200px; }
  .main-layout { margin-block-start: 3.75rem; }
  .site-footer { padding-inline: 4rem; }
}
@media (min-width: 64rem) {
  .main-layout { padding-inline-end: 8rem; }
  .ruler { display: block; }
  .facts { flex-wrap: nowrap; gap: 0.75rem; }
  .facts li { padding-inline-start: 0.75rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .status-dot { animation: breathe 3s ease-in-out infinite; }
  @keyframes breathe { 50% { opacity: 0.5; } }
}

/* ── Language switch link (top-right header) ─────────────────────────────── */
.lang-switch {
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ivory);
  text-decoration: underline;
  text-underline-offset: 0.3em;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  transition: color 0.15s;
}
.lang-switch:hover { text-decoration-thickness: 2px; }
.lang-switch:focus-visible { outline: 2px solid var(--ivory); outline-offset: 4px; }

/* ── Language picker dialog ──────────────────────────────────────────────── */
#lang {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  width: 100%;
  color-scheme: light;
}
#lang::backdrop {
  background: rgba(8,28,20,.78);
  color-scheme: light;
}
.lang-card {
  background: #F7F7F2;
  color: #202923;
  border-radius: 12px;
  max-width: 440px;
  margin-inline: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  color-scheme: light;
}
.lang-icon {
  margin-block-end: 10px;
}
.lang-title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  color: #174C38;
  line-height: 1.4;
}
.lang-sub {
  margin: 4px 0 20px;
  font-size: 14px;
  color: #4A5650;
  line-height: 1.5;
}
.lang-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}
@media (max-width: 360px) {
  .lang-options { grid-template-columns: 1fr; }
}
.lang-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: #fff;
  border: 1px solid rgba(23,76,56,.25);
  border-radius: 12px;
  text-decoration: none;
  color: #202923;
  cursor: pointer;
  transition: border-color 0.15s;
}
.lang-opt:hover,
.lang-opt:focus-visible {
  border-color: #174C38;
  outline: none;
}
.lang-opt:focus-visible {
  outline: 2px solid #174C38;
  outline-offset: 2px;
}
.flag-icon {
  display: block;
  /* flags are decorative, aria-hidden already set in HTML */
}
.lang-opt-name {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  color: #202923;
}
.lang-opt-sub {
  font-size: 12px;
  color: #4A5650;
  line-height: 1.4;
}
.lang-footer {
  margin: 16px 0 0;
  font-size: 12px;
  color: #4A5650;
  text-align: center;
  line-height: 1.6;
}
