:root {
  --bg: #fbfaf7; --card: #ffffff; --ink: #1b2326; --muted: #5d6a70; --line: #e4e1da;
  --brand: #0f3b47; --accent: #0d7c86; --accent-ink: #ffffff;
  --clear: #1f8a4c; --clear-bg: #e6f4ec; --partial: #a86400; --partial-bg: #fdf1dc;
  --covered: #c2410c; --covered-bg: #fde8dc; --closed: #b42318; --closed-bg: #fde4e2;
  --unconf: #5b6470; --unconf-bg: #eceef1;
  --night: rgba(40, 48, 70, .13); --win: rgba(31, 138, 76, .20);
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1416; --card: #172024; --ink: #e8ecee; --muted: #9aa7ad; --line: #2a3539;
    --brand: #8fd3db; --accent: #3fb6c1; --accent-ink: #062126;
    --clear: #5cd08f; --clear-bg: #133222; --partial: #f0b44c; --partial-bg: #33270f;
    --covered: #ff8a57; --covered-bg: #3a1e12; --closed: #ff6b60; --closed-bg: #3b1615;
    --unconf: #b2bcc6; --unconf-bg: #252c33; --night: rgba(0, 0, 0, .35); --win: rgba(92, 208, 143, .18);
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--brand); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4.2vw, 2.5rem); margin: .3em 0 .3em; }
h2 { font-size: 1.35rem; margin: 1.8em 0 .6em; }
h3 { font-size: 1.08rem; margin: 1.2em 0 .4em; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.small, .muted { color: var(--muted); }
.small { font-size: .88rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 46em; }

/* header */
.top { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 10; }
@media (prefers-color-scheme: dark) { .top { background: #0b2a32; } }
.top-in { display: flex; align-items: center; gap: 18px; min-height: 58px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.08rem; white-space: nowrap; }
.brand:hover { color: #fff; }
.nav { display: flex; gap: 4px 14px; flex-wrap: wrap; align-items: center; font-size: .95rem; }
.nav a { color: #d6eef1; text-decoration: none; padding: 4px 0; }
.nav a:hover, .nav a[aria-current] { color: #fff; text-decoration: underline; }
.nav .cta { background: #ffd166; color: #1b2326; padding: 5px 12px; border-radius: 999px; font-weight: 600; }
.nav .cta:hover { color: #1b2326; text-decoration: none; filter: brightness(1.05); }
@media (max-width: 720px) { .nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; } .nav a { white-space: nowrap; } }

.crumbs { font-size: .88rem; color: var(--muted); margin: 18px 0 0; }
.crumbs a { color: var(--muted); }

/* hero */
.hero { padding: 34px 0 10px; }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.1rem); max-width: 16em; }
.search { position: relative; max-width: 560px; margin: 18px 0 8px; }
.search input { width: 100%; font: inherit; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.search ul { position: absolute; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 360px; overflow: auto; z-index: 5; }
.search li a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.search li a:hover, .search li a:focus { background: var(--bg); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 14px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: block; }
a.card:hover { border-color: var(--accent); color: var(--ink); }
.card h3 { margin: 0 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card .k { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin: 14px 0; }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }

/* status */
.badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-clear { color: var(--clear); background: var(--clear-bg); }
.st-partial { color: var(--partial); background: var(--partial-bg); }
.st-covered { color: var(--covered); background: var(--covered-bg); }
.st-closed { color: var(--closed); background: var(--closed-bg); }
.st-unconfirmed { color: var(--unconf); background: var(--unconf-bg); }
.statushead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; }
.statushead .badge { font-size: 1rem; padding: 6px 14px; }
.bigq { font-size: 1.25rem; font-weight: 700; margin: 0; }
.facts-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; }
.photo-slot { border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--muted); }
.photo-slot img { border-radius: 10px; display: block; margin: 0 auto 8px; }
.lmlist { list-style: none; padding: 0; margin: 10px 0; }
.lmlist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.lmlist li a { font-weight: 600; text-decoration: none; }
.lmlist .why { display: block; font-size: .9rem; color: var(--muted); font-weight: 400; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

/* buttons, forms */
.btn, .gyg { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 650; border: 0; font: inherit; font-weight: 650; cursor: pointer; }
.btn:hover, .gyg:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.picker { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 8px 0 4px; }
.picker label { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
input[type=date] { min-height: 44px; }
form.report { display: grid; gap: 14px; max-width: 640px; }
form.report label { display: grid; gap: 6px; font-weight: 600; }
form.report fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
form.report legend { font-weight: 600; padding: 0 6px; }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radios label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.hp { position: absolute; left: -9999px; }
.form-msg { min-height: 1.4em; font-weight: 600; }

/* verdicts */
.verdict { background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: var(--radius); padding: 16px 18px; margin: 14px 0; box-shadow: var(--shadow); }
.verdict.v5, .verdict.v4 { border-left-color: var(--clear); }
.verdict.v3 { border-left-color: var(--partial); }
.verdict.v2, .verdict.v1 { border-left-color: var(--closed); }
.verdict-main { display: flex; gap: 14px; align-items: center; }
.verdict-k { margin: 0; color: var(--muted); font-size: .9rem; }
.verdict-v { margin: 2px 0; font-size: 1.35rem; font-weight: 750; }
.verdict-s { margin: 0; color: var(--muted); }
.facts { color: var(--muted); font-size: .92rem; margin: 10px 0 0; }
.dots { letter-spacing: 1px; color: var(--clear); font-size: .8rem; }
.dots .off { color: var(--line); }
.moon .moon-dark { fill: #2b3940; }
.moon .moon-lit { fill: #f6e7a8; }
@media (prefers-color-scheme: dark) { .moon .moon-dark { fill: #34444b; } }

/* tables */
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.grid th, .grid td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.grid thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.grid tr.best td { background: var(--clear-bg); }
.mini { margin: 12px 0 0; }
.mini th, .mini td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mini th { white-space: nowrap; }
.mini tr.best { background: var(--clear-bg); }

/* tide chart */
.tidechart { width: 100%; height: auto; margin: 12px 0 0; background: var(--bg); border-radius: 10px; }
.tidechart .curve { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.tidechart .night { fill: var(--night); }
.tidechart .win { fill: var(--win); }
.tidechart .high { fill: var(--accent); }
.tidechart .low { fill: var(--covered); }
.tidechart .tick, .tidechart .lbl { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.tidechart .lbl { fill: var(--ink); font-weight: 600; }

/* full moon */
.explist { list-style: none; padding: 0; }
.explist li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.explist li.no { opacity: .7; }
.np { display: inline-block; font-size: .85rem; padding: 2px 8px; border-radius: 999px; margin: 4px 4px 0 0; }
.np.ok { background: var(--clear-bg); color: var(--clear); }
.np.bad { background: var(--unconf-bg); color: var(--unconf); text-decoration: line-through; }
.empty { color: var(--muted); }

/* misc */
.notice { background: var(--partial-bg); color: var(--ink); border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; padding: 0; list-style: none; }
.tags a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-size: .92rem; }
.daytabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.daytabs button { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.daytabs button[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.dayview[hidden] { display: none; }
.sec-closed td:first-child::before { content: "✕ "; color: var(--closed); font-weight: 700; }
.sec-partial td:first-child::before { content: "◐ "; color: var(--partial); font-weight: 700; }
.sec-open td:first-child::before { content: "✓ "; color: var(--clear); font-weight: 700; }
.grid td.wrapok { white-space: normal; }
.foot { margin-top: 60px; border-top: 1px solid var(--line); background: var(--card); padding: 24px 0 36px; color: var(--muted); font-size: .94rem; }
.foot-in p { margin: 8px 0; max-width: 60em; }
.prose { max-width: 46em; }
.prose li { margin: 6px 0; }
