/* Two Tails website. Colors are the app's tokens from docs/DESIGN.md (measured there). */
:root {
  color-scheme: light dark;
  --bg: #F3F8F7;
  --card: #FFFFFF;
  --surface: #DFE6E8;
  --mint: #BCE7E0;
  --text: #172B3A;
  --text-2: #4C6472;
  --accent: #3C58C2;
  --radius: 20px;
  --radius-inner: 12px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D171D;
    --card: #15222A;
    --surface: #21313B;
    --mint: #1D4441;
    --text: #E6F0EF;
    --text-2: #9DB2BC;
    --accent: #93A8F2;
  }
}

/* Increased Contrast values from DESIGN.md. */
@media (prefers-contrast: more) {
  :root { --text: #0B1A24; --text-2: #3B515E; --accent: #2E47A8; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --text: #F5FAF9; --text-2: #B8C9D1; --accent: #B0C0F7; }
}

*, *::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: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 12px 16px;
  background: var(--card);
  color: var(--accent);
  border-radius: var(--radius-inner);
  z-index: 10;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: 700px; margin: 0 auto; padding: 0 16px; }

header.site { padding: 20px 0 8px; }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
}
nav a[aria-current="page"] { background: var(--surface); color: var(--text); }

main { padding: 16px 0 40px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: 2rem; margin: 16px 0 8px; }
h2 { font-size: 1.375rem; margin: 32px 0 8px; }
h3 { font-size: 1.125rem; margin: 24px 0 4px; }
p, ul, ol, dl { margin: 0 0 12px; }
li { margin-bottom: 6px; }

.lede { font-size: 1.1875rem; color: var(--text); }
.meta { color: var(--text-2); font-size: 0.9375rem; }

.card { background: var(--card); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.card > :last-child { margin-bottom: 0; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.highlight { background: var(--mint); }

.notice {
  background: var(--surface);
  border-radius: var(--radius-inner);
  padding: 12px 16px;
  margin: 16px 0;
}
.notice > :last-child { margin-bottom: 0; }

blockquote {
  margin: 12px 0;
  padding: 12px 16px;
  background: var(--mint);
  border-radius: var(--radius-inner);
}

table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 0.9375rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--surface); }
th { font-weight: 600; }
.table-scroll { overflow-x: auto; }

footer.site { padding: 24px 0 40px; color: var(--text-2); font-size: 0.9375rem; }
footer.site ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
footer.site a { display: inline-flex; min-height: 44px; align-items: center; }

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