/* ============================================================================
   Shared styles for the standalone static pages — both the legal pages
   (privacy / terms / about / contact) and the content/guide pages (how-to,
   odds, hand rankings, FAQ, glossary). All use the `.legal` article wrapper.
   These pages do NOT load the React bundle, so this stylesheet is
   self-contained but mirrors the palette in src/styles.css.
   ============================================================================ */

:root {
  --gold: #e7c66b;
  --red: #c0392b;
  --text: #f3f6f2;
  --text-dim: #b7cabf;
  --muted: #8aa79c;
  --surface: #103a2c;
  --radius-panel: 16px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  background: radial-gradient(circle at 50% 0%, #1b3d31 0%, #0a1f18 60%, #07140f 100%);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

a {
  color: var(--gold);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid #6fd3ad;
  outline-offset: 2px;
}

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(20px, 5vw, 48px) clamp(16px, 5vw, 32px) 64px;
}

.legal__back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.legal__title {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.25em;
}

.legal__title-suit {
  color: var(--gold);
}
.legal__title-suit--red {
  color: var(--red);
}

.legal__updated {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.legal h2 {
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  margin: 2rem 0 0.6rem;
  color: var(--text);
}

.legal h3 {
  font-size: 1.02rem;
  margin: 1.4rem 0 0.4rem;
  color: var(--text);
}

.legal p,
.legal li {
  color: var(--text-dim);
  font-size: 0.98rem;
}

.legal ul {
  padding-left: 1.3em;
}

.legal li {
  margin: 0.35em 0;
}

.legal strong {
  color: var(--text);
}

.legal__panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-panel);
  padding: clamp(16px, 4vw, 28px);
  margin: 1.5rem 0;
}

/* Collapse the outer margins of a panel's first/last child so the panel
   padding is the only spacing — avoids per-element inline style overrides. */
.legal__panel > :first-child {
  margin-top: 0;
}
.legal__panel > :last-child {
  margin-bottom: 0;
}

/* Visually hidden but available to screen readers (e.g. "opens in new tab"). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------ content / guide pages */

/* Intro paragraph under the title. */
.legal__lead {
  font-size: clamp(1rem, 2.8vw, 1.15rem);
  color: var(--text);
  margin: 0 0 1.5rem;
}

.legal ol {
  padding-left: 1.3em;
}
.legal ol li {
  margin: 0.45em 0;
}

/* Inline emphasis for poker notation like "A♠ K♦" or a rank. */
.legal__cards {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.legal__suit-red {
  /* A brighter red than the app's --red (#c0392b): inline suit glyphs sit
     directly on the dark gradient and need ≥4.5:1 contrast for AA text. */
  color: #ff6f61;
}

/* Reference tables (hand rankings, odds). */
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}
.legal th,
.legal td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  vertical-align: top;
}
.legal th {
  color: var(--text);
  font-weight: 700;
  border-bottom-color: rgba(255, 255, 255, 0.25);
}
.legal td {
  color: var(--text-dim);
}
.legal tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}
.legal__table-wrap {
  overflow-x: auto;
}

/* Definition list (glossary). */
.legal dl {
  margin: 1.25rem 0;
}
.legal dt {
  color: var(--gold);
  font-weight: 700;
  margin-top: 1.1rem;
}
.legal dd {
  margin: 0.25rem 0 0;
  color: var(--text-dim);
}

/* Callout / note box (reuses the panel look with an accent edge). */
.legal__note {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-panel);
  padding: clamp(14px, 3.5vw, 20px);
  margin: 1.5rem 0;
}
.legal__note > :first-child {
  margin-top: 0;
}
.legal__note > :last-child {
  margin-bottom: 0;
}

.legal__footer {
  margin-top: 3rem;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.legal__footer a {
  color: var(--text-dim);
  margin: 0 0.5em;
}
