/* Tokens and primitives shared by the site and the app. 8px spacing system. */

:root {
  --black: #0a0a0a;
  --ink: #1d1d1f;
  --paper: #fbfbfd;
  --white: #ffffff;

  /* Text on light */
  --text: #1d1d1f;
  --muted: #5f5f65;
  --hairline: #d9d9de;
  --surface: #f2f2f5;

  /* Text on dark */
  --d-text: #f5f5f7;
  --d-muted: #a1a1a6;
  --d-dim: #6e6e73;
  --d-hairline: #262628;
  --d-surface: #121213;

  /* The one accent. --accent-ink is the same hue, dark enough for text on light. */
  --accent: #ff5b1f;
  --accent-ink: #b8400d;
  --danger: #c4311d;

  --display: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px; --s6: 48px; --s8: 64px; --s10: 80px; --s12: 96px;
  --gutter: clamp(20px, 4vw, 48px);
}

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

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

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

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Buttons: pill, solid for primary; text link with chevron for secondary. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 999px;
  font-family: var(--body); font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 150ms var(--ease), opacity 200ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-accent { background: var(--accent); color: var(--black); }
.btn-accent:hover:not([disabled]) { background: #ff7440; }

.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover:not([disabled]) { background: #3a3a3d; }

.btn-light { background: var(--d-text); color: var(--black); }
.btn-light:hover:not([disabled]) { background: var(--white); }

.btn-ghost { border-color: var(--hairline); background: transparent; color: var(--text); }
.btn-ghost:hover:not([disabled]) { border-color: var(--ink); }
.on-dark .btn-ghost { border-color: #3a3a3d; color: var(--d-text); }
.on-dark .btn-ghost:hover:not([disabled]) { border-color: var(--d-text); }

.link {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px;
  background: none; border: 0; padding: 0;
  font-size: 15px; font-weight: 500; color: var(--accent-ink);
  transition: opacity 200ms var(--ease);
}
.link::after { content: '›'; font-size: 1.2em; line-height: 1; transition: transform 200ms var(--ease); }
.link:hover { opacity: 0.75; }
.link:hover::after { transform: translateX(3px); }
.on-dark .link { color: var(--accent); }

/* Thumbs up and down under an answer, on the call screen and in the home page's copy of it. */
.cue-rate { display: flex; align-items: center; gap: 10px; }
.rate-btn {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid #3a3a3d; border-radius: 50%; color: var(--d-muted);
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 150ms var(--ease);
}
.rate-btn svg { width: 45%; height: 45%; }
button.rate-btn:hover { border-color: var(--d-text); color: var(--d-text); }
button.rate-btn:active { transform: scale(0.92); }
button.rate-btn[aria-pressed='true'] { background: var(--d-text); border-color: var(--d-text); color: var(--black); }
.rate-note { margin-left: 4px; font-size: 14px; line-height: 1.35; color: var(--d-dim); }

kbd {
  display: inline-block; min-width: 20px; padding: 2px 6px;
  border: 1px solid currentColor; border-radius: 5px;
  font-family: var(--body); font-size: 11px; font-weight: 500; line-height: 1.3; text-align: center;
  opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
