/* DBCA Labs · Summit: shared style for the Summit legal pages.
   No web fonts, scripts, cookies or third-party requests. Light and dark follow the device setting.
   Colours come from the game's default "Juicy" theme (web/src/themes.js). */

:root {
  color-scheme: light dark;
  --bg: #fbfaff;
  --surface: #f2effb;
  --surface-strong: #e6e0f7;
  --text: #1d1a2b;
  --muted: #5b5670;
  --border: #dcd5ee;
  --link: #4e31aa;
  --link-hover: #3a1078;
  --brand-from: #3a1078;
  --brand-mid: #4e31aa;
  --brand-to: #3795bd;
  --on-brand: #ffffff;
  --accent: #ffd23f;
  --on-accent: #241047;
  --gate-bg: #ffe7a3;
  --gate-text: #5a3d00;
  --focus: #3795bd;
  --radius: 14px;
  --measure: 46rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121019;
    --surface: #1c1829;
    --surface-strong: #272038;
    --text: #ece9f5;
    --muted: #aaa4bf;
    --border: #342c4a;
    --link: #bcaaff;
    --link-hover: #ddd3ff;
    --brand-from: #2a0f5c;
    --brand-mid: #3b2585;
    --brand-to: #24667f;
    --gate-bg: #4d3b00;
    --gate-text: #ffe28a;
    --focus: #7fc8e6;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 var(--font);
  overflow-wrap: break-word;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

/* ---------- skip link ---------- */
.skip {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.skip:focus { top: 8px; }

/* ---------- header ---------- */
.site-header {
  background: linear-gradient(135deg, var(--brand-from) 0%, var(--brand-mid) 55%, var(--brand-to) 100%);
  color: var(--on-brand);
  padding-top: env(safe-area-inset-top);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
a.brand { color: inherit; text-decoration: none; }
.brand strong { font-weight: 800; }
.brand .dot { opacity: 0.7; margin: 0 0.15em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark .peak { fill: currentColor; }
.brand-mark .cap { fill: var(--accent); }
.brand-mark .tile { fill: currentColor; opacity: 0.16; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.site-nav a {
  color: var(--on-brand);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.24); }
.site-nav a[aria-current="page"] {
  background: var(--accent);
  color: var(--on-accent);
}

/* ---------- text ---------- */
main { padding-bottom: 3rem; }

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(1.9rem, 1.35rem + 2.4vw, 2.6rem);
  margin: 1.4em 0 0.25em;
}
h2 {
  font-size: 1.4rem;
  margin: 2.4rem 0 0.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 1rem;
}
h3 {
  font-size: 1.12rem;
  margin: 1.8rem 0 0.5rem;
  scroll-margin-top: 1rem;
}

p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin: 0.3rem 0; }
li::marker { color: var(--muted); }

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--link-hover); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.6rem;
}
.meta strong { color: var(--text); }
.lead { font-size: 1.12rem; }

code, pre { font-family: var(--mono); }
pre {
  margin: 0 0 1.2rem;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* A release gate: text that is only true once a feature ships (see README.md). Never published. */
mark.gate {
  background: var(--gate-bg);
  color: var(--gate-text);
  font: 700 0.78em/1.4 var(--mono);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
mark.gate:empty { display: none; }

/* ---------- summary box ---------- */
.summary {
  margin: 0 0 2rem;
  padding: 1.1rem 1.25rem 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--brand-mid);
  border-radius: var(--radius);
}
.summary h2 {
  margin: 0 0 0.6rem;
  padding: 0;
  border: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.summary ul { padding-left: 1.2rem; }

/* ---------- contents ---------- */
.toc {
  margin: 0 0 1rem;
  font-size: 0.97rem;
}
.toc h2 {
  margin: 0 0 0.5rem;
  padding: 0;
  border: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc li { margin: 0.15rem 0; break-inside: avoid; }
@media (min-width: 40rem) {
  .toc ul { columns: 2; column-gap: 2rem; }
}

/* ---------- call to action ---------- */
.cta { margin: 1.4rem 0; }
a.button {
  display: inline-block;
  padding: 0.75rem 1.3rem;
  border-radius: 999px;
  background: var(--brand-mid);
  color: var(--on-brand);
  font-weight: 700;
  text-decoration: none;
}
a.button:hover { background: var(--brand-from); color: var(--on-brand); }

/* ---------- tables ---------- */
.table-wrap {
  margin: 0 0 1.4rem;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  line-height: 1.5;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--surface-strong);
  font-weight: 700;
}
thead th:first-child { border-top-left-radius: 10px; }
thead th:last-child { border-top-right-radius: 10px; }

/* Tables with many columns get more room than the text column on large screens. */
@media (min-width: 64rem) {
  .table-wrap.wide {
    width: min(70rem, calc(100vw - 48px));
    margin-left: 50%;
    transform: translateX(-50%);
  }
  .table-wrap.wide td:first-child { width: 30%; }
}

/* On phones, each table row becomes a card, with the column name above each value. */
@media (max-width: 47.99rem) {
  table, thead, tbody, tr, th, td { display: block; }
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  tr {
    margin: 0 0 0.9rem;
    padding: 0.35rem 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  td {
    border: 0;
    padding: 0.4rem 1rem;
  }
  td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
  }
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  padding-bottom: env(safe-area-inset-bottom);
}
.site-footer .wrap { padding-top: 1.4rem; padding-bottom: 2rem; }
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 0.8rem;
  font-weight: 600;
}
.site-footer p { margin: 0 0 0.4rem; }

/* ---------- print ---------- */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .skip, .site-nav, .site-footer nav, .toc { display: none; }
  .site-header { background: none; color: #000; border-bottom: 1px solid #999; }
  .summary, tr, pre { background: none; }
  a { color: #000; }
}
