/* Shared chrome for About / Legal / Donate. Markup in public/js/views/screens/static-page.js. */

/* No measure cap of its own: Legal/Donate take the shell width every other screen does
   (`.screen` 1600px signed-in, `.app-public .public-content > .screen` 1400px as a guest).
   `.screen` centres its children, so stretch is what makes the panel and the Legal tab
   strip span that width instead of shrinking to their own content. */
.screen.static-page,
.app-public .public-content > .screen.static-page {
  align-items: stretch;
}

.static-page-content {
  display: block;
  box-sizing: border-box;
  background: var(--bg-2);
  border-radius: var(--radius-l);
  /* No inline padding: both users (legal, donate) override the fill to transparent, so with
     no frame a horizontal inset would just indent every line off the page gutter. */
  padding: 1.5rem 0 1.75rem;
  color: var(--ink);
  line-height: 1.6;
}

.static-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}
.static-page-breadcrumb {
  color: var(--bronze-2);
  font-size: 0.78rem;
  letter-spacing: 1.2px;
  font-weight: 600;
  text-transform: uppercase;
}

/* --ink-2, not --ink-3 (--ink-3 is for captions/metadata). Matches .pp-lede on the other pages. */
.static-page-lede {
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.65;
  margin: 6px 0 18px;
  text-align: justify;
  hyphens: auto; -webkit-hyphens: auto; -ms-hyphens: auto;
}

.static-page-block {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}
.static-page-block:first-of-type {
  border-top: 0;
  padding-top: 6px;
}
.static-page-h3 {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 8px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.static-page-num {
  color: var(--bronze-2);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  min-width: 32px;
}

/* Tighter radius than the containing card — inner radius must stay below the outer. */
.static-page-plain {
  background: var(--bg-2);
  border-left: 3px solid var(--bronze-2);
  border-radius: var(--radius-s);
  padding: 10px 14px;
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.55;
}

.static-page-body p {
  margin: 0 0 10px;
  text-align: justify;
  hyphens: auto; -webkit-hyphens: auto; -ms-hyphens: auto;
}
/* :not(.btn) keeps donate buttons on .btn-primary: `.static-page-body a` (0,2,1) beats .btn-primary (0,1,0). */
.static-page-body a:not(.btn),
.static-page-body a:not(.btn):visited,
.static-page-lede a:not(.btn),
.static-page-lede a:not(.btn):visited {
  color: var(--bronze-2);
  text-decoration: none;
}
.static-page-body a:not(.btn):hover,
.static-page-lede a:not(.btn):hover {
  text-decoration: underline;
}
.static-page-body strong { color: var(--ink); }
.static-page-body ul,
.static-page-bullets {
  margin: 0 0 12px;
  padding-left: 32px;
}
.static-page-body li,
.static-page-bullets li { margin-bottom: 6px; }
.static-page-aside {
  font-size: 0.9rem;
  color: var(--ink-3);
  border-left: 2px solid var(--border-color);
  padding-left: 10px;
  margin: 8px 0 0;
}

.static-page-body code {
  background: var(--bg-2);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.85em;
  color: var(--bronze-2);
}

.ranks-admin {
  margin-top: 24px; padding: 16px;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-m);
  max-width: 520px;
}
/* Collapsed editor: the trigger alone, so it takes the panel's spacing and none of its chrome. */
.ranks-admin-toggle { margin-top: 24px; }
.ranks-admin h3 { margin: 0 0 4px; }
.ranks-admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
/* There is no canonical `input` rule (only `select` in layout.css), so an unstyled field falls
   back to the UA white — fine in the light theme, a glaring slab in the dark one. Tokens, so it
   follows both. */
.ranks-admin-row input {
  padding: 8px 10px; font: inherit; font-size: 0.9rem;
  color: var(--ink); background: var(--bg-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-m);
}
/* Recruit's floor is structurally 0 — same locked treatment as the free subscription tier. */
.ranks-admin-row input:disabled {
  color: var(--ink-4); background: var(--bg-0);
  border-style: dashed; border-color: var(--border);
  cursor: not-allowed;
}
/* min-width: 0 is load-bearing: an input's auto minimum is its ~20-char intrinsic size, so
   `flex: 1` alone cannot shrink it and the ELO field is pushed off a phone screen. */
.ranks-admin-row input[type="text"] { flex: 1 1 140px; min-width: 0; }
.ranks-admin-row input[type="number"] { flex: 0 0 96px; width: 96px; }
@media (max-width: 640px) {
  .ranks-admin-row input[type="number"] { flex-basis: 88px; width: 88px; }
}
.ranks-admin-stars { flex: 0 0 34px; color: var(--bronze-2); }
.ranks-admin-actions { display: flex; gap: 8px; margin-top: 10px; }
