/* GoDay: mobile-first, tokens only. Good to bad runs green, light green, yellow, orange, red (Cyrus 2026-09-29).
   Red and green look alike to about 1 in 12 men, so every coloured thing also carries a number or a word. */
:root {
  --bg: #0b1220; --panel: #131c2e; --panel-2: #1a253b; --line: #26324a;
  --text: #e8eef7; --dim: #a3b0c4; --accent: #ffc247; --on-accent: #1a1300; --accent-ink: #ffc247;
  --lvl-0: #22c55e; --lvl-1: #a3e635; --lvl-2: #facc15; --lvl-3: #ff8c1a; --lvl-4: #ff4545; --lvl-none: #6b7a92; --on-lvl: #0b1220;
  /* Filled buttons use --accent-ink: white on the light theme's --accent is only 3.6:1, on --accent-ink 5.9:1. */
  --scrim: rgb(4 8 16 / 0.55);
  /* Rating tints blend into a neutral grey, not the navy panel: red + navy reads purple, yellow + navy olive. */
  --tint: #1c1c1e; --tint-line: #3a3a3e;
  --radius: 16px; --radius-s: 10px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f7fb; --panel: #ffffff; --panel-2: #eef3f9; --line: #d5deea;
    --text: #0f1a2b; --dim: #4d5b70; --accent: #b77900; --on-accent: #ffffff; --accent-ink: #8a5a00;
    --scrim: rgb(15 26 43 / 0.35);
    --tint: #ffffff; --tint-line: #dcdcdc;
    --lvl-0: #147436; --lvl-1: #476f0d; --lvl-2: #8f5708; --lvl-3: #b33c0a; --lvl-4: #b91c1c; --lvl-none: #6b7a92; --on-lvl: #ffffff;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); }
body { min-height: 100dvh; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s4); top: var(--s4); background: var(--panel); padding: var(--s2) var(--s3); z-index: 10; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { max-width: 720px; margin: 0 auto; padding: max(var(--s4), env(safe-area-inset-top)) var(--s4) var(--s6); }

/* Header */
.top { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s4); }
.logo { font-weight: 800; font-size: 26px; letter-spacing: -0.5px; display: flex; align-items: center; gap: var(--s2); }
.logo img { width: 38px; height: 38px; }
.logo b { color: var(--accent); }
/* min-width 0 lets a long spot name shrink to an ellipsis instead of pushing the buttons off a narrow phone. */
.spot-btn { margin-left: auto; min-height: 44px; max-width: 60%; min-width: 0; display: flex; align-items: center; gap: var(--s1);
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 0 var(--s3); }
.spot-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo, .icon-btn { flex: none; }
.icon-btn { min-width: 44px; min-height: 44px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; }
.refresh { font-size: 20px; line-height: 1; }
.refresh.spin span { display: inline-block; animation: spin 0.8s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

/* Sport chips: one sideways-scrolling row on phones, running to the screen edges with a fade that says "more";
   wrapped rows from 560px. The chosen chip is filled, so it reads without colour too. */
.sports-wrap { margin-bottom: var(--s4); }
.sports { position: relative; display: flex; gap: var(--s2); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  margin: calc(-1 * var(--s2)) calc(-1 * var(--s4)); padding: var(--s3) var(--s4);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--s4), #000 calc(100% - var(--s6)), transparent 100%); }
.sport { flex: none; scroll-snap-align: center; min-height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 var(--s3);
  background: var(--panel); border: 2px solid var(--line); border-radius: 999px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.sport .e { font-size: 18px; line-height: 1; }
.sport[aria-pressed="true"] { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--on-accent); }
/* Rated chips: a gentle tint of right now's rating, like the day tiles, with the number beside the name. The chosen
   one gets a strong tint and a bold outline, so it stands out whatever its colour. */
.sport:is(.l0, .l1, .l2, .l3, .l4) { background: color-mix(in oklab, var(--lvl) 10%, var(--tint));
  border-color: color-mix(in oklab, var(--lvl) 28%, var(--tint-line)); }
.sport:is(.l0, .l1, .l2, .l3, .l4)[aria-pressed="true"] { background: var(--lvl); border-color: var(--lvl); color: var(--on-lvl);
  font-weight: 800; }
/* The chosen chip: a ring with a slow glow breathing in its own colour. Still (but still glowing) for people who
   turn motion off. */
.sport[aria-pressed="true"] { --glow: var(--lvl, var(--accent-ink));
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text), 0 0 10px 3px color-mix(in srgb, var(--glow) 60%, transparent);
  animation: chip-glow 2.4s ease-in-out infinite; }
