/* Odysseus English — legal pages
   One stylesheet, shared by every page. Light + dark. */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-raised: #ffffff;
  --text: #1a1d21;
  --text-muted: #5c636e;
  --text-faint: #868e9a;
  --border: #e3e6ea;
  --border-soft: #eef0f3;
  --accent: #2f5bd7;
  --accent-soft: #eef2fd;
  --radius: 10px;
  --maxw: 44rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101215;
    --bg-soft: #16191d;
    --bg-raised: #1a1e23;
    --text: #e8eaed;
    --text-muted: #a2aab5;
    --text-faint: #7c848f;
    --border: #2a2f36;
    --border-soft: #22262c;
    --accent: #7fa3ff;
    --accent-soft: #1a2236;
  }
}

:root[data-theme="dark"] {
  --bg: #101215;
  --bg-soft: #16191d;
  --bg-raised: #1a1e23;
  --text: #e8eaed;
  --text-muted: #a2aab5;
  --text-faint: #7c848f;
  --border: #2a2f36;
  --border-soft: #22262c;
  --accent: #7fa3ff;
  --accent-soft: #1a2236;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-raised: #ffffff;
  --text: #1a1d21;
  --text-muted: #5c636e;
  --text-faint: #868e9a;
  --border: #e3e6ea;
  --border-soft: #eef0f3;
  --accent: #2f5bd7;
  --accent-soft: #eef2fd;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand__mark {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex: none;
}

@media (prefers-color-scheme: dark) {
  .brand__mark { color: #101215; }
}
:root[data-theme="dark"] .brand__mark { color: #101215; }
:root[data-theme="light"] .brand__mark { color: #fff; }

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
}

.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 550; }

/* ---------- layout ---------- */

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

.page-title {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 0.6rem;
  font-weight: 680;
}

.page-lede {
  color: var(--text-muted);
  font-size: 1.02rem;
  margin: 0 0 1.5rem;
}

.meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.825rem;
  color: var(--text-faint);
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 2rem;
}

h2 {
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  margin: 2.75rem 0 0.85rem;
  font-weight: 640;
  scroll-margin-top: 5rem;
}

h3 {
  font-size: 1rem;
  margin: 1.75rem 0 0.6rem;
  font-weight: 620;
  scroll-margin-top: 5rem;
}

p { margin: 0 0 1rem; }

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

ul, ol { margin: 0 0 1rem; padding-left: 1.35rem; }
li { margin-bottom: 0.5rem; }
li > ul, li > ol { margin-top: 0.5rem; }

strong { font-weight: 620; }

hr {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: 3rem 0;
}

/* ---------- table of contents ---------- */

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  margin-bottom: 2.5rem;
}

.toc__title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  font-weight: 650;
  margin: 0 0 0.7rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  columns: 2;
  column-gap: 1.5rem;
}

.toc li { margin-bottom: 0.35rem; break-inside: avoid; }
.toc a { color: var(--text-muted); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 34rem) {
  .toc ol { columns: 1; }
}

/* ---------- callouts & cards ---------- */

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.94rem;
}

.callout p:last-child { margin-bottom: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.9rem;
  margin: 2rem 0;
}

.card {
  display: block;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover { border-color: var(--accent); transform: translateY(-1px); }

.card__title {
  font-weight: 630;
  font-size: 0.97rem;
  margin: 0 0 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card__desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.55;
}

/* ---------- steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 1.5rem 0;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1.25rem;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 650;
  display: grid;
  place-items: center;
}

/* ---------- tables ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 30rem;
  font-size: 0.9rem;
}

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

th {
  background: var(--bg-soft);
  font-weight: 620;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

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

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-soft);
}

.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.site-footer nav {
  margin-left: auto;
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ---------- utility ---------- */

.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.back-to-top {
  display: inline-block;
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
}

.back-to-top:hover { color: var(--accent); }

@media print {
  .site-header, .site-footer, .toc, .back-to-top { display: none; }
  body { font-size: 11pt; }
  main { max-width: none; padding: 0; }
}
