:root {
  --evergreen-950: #032b25;
  --evergreen-900: #004c3f;
  --evergreen-800: #076451;
  --evergreen-100: #dcece6;
  --cream: #f5f0e6;
  --paper: #fffdf8;
  --ink: #16201d;
  --muted: #66716d;
  --line: #dfe5e1;
  --orange: #ef5523;
  --orange-dark: #c93c16;
  --gold: #f3ac19;
  --blue: #2476d3;
  --shadow-sm: 0 2px 8px rgba(12, 39, 32, 0.09);
  --shadow-md: 0 16px 40px rgba(8, 35, 29, 0.14);
  --device-safe-top: env(safe-area-inset-top, 0px);
  --device-safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

.is-android { --device-safe-bottom: 0px; }
.is-android.is-standalone { --device-safe-bottom: clamp(24px, env(safe-area-inset-bottom, 24px), 44px); }
.is-android.is-standalone .landing-footer > .footer-action { transform: translateY(-16px); }
.is-android.is-native-android-app { --device-safe-top: 0px; --device-safe-bottom: 0px; }
.is-android.is-native-android-app .landing-footer > .footer-action { transform: none; }

* { box-sizing: border-box; }

html, body { height: 100%; }

html { background: var(--evergreen-950); }

body {
  margin: 0;
  overflow: hidden;
  background: var(--cream);
}

button { color: inherit; font: inherit; }

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

a { color: inherit; }

button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(239, 85, 35, 0.55);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 9px;
  background: var(--paper);
  color: var(--evergreen-950);
  font-weight: 800;
  transform: translateY(-180%);
}

.skip-link:focus { transform: none; }

.launch-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #000;
  opacity: 1;
  transition: opacity 360ms ease, visibility 360ms ease;
}

.launch-splash img {
  width: min(100vw, 480px);
  height: 100%;
  object-fit: contain;
}

.launch-splash.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.landing-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr) calc(82px + var(--device-safe-bottom));
  height: 100dvh;
  min-height: 100%;
  background:
    radial-gradient(circle at 10% 12%, rgba(243, 172, 25, 0.08), transparent 30%),
    linear-gradient(180deg, #f8f4eb 0%, var(--cream) 100%);
}

.app-header {
  position: relative;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: var(--device-safe-top) max(20px, calc((100vw - 1180px) / 2)) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--evergreen-950);
  color: white;
  box-shadow: 0 4px 18px rgba(3, 36, 29, 0.16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: white;
  text-decoration: none;
}

.brand img {
  width: 47px;
  height: 47px;
  flex: 0 0 auto;
  border-radius: 13px;
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.26);
}

.brand-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  white-space: nowrap;
}

.brand-title {
  display: flex;
  align-items: baseline;
  gap: 7px;
  letter-spacing: 0.055em;
}

.brand-title strong {
  color: white;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-guide {
  color: var(--orange);
  font-size: 1.06rem;
  font-weight: 800;
}

.brand-tagline {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.1;
  text-overflow: ellipsis;
}

.header-find-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 0.8rem;
  font-weight: 850;
  text-decoration: none;
}

.header-find-link span { color: #ffd671; font-size: 1.08rem; }

.landing-main {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(27px + var(--device-safe-top)) 22px 24px;
}

.landing-welcome {
  position: relative;
  width: min(100%, 900px);
  margin: 0 auto 25px;
  padding: 18px 24px 19px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: var(--evergreen-950);
  box-shadow: 0 10px 28px rgba(3, 43, 37, 0.22);
  color: white;
  text-align: center;
}

.landing-welcome::before, .landing-welcome::after {
  content: "";
  position: absolute;
  bottom: -24px;
  width: 140px;
  height: 74px;
  background: var(--evergreen-800);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  opacity: 0.42;
}

.landing-welcome::before { left: -24px; }
.landing-welcome::after { right: -18px; transform: scale(0.78); }

.welcome-title-line {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.welcome-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
}

.welcome-title-copy { text-align: left; }

.welcome-brand-line {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 0.32em;
  margin: 0 0 5px;
  white-space: nowrap;
  line-height: 1;
}

.welcome-prefix {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.72rem, 3.1vw, 0.92rem);
  font-weight: 800;
  letter-spacing: 0.025em;
}