@keyframes chip-glow {
  0%, 100% { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text), 0 0 5px 1px color-mix(in srgb, var(--glow) 40%, transparent); }
  50% { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text), 0 0 14px 4px color-mix(in srgb, var(--glow) 80%, transparent); }
}
.sport[aria-pressed="true"] .sc { background: color-mix(in srgb, var(--on-lvl) 18%, transparent); }
.sport .sc { font-size: 13px; font-weight: 800; line-height: 1; padding: 3px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--lvl, var(--line)) 30%, transparent); }
/* Always one line tall, so switching sports never moves the page. */
.sport-sub { margin: var(--s1) 0 0; color: var(--dim); font-size: 14px; line-height: 1.5; min-height: 1.5em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Hero */
/* Tinted with the rating like the day tiles. The gauge and words sit centred as one block; the words' column keeps
   a set width so the gauge doesn't shift when the verdict changes length. The tube runs the full height of the words
   and the share button (Cyrus 2026-09-29). */
.hero { --hero-bg: var(--panel); background: var(--hero-bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s5) var(--s4); display: grid; grid-template-columns: auto minmax(0, 15em); justify-content: center;
  gap: var(--s4); align-items: center; }
.hero:is(.l0, .l1, .l2, .l3, .l4) { --hero-bg: color-mix(in oklab, var(--lvl) 16%, var(--tint));
  border-color: color-mix(in oklab, var(--lvl) 40%, var(--tint-line)); }
/* Vertical gauge: a rounded tube filled from the bottom in the rating colour, faint marks every 1/10, and the
   number beside it (the number carries the rating for colour-blind readers). */
.meter { display: flex; align-items: center; gap: var(--s3); align-self: stretch; }
.tube { position: relative; width: 24px; align-self: stretch; min-height: 120px; border-radius: 12px; overflow: hidden;
  background: color-mix(in oklab, var(--text) 10%, transparent); border: 1px solid color-mix(in oklab, var(--text) 18%, transparent); }
.tube .fill { --pct: 0; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--pct) * 1%); background: var(--lvl, var(--lvl-none)); }
.tube::after { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(to top, transparent 0 calc(10% - 1px), rgb(0 0 0 / 0.28) calc(10% - 1px) 10%); }
.meter .num { text-align: center; min-width: 1.15em; }   /* room for "10", so the words don't shift */
.meter .n { font-size: 48px; font-weight: 800; line-height: 1; }
.meter .of { font-size: 13px; color: var(--dim); }
.when { color: var(--dim); font-size: 14px; }
.verdict { font-size: clamp(22px, 6vw, 30px); font-weight: 800; line-height: 1.15; margin: 2px 0 var(--s1); }
.sub { color: var(--dim); }
.cap { margin-top: var(--s2); font-size: 14px; }
/* Share + back: a row under the words. */
.acts { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.acts:empty { display: none; }
.share { min-height: 44px; padding: 0 var(--s4); border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: color-mix(in oklab, var(--lvl, var(--line)) 22%, var(--tint)); font-weight: 600;
  border: 1px solid color-mix(in oklab, var(--lvl, var(--line)) 55%, var(--tint-line)); }
.share:hover { background: color-mix(in oklab, var(--lvl, var(--line)) 32%, var(--tint)); }
.share svg { flex: none; }
@media (max-width: 400px) { .share { padding: 0 var(--s3); font-size: 15px; } }   /* fits the words' column on small phones */
.back { margin-top: 0; min-height: 44px; padding: 0 var(--s4); border-radius: 999px; background: transparent;
  border: 1px solid var(--line); }

.best { margin: var(--s3) 0 var(--s5); padding: var(--s3) var(--s4); background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-s); display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.best b { font-weight: 700; }

h2 { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); margin: 0 0 var(--s2); font-weight: 700; }

