/* The foxyhole look: the site header, buttons, fields, cards, badges, the account button and menu, and the sign-in
   dialog. Colours come from the page's tokens (--bg, --surface, --surface-2, --border, --text, --text-muted, --accent,
   --accent-rgb, --good, --critical, --shadow): foxyhole.com loads foxyhole-tokens.css first, a sport site its own app.css.
   The few tokens only this file uses have zero-specificity defaults below, so any page can override them.
   Fonts: Big Shoulders Display (headings), IBM Plex Sans (text), IBM Plex Mono (numbers), from Google Fonts. */
:where(:root) {
  --shadow-lg: 0 12px 40px rgba(23,23,26,.18);
  --site-blueline: #2a78d6; --site-baseline: #e0662a; --site-bettracker: #1f9a63; --site-gridline: #7a7f8c; --site-jarvis: #7457d4;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) {
    --shadow-lg: 0 16px 48px rgba(0,0,0,.55);
    --site-blueline: #3d8ce8; --site-baseline: #f07a3a; --site-bettracker: #34b77a; --site-gridline: #8b909c; --site-jarvis: #9a83f0;
  }
}
:where(:root[data-theme="dark"]) {
  --shadow-lg: 0 16px 48px rgba(0,0,0,.55);
  --site-blueline: #3d8ce8; --site-baseline: #f07a3a; --site-bettracker: #34b77a; --site-gridline: #8b909c; --site-jarvis: #9a83f0;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body.fx {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 "IBM Plex Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.fx [hidden] { display: none !important; }
.fx h1, .fx h2, .fx h3 { font-family: "Big Shoulders Display", system-ui, sans-serif; font-weight: 800; letter-spacing: .01em; margin: 0; line-height: 1.1; text-wrap: balance; }
.fx a { color: var(--accent); }
.fx .mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.fx .muted { color: var(--text-muted); }
.fx-wrap { max-width: 1080px; margin: 0 auto; padding-inline: 16px; }
.fx :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- site header ---------------------------------------------------------------------------- */
.fx-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.fx-header .fx-wrap { max-width: 1440px; padding-inline: 20px; display: flex; align-items: center; gap: 12px; height: 60px; }
@media (max-width: 640px) { .fx-header .fx-wrap { padding-inline: 16px; } }
.fx-brand { display: flex; align-items: center; gap: 10px; color: var(--text) !important; text-decoration: none; flex: none; }
.fx-brand img { width: 34px; height: 34px; object-fit: contain; }
.fx-brand span { font: 800 24px/1 "Big Shoulders Display", system-ui, sans-serif; letter-spacing: .01em; }
.fx-nav { display: flex; gap: 2px; margin-left: 12px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.fx-nav::-webkit-scrollbar { display: none; }
.fx-nav a {
  color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 7px 11px; border-radius: 8px; white-space: nowrap;
}
.fx-nav a:hover { color: var(--text); background: var(--surface-2); }
.fx-nav a[aria-current="page"] { color: var(--text); }
.fx-spacer { flex: 1; }
@media (max-width: 640px) {
  .fx-nav { display: none; }
  .fx-brand span { font-size: 22px; }
}

/* --- buttons and fields --------------------------------------------------------------------- */
.fx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 14px/1 "IBM Plex Sans", system-ui, sans-serif; text-decoration: none; white-space: nowrap;
  height: 38px; padding: 0 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text) !important;
  transition: border-color .12s, background .12s, color .12s;
}
.fx-btn:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }
.fx-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff !important; }
.fx-btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.fx-btn.ghost { background: transparent; border-color: transparent; }
.fx-btn.ghost:hover { background: var(--surface-2); }
.fx-btn.block { width: 100%; height: 42px; }
.fx-btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.fx-btn:disabled { opacity: .55; cursor: not-allowed; }
.fx-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.fx-field { display: grid; gap: 5px; }
.fx-field > span { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.fx input:not([type="checkbox"]):not([type="radio"]), .fx-dialog input, .fx-notice input {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; height: 40px; padding: 0 12px; min-width: 0; width: 100%;
}
.fx input:focus, .fx-dialog input:focus, .fx-notice input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18); }
.fx-msg { font-size: 13.5px; min-height: 1.3em; }
.fx-msg.err { color: var(--critical); }
.fx-msg.ok { color: var(--good); }

