/* Base of every sport app (bin/new-sport). Shared scale from the sport kit's base.json
   (breakfinder-design kits/sport-kit/template/kit.css); colours and fonts come from
   tokens.css, which is generated from the sport's token file. Product look goes into
   application.css. */

:root {
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --fs-xs: 11px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 28px; --fs-3xl: clamp(28px, 5vw, 44px);
  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 20px; --radius-pill: 999px;
  --ease: cubic-bezier(.2, .7, .2, 1); --dur: 180ms;
  --shadow: 0 1px 2px rgba(20, 25, 30, .06), 0 8px 24px rgba(20, 25, 30, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: var(--fs-md)/1.5 var(--f-ui); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column; }
img, svg { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--f-display); font-weight: var(--fw-heading); line-height: 1.1; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-weight: var(--fw-numeral); }
.wordmark { font-family: var(--f-display); font-weight: var(--fw-heading); letter-spacing: -.01em; }
.hand { font-family: var(--f-hand); font-weight: 700; }
.eyebrow { font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0; }
.muted { color: var(--muted); }
.note { font-size: var(--fs-sm); color: var(--muted); max-width: 70ch; }
.skip-link { position: absolute; left: -999px; top: 8px; }
.skip-link:focus { left: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-sm); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Frame */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; flex-wrap: wrap; gap: 8px 16px;
  align-items: center; justify-content: space-between; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line2); }
.site-header .wordmark { font-size: 24px; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: var(--fs-sm); }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.site-nav form { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; }
.site-footer { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 18px 16px;
  border-top: 1px solid var(--line2); font-size: var(--fs-sm); color: var(--muted); }
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-8); }
.page-title { font-size: var(--fs-3xl); margin: var(--space-2) 0; }
.lede { color: var(--muted); max-width: 64ch; margin: 0 0 var(--space-5); font-size: var(--fs-lg); }
.heading-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: var(--space-4) 0; }
.flash { max-width: 1180px; margin: 12px auto 0; padding: 10px 14px; border-radius: var(--radius-md); border: 1.5px solid var(--line2); background: var(--surface); width: calc(100% - 32px); }
.flash-alert { border-color: var(--event); }

/* Building blocks */
.card { background: var(--surface); border: 1px solid var(--line2); border-radius: var(--radius-md); padding: var(--space-4); box-shadow: var(--shadow); min-width: 0; }
.card h2, .card h3 { margin: 4px 0 8px; font-size: var(--fs-lg); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius-pill); padding: 10px 18px;
  font: 600 var(--fs-md)/1 var(--f-ui); border: 1.5px solid var(--line); background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; }
.btn.small { padding: 6px 12px; font-size: var(--fs-sm); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.event { background: var(--event); color: var(--on-event); border-color: var(--event); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line2);
  font: inherit; font-size: 12px; background: var(--surface); color: var(--ink); white-space: nowrap; text-decoration: none; }
.chip[aria-pressed="true"], .chip[aria-current] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.scroll-x { overflow-x: auto; max-width: 100%; position: relative; }
.grid2 { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid3 { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
table.log { width: 100%; border-collapse: collapse; font-size: 14px; }
table.log th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px; border-bottom: 1.5px solid var(--line); }
table.log td { padding: 10px 8px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.facts { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: var(--space-4) 0; }
.facts dt { font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: var(--fs-lg); }

/* Privacy marker: lock + label, used wherever a place would otherwise show */
.priv { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--private, var(--muted)); font-weight: 600; white-space: nowrap; }
.priv::before { content: ""; width: 10px; height: 11px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 11'%3E%3Cpath d='M2 5V3.5a3 3 0 0 1 6 0V5h.5A1.5 1.5 0 0 1 10 6.5v3A1.5 1.5 0 0 1 8.5 11h-7A1.5 1.5 0 0 1 0 9.5v-3A1.5 1.5 0 0 1 1.5 5zm1.5 0h3V3.5a1.5 1.5 0 0 0-3 0z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 11'%3E%3Cpath d='M2 5V3.5a3 3 0 0 1 6 0V5h.5A1.5 1.5 0 0 1 10 6.5v3A1.5 1.5 0 0 1 8.5 11h-7A1.5 1.5 0 0 1 0 9.5v-3A1.5 1.5 0 0 1 1.5 5zm1.5 0h3V3.5a1.5 1.5 0 0 0-3 0z'/%3E%3C/svg%3E") center / contain no-repeat; }
.priv-banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: var(--space-4) 0; border-radius: var(--radius-md);
  border: 1.5px dashed var(--line2); background: var(--sunk); font-size: 13px; color: var(--ink); }
.priv-banner .priv { margin-top: 2px; }

/* Forms */
.auth { max-width: 460px; margin: var(--space-5) auto; }
.form { display: grid; gap: var(--space-3); }
.field { display: grid; gap: 4px; }
.field label { font-weight: 600; font-size: var(--fs-sm); }
.field.checkbox { display: flex; gap: 8px; align-items: center; }
input[type="email"], input[type="password"], input[type="text"], input[type="number"], input[type="search"], select, textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line2); border-radius: var(--radius-sm); padding: 9px 10px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.form-errors { border: 1.5px solid var(--event); border-radius: var(--radius-md); padding: 10px 14px; background: var(--surface); }
.auth-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: var(--space-4); font-size: var(--fs-sm); }
.danger-zone { max-width: 460px; margin: var(--space-5) auto; }

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