/* 5-day strip */
.strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s2); margin-bottom: var(--s5); }
.day { min-height: 116px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius-s);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: var(--s2) 2px; text-align: center; }
.day[aria-pressed="true"] { border-color: var(--accent); background: var(--panel-2); }
/* Each day is tinted with its rating colour (Cyrus 2026-09-29); the number, word and bar still carry the rating
   for colour-blind readers. Browsers without color-mix() keep the plain panel. Tints mix in OKLab with --tint. */
.day:is(.l0, .l1, .l2, .l3, .l4) { background: color-mix(in oklab, var(--lvl) 16%, var(--tint));
  border-color: color-mix(in oklab, var(--lvl) 40%, var(--tint-line)); }
.day:is(.l0, .l1, .l2, .l3, .l4)[aria-pressed="true"] { background: color-mix(in oklab, var(--lvl) 26%, var(--tint)); border-color: var(--accent); }
.day .d { font-size: 13px; font-weight: 700; }
.day .sk { font-size: 20px; line-height: 1.2; }
.day .n { font-size: 24px; font-weight: 800; line-height: 1; }
.day .w { font-size: 11px; color: var(--dim); line-height: 1.2; }
.day .bar { width: 70%; height: 4px; border-radius: 2px; background: var(--ring, var(--lvl-none)); }

/* Factor cards */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s2); margin-bottom: var(--s4); }
.card { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--lvl, var(--lvl-none));
  border-radius: var(--radius-s); padding: var(--s3); min-height: 96px; text-align: center; }
.card .h { font-size: 13px; color: var(--dim); font-weight: 600; }
.card .v { font-size: 26px; font-weight: 800; line-height: 1.2; color: var(--lvl, var(--text)); }
.card .v small { font-size: 14px; font-weight: 600; color: var(--dim); margin-left: 2px; }
.card .b { font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lvl, var(--lvl-none)); flex: none; }
.card.info { border-left-color: var(--line); }
.card.info .v { color: var(--text); }
.card .v.txt { font-size: 20px; line-height: 1.5; }
.card.pick { display: block; width: 100%; font: inherit; color: var(--text); }
.card.pick > span { display: block; }
.card.pick .link { color: var(--accent-ink); text-decoration: underline; }

/* Beach direction picker: a compass rose, Auto in the middle */
.faces { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-s); padding: var(--s3) var(--s4);
  margin-bottom: var(--s4); text-align: center; }
.faces .q { margin: 0 0 var(--s2); font-weight: 600; }
.rose { display: grid; grid-template-columns: repeat(3, 64px); gap: var(--s2); justify-content: center; }
.rose button { min-height: 44px; border-radius: var(--radius-s); background: var(--panel-2); border: 2px solid var(--line); font-weight: 700; }
.rose button[aria-pressed="true"] { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--on-accent); }
.rose .auto { font-size: 14px; }
.faces .hint { margin: var(--s2) 0 0; color: var(--dim); font-size: 14px; }

.l0 { --lvl: var(--lvl-0); --ring: var(--lvl-0); } .l1 { --lvl: var(--lvl-1); --ring: var(--lvl-1); }
.l2 { --lvl: var(--lvl-2); --ring: var(--lvl-2); } .l3 { --lvl: var(--lvl-3); --ring: var(--lvl-3); }
.l4 { --lvl: var(--lvl-4); --ring: var(--lvl-4); }
.lc { color: var(--lvl); }