/* --- cards and badges ----------------------------------------------------------------------- */
.fx-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.fx-badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap;
}
.fx-badge.accent { border-color: var(--accent); color: var(--accent); }
.fx-badge[data-site] { --c: var(--text-muted); color: var(--c); border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); }
.fx-badge[data-site="blueline"] { --c: var(--site-blueline); }
.fx-badge[data-site="baseline"] { --c: var(--site-baseline); }
.fx-badge[data-site="bettracker"] { --c: var(--site-bettracker); }
.fx-badge[data-site="jarvis"] { --c: var(--site-jarvis); }

/* --- account button and menu ---------------------------------------------------------------- */
.fx-account { position: relative; display: flex; align-items: center; gap: 6px; flex: none; }
.fx-avatar-btn {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 4px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 14px/1 "IBM Plex Sans", system-ui, sans-serif;
}
.fx-avatar-btn:hover, .fx-avatar-btn[aria-expanded="true"] { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }
.fx-avatar {
  position: relative; width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font: 800 15px/1 "Big Shoulders Display", system-ui, sans-serif;
  background: linear-gradient(150deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7a1f00));
}
.fx-avatar.lg { width: 40px; height: 40px; font-size: 19px; }
.fx-dot { position: absolute; top: -1px; right: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--critical); border: 2px solid var(--surface); }
.fx-caret { color: var(--text-muted); font-size: 11px; }
@media (max-width: 480px) { .fx-avatar-btn .fx-uname { display: none; } }
.fx-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 270px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 6px;
}
.fx-menu-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.fx-menu-head strong { display: block; font-size: 15px; }
.fx-menu-head small { color: var(--text-muted); font-size: 12.5px; }
.fx-menu a, .fx-menu button.fx-mi {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px;
  font: 500 14px/1.2 "IBM Plex Sans", system-ui, sans-serif; color: var(--text); text-decoration: none;
  background: none; border: 0; cursor: pointer; text-align: left;
}
.fx-menu a:hover, .fx-menu button.fx-mi:hover, .fx-menu a:focus-visible, .fx-menu button.fx-mi:focus-visible { background: var(--surface-2); outline: none; }
.fx-menu .fx-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.fx-menu .fx-mi-warn { color: var(--critical); font-weight: 600; }
.fx-menu .fx-mi-ext { margin-left: auto; color: var(--text-muted); font-size: 12px; }

/* --- sign-in / sign-up dialog --------------------------------------------------------------- */
.fx-dialog {
  width: min(400px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 18px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
.fx-dialog::backdrop { background: rgba(10,10,12,.5); backdrop-filter: blur(2px); }
.fx-dialog form { display: grid; gap: 14px; padding: 24px; }
.fx-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fx-dialog-head h2 { font-size: 28px; }
.fx-dialog-head p { margin: 4px 0 0; color: var(--text-muted); font-size: 14px; }
.fx-x { flex: none; width: 32px; height: 32px; border-radius: 8px; border: 0; background: var(--surface-2); color: var(--text-muted); font-size: 16px; cursor: pointer; }
.fx-x:hover { color: var(--text); }
.fx-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 11px; background: var(--surface-2); }
.fx-seg button { height: 32px; border: 0; border-radius: 8px; background: none; color: var(--text-muted); font: 600 14px/1 "IBM Plex Sans", system-ui, sans-serif; cursor: pointer; }
.fx-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.fx-dialog .fx-foot { font-size: 13px; color: var(--text-muted); text-align: center; }

/* --- notices -------------------------------------------------------------------------------- */
.fx-notice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border)); background: rgba(var(--accent-rgb), .08);
}
.fx-notice > span { flex: 1 1 240px; }
.fx-notice form { display: flex; gap: 8px; flex: 1 1 320px; }

/* --- footer --------------------------------------------------------------------------------- */
.fx-footer { border-top: 1px solid var(--border); margin-top: 64px; padding-block: 24px 40px; color: var(--text-muted); font-size: 13px; }
.fx-footer .fx-wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.fx-footer a { color: var(--text-muted); }

/* --- on any page (the sport sites don't all have a global [hidden] rule) ---------------------- */
.fx-dialog [hidden], .fx-account [hidden], .fx-menu [hidden] { display: none !important; }
.fx-menu a[aria-current="page"] { font-weight: 600; }
/* Phones: the account corner stays one small button so the top bar keeps to one row; the dialog has Create account. */
@media (max-width: 480px) {
  .fx-account [data-acct="sign-up"] { display: none; }
  .fx-account [data-acct="sign-in"] { border-color: var(--border); background: var(--surface); height: 34px; padding: 0 12px; }
}
