/* Perth Poker Hub — styles for the generated pages (venues, operators, days,
   areas, tonight, this week, guides) and share.html. Colours and type match
   the homepage; the pages are built by .github/schedule-sync/build-pages.mjs. */
:root {
  color-scheme: dark;
  --bg: #0e0e14; --bg-soft: #16161f; --bg-card: #1c1c28;
  --ink: #f0e9d6; --ink-soft: #b9b1a0; --ink-mute: #8d8a78;
  --gold: #d4a017; --gold-soft: #e8d5a3; --line: #2a2a38;
  --header-bg: rgba(14, 14, 20, 0.9);
  --cash: #2e9e5b; --tour: #d4a017; --free: #4d8fd6;
  --display: 'Bebas Neue', 'Impact', sans-serif;
  --sans: 'Manrope', system-ui, sans-serif;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #e8dfc8; --bg-soft: #ddd2b7; --bg-card: #f0e8d3;
  --ink: #1f1f2c; --ink-soft: #3a3a48; --ink-mute: #5a5448;
  --gold: #8b6914; --gold-soft: #a87a09; --line: #c4b99c;
  --header-bg: rgba(232, 223, 200, 0.94);
  --cash: #1f7a43; --tour: #8b6914; --free: #2a65a8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); background: var(--bg); color: var(--ink);
  font-size: 15px; line-height: 1.6; min-height: 100vh; overflow-x: hidden;
  background-image: radial-gradient(circle at 20% 0%, rgba(212,160,23,0.06), rgba(0,0,0,0) 45%);
  background-repeat: no-repeat;
}
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-soft); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; padding: 12px 0; border-bottom: 1px solid var(--line); background: var(--header-bg); backdrop-filter: blur(10px); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark img { width: 36px; height: 36px; display: block; object-fit: contain; }
.brand-name { font-family: var(--display); font-size: 22px; letter-spacing: 2px; text-transform: uppercase; line-height: 1; }
.brand-name span { color: var(--gold); }
.nav-links { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; padding: 6px 0; }
.nav-links a:hover { color: var(--gold); }