.note { color: var(--dim); font-size: 14px; margin: 0 0 var(--s4); text-align: center; }
.foot { margin-top: var(--s3); color: var(--dim); font-size: 13px; }   /* no rule above it, sits close under About (Cyrus 2026-09-29) */
.foot a { color: inherit; }
.foot > p:first-child { text-align: center; margin-top: 0; }   /* the disclaimer, centred like the line under it (Cyrus 2026-09-29) */

/* Each page's own text (tools/build.mjs): a heading, one closed section, a link to About. Real, visible text;
   the section is closed only to keep the page short. */
.seo { margin-top: var(--s6); }
.seo h1 { font-size: 16px; font-weight: inherit; line-height: 1.35; margin: 0; }   /* the page heading, as the section's title */
.acc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-s); }
.acc summary { min-height: 44px; padding: var(--s3) var(--s4); display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3); cursor: pointer; font-weight: 600; list-style: none; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; flex: none; font-size: 22px; line-height: 1; color: var(--dim); }
.acc[open] summary::after { content: "\2212"; }
.acc-body { padding: 0 var(--s4) var(--s4); color: var(--dim); font-size: 15px; line-height: 1.6; }
.acc-body p, .acc-body ol { margin: 0 0 var(--s3); }
.acc-body ol { padding-left: var(--s5); }
.seo h2, .doc h2 { font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--text); margin: var(--s4) 0 var(--s2); }
.seo h3 { font-size: 15px; color: var(--text); margin: var(--s3) 0 var(--s1); }
.more { margin: var(--s4) 0 0; font-size: 14px; color: var(--dim); }
.more p { margin: 0 0 var(--s2); }
.more ul, .doc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.more a, .doc ul a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s3); border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.more a[aria-current="page"] { border-color: var(--accent-ink); }
p.more { text-align: center; }
p.more a { display: inline; min-height: 0; padding: 0; border: 0; background: none; color: var(--accent-ink); text-decoration: underline; }
.acc-body a, .doc p a { color: var(--accent-ink); }

/* Static pages (About) */
.doc { max-width: 720px; margin: 0 auto; padding: max(var(--s4), env(safe-area-inset-top)) var(--s4) var(--s6); line-height: 1.6; }
.doc h1 { font-size: 28px; margin: var(--s5) 0 var(--s3); }
.doc p { color: var(--dim); margin: 0 0 var(--s3); }
.doc .logo { color: var(--text); text-decoration: none; }
.doc .foot a { color: inherit; }

/* c9apps.com footer line. The patent note sits above the whole line (not the badge) so it never pokes off a phone screen. */
.sig { position: relative; text-align: center; font-size: 13px; line-height: 1.75; color: var(--dim); margin: var(--s4) 0 0; }
.sig a { color: var(--dim); text-decoration: none; border-bottom: 1px solid var(--line); }
.sig .half { white-space: nowrap; }
.sig.split .half { display: block; }
.sig.split .half + .sep + .half { margin-top: var(--s1); }
.sig.split .sep { display: none; }
.sig a:hover { color: var(--accent-ink); border-bottom-color: var(--accent-ink); }
.ip { color: var(--accent-ink); border-bottom: 1px dotted var(--accent-ink); cursor: help; white-space: nowrap; font-weight: 600; }
.ip-tip { visibility: hidden; opacity: 0; position: absolute; bottom: calc(100% + 8px); inset-inline: 0; margin-inline: auto;
  width: max-content; max-width: min(360px, 100%); padding: 14px 16px 12px; text-align: left; white-space: normal;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  font-size: 12.5px; font-weight: 400; line-height: 1.6; box-shadow: 0 14px 38px rgb(0 0 0 / 0.45); z-index: 30;
  transition: opacity 0.18s ease, visibility 0.18s ease; }
