/* Shared styling for the rekallme. legal pages.
   Deliberately plain: these are documents, not marketing. */

@font-face {
  font-family: "Archivo Brand";
  src: url("fonts/archivo-logo.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #1b1f3b;
  --body: #4c5375;
  --muted: #727788;
  --rule: #e7e8f2;
  --page: #ffffff;
  --brand: #3b4ce0;
  --note: #f5f5fa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ececec;
    --body: #aeaeae;
    --muted: #858585;
    --rule: #333333;
    --page: #121212;
    --brand: #8a93dc;
    --note: #1e1e1e;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Archivo Brand", Arial, sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--brand);
  text-decoration: none;
}
.mark__icon { display: block; width: 42px; height: 42px; flex: 0 0 42px; }
.mark__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.mark__tag { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: .74rem; font-weight: 500; line-height: 1.2; letter-spacing: normal; color: var(--muted); }
@media (max-width: 760px) {
  .mark__icon { width: 38px; height: 38px; flex-basis: 38px; }
}

.brand-name {
  font-family: "Archivo Brand", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.mark .brand-name { font-size: 1.7rem; font-weight: 900; line-height: 1; letter-spacing: -.045em; }
.mark .brand-name { color: var(--ink); }
.mark__dot { color: var(--brand); }
@media (prefers-color-scheme: dark) {
  .mark .brand-name { color: var(--brand); }
}

h1 {
  color: var(--ink);
  font-size: 1.9rem;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 1.25rem 0 .4rem;
  text-wrap: balance;
}

h2 {
  color: var(--ink);
  font-size: 1.2rem;
  letter-spacing: -.01em;
  margin: 2.75rem 0 .75rem;
  text-wrap: balance;
}

h3 {
  color: var(--ink);
  font-size: 1rem;
  margin: 1.75rem 0 .5rem;
}

.updated { color: var(--muted); font-size: .875rem; margin: 0; }

p, li { margin: 0 0 1rem; }
li { margin-bottom: .5rem; }
ul, ol { padding-left: 1.25rem; }

a { color: var(--brand); }

strong { color: var(--ink); }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.5rem;
  font-size: .95rem;
}

th, td {
  text-align: left;
  padding: .6rem .7rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th { color: var(--ink); font-weight: 700; }

/* Wide tables scroll inside their own box rather than the page. */
.scroll { overflow-x: auto; }

.note {
  background: var(--note);
  border: 1px solid var(--rule);
  border-radius: .6rem;
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}
.note p:last-child { margin-bottom: 0; }

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .875rem;
}

footer a { margin-right: 1rem; }

@media (max-width: 480px) {
  .wrap { padding: 2rem 1rem 3rem; }
  h1 { font-size: 1.75rem; }
  p, li, td, a { overflow-wrap: anywhere; }
  .scroll { max-width: 100%; }
}

/* Tables remain aligned on desktop; phone rows show readable labelled fields. */
.legal-table { table-layout: fixed; line-height: 1.5; }
.legal-table th, .legal-table td { overflow-wrap: break-word; word-break: normal; white-space: normal; padding: .8rem; }
.legal-table th { font-size: .85rem; background: var(--note); }
.legal-table--2 th:first-child { width: 34%; }
.legal-table--3 th:first-child { width: 22%; }
.legal-table--3 th:nth-child(2) { width: 54%; }
.legal-table--4 th:first-child { width: 20%; }
.legal-table--4 th:nth-child(2) { width: 30%; }
.legal-table--4 th:nth-child(3) { width: 30%; }
@media (max-width: 600px) {
  .scroll { overflow: visible; margin-block: 1.25rem 1.5rem; }
  .legal-table { display: block; width: 100%; margin: 0; font-size: .95rem; }
  .legal-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .legal-table tbody { display: grid; gap: 12px; }
  .legal-table tbody tr { display: block; border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; background: var(--page); }
  .legal-table tbody td { display: block; width: 100%; border: 0; padding: 0; overflow-wrap: break-word; }
  .legal-table tbody td + td { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
  .legal-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--muted); font-size: .75rem; font-weight: 650; line-height: 1.4; }
}
