:root {
  --bg: #f2f6f5; --card: #fff; --ink: #13262b; --muted: #587076; --line: #dfe8e7;
  --teal: #0e4a5c; --teal-2: #13697f; --lake: #2a9bb5; --sun: #f0a43a; --moon: #6f6ad8; --moon-2: #b6b2f2;
  --good: #1f8a5b; --good-bg: #d8f0e3; --fair: #c28a17; --fair-bg: #fbefcf; --slow: #8a9aa0; --slow-bg: #e9eef0;
  --shadow: 0 1px 2px rgba(15,40,45,.06), 0 4px 16px rgba(15,40,45,.07); --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.5; }
a { color: var(--teal-2); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }

header.hero { background: linear-gradient(165deg, #0b3a48 0%, var(--teal) 45%, #176f7f 100%); color: #fff; padding: 22px 0 58px; position: relative; overflow: hidden; }
header.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 40px; background: radial-gradient(60% 40px at 50% 100%, rgba(255,255,255,.07), transparent); pointer-events: none; }
.topbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 18px; margin-bottom: 22px; }
.brand { color: #fff; text-decoration: none; font-weight: 750; font-size: 15px; }
.topnav { display: flex; gap: 16px; font-size: 14px; flex-wrap: wrap; }
.topnav a { color: #cfe6ea; text-decoration: none; }
.topnav a:hover { color: #fff; text-decoration: underline; }
.crumbs { font-size: 13px; color: #a9cbd1; margin-bottom: 10px; }
.crumbs a { color: #cfe6ea; }
h1 { font-size: clamp(30px, 5.4vw, 48px); line-height: 1.08; margin: 0 0 10px; letter-spacing: -.02em; }
.lede { font-size: clamp(16px, 2.2vw, 19px); margin: 0 0 20px; opacity: .93; max-width: 660px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 30px; }
.hero-facts div { font-size: 13px; color: #b9d8dd; }
.hero-facts b { display: block; color: #fff; font-size: 20px; }

.finder { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.22); max-width: 640px; }
.finder-row { display: flex; gap: 10px; flex-wrap: wrap; }
.finder input, .finder button { font: inherit; font-size: 16px; border-radius: 10px; padding: 11px 14px; border: 1.5px solid #c9d8d8; }
.finder input { flex: 1 1 120px; min-width: 0; }
.finder input:focus { outline: none; border-color: var(--lake); box-shadow: 0 0 0 3px rgba(42,155,181,.2); }
.finder .btn { background: var(--teal-2); color: #fff; border-color: var(--teal-2); font-weight: 700; cursor: pointer; }
.finder .btn:hover { background: var(--teal); }
.finder .btn.ghost { background: #fff; color: var(--teal-2); }
.finder .btn.ghost:hover { background: #eef6f7; }
.msg { font-size: 14px; color: #a23b2a; }
.msg:not(:empty) { margin-top: 10px; }

main { margin-top: -28px; position: relative; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
h2 { font-size: clamp(21px, 3vw, 26px); margin: 0 0 6px; letter-spacing: -.01em; }
h3 { margin: 0; }
.sub, .muted { color: var(--muted); margin: 0 0 14px; }
.source { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* today / solunar */
.today-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px; margin: 10px 0 14px; }
.today-date { color: var(--muted); font-size: 14px; }
.today-score { display: inline-block; font-weight: 800; font-size: 22px; }
.today-score.s4 { color: var(--good); } .today-score.s3 { color: #3f8f4f; } .today-score.s2 { color: var(--fair); } .today-score.s1 { color: var(--slow); }
.moon { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.moon-ico { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(90deg, #f4f1d0 var(--lit), #3b4a52 var(--lit)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.tl { position: relative; height: 34px; border-radius: 8px; background: #eaf4f6; overflow: hidden; }
.tl > div { position: absolute; top: 0; bottom: 0; }
.tl-night { background: #c9d8de; }
.tl-sun { background: rgba(240,164,58,.75); top: 22px !important; }
.tl-minor { background: var(--moon-2); top: 6px !important; bottom: 14px !important; border-radius: 4px; }
.tl-major { background: var(--moon); top: 2px !important; bottom: 12px !important; border-radius: 4px; }
.tl-now { width: 2px; background: #c0392b; }
.tl-ticks { position: relative; height: 18px; font-size: 12px; color: var(--muted); }
.tl-ticks span { position: absolute; transform: translateX(-50%); top: 2px; }
.tl-ticks span:first-child { transform: none; }
.legend2 { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.legend2 span { display: inline-flex; align-items: center; gap: 6px; }
.k { display: inline-block; width: 16px; height: 10px; border-radius: 3px; }
.k.major { background: var(--moon); } .k.minor { background: var(--moon-2); } .k.sun { background: var(--sun); }
.periods { list-style: none; padding: 0; margin: 6px 0 14px; display: grid; gap: 6px; }
.periods li { padding: 8px 12px; border-radius: 10px; background: #f4f6fb; font-size: 15px; border-left: 4px solid var(--moon-2); }
.periods li.major { border-left-color: var(--moon); }
.periods li.sun { border-left-color: var(--sun); background: #fdf6ec; }
.next-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.next-days div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.next-days .today-score { font-size: 16px; }
.next-days small { color: var(--muted); }

/* weather */
.wx { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.wx-p { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.wx-t { font-size: 22px; font-weight: 800; }
.wx-p small { color: var(--muted); }
.wx-p em { font-style: normal; font-size: 12px; color: var(--teal-2); font-weight: 600; }

/* biting */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sp { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; border-top: 4px solid var(--slow); }
.sp.r3 { border-top-color: var(--good); } .sp.r2 { border-top-color: var(--fair); }
.sp-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sp h3 { font-size: 17px; }
.sp-phase { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 2px 0 4px; }
.sp p { margin: 0; font-size: 14px; color: #2c4248; }
.rate { font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.rate.r3 { background: var(--good-bg); color: var(--good); } .rate.r2 { background: var(--fair-bg); color: #8a610c; } .rate.r1 { background: var(--slow-bg); color: #5c6d72; }

/* month grid */
.grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mgrid { border-collapse: separate; border-spacing: 3px; font-size: 13px; min-width: 620px; width: 100%; }
.mgrid th { font-weight: 600; color: var(--muted); text-align: center; padding: 2px 4px; }
.mgrid th[scope="row"] { text-align: left; color: var(--ink); white-space: nowrap; padding-right: 10px; }
.mgrid th.cur { color: var(--ink); font-weight: 800; }
.mgrid td { text-align: center; height: 26px; border-radius: 5px; font-size: 11px; color: rgba(0,0,0,.55); }
.mgrid tr.wt td { color: var(--muted); font-variant-numeric: tabular-nums; }
.mgrid td.g.r3 { background: #6cc49a; } .mgrid td.g.r2 { background: #f1d48b; } .mgrid td.g.r1 { background: #e3e9eb; }
.mgrid td.cur { outline: 2px solid var(--ink); outline-offset: -1px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.sw.r3 { background: #6cc49a; } .sw.r2 { background: #f1d48b; } .sw.r1 { background: #e3e9eb; }

.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts-tbl th { width: 34%; color: var(--muted); font-weight: 600; }

.lake-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 18px; }
.lake-list small { color: var(--muted); display: block; }
.lake-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.lake-cards a { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.lake-cards a:hover { border-color: var(--lake); box-shadow: var(--shadow); }
.lake-cards b { color: var(--teal-2); font-size: 17px; }
.lake-cards small { color: var(--muted); }
.lake-cards span { font-size: 14px; }
h3.st { font-size: 16px; margin: 16px 0 6px; }
h3.st a { color: var(--ink); text-decoration: none; }
.lake-inline { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
#nearby h3 { font-size: 17px; margin: 16px 0 6px; }

.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { margin: 8px 0 2px; color: #2c4248; }
.prose h2 { margin-top: 18px; } .prose h2:first-child { margin-top: 0; }
footer { font-size: 13px; color: var(--muted); padding: 10px 16px 40px; }
footer a { color: var(--muted); }
@media (max-width: 560px) { .panel { padding: 16px; } .hero-facts b { font-size: 18px; } }