.ip-tip strong { display: block; margin-bottom: var(--s2); font-size: 13px; color: var(--accent-ink); font-weight: 700; }
.ip-tip b { font-weight: 700; }
.ip-tip small { display: block; margin-top: var(--s2); font-size: 11px; color: var(--dim); }
.ip:hover .ip-tip, .ip:focus .ip-tip { visibility: visible; opacity: 1; }

/* Welcome + place picker */
.welcome { text-align: center; }
.welcome .big { width: 96px; height: 96px; }
.welcome h1 { font-size: clamp(30px, 9vw, 44px); line-height: 1.1; margin: var(--s4) 0 var(--s2); }
.welcome p { color: var(--dim); max-width: 440px; margin: 0 auto var(--s5); }
.picker { text-align: left; max-width: 480px; margin: 0 auto; }
.primary { width: 100%; min-height: 52px; border-radius: 999px; border: 0; background: var(--accent-ink); color: var(--on-accent);
  font-weight: 700; font-size: 17px; }
.field { margin-top: var(--s4); }
.field label { display: block; font-size: 14px; color: var(--dim); margin-bottom: var(--s1); }
.field input { width: 100%; min-height: 48px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--panel);
  padding: 0 var(--s3); font-size: 16px; }
.results { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.results li + li { margin-top: var(--s1); }
.place { width: 100%; min-height: 52px; text-align: left; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: var(--s2) var(--s3); display: flex; flex-direction: column; justify-content: center; }
.place small { color: var(--dim); }
.saved-row { display: flex; gap: var(--s2); }
.saved-row .place { flex: 1; }
.msg { color: var(--dim); font-size: 14px; margin-top: var(--s2); }
.credit { margin: var(--s5) 0 0; text-align: center; font-size: 12px; }
.credit a { color: var(--dim); }

.sheet-wrap { position: fixed; inset: 0; background: rgb(0 0 0 / 0.55); display: flex; align-items: flex-end; justify-content: center; z-index: 20;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* First visit: the app sits blurred and shaded behind a glass "pick your spot" window. */
body.gated { overflow: hidden; }
.app.preview { filter: blur(6px); user-select: none; }
.gate { position: fixed; inset: 0; z-index: 25; overflow-y: auto; display: flex; flex-direction: column; align-items: center;
  padding: max(var(--s5), env(safe-area-inset-top)) var(--s4) max(var(--s4), env(safe-area-inset-bottom));
  background: var(--scrim); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.gate-card { width: 100%; max-width: 480px; margin: auto 0 0; padding: var(--s5) var(--s4) var(--s4);
  background: var(--bg); background: color-mix(in srgb, var(--bg) 94%, transparent); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.5); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.gate-card:focus { outline: none; }
.gate-card .big { width: 72px; height: 72px; }
.gate-card h1 { margin-top: var(--s2); }
.gate-card > p { margin-bottom: var(--s4); }
.gate-foot { width: 100%; max-width: 480px; margin: var(--s3) 0 auto; border-top: 0; padding-top: 0; }
.sheet { width: 100%; max-width: 560px; max-height: 88dvh; overflow: auto; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0; padding: var(--s4) var(--s4) max(var(--s5), env(safe-area-inset-bottom)); }
.sheet .bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s2); }
.sheet h2 { margin: 0; }

/* Loading skeleton */
.skel { background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--radius-s); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skel.hero-s { height: 160px; border-radius: var(--radius); margin-bottom: var(--s5); }
.skel.card-s { height: 96px; }
.error { background: var(--panel); border: 1px solid var(--lvl-4); border-radius: var(--radius); padding: var(--s4); }
.error button { margin-top: var(--s3); }

@media (min-width: 560px) {
  .sports { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; mask-image: none; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .tube { width: 28px; min-height: 140px; border-radius: 14px; } .meter .n { font-size: 58px; }
  .sheet-wrap { align-items: center; } .sheet { border-radius: var(--radius); }
}
@media (prefers-reduced-motion: reduce) { .skel, .sport[aria-pressed="true"] { animation: none; } .ip-tip { transition: none; } .refresh.spin span { animation: none; opacity: 0.5; } }