.welcome-brand-icicle, .welcome-brand-guide {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
}

.welcome-brand-icicle {
  color: white;
  font-size: clamp(0.82rem, 3.3vw, 1.08rem);
  letter-spacing: 0.055em;
}

.welcome-brand-guide {
  color: var(--orange);
  font-size: clamp(0.78rem, 3.1vw, 1rem);
  letter-spacing: 0.035em;
}

.landing-welcome h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.6vw, 1.8rem);
  line-height: 1.1;
  white-space: nowrap;
}

.landing-welcome > p:last-child {
  position: relative;
  z-index: 1;
  margin: 7px 0 0;
  color: #ffd671;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.2;
}

.welcome-subtitle > span {
  display: block;
  white-space: nowrap;
}

.landing-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: min(100%, 900px);
  margin: 0 auto;
}

.landing-action-card {
  --card-accent: var(--evergreen-800);
  --card-soft: #e4f0eb;
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 174px;
  padding: 22px 19px;
  overflow: hidden;
  border: 1px solid rgba(0, 76, 63, 0.13);
  border-radius: 22px;
  background: linear-gradient(140deg, #fffdf8 0%, #fffdf8 66%, var(--card-soft) 150%);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.landing-action-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -52px auto;
  width: 130px;
  height: 100px;
  border-radius: 50%;
  background: var(--card-soft);
  opacity: 0.48;
}

.landing-action-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--card-accent) 42%, transparent);
  box-shadow: 0 20px 46px rgba(8, 35, 29, 0.19);
}

.parking-card { --card-accent: #1d5c96; --card-soft: #e4edf7; }
.weather-card { --card-accent: #b66a00; --card-soft: #fff0ce; }
.events-card { --card-accent: #e85d04; --card-soft: #ffeadc; }

.action-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--card-soft);
  color: var(--card-accent);
}

.action-icon svg {
  width: 37px;
  height: 37px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.4;
}

.weather-live-icon {
  background: #fff0bf;
  color: #b96d00;
  font-size: 2rem;
}

.action-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  min-width: 0;
}

.action-eyebrow {
  margin-bottom: 5px;
  color: var(--card-accent);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.action-copy > strong {
  color: var(--evergreen-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.14rem, 2.2vw, 1.45rem);
  line-height: 1.12;
}

.action-copy > small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.action-arrow {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 999px;
  background: var(--card-soft);
  color: var(--card-accent);
  font-size: 1.05rem;
  font-weight: 900;
}

.conditions-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
}

#weather-temperature { color: var(--card-accent); font-size: 1.55em; }
#weather-description { font-size: 0.83em; }
.air-quality-line b { color: var(--evergreen-950); font-size: 1.08rem; }

.conditions-attribution {
  width: min(100%, 900px);
  margin: 10px auto 0;
  color: #7a827f;
  font-size: 0.58rem;
  text-align: right;
}

.conditions-attribution a { text-underline-offset: 2px; }

.landing-footer {
  position: relative;
  z-index: 600;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  min-width: 0;
  padding: 0 max(20px, calc((100vw - 920px) / 2)) var(--device-safe-bottom);
  border-top: 1px solid rgba(0, 76, 63, 0.12);
  background: rgba(255, 253, 248, 0.97);
  box-shadow: 0 -8px 30px rgba(8, 35, 29, 0.09);
  backdrop-filter: blur(15px);
}

.footer-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-width: 0;
  justify-content: center;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--evergreen-950);
  cursor: pointer;
  text-decoration: none;
}

.footer-menu { justify-self: stretch; text-align: left; }

.footer-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--evergreen-100);
  color: var(--evergreen-900);
  font-size: 1.05rem;
  font-weight: 900;
}