/* Page head */
main { padding: 22px 0 56px; }
.crumbs { font-size: 12px; color: var(--ink-mute); margin-bottom: 14px; }
.crumbs a { color: var(--ink-mute); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 7vw, 54px); letter-spacing: 1.5px; text-transform: uppercase; line-height: 1; margin-bottom: 12px; text-wrap: balance; }
.lede { color: var(--ink-soft); font-size: 16px; margin-bottom: 18px; max-width: 62ch; }
.lede .addr { display: block; margin-top: 6px; color: var(--ink-mute); font-size: 14px; }
.stale-note { margin: 0 0 18px; padding: 10px 14px; border-left: 3px solid var(--gold); background: rgba(212,160,23,0.08); border-radius: 0 6px 6px 0; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 999px; background: var(--gold); color: #14141c; font-weight: 700; font-size: 13px; letter-spacing: 0.4px; text-decoration: none; border: 1px solid var(--gold); }
.btn:hover { color: #14141c; opacity: 0.9; }
.btn-ghost { background: transparent; color: var(--gold); }
.btn-ghost:hover { color: var(--gold-soft); border-color: var(--gold-soft); }

/* Blocks */
.block { margin: 30px 0 0; scroll-margin-top: 80px; }
.block > h2, .signup h2, .browse > h2 { font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: 1.2px; text-transform: uppercase; line-height: 1.1; margin-bottom: 12px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.block > h2 a { color: var(--ink); text-decoration: none; }
.block > h2 a:hover { color: var(--gold); }
.count { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.4px; text-transform: none; color: var(--ink-mute); }
.today-pill { font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #14141c; background: var(--gold); padding: 3px 8px; border-radius: 999px; align-self: center; }
.empty { color: var(--ink-soft); padding: 16px; border: 1px dashed var(--line); border-radius: 10px; }

/* Event list */
.ev-list { list-style: none; display: grid; gap: 10px; }
.ev { background: var(--bg-card); border: 1px solid var(--line); border-left: 3px solid var(--tour); border-radius: 10px; padding: 14px 16px; }
.ev-cash { border-left-color: var(--cash); }
.ev-free { border-left-color: var(--free); }
.ev-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 14px; flex-wrap: wrap; }
.ev-name { font-size: 16px; font-weight: 700; line-height: 1.3; }
.ev-time { font-size: 13px; font-weight: 700; color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-time a { color: inherit; }
.ev-late { font-weight: 600; color: var(--ink-mute, #8d8a78); }
.ev-venue { font-size: 13px; margin-top: 3px; color: var(--ink-mute); }
.ev-venue a { font-weight: 600; text-decoration: none; }
.ev-venue a:hover { text-decoration: underline; }
.ev-sub { color: var(--ink-mute); }
.ev-facts { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }
.ev-facts b { color: var(--ink); margin-right: 8px; }
.ev-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); }
.tag-cash { color: var(--cash); border-color: var(--cash); }
.tag-tournament { color: var(--tour); border-color: var(--tour); }
.tag-free { color: var(--free); border-color: var(--free); }
.ev-when { margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
.ev-cad { font-weight: 600; }
.ev-skip, .ev-next { color: var(--ink-mute); }
.ev-skip::before, .ev-next::before { content: '· '; }
.ev-meta { margin-top: 8px; font-size: 13px; line-height: 1.55; color: var(--ink-mute); }
.ev-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
.ev-act { font-size: 13px; font-weight: 600; }

/* Link lists */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; min-height: 36px; background: var(--bg-soft); font-size: 13px; }
.chips a { text-decoration: none; font-weight: 600; }
.chips span { color: var(--ink-mute); font-size: 12px; }
.rows { list-style: none; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; flex-wrap: wrap; padding: 12px 14px; background: var(--bg-card); border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows a { font-weight: 600; text-decoration: none; }
.rows a:hover { text-decoration: underline; }
.rows span { color: var(--ink-mute); font-size: 13px; }
.block > p { margin-top: 12px; color: var(--ink-soft); }

/* Facts, tables, prose */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 6px; }
.facts div { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.facts dt { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-mute); }
.facts dd { font-size: 15px; font-weight: 600; margin-top: 2px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.cmp { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 13px; background: var(--bg-card); }
.cmp th, .cmp td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.cmp thead th { border-top: 0; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-mute); background: var(--bg-soft); }
.cmp tbody th { font-weight: 700; white-space: nowrap; }
.cmp td { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.fine { font-size: 12px; color: var(--ink-mute); margin-top: 10px; }
.prose p, .prose li, .prose dd { color: var(--ink-soft); font-size: 15px; line-height: 1.7; max-width: 68ch; }
.prose p + p { margin-top: 12px; }
.prose ul, .prose ol { margin: 4px 0 0 20px; display: grid; gap: 6px; }
.prose b { color: var(--ink); }
.gloss dt { font-weight: 700; color: var(--ink); margin-top: 14px; }
.gloss dt:first-child { margin-top: 0; }

/* Signup */
.signup { margin-top: 44px; padding: 22px 20px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, rgba(212,160,23,0.07), var(--bg-card) 70%); }
.signup p { color: var(--ink-soft); font-size: 14px; max-width: 60ch; }
.signup-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.signup-form[hidden] { display: none; }
.signup-form input[type="email"] { flex: 1 1 220px; min-height: 46px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; }
.signup-form input[type="email"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.signup-form button { min-height: 46px; padding: 0 18px; border-radius: 8px; border: 0; background: var(--gold); color: #14141c; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.signup-form button:disabled { opacity: 0.6; cursor: default; }
.signup-hp { position: absolute; left: -9999px; }
.signup-note { margin-top: 10px; font-weight: 600; color: var(--ink) !important; }
.signup-note:empty { display: none; }
.signup-fine { margin-top: 10px; font-size: 12px !important; color: var(--ink-mute) !important; }

/* Browse + footer */
.browse { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); }
.browse-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px 28px; }
.browse h3 { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 10px; }
.browse .chips + h3 { margin-top: 18px; }
.site-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-mute); font-size: 12px; line-height: 1.6; }
.site-foot p { margin-bottom: 10px; max-width: 80ch; }
.foot-links { font-size: 13px; }
.foot-rg { font-weight: 700; color: var(--ink-soft); }

/* Consent gate — same wording and behaviour as the homepage */
.consent-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(8, 8, 12, 0.94); backdrop-filter: blur(6px); }
.consent-overlay[hidden] { display: none; }
.consent-card { max-width: 460px; width: 100%; text-align: center; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 32px 26px; }
.consent-logo { width: 72px; height: 72px; object-fit: contain; margin-bottom: 16px; }
.consent-card h2 { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 12px; }
.consent-card p { color: var(--ink-soft); font-size: 14px; }
.consent-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.consent-btn { min-height: 44px; padding: 12px 26px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; }
.consent-btn.primary { background: var(--gold); color: #14141c; border: 1px solid var(--gold); }
.consent-btn.secondary { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.consent-fineprint { margin-top: 16px; font-size: 11px; color: var(--ink-mute); }

@media (max-width: 560px) {
  .wrap { padding: 0 14px; }
  .brand-name { font-size: 19px; }
  .nav-links { gap: 2px 14px; }
  .nav-links a { font-size: 11px; letter-spacing: 0.8px; }
  .block > h2, .signup h2, .browse > h2 { font-size: 23px; }
  .signup-form button { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: no-preference) { a, .btn { transition: color 0.15s ease, opacity 0.15s ease, border-color 0.15s ease; } }
