/*
  Livefy public site — one shared stylesheet, no dependencies.

  Colour, radius and spacing values are copied from the light `:root` tokens in
  design/system.md, which mirrors apps/desktop/src/styles.css. This stylesheet loads
  no remote font, no script and no image, and declares no motion at all, so there is
  nothing for `prefers-reduced-motion` to suppress.

  These are documents, not product screens: one narrow measure, system fonts,
  semantic HTML from the pages themselves.
*/

:root {
  color-scheme: light;

  /* Colours — light `:root` values, verbatim. */
  --background: oklch(1.0000 0 0);
  --foreground: oklch(0.2850 0 0);
  --muted: oklch(0.9845 0.0026 106.4477);
  --muted-foreground: oklch(0.5103 0 0);
  --border: oklch(0.9269 0.0160 110.5685);
  --ring: oklch(0.9347 0.1825 120.5229);

  /* Radius — `--radius` and its `-sm` step. */
  --radius: 1rem;
  --radius-sm: calc(var(--radius) * 0.6);

  /* Spacing — the single spacing unit. */
  --spacing: 0.25rem;

  /* Document measure and the local font stacks (no webfont is loaded). */
  --measure: 68ch;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: 0;
}

/* The measure is the text line: the 1.25rem side padding is added on top of it. */
.page {
  max-width: calc(var(--measure) + 2.5rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) 1.25rem 3rem;
}

/* Skip link: off the top edge until it takes focus, then a readable bar. */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 1;
  padding: calc(var(--spacing) * 2) calc(var(--spacing) * 3);
  border-radius: var(--radius-sm);
  background: var(--foreground);
  color: var(--background);
  font-size: 0.9375rem;
  text-decoration: none;
}

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

/* Header: the site name and the document links. */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: calc(var(--spacing) * 2) calc(var(--spacing) * 6);
  padding-bottom: calc(var(--spacing) * 4);
  border-bottom: 1px solid var(--border);
}

.site-name {
  font-size: 1.125rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--foreground);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing) * 4);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

/* Links: underlined by default, and a focus style that does not rely on the lime
   ring alone (the lime is 1.17:1 on white, so it always sits next to `--foreground`). */
a {
  color: var(--foreground);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--ring);
  border-radius: 2px;
}

/* Document body. */
main {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  margin: 0 0 calc(var(--spacing) * 3);
  font-size: clamp(1.75rem, 5vw, 2.125rem);
  font-weight: 650;
}

h2 {
  margin: clamp(2rem, 4vw, 2.75rem) 0 calc(var(--spacing) * 2);
  font-size: 1.25rem;
  font-weight: 650;
}

h3 {
  margin: calc(var(--spacing) * 6) 0 calc(var(--spacing) * 1);
  font-size: 1.0625rem;
  font-weight: 650;
}

p,
ul,
ol,
dl {
  margin: 0 0 calc(var(--spacing) * 4);
}

ul,
ol {
  padding-left: 1.35rem;
}

li {
  margin-bottom: calc(var(--spacing) * 1);
}

li > ul,
li > ol {
  margin-top: calc(var(--spacing) * 1);
}

/* The line under a heading: what the page is and when it was updated. */
.lede,
.doc-meta {
  color: var(--muted-foreground);
}

.lede {
  font-size: 1.125rem;
  margin-bottom: calc(var(--spacing) * 6);
}

.doc-meta {
  margin-top: calc(var(--spacing) * -1);
  font-size: 0.9375rem;
}

/* Field names from the TikTok API keep their exact spelling. */
code {
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  background: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.9375em;
}

dl {
  padding-left: 0;
}

dt {
  margin-top: calc(var(--spacing) * 3);
  font-weight: 650;
}

dd {
  margin: calc(var(--spacing) * 1) 0 0;
  color: var(--foreground);
}

/* A short list of links to the other documents. */
.doc-links {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: calc(var(--spacing) * 4);
  border-top: 1px solid var(--border);
}

.doc-links ul {
  margin-bottom: 0;
}

.site-footer {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: calc(var(--spacing) * 5);
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.site-footer p {
  margin: 0;
}

.site-footer .footer-name {
  color: var(--foreground);
  font-weight: 600;
}

.footer-year {
  color: var(--muted-foreground);
  font-weight: 400;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing) * 1) calc(var(--spacing) * 4);
  margin: calc(var(--spacing) * 2) 0 0;
  padding: 0;
  list-style: none;
}

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

.site-footer a:hover {
  color: var(--foreground);
}

/* The Login Kit redirect landing: one short screen, no navigation beyond the footer. */
.callback main {
  padding-top: clamp(2rem, 8vh, 4rem);
}

.callback h1 {
  margin-bottom: calc(var(--spacing) * 4);
}