.footer-action > span:last-child { display: grid; }
.footer-action strong { font-size: 0.78rem; }
.footer-action small { margin-top: 3px; color: var(--muted); font-size: 0.61rem; }

.menu-lines { align-content: center; gap: 4px; }
.menu-lines i { display: block; width: 17px; height: 2px; border-radius: 99px; background: currentColor; }

.footer-center-action {
  position: relative;
  align-self: stretch;
  display: grid;
  width: 100%;
  justify-items: center;
  align-content: center;
}

.options-button {
  position: absolute;
  top: -27px;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  padding: 0;
  border: 6px solid var(--paper);
  border-radius: 999px;
  background: var(--orange);
  color: white;
  box-shadow: 0 8px 24px rgba(201, 60, 22, 0.34);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.options-button:hover { background: var(--orange-dark); transform: translateY(-2px); }
.options-button span { margin-top: -5px; font-size: 2.45rem; font-weight: 300; line-height: 1; }
.options-button[aria-expanded="true"] span { transform: rotate(45deg); }

.popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(3, 30, 24, 0.34);
  backdrop-filter: blur(2px);
}

.footer-popover {
  position: fixed;
  z-index: 710;
  bottom: calc(94px + var(--device-safe-bottom));
  max-height: min(70dvh, 620px);
  overflow-y: auto;
  padding: 21px;
  border: 1px solid rgba(0, 76, 63, 0.13);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(3, 30, 24, 0.3);
}

.options-panel {
  left: 50%;
  width: min(calc(100vw - 28px), 430px);
  transform: translateX(-50%);
}

.menu-panel {
  right: max(14px, calc((100vw - 920px) / 2));
  width: min(calc(100vw - 28px), 470px);
}

.popover-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.popover-heading small {
  color: var(--orange-dark);
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.popover-heading h2 {
  margin: 3px 0 0;
  color: var(--evergreen-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.38rem;
}

.popover-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: var(--evergreen-100);
  color: var(--evergreen-950);
  font-size: 1.45rem;
  cursor: pointer;
}

.quick-option-link, .menu-resource-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  color: var(--ink);
  text-decoration: none;
}

.quick-option-link { padding: 15px; }

.quick-option-link > span:nth-child(2), .menu-resource-list a > span:nth-child(2) { display: grid; min-width: 0; }
.quick-option-link small, .menu-resource-list small { margin-top: 3px; color: var(--muted); font-size: 0.68rem; }

.medical-mark, .menu-resource-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #e8ecff;
  color: #4169e1;
  font-size: 1.45rem;
  font-weight: 900;
}

.menu-resource-list { display: grid; gap: 8px; }
.menu-resource-list a { padding: 10px 12px; }
.menu-resource-list strong { font-size: 0.78rem; }
.menu-resource-list b, .quick-option-link > b { color: var(--muted); }

