/* ToyTrace site — one stylesheet, no build step. Palette mirrors the app's light theme. */

:root {
  --bg: #f4f1ea;
  --surface: #fbf9f4;
  --surface-2: #ebe6da;
  --text: #1f2421;
  --text-muted: #4a514c;
  --accent: #2f6e66;
  --accent-strong: #235650;
  --accent-soft: #dce9e5;
  --border: #d9d2c3;
  --focus: #b3541e;
  --radius: 14px;
  --max: 44rem;
  --max-wide: 64rem;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(1.9rem, 6vw, 2.75rem);
}

h2 {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  margin-top: 2.2em;
}

h3 {
  font-size: 1.125rem;
  margin-top: 1.6em;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

li + li {
  margin-top: 0.35em;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}

.wrap-wide {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header / footer */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header .wrap-wide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.brand svg {
  width: 28px;
  height: 28px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li + li {
  margin-top: 0;
}

.site-nav a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent-strong);
  text-decoration: underline;
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  padding: 2rem 0 3rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.site-footer li + li {
  margin-top: 0;
}

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

/* Home */

.hero {
  padding-top: 3rem;
  padding-bottom: 1rem;
}

.eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 38rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

.steps li {
  margin: 0;
  counter-increment: step;
}

.steps h3 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.steps h3::before {
  content: counter(step);
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.categories li {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-weight: 500;
}

/* Illustrative evidence card */

.sample {
  margin: 0;
  width: 100%;
  max-width: 26rem;
  min-width: 0;
}

.sample-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.sample-figure {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.sample-meta {
  color: var(--text-muted);
  margin: 0.25rem 0 0.9rem;
}

.band {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  margin-bottom: 0.4rem;
}

.band span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 18%;
  right: 30%;
  border-radius: 999px;
  background: var(--accent);
}

.band-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.listings {
  list-style: none;
  padding: 0;
  margin: 0 0 0.9rem;
  border-top: 1px solid var(--border);
}

.listings li {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.listings li span:first-child {
  color: var(--text-muted);
}

.note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.callout {
  border-left: 4px solid var(--accent);
  background: var(--surface);
  padding: 1rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

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

.split {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 48rem) {
  .split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

/* Legal / long-form */

.doc {
  padding-top: 2.5rem;
}

.doc .meta {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25em;
  font-size: 0.97rem;
}

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

.doc th {
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.toc h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

/* French legal pages: one line under the date saying the English version prevails. */
.lang-note {
  font-size: 0.95rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
}

.review-note {
  margin-top: 2.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  padding-top: 1rem;
}

/* FAQ */

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem 1rem;
  margin-bottom: 0.75rem;
}

summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.75rem 0;
  list-style-position: outside;
}

details[open] summary {
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.contact-box {
  font-size: 1.1rem;
}

.contact-box a {
  font-weight: 600;
  word-break: break-all;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.flush-top {
  margin-top: 0;
}

.flush-bottom {
  margin-bottom: 0;
}
