/* Legal pages — terms, privacy, and the statutory notice.
 *
 * These sit on the same ground as the solver: white paper, black ink, hairline rules, and the
 * deep gold used only for the one thing the eye should land on. The pages carry their own
 * small header instead of the app's, so they stay readable with no scripts at all.
 */

.legal-page .legal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 22px;
  max-width: 780px;
  margin: 0 auto;
  padding: 26px 22px 16px;
  border-bottom: var(--mc-hair) solid var(--mc-line);
  /* style.css carries a bare `header` rule with its own background, and a plain <header>
     picks it up whatever class it has. The bar is part of the page ground, not a panel. */
  background: transparent !important;
}
.legal-page .legal-brand {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--mc-ink);
  text-decoration: none;
}
.legal-page .legal-brand em { font-style: normal; color: var(--mc-accent); }
.legal-page .legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-left: auto;
}
.legal-page .legal-nav a {
  color: var(--mc-muted);
  font-size: 12.5px;
  text-decoration: none;
  border-bottom: var(--mc-hair) solid transparent;
  padding-bottom: 2px;
}
.legal-page .legal-nav a:hover { color: var(--mc-ink); border-bottom-color: var(--mc-accent); }
.legal-page .legal-nav a[aria-current="page"] { color: var(--mc-ink); border-bottom-color: var(--mc-accent); }

/* Round flag buttons: the same two choices as the first-run gate, kept small and quiet so
   they sit in the bar rather than compete with the document. */
.legal-page .legal-flag { display: flex; align-items: center; gap: 8px; }
.legal-page .legal-flag button {
  width: 26px; height: 26px; min-width: 0; min-height: 0; padding: 0; line-height: 0;
  aspect-ratio: 1 / 1;
  border: var(--mc-hair) solid var(--mc-line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  opacity: .5;
  transition: opacity .15s ease, border-color .15s ease;
}
.legal-page .legal-flag button:hover { opacity: 1; }
.legal-page .legal-flag button[aria-pressed="true"] { opacity: 1; border-color: var(--mc-accent); }
.legal-page .legal-flag-ico { display: block; width: 100%; height: 100%; }
.legal-page .legal-flag-ico svg { display: block; width: 100%; height: 100%; }

.legal-page .legal-main {
  max-width: 780px;
  margin: 0 auto;
  padding: 30px 22px 64px;
}
.legal-page .legal-main h1 {
  font-size: 26px;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
}
.legal-page .legal-sub {
  color: var(--mc-muted);
  font-size: 12.5px;
  margin: 0 0 26px;
}
.legal-page .legal-note {
  border-left: var(--mc-hair) solid var(--mc-accent);
  padding: 2px 0 2px 14px;
  color: var(--mc-muted);
  font-size: 12.5px;
  line-height: 1.85;
  margin: 0 0 30px;
}
.legal-page .legal-main h2 {
  font-size: 15px;
  margin: 34px 0 10px;
  padding-top: 18px;
  border-top: var(--mc-hair) solid var(--mc-line);
}
.legal-page .legal-main h2:first-of-type { border-top: 0; padding-top: 0; }
.legal-page .legal-main h3 { font-size: 13.5px; margin: 20px 0 8px; }
.legal-page .legal-main p,
.legal-page .legal-main li {
  font-size: 14px;
  line-height: 1.95;
  color: var(--mc-ink);
}
.legal-page .legal-main p { margin: 0 0 12px; }
.legal-page .legal-main ul,
.legal-page .legal-main ol { margin: 0 0 12px; padding-left: 22px; }
.legal-page .legal-main li { margin-bottom: 6px; }
.legal-page .legal-main strong { font-weight: 700; }
.legal-page .legal-main a { color: var(--mc-accent); }
/* A sub-line inside a table cell: the operator name stays the loud part. */
.legal-page .legal-small { color: var(--mc-muted); font-size: 12.5px; }

.legal-page .legal-toc {
  border: var(--mc-hair) solid var(--mc-line);
  border-radius: 10px;
  padding: 16px 18px 16px 34px;
  margin: 0 0 30px;
}
.legal-page .legal-toc li { font-size: 13px; margin-bottom: 3px; }
.legal-page .legal-toc a { color: var(--mc-ink); text-decoration: none; }
.legal-page .legal-toc a:hover { border-bottom: var(--mc-hair) solid var(--mc-accent); }

.legal-page table.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 13px;
}
.legal-page table.legal-table th,
.legal-page table.legal-table td {
  border-top: var(--mc-hair) solid var(--mc-line);
  padding: 10px 10px 10px 0;
  text-align: left;
  vertical-align: top;
  line-height: 1.8;
}
.legal-page table.legal-table th {
  color: var(--mc-muted);
  font-weight: 500;
  white-space: nowrap;
  width: 30%;
}
.legal-page table.legal-table tr:last-child td { border-bottom: var(--mc-hair) solid var(--mc-line); }

/* Anything the operator still has to fill in. Deliberately loud, so a half-finished page
   cannot be mistaken for a finished one. */
.legal-page .fill {
  background: #8a6a1f1f;
  border-bottom: 2px solid var(--mc-accent);
  padding: 1px 4px;
  font-weight: 700;
}
:root[data-theme="dark"] .legal-page .fill { background: #d9b34a26; }

.legal-page .legal-foot {
  max-width: 780px;
  margin: 0 auto;
  padding: 22px 22px 60px;
  border-top: var(--mc-hair) solid var(--mc-line);
  color: var(--mc-muted);
  font-size: 12px;
  line-height: 1.9;
}
.legal-page .legal-foot a { color: var(--mc-muted); }
.legal-page .legal-foot p { margin: 0 0 6px; }