.menu-resource-icon { width: 36px; height: 36px; font-size: 0.82rem; }
.menu-resource-icon.fire { background: #fee8e3; color: #bf321f; }
.menu-resource-icon.road { background: #e4edf7; color: #1d5c96; }
.menu-resource-icon.bus, .menu-resource-icon.dart { background: #dff2f3; color: #007b83; }
.menu-resource-icon.parking { background: #e4edf7; color: #1d5c96; }
.menu-resource-icon.event { background: #ffeadc; color: #d94f00; }

.install-button {
  width: 100%;
  min-height: 44px;
  margin-top: 11px;
  border: 0;
  border-radius: 13px;
  background: var(--evergreen-900);
  color: white;
  font-weight: 850;
  cursor: pointer;
}

.install-instructions {
  margin: 10px 0 0;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--evergreen-100);
  color: var(--evergreen-950);
  font-size: 0.72rem;
  line-height: 1.4;
}

.privacy-link {
  display: block;
  margin-top: 13px;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}

.landing-toast {
  position: fixed;
  z-index: 900;
  left: 50%;
  bottom: 104px;
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--evergreen-950);
  color: white;
  box-shadow: var(--shadow-md);
  font-size: 0.78rem;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.landing-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 700px) {
  .landing-shell {
    grid-template-rows: minmax(0, 1fr) calc(78px + var(--device-safe-bottom));
  }

  .app-header { padding: var(--device-safe-top) 13px 0; }
  .brand { gap: 8px; }
  .brand img { width: 41px; height: 41px; border-radius: 11px; }
  .brand-copy { gap: 3px; }
  .brand-title { gap: 5px; }
  .brand-title strong { font-size: 1.03rem; }
  .brand-guide { font-size: 0.83rem; }
  .brand-tagline { max-width: 166px; font-size: 0.58rem; letter-spacing: 0.02em; }
  .header-find-link { min-height: 39px; padding: 0 11px; font-size: 0.72rem; }

  .landing-main { padding: calc(15px + var(--device-safe-top)) 12px 24px; }
  .landing-welcome { margin-bottom: 13px; padding: 12px 14px 13px; border-radius: 16px; }
  .welcome-title-line { gap: 10px; }
  .welcome-logo { width: 48px; height: 48px; border-radius: 12px; }
  .landing-welcome h1 { font-size: clamp(0.92rem, 4.2vw, 1.08rem); }
  .landing-welcome > p:last-child { font-size: clamp(0.68rem, 3.45vw, 1.125rem); }

  .landing-actions { gap: 10px; }
  .landing-action-card {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 9px 7px;
    min-height: 208px;
    padding: 15px 13px 14px;
    border-radius: 17px;
  }

  .action-icon { grid-column: 1; width: 48px; height: 48px; border-radius: 15px; }
  .action-icon svg { width: 31px; height: 31px; }
  .weather-live-icon { font-size: 1.65rem; }
  .action-arrow { grid-column: 2; grid-row: 1; width: 28px; height: 28px; }
  .action-copy { grid-column: 1 / -1; align-self: stretch; align-content: start; }
  .action-eyebrow { min-height: 22px; font-size: 0.55rem; line-height: 1.2; }
  .action-copy > strong { font-size: clamp(0.96rem, 4.4vw, 1.16rem); }
  .action-copy > small { margin-top: 7px; font-size: 0.63rem; }
  #weather-temperature { font-size: 1.35em; }

  .conditions-attribution { margin-top: 8px; font-size: 0.53rem; }

  .landing-footer {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    padding: 0 9px var(--device-safe-bottom);
  }

  .footer-action { gap: 7px; padding: 7px 3px; }
  .footer-menu { justify-self: stretch; }
  .footer-icon { width: 34px; height: 34px; border-radius: 11px; }
  .footer-action strong { font-size: 0.69rem; }
  .footer-action small { font-size: 0.52rem; }
  .options-button { top: -27px; width: 62px; height: 62px; }
  .footer-popover { bottom: calc(88px + var(--device-safe-bottom)); padding: 17px; border-radius: 21px; }
  .menu-panel { right: 14px; }
}

@media (max-width: 380px) {
  .brand-tagline { max-width: 145px; }
  .header-find-link { padding: 0 9px; }
  .welcome-title-line { gap: 8px; }
  .welcome-logo { width: 44px; height: 44px; }
  .welcome-prefix { font-size: clamp(0.68rem, 3.35vw, 0.8rem); }
  .welcome-brand-icicle { font-size: clamp(0.76rem, 3.7vw, 0.88rem); }
  .welcome-brand-guide { font-size: clamp(0.72rem, 3.5vw, 0.84rem); }
  .landing-welcome h1 { font-size: clamp(0.88rem, 4.2vw, 1rem); }
  .landing-action-card { min-height: 198px; padding: 13px 11px; }
  .action-copy > strong { font-size: 0.95rem; }
  .action-copy > small { font-size: 0.59rem; }
  .footer-action small { display: none; }
}

@media (min-width: 900px) and (min-height: 760px) {
  .landing-main { display: grid; align-content: center; }
}

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

@media (prefers-contrast: more) {
  .landing-action-card, .landing-welcome, .footer-popover { border-width: 2px; border-color: currentColor; }
}
