:root {
  --ink: #172534;
  --muted: #64717e;
  --cream: #fffaf0;
  --sun: #f9b932;
  --orange: #f47d35;
  --green: #47ad75;
  --line: rgba(23, 37, 52, .12);
  --shadow: 0 30px 70px rgba(35, 61, 75, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #f7f9f7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 10px 14px; color: white; background: var(--ink); border-radius: 8px; transform: translateY(-140%); }
.skip-link:focus { transform: translateY(0); }
.site-header, main, footer { max-width: 1180px; margin: 0 auto; }
.site-header {
  height: 88px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 18px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--sun); color: #fff; font-size: 23px; line-height: 1; }
.header-nav { display: flex; gap: 25px; }
.header-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.header-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

.dashboard {
  min-height: 650px;
  margin: 0 16px;
  padding: 74px 72px;
  display: grid;
  grid-template-columns: 1fr 470px;
  gap: 70px;
  align-items: center;
  overflow: hidden;
  position: relative;
  border-radius: 32px;
  background:
    radial-gradient(circle at 82% 8%, rgba(255,255,255,.88) 0 5%, transparent 22%),
    linear-gradient(130deg, #fff7dc 0%, #ffdd82 62%, #ffc95d 100%);
}
.dashboard::before {
  content: "";
  position: absolute;
  width: 370px; height: 370px; border: 1px solid rgba(255,255,255,.6); border-radius: 50%;
  top: -165px; right: 140px;
  box-shadow: 0 0 0 60px rgba(255,255,255,.08), 0 0 0 120px rgba(255,255,255,.05);
}
.intro, .uv-card { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .13em; font-weight: 700; font-size: 13px; }
h1, h2 { margin: 0; font-family: "Avenir Next", Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.04em; line-height: 1.05; }
h1 { font-size: clamp(48px, 6vw, 74px); font-weight: 800; }
h1 em { color: #e86f31; font-style: normal; }
h2 { font-size: clamp(32px, 4vw, 48px); }
.intro-copy { max-width: 520px; margin: 24px 0 30px; font-size: 18px; }
.location-form label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 14px; }
.search-row { display: flex; gap: 10px; }
.input-wrap { height: 54px; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 15px; background: #fff; border: 1px solid rgba(23,37,52,.18); border-radius: 13px; }
.input-wrap:focus-within { outline: 3px solid rgba(244,125,53,.25); border-color: var(--orange); }
.input-wrap input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.input-wrap span { font-size: 25px; transform: rotate(-20deg); }
.search-button { border: 0; padding: 0 22px; border-radius: 13px; background: var(--ink); color: white; font-weight: 700; cursor: pointer; }
.search-button:hover { background: #243b4e; }
.geo-button { margin-top: 13px; padding: 0; border: 0; background: transparent; color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.geo-button:disabled { opacity: .55; cursor: wait; }
.form-message { min-height: 24px; margin: 8px 0 0; font-size: 14px; color: #8b3e26; }

.uv-card { padding: 29px; border: 1px solid rgba(255,255,255,.72); border-radius: 26px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.uv-card.is-loading { animation: softPulse 1.4s ease-in-out infinite alternate; }
@keyframes softPulse { to { opacity: .72; } }
.card-topline, .card-stats, .location-line, .uv-reading, .advice-box { display: flex; align-items: center; }
.card-topline { justify-content: space-between; color: var(--muted); font-size: 13px; }
.card-topline p { margin: 0; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--green); }
.location-line { gap: 7px; margin-top: 18px; font-weight: 700; }
.location-line > span:first-child { color: var(--orange); font-size: 10px; }
.uv-reading { gap: 22px; margin: 10px 0 10px; }
.uv-number { font-family: "Avenir Next", Inter, ui-sans-serif, system-ui, sans-serif; font-size: 110px; font-weight: 800; line-height: 1; letter-spacing: -.08em; color: var(--uv-color, var(--sun)); }
.uv-reading div { display: flex; flex-direction: column; }
.uv-reading strong { font-family: "Avenir Next", Inter, ui-sans-serif, system-ui, sans-serif; font-size: 26px; }
.uv-reading div span { color: var(--muted); font-size: 14px; }
.uv-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 22px; }
.uv-scale span { height: 6px; border-radius: 8px; background: #d8dedf; }
.uv-scale span:nth-child(1) { background: #4bb879; }
.uv-scale span:nth-child(2) { background: #f2c849; }
.uv-scale span:nth-child(3) { background: #f49a3a; }
.uv-scale span:nth-child(4) { background: #e65743; }
.uv-scale span:nth-child(5) { background: #974fa5; }
.uv-scale span:not(.active) { opacity: .22; }
.advice-box { gap: 14px; padding: 15px; border-radius: 15px; background: #fff6dd; }
.advice-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 50%; background: var(--sun); color: white; font-size: 23px; }
.advice-box p { margin: 0; font-weight: 700; }
.advice-box div span { color: var(--muted); font-size: 14px; }
.card-stats { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.card-stats div { width: 50%; display: flex; flex-direction: column; }
.card-stats div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.card-stats span { color: var(--muted); font-size: 13px; }
.card-stats strong { font-size: 20px; }

.forecast-section, .explain-section, .faq-section { padding: 100px 28px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.section-heading > p { max-width: 430px; margin: 0; color: var(--muted); }
.forecast-card { padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: 0 18px 45px rgba(35,61,75,.07); }
.chart { min-height: 210px; display: grid; grid-template-columns: repeat(8, 1fr); align-items: end; gap: clamp(8px, 2vw, 26px); border-bottom: 1px solid var(--line); }
.chart-item { height: 210px; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 8px; }
.chart-item strong { font-size: 14px; }
.bar-track { height: 150px; width: min(38px, 70%); display: flex; align-items: end; background: #f1f3f1; border-radius: 20px 20px 0 0; overflow: hidden; }
.bar { width: 100%; min-height: 3px; border-radius: 20px 20px 0 0; background: var(--bar); transition: height .45s ease; }
.chart-item small { color: var(--muted); font-size: 12px; }
.forecast-summary { display: flex; justify-content: space-between; gap: 20px; padding-top: 22px; }
.forecast-summary span { color: var(--muted); }
.week-section { padding: 0 28px 100px; }
.week-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.week-day { padding: 22px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: white; }
.week-day > span { color: var(--muted); text-transform: capitalize; font-size: 14px; }
.week-day strong { margin-top: 14px; font-family: "Avenir Next", Inter, ui-sans-serif, system-ui, sans-serif; font-size: 40px; line-height: 1; }
.week-day small { margin-top: 5px; font-weight: 700; }

.burn-section { padding: 0 28px; }
.burn-card { display: grid; grid-template-columns: .9fr 1.25fr .7fr; gap: 38px; align-items: center; padding: 48px; border-radius: 26px; background: var(--ink); color: white; }
.burn-card h2 { font-size: 38px; }
.burn-card p:not(.eyebrow) { color: #b9c6ce; margin-bottom: 0; }
.skin-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.skin-option { display: flex; align-items: center; gap: 11px; padding: 13px; text-align: left; color: white; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13); border-radius: 13px; cursor: pointer; }
.skin-option:hover, .skin-option.active { border-color: var(--sun); background: rgba(249,185,50,.14); }
.skin-option span:nth-child(2) { display: flex; flex-direction: column; }
.skin-option small { color: #afbec7; }
.skin { width: 29px; height: 29px; flex: 0 0 29px; border: 2px solid rgba(255,255,255,.35); border-radius: 50%; }
.swatch-1 { background: #f8d6c3; } .swatch-2 { background: #dca77f; } .swatch-3 { background: #a86e48; } .swatch-4 { background: #65402d; }
.burn-result { padding-left: 32px; border-left: 1px solid rgba(255,255,255,.18); }
.burn-result span, .burn-result small { display: block; color: #b9c6ce; }
.burn-result strong { display: block; margin: 6px 0; color: var(--sun); font-family: "Avenir Next", Inter, ui-sans-serif, system-ui, sans-serif; font-size: 30px; }

.levels-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.level { min-height: 210px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 20px; color: white; }
.level > span { font-family: "Avenir Next", Inter, ui-sans-serif, system-ui, sans-serif; font-size: 32px; font-weight: 800; }
.level strong { font-size: 19px; }
.level p { margin: 4px 0 0; font-size: 14px; opacity: .85; }
.level-low { background: #419e69; } .level-medium { background: #d6ab25; } .level-high { background: #e9852f; } .level-very { background: #d64e3d; } .level-extreme { background: #81428e; }
.source-note { margin-top: 24px; padding: 24px; border: 1px solid #d7e1e3; border-radius: 18px; background: #eef6f5; }
.source-note p { margin: 6px 0 10px; }
.source-note a { color: var(--ink); font-weight: 700; }
.faq-section { padding-top: 0; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: 23px 44px 23px 0; position: relative; cursor: pointer; list-style: none; font-family: "Avenir Next", Inter, ui-sans-serif, system-ui, sans-serif; font-weight: 700; font-size: 19px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 8px; top: 19px; font-size: 25px; font-weight: 400; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p { max-width: 760px; margin: -8px 0 22px; color: var(--muted); }

footer { margin-top: 10px; padding: 34px 28px 48px; display: grid; grid-template-columns: 1fr 1.5fr auto; align-items: center; gap: 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-brand { color: var(--ink); }
footer p a { color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; }
.footer-links a { color: var(--ink); }
.cookie-settings { padding: 0; border: 0; color: var(--ink); background: none; font: inherit; cursor: pointer; text-decoration: underline; }
.cookie-settings:hover { text-decoration-thickness: 2px; }

.cookie-banner { position: fixed; inset: auto 18px 18px; z-index: 1000; display: flex; justify-content: center; pointer-events: none; }
.cookie-panel { width: min(680px, 100%); padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 20px 60px rgba(35,61,75,.2); pointer-events: auto; }
.cookie-panel h2 { margin: 0 0 8px; font-size: 22px; }
.cookie-panel p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.cookie-panel p a { color: var(--ink); }
.cookie-actions { margin-top: 17px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.cookie-actions button { min-height: 44px; padding: 10px 17px; border: 1px solid var(--ink); border-radius: 11px; font: inherit; font-weight: 700; cursor: pointer; }
.cookie-reject { color: var(--ink); background: white; }
.cookie-accept { color: white; background: var(--ink); }
.cookie-actions button:focus-visible, .cookie-settings:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

.text-page { max-width: 850px; padding: 90px 28px 120px; }
.text-page h1 { max-width: 760px; font-size: clamp(45px, 7vw, 72px); }
.text-page .lead { margin: 28px 0 65px; color: var(--muted); font-size: 21px; }
.text-page section { padding: 30px 0; border-top: 1px solid var(--line); }
.text-page section h2 { font-size: 27px; }
.text-page section p { color: var(--muted); }
.text-actions { margin-top: 36px; display: flex; align-items: center; flex-wrap: wrap; gap: 22px; }
.text-actions > a:not(.primary-link) { color: var(--ink); font-weight: 600; }
.primary-link { display: inline-block; padding: 14px 20px; border-radius: 12px; background: var(--ink); color: white; text-decoration: none; font-weight: 700; }
.error-page { max-width: 720px; min-height: 100vh; margin: auto; padding: 100px 28px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.error-page h1 { margin: 10px 0; font-size: clamp(42px, 8vw, 72px); }
.error-page p:not(.eyebrow) { margin-bottom: 28px; color: var(--muted); font-size: 19px; }

@media (max-width: 940px) {
  .dashboard { padding: 58px 42px; grid-template-columns: 1fr; gap: 40px; }
  .intro { max-width: 620px; }
  .uv-card { max-width: 560px; width: 100%; }
  .burn-card { grid-template-columns: 1fr 1fr; }
  .burn-result { grid-column: 1 / -1; padding: 20px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.18); }
  .levels-grid { grid-template-columns: repeat(3, 1fr); }
  .week-grid { grid-template-columns: repeat(3, 1fr); }
  footer { grid-template-columns: 1fr 1fr; }
  footer > p:last-child { grid-column: 2; }
}

@media (max-width: 620px) {
  .site-header { height: 72px; padding: 0 18px; }
  .header-nav a:not(:first-child) { display: none; }
  .dashboard { margin: 0 8px; padding: 42px 18px 22px; border-radius: 24px; gap: 28px; }
  h1 { font-size: 47px; }
  .intro-copy { margin: 18px 0 24px; font-size: 16px; }
  .search-row { flex-direction: column; }
  .search-button { height: 52px; }
  .uv-card { padding: 21px; border-radius: 21px; }
  .uv-number { font-size: 86px; }
  .uv-reading strong { font-size: 22px; }
  .forecast-section, .explain-section, .faq-section { padding: 74px 18px; }
  .section-heading { align-items: start; flex-direction: column; }
  .forecast-card { padding: 22px 10px; overflow-x: auto; }
  .chart { min-width: 580px; gap: 12px; }
  .forecast-summary { min-width: 580px; padding-inline: 10px; }
  .burn-section { padding: 0 8px; }
  .week-section { padding: 0 18px 74px; }
  .week-grid { grid-template-columns: 1fr 1fr; }
  .week-day:first-child { grid-column: 1 / -1; }
  .burn-card { padding: 32px 20px; grid-template-columns: 1fr; border-radius: 24px; }
  .skin-picker { grid-template-columns: 1fr; }
  .burn-result { grid-column: auto; }
  .levels-grid { grid-template-columns: 1fr; }
  .level { min-height: 140px; flex-direction: row; align-items: end; }
  .level div { max-width: 190px; }
  footer { margin-inline: 18px; padding-inline: 0; grid-template-columns: 1fr; }
  footer > p:last-child { grid-column: auto; }
  .footer-links { justify-content: flex-start; }
  .text-page { padding: 60px 18px 90px; }
  .text-page .lead { margin-bottom: 45px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
