/* SpeakLegends — Terms of Service
   Served at speaklegends.com/terms
   Self-contained, no external dependencies.
   Brand: clean4 look — light surface, blue accent #1CB0F6, readable type.
   Matches the privacy/ and support/ pages for a consistent legal-page set. */

:root {
  --sl-blue:        #1CB0F6;
  --sl-blue-dark:   #1188c4;
  --sl-blue-tint:   #e8f7fe;
  --sl-warn:        #c8881e;
  --sl-warn-tint:   #fdf3e0;
  --sl-warn-line:   #f0d49a;
  --ink:            #2b2f38;
  --ink-soft:       #5b6472;
  --ink-faint:      #8a93a3;
  --line:           #e6e9ef;
  --surface:        #ffffff;
  --surface-alt:    #f6f8fb;
  --radius:         14px;
  --maxw:           760px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--surface-alt);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Header ---- */
.site-header {
  background: var(--sl-blue);
  background: linear-gradient(135deg, #1CB0F6 0%, #1391d4 100%);
  color: #fff;
  padding: 40px 24px 44px;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.site-header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-header .effective {
  margin: 10px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

/* ---- Layout ---- */
.wrap {
  max-width: var(--maxw);
  margin: -24px auto 0;
  padding: 0 20px 64px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px clamp(20px, 5vw, 44px) 40px;
  box-shadow: 0 10px 36px rgba(27, 48, 79, 0.07);
}

.intro {
  font-size: 16px;
  color: var(--ink-soft);
}

/* ---- Table of contents (sticky on wide viewports) ---- */
.toc {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0 8px;
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.toc ol {
  margin: 0;
  padding-left: 22px;
  columns: 2;
  column-gap: 28px;
  font-size: 15px;
}

.toc li { margin: 4px 0; break-inside: avoid; }

/* ---- Sections ---- */
section { scroll-margin-top: 16px; }

h2.sec {
  margin: 38px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

section:first-of-type h2.sec {
  border-top: none;
  padding-top: 0;
  margin-top: 8px;
}

h3 {
  margin: 22px 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

p { margin: 12px 0; }

a {
  color: var(--sl-blue-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(28, 176, 246, 0.35);
}

a:hover { border-bottom-color: var(--sl-blue-dark); }

ul, ol { margin: 12px 0; padding-left: 22px; }
li { margin: 6px 0; }

strong { font-weight: 700; color: var(--ink); }

/* ---- Callout ---- */
.callout {
  background: var(--sl-blue-tint);
  border: 1px solid #bfe7fb;
  border-left: 4px solid var(--sl-blue);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 15px;
  color: var(--ink);
}

.callout strong { color: var(--sl-blue-dark); }

/* Warning-variant callout — used for the legal-review notice */
.callout-warn {
  background: var(--sl-warn-tint);
  border-color: var(--sl-warn-line);
  border-left-color: var(--sl-warn);
}

.callout-warn strong { color: var(--sl-warn); }

/* ---- Data table ---- */
.table-scroll { overflow-x: auto; margin: 16px 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 460px;
}

caption {
  caption-side: top;
  text-align: left;
  font-size: 13px;
  color: var(--ink-faint);
  padding-bottom: 8px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  background: var(--surface-alt);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

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

/* ---- Contact block ---- */
.contact {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 24px;
}

.contact h3 { margin-top: 0; }

.contact .row { margin: 4px 0; font-size: 15px; }

.contact .label {
  display: inline-block;
  min-width: 78px;
  color: var(--ink-faint);
  font-weight: 600;
}

/* ---- Legal footnote ---- */
.legal-footnote {
  margin: 36px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  font-style: italic;
  color: var(--ink-faint);
}

.legal-footnote strong { color: var(--ink-soft); font-style: normal; }

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 28px 20px 40px;
  font-size: 13px;
  color: var(--ink-faint);
}

.site-footer a { color: var(--ink-soft); border: none; }
.site-footer a:hover { color: var(--sl-blue-dark); }

.site-footer .links { margin-bottom: 8px; }
.site-footer .links a { margin: 0 8px; }

/* ---- Responsive ---- */
@media (min-width: 1080px) {
  /* On wide viewports the TOC tracks the reader as a sticky aside-style block. */
  .toc {
    position: sticky;
    top: 16px;
    z-index: 1;
  }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header { padding: 32px 18px 40px; }
  .site-header h1 { font-size: 24px; }
  .card { padding: 24px 18px 32px; }
  .toc ol { columns: 1; }
  h2.sec { font-size: 19px; }
}

/* ---- Dark mode ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --ink:          #e7ebf2;
    --ink-soft:     #aab3c2;
    --ink-faint:    #7d8696;
    --line:         #2a2f3a;
    --surface:      #181b22;
    --surface-alt:  #11141a;
    --sl-blue-tint: #15303d;
    --sl-blue-dark: #57c4fb;
    --sl-warn:      #e7b25a;
    --sl-warn-tint: #32260f;
    --sl-warn-line: #5c4720;
  }
  body { background: var(--surface-alt); }
  .card { box-shadow: 0 10px 36px rgba(0, 0, 0, 0.4); }
  .callout { border-color: #1f4d63; }
  .callout-warn { border-color: var(--sl-warn-line); }
  a { border-bottom-color: rgba(87, 196, 251, 0.4); }
  .brand-mark { background: #fff; }
}

/* ---- Print ---- */
@media print {
  body { background: #fff; font-size: 12pt; }
  .site-header { background: #fff !important; color: #000; }
  .site-header h1, .brand-name { color: #000; }
  .wrap { margin-top: 12px; }
  .card { border: none; box-shadow: none; padding: 0; }
  .toc { position: static; }
  .toc, .site-footer { display: none; }
  a { color: #000; border: none; }
}
