/* ===========================================================================
   Legal pages — privacy, terms, refunds, account deletion.

   Set narrow and generously leaded. These get read by two audiences with very
   different patience: a Play Store reviewer scanning for specific clauses, and
   a worried student looking for one answer. Both are served by short lines,
   clear headings and tables instead of paragraphs of prose.
   =========================================================================== */

.legal {
  max-width: 760px;
  padding-top: 48px;
  padding-bottom: 90px;
}

.legal h1 { margin-bottom: 8px; }

.legal-meta {
  font-size: 14px;
  color: var(--ink-faint);
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}

.legal h2 {
  font-size: 1.45rem;
  margin: 42px 0 14px;
  padding-top: 8px;
}
.legal h3 {
  font-size: 1.08rem;
  font-family: var(--sans);
  font-weight: 700;
  margin: 26px 0 10px;
}

.legal p  { margin-bottom: 14px; color: var(--ink-soft); line-height: 1.72; }
.legal li { margin-bottom: 9px; color: var(--ink-soft); line-height: 1.7; }
.legal ul, .legal ol { padding-left: 22px; margin-bottom: 18px; }
.legal b { color: var(--ink); font-weight: 650; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }

/* The plain-language box at the top. A reader who stops here should still
   come away with an accurate picture. */
.legal-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--marigold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 24px;
  margin-bottom: 14px;
}
.legal-summary h3 { margin-top: 0; margin-bottom: 12px; color: var(--marigold); }
.legal-summary ul { margin-bottom: 10px; }
.legal-summary li { color: var(--ink); }

/* Definition-style tables beat prose for "what we collect and why". */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 20px;
  font-size: 14.5px;
}
.legal-table th {
  text-align: left;
  vertical-align: top;
  width: 34%;
  padding: 11px 16px 11px 0;
  color: var(--ink);
  font-weight: 650;
  border-bottom: 1px solid var(--line);
}
.legal-table td {
  vertical-align: top;
  padding: 11px 0;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
}
.legal-table tr:last-child th,
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table em { font-style: normal; color: var(--ink-faint); font-size: 13px; }

/* Unfilled facts. Deliberately loud — these must never reach the Play Store
   still showing a bracket. */
.todo {
  background: var(--wrong-bg);
  color: var(--wrong);
  border: 1px dashed var(--wrong);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

/* Deletion page */
.danger-box {
  background: var(--wrong-bg);
  border: 1px solid color-mix(in srgb, var(--wrong) 30%, transparent);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 24px 0;
}
.danger-box h3 { margin-top: 0; color: var(--wrong); }
.danger-box li { color: var(--ink); }

.step-list { counter-reset: s; list-style: none; padding-left: 0; }
.step-list li {
  counter-increment: s;
  position: relative;
  padding-left: 44px;
  margin-bottom: 18px;
  min-height: 32px;
}
.step-list li::before {
  content: counter(s);
  position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px;
  background: var(--indigo); color: #fff;
  border-radius: 9px;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 15px;
}
:root[data-theme="dark"] .step-list li::before { color: #14151A; }

@media (max-width: 640px) {
  .legal { padding-top: 32px; }
  .legal-table th, .legal-table td { display: block; width: 100%; }
  .legal-table th { padding-bottom: 2px; border-bottom: 0; }
  .legal-table td { padding-top: 0; }
}
