/* Shared styling for standalone legal / policy pages (DES-442).
 *
 * Kinfolk paper: flat cream canvas, hairlines, 4px radii.
 * Anti-vibecode: no page gradients, no soft SaaS shadows, no pill chrome.
 * ES-AR pages and EU locales both link this file — do not re-inline.
 */
:root {
  /* Align with src/ui/styles/variables.css Kinfolk tokens (standalone pages
     cannot import the SPA bundle). */
  --bg: #faf6ec;
  --bg-alt: #f3efe9;
  --ink: #1a1b18;
  --muted: #4f4a44;
  --line: #dfd8cf;
  --accent: #243f37; /* --brand-primary-text */
  --rust: #243f37;
  --surface: #ffffff;
  --danger: #a6402b; /* --state-error */
  --btn-radius: 4px;
  --serif: "Lora", serif;
  --sans: "Inter", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 2000;
  background: var(--ink);
  color: var(--surface);
  padding: 10px 16px;
  border-radius: var(--btn-radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}
.skip-link:focus {
  top: 8px;
  outline: 2px solid var(--surface);
  outline-offset: 2px;
}

.wrap {
  width: min(960px, 92vw);
  margin: 0 auto;
  padding: 32px 0 64px;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand .name {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1.4rem;
}
.brand .town {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
}
.nav-mini a {
  font-size: 0.92rem;
  color: var(--muted);
  margin-left: 16px;
}

h1 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
}
h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.3px;
  margin-top: 28px;
  margin-bottom: 10px;
  scroll-margin-top: 16px;
}
h3 {
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 18px;
  margin-bottom: 6px;
  color: var(--ink);
}
p, li { color: var(--muted); }
ul, ol { padding-left: 1.2rem; }
li { margin-bottom: 4px; }
.meta { margin-bottom: 8px; font-size: 0.95rem; }
.updated-note { margin-bottom: 16px; font-size: 0.98rem; }
.lead { margin-bottom: 24px; font-size: 1.02rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--btn-radius);
  padding: 22px 26px;
  margin-top: 8px;
}
.card p + p { margin-top: 10px; }

.notice,
.callout {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--btn-radius);
  padding: 14px 18px;
  margin: 16px 0 8px;
  font-size: 0.95rem;
  color: var(--ink);
}
.callout strong { color: var(--ink); }

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--btn-radius);
  padding: 18px 22px;
  margin: 16px 0 24px;
}
.toc h2 {
  margin-top: 0;
  font-size: 1.1rem;
}
.toc ol {
  margin: 0;
  columns: 2;
  column-gap: 28px;
  font-size: 0.92rem;
}
@media (max-width: 640px) {
  .toc ol { columns: 1; }
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--btn-radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.doc-card p { font-size: 0.92rem; }
.doc-card a.go { font-weight: 600; margin-top: 6px; }
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

button.inline-pref {
  font: inherit;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.receipt { display: none; margin-top: 16px; }
.receipt[data-visible="true"] { display: block; }
.receipt strong { display: block; margin: 8px 0; color: var(--ink); font-size: 1.1rem; }
.status { min-height: 1.5em; margin: 0; }
.status.error { color: var(--danger); }

table.legal {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.88rem;
}
table.legal th,
table.legal td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  color: var(--muted);
}
table.legal th { background: var(--bg-alt); color: var(--ink); font-weight: 600; }

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--btn-radius);
  background: #e5ede9;
  color: #243f37;
}
.badge.planned { background: #d9c5b3; color: #5a3a26; }
.badge.pending,
.badge.dpa { background: #eeeeee; color: #555555; }

footer.site {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}
footer.site nav a { margin-right: 14px; }
footer.site .meta { font-size: 0.85rem; }

@media (max-width: 480px) {
  .wrap { padding: 24px 0 48px; }
  header.site { flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav-mini a { margin-left: 0; margin-right: 12px; }
  table.legal,
  table.legal thead,
  table.legal tbody,
  table.legal tr,
  table.legal th,
  table.legal td { display: block; }
  table.legal thead { display: none; }
  table.legal td { border: none; border-bottom: 1px solid var(--line); }
  table.legal tr {
    border: 1px solid var(--line);
    border-radius: var(--btn-radius);
    margin-bottom: 10px;
    padding: 4px;
  }
}

/* Per-vendor detail list rendered by scripts/generate-subprocessor-tables.mjs. */
.legal-detail { margin: 16px 0; }
.legal-detail dt {
  font-weight: 600;
  margin-top: 14px;
  color: var(--ink);
}
.legal-detail dd {
  margin: 4px 0 0;
  padding-left: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

/* Transfer-basis emphasis in generated tables. */
table.legal td small { color: var(--muted); font-size: 0.82rem; }
