/* Starry legal and support pages: the grown-up palette on lavender paper. */

/* Self-hosted (latin subset, variable weight) so the pages make no third-party requests. Licence: fonts/OFL.txt */
@font-face {
  font-family: 'Grandstander';
  src: url('fonts/grandstander-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lexend';
  src: url('fonts/lexend-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --paper: #f5f2fc;
  --card: #ffffff;
  --ink: #211a52;
  --muted: #6d6893;
  --primary: #4b3fd1;
  --primary-deep: #3a2fb3;
  --line: #e3def3;
  --wash: #ebe7fa;
  --select: #d9d3fb;
  --gold: #ffc94d;
  --cream: #fff8ec;

  --display: 'Grandstander', 'Chalkboard SE', 'Comic Sans MS', system-ui, sans-serif;
  --text: 'Lexend', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
  scrollbar-color: #c9c2ec var(--paper);
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  caret-color: var(--primary);
}

::selection {
  background: var(--select);
  color: var(--ink);
}

/* Links and focus */
a {
  color: var(--primary);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, var(--primary) 45%, transparent);
  transition: text-decoration-color 160ms ease-out, color 160ms ease-out;
}

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

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--card);
  border-radius: 10px;
  font-weight: 500;
}

.skip:focus {
  top: 0.75rem;
}

/* Draft banner: the owner removes it after legal review. */
.draft {
  margin: 0;
  padding: 0.7rem var(--gutter);
  background: var(--ink);
  color: var(--cream);
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.01em;
}

/* Header */
.masthead {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
}

.brand:hover {
  color: var(--ink);
}

.brand svg {
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
}

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

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.9rem;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}

.site-nav {
  margin-left: -0.9rem;
}

@media (min-width: 40rem) {
  .site-nav {
    margin-left: 0;
    margin-right: -0.9rem;
  }
}

.site-nav a:hover {
  background: var(--wash);
}

.site-nav a[aria-current='page'] {
  background: var(--primary);
  color: #fff;
}

/* Page layout */
.page {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) var(--gutter) 4rem;
}

.page-head {
  max-width: var(--measure);
  margin-bottom: 2.5rem;
}

h1,
h2 {
  font-family: var(--display);
  color: var(--ink);
  text-wrap: balance;
  letter-spacing: -0.01em;
}

h1 {
  margin: 0 0 0.75rem;
  font-weight: 800;
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);
  line-height: 1.05;
}

.lede {
  margin: 0;
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--ink);
}

.meta {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.with-toc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

@media (min-width: 64rem) {
  .with-toc {
    grid-template-columns: 14rem minmax(0, var(--measure));
    gap: 4rem;
    align-items: start;
  }
}

/* On this page */
.toc {
  font-size: 0.9375rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.toc h2 {
  margin: 0 0 0.5rem;
  font-family: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2 11rem;
  column-gap: 1.5rem;
}

.toc li {
  break-inside: avoid;
}

.toc a {
  display: block;
  padding: 0.3rem 0;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.4;
}

.toc a:hover {
  color: var(--primary);
}

@media (min-width: 64rem) {
  .toc {
    position: sticky;
    top: 1.5rem;
    border: 0;
    padding: 0;
  }

  .toc ol {
    columns: auto;
    border-left: 1px solid var(--line);
  }

  .toc a {
    padding: 0.35rem 0 0.35rem 1rem;
    margin-left: -1px;
    border-left: 1px solid transparent;
  }

  .toc a:hover {
    border-left-color: var(--primary);
  }
}

/* Prose */
.prose {
  max-width: var(--measure);
}

.prose section + section {
  margin-top: 3rem;
}

.prose h2 {
  margin: 0 0 0.75rem;
  font-weight: 700;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
  line-height: 1.2;
}

.prose h3 {
  margin: 1.75rem 0 0.4rem;
  font-family: var(--text);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.35;
  text-wrap: balance;
}

.prose p,
.prose ul,
.prose ol,
.prose dl {
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose li::marker {
  color: var(--primary);
}

.prose strong {
  font-weight: 600;
}

/* The children's promise: the part a parent reads first. */
.promise {
  margin: 0 0 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 6px 20px -8px rgba(33, 26, 82, 0.18);
}

.promise ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.promise li {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  margin: 0;
  font-weight: 500;
}

.promise li::before {
  content: '';
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--gold);
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
  transform: translateY(0.05rem);
}

/* Processor table */
.table-wrap {
  margin: 0 0 1rem;
  overflow-x: auto;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 6px 20px -8px rgba(33, 26, 82, 0.18);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

caption {
  text-align: left;
  padding: 1rem 1.25rem 0;
  font-weight: 600;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1.25rem;
}

thead th {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

tbody tr + tr th,
tbody tr + tr td {
  border-top: 1px solid var(--line);
}

tbody th {
  font-weight: 600;
}

@media (max-width: 40rem) {
  /* Stack each company into a block so nothing scrolls sideways on a phone. */
  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  tbody tr {
    padding: 0.9rem 1.25rem;
  }

  tbody tr + tr {
    border-top: 1px solid var(--line);
  }

  tbody tr + tr th,
  tbody tr + tr td {
    border-top: 0;
  }

  tbody th,
  tbody td {
    padding: 0;
  }

  tbody td:last-child {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--muted);
  }

  tbody td:last-child::before {
    content: 'Where: ';
  }
}

/* Prices */
.prices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0;
}

.prices div {
  padding: 1rem 1.25rem;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 6px 20px -8px rgba(33, 26, 82, 0.18);
}

.prices dt {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

.prices dd {
  margin: 0.15rem 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}

/* Contact box */
.contact {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

/* Home */
.home-links {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--measure);
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.home-links li {
  border-bottom: 1px solid var(--line);
}

.home-links a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.15rem 1.5rem;
  padding: 1.25rem 0.25rem;
  color: var(--ink);
  text-decoration: none;
}

.home-links strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
}

.home-links span {
  grid-column: 1;
  color: var(--muted);
}

.home-links svg {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.home-links a:hover strong {
  color: var(--primary);
}

.home-links a:hover svg {
  transform: translateX(4px);
}

/* Footer */
.footer {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

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

@media print {
  .draft,
  .site-nav,
  .toc,
  .skip {
    display: none;
  }

  body {
    background: #fff;
  }
}
