:root {
  color-scheme: light;
  --navy: #10233f;
  --navy-soft: #1a355b;
  --ink: #172033;
  --muted: #5b6473;
  --cream: #f7f3e9;
  --paper: #fffdf8;
  --line: #dcd7ca;
  --sun: #ffb21a;
  --sun-soft: #ffe19a;
  --blue: #5b8def;
  --blue-soft: #dce8ff;
  --standard: #6c7a89;
  --shadow: 0 24px 70px rgba(16, 35, 63, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); }
a { color: inherit; }
button, select { font: inherit; }

.topbar {
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(247, 243, 233, 0.9);
  border-bottom: 1px solid rgba(16, 35, 63, 0.12);
  display: flex;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 4vw;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { align-items: center; display: inline-flex; font-weight: 850; gap: 10px; text-decoration: none; }
.brand-mark {
  align-items: center;
  background: var(--navy);
  border-radius: 10px;
  color: white;
  display: inline-flex;
  font-size: 13px;
  height: 36px;
  justify-content: center;
  width: 36px;
}
.topbar nav, footer nav { display: flex; gap: 24px; }
.topbar nav a, footer nav a { color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; }
.topbar nav a:hover, footer nav a:hover { color: var(--navy); }

main { margin: 0 auto; max-width: 1240px; padding: 0 32px 72px; }
main section[id] { scroll-margin-top: 88px; }
.hero { align-items: center; display: grid; gap: 64px; grid-template-columns: 1.04fr 0.96fr; min-height: 590px; padding: 72px 0 54px; }
.eyebrow { color: #a55500; font-size: 12px; font-weight: 850; letter-spacing: 0.12em; margin: 0 0 12px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(46px, 6vw, 76px); letter-spacing: -0.055em; line-height: 0.98; margin-bottom: 24px; max-width: 760px; }
.hero-text { color: var(--muted); font-size: 20px; line-height: 1.6; max-width: 650px; }
.hero-actions { align-items: center; display: flex; gap: 18px; margin-top: 30px; }
.hero-actions span { color: var(--muted); font-size: 13px; }
.primary-action, .share-button {
  background: var(--navy);
  border: 0;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  padding: 14px 20px;
  text-decoration: none;
}
.primary-action:hover, .share-button:hover { background: var(--navy-soft); transform: translateY(-1px); }

.sky-card {
  background: linear-gradient(180deg, #0d1c33 0%, #264e79 50%, #ffb35a 100%);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 32px;
  box-shadow: var(--shadow);
  height: 430px;
  overflow: hidden;
  position: relative;
}
.sky-stars { background-image: radial-gradient(circle, white 0 1px, transparent 1.5px); background-size: 47px 51px; inset: 0; opacity: .48; position: absolute; }
.sun-disc { background: #ffcf57; border-radius: 50%; box-shadow: 0 0 60px #ffcf57; height: 86px; left: 50%; position: absolute; top: 53%; transform: translate(-50%, -50%); width: 86px; }
.horizon { background: linear-gradient(180deg, #263c48, #101d28); bottom: 0; clip-path: polygon(0 36%, 16% 18%, 29% 38%, 45% 10%, 61% 40%, 78% 20%, 100% 42%, 100% 100%, 0 100%); height: 42%; left: 0; position: absolute; width: 100%; }
.sky-label { background: rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); display: grid; gap: 3px; padding: 12px 15px; position: absolute; }
.sky-label span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.sky-label strong { font-size: 15px; }
.morning-label { left: 22px; top: 26px; }
.evening-label { bottom: 26px; right: 22px; }

.bill-status {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  gap: 16px;
  grid-template-columns: auto 1fr auto;
  margin-bottom: 100px;
  padding: 18px 22px;
}
.status-dot { background: var(--sun); border-radius: 50%; box-shadow: 0 0 0 7px var(--sun-soft); height: 10px; width: 10px; }
.bill-status p { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.bill-status a { color: var(--navy); font-size: 13px; font-weight: 800; }

.calculator-section, .chart-section, .method-section, .faq-section { margin-bottom: 112px; }
.section-heading { max-width: 760px; }
.section-heading h2 { font-size: clamp(34px, 4vw, 52px); letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 14px; }
.section-heading p:last-child { color: var(--muted); font-size: 17px; line-height: 1.6; }
.section-heading.compact h2 { font-size: clamp(30px, 3.5vw, 46px); }

.city-control {
  align-items: end;
  background: var(--navy);
  border-radius: 24px;
  color: white;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(240px, 1fr) auto;
  margin: 32px 0 18px;
  padding: 20px;
  position: relative;
}
.city-control label { font-size: 12px; font-weight: 800; grid-column: 1; letter-spacing: .08em; text-transform: uppercase; }
.select-wrap { grid-column: 1; position: relative; }
.select-wrap::after { content: "⌄"; pointer-events: none; position: absolute; right: 16px; top: 14px; }
.city-control select { appearance: none; background: white; border: 0; border-radius: 13px; color: var(--ink); min-height: 52px; padding: 0 44px 0 16px; width: 100%; }
.share-button { background: var(--sun); color: #352200; min-height: 52px; }
.share-button:hover { background: #ffc44e; }
.share-status { bottom: -27px; color: var(--muted); font-size: 12px; position: absolute; right: 18px; }

.result-callout { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; display: grid; gap: 34px; grid-template-columns: minmax(180px,.38fr) 1fr; margin-bottom: 18px; padding: 28px; }
.result-location { font-size: 20px; font-weight: 850; margin-bottom: 5px; }
.result-callout span, .result-callout p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.result-callout h2 { font-size: clamp(25px, 3vw, 38px); letter-spacing: -.035em; margin-bottom: 10px; }
.result-callout div:last-child p { font-size: 15px; margin-bottom: 0; }

.scenario-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.scenario-card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; min-width: 0; overflow: hidden; }
.scenario-card.daylight { border-color: #e5ae2f; box-shadow: 0 18px 50px rgba(255,178,26,.15); }
.scenario-heading { border-bottom: 1px solid var(--line); min-height: 178px; padding: 24px; }
.scenario-heading h3 { font-size: 21px; margin: 12px 0 8px; }
.scenario-heading p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.scenario-badge { background: var(--blue-soft); border-radius: 999px; color: #234f9a; display: inline-block; font-size: 10px; font-weight: 850; letter-spacing: .06em; padding: 6px 9px; text-transform: uppercase; }
.daylight .scenario-badge { background: var(--sun-soft); color: #815000; }
.standard .scenario-badge { background: #e8ecef; color: #495563; }
.scenario-metrics { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; }
.scenario-metrics div { border-bottom: 1px solid var(--line); padding: 18px 20px; }
.scenario-metrics div:nth-child(odd) { border-right: 1px solid var(--line); }
.scenario-metrics div:nth-last-child(-n+2) { border-bottom: 0; }
.scenario-metrics dt { color: var(--muted); font-size: 11px; font-weight: 750; }
.scenario-metrics dd { font-size: 24px; font-weight: 850; letter-spacing: -.03em; margin: 5px 0 2px; }
.scenario-metrics small { color: var(--muted); font-size: 10px; }

.chart-card { background: var(--navy); border-radius: 28px; box-shadow: var(--shadow); color: white; margin-top: 30px; padding: 26px; }
.chart-axis { color: #bac8dc; display: grid; font-size: 10px; grid-template-columns: repeat(5, 1fr); margin: 0 0 12px 112px; }
.chart-axis span:last-child { text-align: right; }
.month-row { align-items: center; border-top: 1px solid rgba(255,255,255,.12); display: grid; gap: 16px; grid-template-columns: 42px 1fr; padding: 10px 0; }
.month-row > strong { color: #dbe6f5; font-size: 12px; }
.month-bars { display: grid; gap: 6px; }
.chart-policy-row { align-items: center; display: grid; gap: 10px; grid-template-columns: 62px 1fr; }
.chart-policy-label { color: #aebdd2; font-size: 9px; }
.day-track { background-image: linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px); background-size: 25% 100%; border-radius: 99px; height: 22px; overflow: hidden; position: relative; }
.daylight-bar { align-items: center; border-radius: 99px; display: flex; height: 100%; min-width: 4px; overflow: hidden; padding: 0 7px; position: absolute; white-space: nowrap; }
.daylight-bar.current { background: var(--blue); }
.daylight-bar.daylight { background: linear-gradient(90deg, #ffc341, #ff9e1b); color: #352200; }
.daylight-bar span { font-size: 9px; font-weight: 800; }
.chart-legend { display: flex; gap: 24px; justify-content: flex-end; margin-top: 18px; }
.chart-legend span { align-items: center; color: #c5d1e1; display: flex; font-size: 11px; gap: 7px; }
.chart-legend i { border-radius: 99px; height: 8px; width: 22px; }
.legend-current { background: var(--blue); }
.legend-daylight { background: var(--sun); }

.method-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); margin-top: 30px; }
.method-grid article { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 26px; }
.method-grid article > span { color: #a55500; font-size: 12px; font-weight: 850; }
.method-grid h3 { margin: 24px 0 8px; }
.method-grid p, .method-note { color: var(--muted); font-size: 14px; line-height: 1.65; }
.method-note { border-left: 3px solid var(--sun); margin: 22px 0 0; padding: 4px 0 4px 16px; }

.faq-list { border-top: 1px solid var(--line); margin-top: 30px; }
.faq-list details { border-bottom: 1px solid var(--line); padding: 20px 2px; }
.faq-list summary { cursor: pointer; font-size: 18px; font-weight: 800; list-style: none; padding-right: 34px; position: relative; }
.faq-list summary::after { color: #a55500; content: "+"; font-size: 26px; position: absolute; right: 3px; top: -5px; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list p { color: var(--muted); line-height: 1.65; margin: 13px 0 0; max-width: 850px; }
.sources-section { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.sources-section h2 { font-size: 18px; }
.sources-section p { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-bottom: 0; }
.sources-section a { color: var(--navy); font-size: 13px; font-weight: 750; }

footer { align-items: center; border-top: 1px solid var(--line); display: grid; gap: 18px; grid-template-columns: auto 1fr auto; margin: 0 auto; max-width: 1240px; padding: 34px 32px 50px; }
footer p { color: var(--muted); font-size: 13px; margin: 0; }

.simple-page {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  margin: 72px auto;
  max-width: 780px;
  padding: clamp(28px, 6vw, 64px);
}
.simple-page .back-link { color: #a55500; display: inline-block; font-size: 13px; font-weight: 800; margin-bottom: 38px; }
.simple-page h1 { font-size: clamp(38px, 6vw, 58px); }
.simple-page h2 { font-size: 24px; margin-top: 34px; }
.simple-page p, .simple-page li { color: var(--muted); line-height: 1.75; }
.simple-page a { color: var(--navy); font-weight: 700; }

@media (max-width: 900px) {
  .topbar nav { gap: 14px; }
  .topbar nav a:nth-child(2), .topbar nav a:nth-child(3) { display: none; }
  main { padding: 0 20px 56px; }
  .hero { gap: 36px; grid-template-columns: 1fr; padding-top: 50px; }
  .sky-card { height: 340px; }
  .bill-status { grid-template-columns: auto 1fr; margin-bottom: 78px; }
  .bill-status a { grid-column: 2; }
  .scenario-grid, .method-grid { grid-template-columns: 1fr; }
  .scenario-heading { min-height: auto; }
  .result-callout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar { min-height: 60px; padding: 0 16px; }
  .brand { font-size: 14px; }
  .brand-mark { height: 32px; width: 32px; }
  .topbar nav a { font-size: 12px; }
  h1 { font-size: 44px; }
  .hero { min-height: auto; padding: 44px 0 38px; }
  .hero-text { font-size: 17px; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .sky-card { border-radius: 22px; height: 290px; }
  .sun-disc { height: 68px; width: 68px; }
  .bill-status { align-items: start; margin-bottom: 72px; padding: 18px; }
  .bill-status a { grid-column: 1 / -1; }
  .calculator-section, .chart-section, .method-section, .faq-section { margin-bottom: 78px; }
  .city-control { grid-template-columns: 1fr; }
  .city-control label, .select-wrap { grid-column: 1; }
  .share-button { width: 100%; }
  .share-status { bottom: -24px; }
  .result-callout { padding: 22px; }
  .scenario-metrics dd { font-size: 21px; }
  .chart-card { border-radius: 20px; padding: 18px 12px; }
  .chart-axis { margin-left: 75px; }
  .month-row { gap: 8px; grid-template-columns: 30px 1fr; }
  .chart-policy-row { gap: 6px; grid-template-columns: 39px 1fr; }
  .chart-policy-label { font-size: 7px; line-height: 1.1; }
  .daylight-bar span { display: none; }
  .chart-legend { align-items: flex-start; flex-direction: column; gap: 8px; }
  footer { align-items: start; grid-template-columns: 1fr; padding: 28px 20px 40px; }
  .simple-page { border-radius: 20px; margin: 24px 16px; }
}

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