/* SofaList site: one stylesheet.
   Mobile-first, system fonts, no external assets.
   Palette from the app icon: #673AB7, #D3BBFF, #F7EDFF; text in neutral near-black.
   WCAG AA contrast (normal text needs 4.5:1):
     light  #1D1B20 on #F7EDFF 15.05   #673AB7 on #F7EDFF 6.46
            #1D1B20 on #FFFFFF 17.07   #673AB7 on #FFFFFF 7.33
            #FFFFFF on #673AB7  7.33 (header)
     dark   #E6E0E9 on #141218 14.35   #D3BBFF on #141218 10.91
            #E6E0E9 on #1D1B20 13.17   #D3BBFF on #1D1B20 10.02
   #D3BBFF on #673AB7 is 4.30, so it is never text on the header (border only). */

:root {
  --purple: #673AB7;
  --lilac: #D3BBFF;
  --lavender: #F7EDFF;

  --text: #1D1B20;
  --bg: var(--lavender);
  --surface: #FFFFFF;
  --link: var(--purple);
  --border: var(--lilac);
  --header-bg: var(--purple);
  --header-text: #FFFFFF;

  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --content-max: 720px;
  --radius: 10px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #E6E0E9;
    --bg: #141218;
    --surface: #1D1B20;
    --link: var(--lilac);
    --border: var(--purple);
  }
}

/* Minimal reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-stack);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

/* Headings */
h1, h2 {
  line-height: 1.3;
  font-weight: 650;
}

h1 {
  font-size: 1.75rem;
  margin: var(--space-lg) 0 var(--space-sm);
}

h2 {
  font-size: 1.3rem;
  margin: var(--space-lg) 0 var(--space-xs);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

p { margin: 0 0 var(--space-sm); }

ul {
  margin: 0 0 var(--space-sm);
  padding-left: 1.5rem;
}

li { margin-bottom: var(--space-xs); }

/* Links */
a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:hover { text-decoration-thickness: 2px; }

a:focus-visible,
.table-scroll:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: 0;
  top: -3rem;
  padding: var(--space-xs) var(--space-sm);
  background: var(--header-bg);
  color: var(--header-text);
  z-index: 10;
}

.skip-link:focus { top: 0; }

/* Header */
.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 3px solid var(--lilac);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 3.5rem;
}

.site-header a {
  color: var(--header-text);
}

.site-header a:focus-visible {
  outline-color: var(--header-text);
}

.wordmark {
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
}

.lang-switch {
  display: flex;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.lang-switch [aria-current] { font-weight: 700; }

/* Home */
.hero h1 { font-size: 1.6rem; }

.lead { font-size: 1.15rem; }

.home-links {
  list-style: none;
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-md) 0 var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Legal pages */
.legal { padding-bottom: var(--space-lg); }

/* Section 10 table: scrolls sideways on narrow screens */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 36rem;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-xs) 0.75rem;
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child > * { border-bottom: 0; }

thead th { font-weight: 700; }

tbody th { font-weight: 600; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-md) 0;
  font-size: 0.95rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-xs);
}

.site-footer p { margin: 0; }

@media (min-width: 768px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.1rem; }
}
