/* Linewatch — Tesla-clean, full-bleed, mobile-first */
:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #f4f4f4;
  --muted: #8e8e8e;
  --line: #222;
  --accent: #cc9a2b;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --pad-x: clamp(1rem, 5vw, 3rem);
  --tap: 3rem;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  width: 100%;
  height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* logo pinned to top — never center the page */
  align-items: stretch;
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--muted); text-decoration: none; }
a:hover { color: var(--fg); }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

.top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
  padding: 1.75rem var(--pad-x) 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.brand {
  line-height: 0;
  opacity: 1;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0;
  margin: 0;
}
.brand img,
.brand svg.logo {
  width: clamp(280px, 70vw, 360px);
  height: auto;
  max-width: 92vw;
  display: block;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0;
  margin: 0 auto;
  /* Full LINEWATCH+NBA mark is the centered unit — no optical nudge */
  transform: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.top nav {
  position: absolute;
  right: var(--pad-x);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.top nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

main {
  /* Grow under top logo; keep pick+form as one unit, gently mid in the band */
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(0.75rem, 2vh, 1.25rem) var(--pad-x) 1rem;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.hero {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  padding: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.pick-date {
  /* Shrink-wrap + auto margins so letter-spacing can't skew a full-width box */
  display: block;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(0.75rem, 2.5vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  /* Trailing tracking space — indent matches so glyphs sit on true center */
  padding-left: 0.14em;
  padding-right: 0;
  box-sizing: content-box;
  text-align: center;
  text-transform: uppercase;
  color: var(--muted);
}
.pick-matchup {
  margin: 1rem 0 0;
  width: 100%;
  font-size: clamp(1rem, 3.5vw, 1.25rem);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding-left: 0.04em;
  box-sizing: border-box;
  text-align: center;
}
.pick-side {
  margin: 0.65rem 0 0;
  width: 100%;
  font-size: clamp(2.35rem, 11vw, 4.75rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  /* negative tracking pulls right edge in — tiny pad keeps optical center */
  padding-right: 0.045em;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.05;
  word-break: break-word;
}
.pick-reason {
  margin: 0.85rem auto 0;
  max-width: 26rem;
  padding: 0 0.25rem;
  font-size: clamp(0.95rem, 3.2vw, 1.1rem);
  font-weight: 400;
  line-height: 1.45;
  color: #aaa;
  text-align: center;
}

.join {
  margin: 1rem auto 0;
  width: 100%;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem;
}
.join input {
  width: 100%;
  min-height: var(--tap);
  height: var(--tap);
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #111;
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.join input::placeholder { color: #666; }
.join input:focus { border-color: #555; }

.btn {
  width: 100%;
  min-height: var(--tap);
  height: var(--tap);
  border: 0;
  border-radius: 4px;
  background: var(--fg);
  color: #000;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:hover { background: #e8e8e8; }
a.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.btn:active { transform: scale(0.99); }
.btn.is-waiting {
  background: #2a2a2a;
  color: #c8c8c8;
}
.btn.is-waiting:hover { background: #333; }
.join-price,
.join-note {
  margin: 0;
  text-align: center;
  color: #9a9a9a;
  font-size: 0.85rem;
  line-height: 1.4;
}

.foot {
  flex: 0 0 auto;
  margin-top: auto; /* pin to bottom so the mid band is usable */
  width: 100%;
  padding: 1rem var(--pad-x) 1.25rem;
  text-align: center;
  background: transparent;
  border: 0;
}
.foot p {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.4;
  color: #555;
  letter-spacing: 0.02em;
}

.toasts {
  list-style: none;
  margin: 0;
  padding: 0 var(--pad-x);
}
.toast {
  max-width: 26rem;
  margin: 0.5rem auto;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  background: #111;
  border: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
}
.toast.ok { border-color: #2a2a2a; color: var(--fg); }

.member {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1rem 0 4rem;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.member h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.kicker {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.sub {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  word-break: break-word;
}
.picks {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.picks li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.picks .row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.picks .game { word-break: break-word; }
.picks .side {
  margin-top: 0.5rem;
  font-size: clamp(1.1rem, 4vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.picks .meta {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.picks .reason {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: #aaa;
  line-height: 1.45;
}
.note {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: #555;
}

/* Phone: stack form; keep thumb-sized controls */
@media (max-width: 639px) {
  .join {
    max-width: 100%;
  }
  .btn {
    font-size: 1.05rem;
  }
}

/* Wider phones / tablets: email + button on one row when space allows */
@media (min-width: 640px) {
  .join {
    flex-direction: row;
    align-items: stretch;
  }
  .join input { flex: 1; }
  .btn {
    width: auto;
    min-width: 9.5rem;
    flex-shrink: 0;
    font-size: 0.95rem;
  }
}

/* Auth (signup / login) — same black/white language as landing */
.auth {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  padding: 0 0 2rem;
  text-align: center;
}
.auth h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.auth-form {
  margin: 1.5rem auto 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.auth-form input {
  width: 100%;
  min-height: var(--tap);
  height: var(--tap);
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #111;
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.auth-form input::placeholder { color: #666; }
.auth-form input:focus { border-color: #555; }
.auth-foot {
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.auth-foot a { color: var(--fg); text-decoration: underline; text-underline-offset: 0.2em; }
.toast.warn { border-color: #3a2a1a; color: #cc9a2b; }

/* Public articles — calm navy, readable contrast (not pure black/white flash) */
body:has(.articles-index),
body:has(.article) {
  --bg: #0b1220;
  --fg: #e8eef6;
  --muted: #9aafc2;
  --line: #243044;
  --accent: #c9a227;
  background: #0b1220;
  color: #e8eef6;
}
html:has(.articles-index),
html:has(.article),
html:has(body.page-articles),
html:has(body.page-article) {
  background: #0b1220;
}
body:has(.articles-index) .top,
body:has(.article) .top,
body:has(.articles-index) .foot,
body:has(.article) .foot {
  background: #0b1220;
}

.articles-index,
.article {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 0 2.5rem;
  text-align: left;
  color: var(--fg);
  background: transparent;
}

.articles-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.articles-kicker a { color: var(--muted); }
.articles-kicker a:hover { color: var(--fg); }

.articles-heading {
  margin: 0.5rem 0 0;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--fg);
}

.articles-lede {
  margin: 0.65rem auto 0;
  max-width: 26rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}

.articles-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  background: transparent;
}
.articles-list li {
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.articles-list a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem 0.15rem;
  color: var(--fg);
  background: transparent;
  min-height: 44px;
}
.articles-list a:hover {
  background: rgba(90, 122, 138, 0.12);
}
.articles-list a:hover .articles-title { color: var(--accent); }

.articles-date {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.articles-title {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--fg);
}
.articles-empty {
  margin: 2rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.article .articles-date {
  margin: 0.75rem 0 1.5rem;
}

.article-body {
  font-size: 1.02rem;
  line-height: 1.65;
  color: #cfd8e6;
  background: transparent;
}
.article-body h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #eef3fa;
  text-align: center;
  background: transparent;
}
.article-body h2 {
  margin: 1.75rem 0 0.65rem;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #e8eef6;
  background: transparent;
}
.article-body h3 {
  margin: 1.25rem 0 0.4rem;
  font-size: 1.02rem;
  font-weight: 500;
  color: #e8eef6;
  background: transparent;
}
.article-body p { margin: 0.65rem 0; color: #cfd8e6; background: transparent; }
.article-body strong { color: #eef3fa; font-weight: 600; }
.article-body em { color: #aebcce; }
.article-body a { color: #d4b45a; }
.article-body a:hover { color: #e8eef6; }
.article-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.75rem 0;
  background: transparent;
}
.article-body ul, .article-body ol {
  margin: 0.65rem 0;
  padding-left: 1.25rem;
  color: #c5d0e0;
}
.article-body li { color: #c5d0e0; }
.article-body blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid #3d5a6e;
  background: #121a28;
  color: #c5d0e0;
}
.article-body pre,
.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #121a28;
  color: #d5deea;
}
.article-body code {
  padding: 0.12em 0.35em;
  border-radius: 4px;
  font-size: 0.92em;
}
.article-body pre {
  padding: 0.9rem 1rem;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid var(--line);
}
.article-body pre code {
  padding: 0;
  background: transparent;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  background: #121a28;
  color: #cfd8e6;
}
.article-body th,
.article-body td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.65rem;
  background: #121a28;
  color: #cfd8e6;
}
.article-body th { color: #e8eef6; }

.foot a { color: #7f93a8; }
.foot a:hover { color: var(--muted); }

/* Articles pages: top-align main (not hero-centered) */
body:has(.articles-index) main,
body:has(.article) main {
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: clamp(1rem, 3vh, 2rem);
  background: #0b1220;
  color: #e8eef6;
}
