/* The values come from docs/design/design-system/tokens.json. Change the token there first. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --font-display: Geist, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", Geist, "Helvetica Neue", Arial, sans-serif;

  /* Sheet */
  --ground: #ffffff;
  --text: #000000;
  --text-secondary: #68686e;
  --list-fill: #f3f3f5;
  --hairline: rgba(0, 0, 0, 0.08);
  --link: #2436c9;

  /* Block */
  --block-ground: #2436c9;
  --block-text: #ffffff;
  --block-text-secondary: #d5dbff;
  --block-line: rgba(255, 255, 255, 0.6);

  --screen-margin: 20px;
  --radius-tile: 22px;
  --radius-chip: 10px;
  --radius-pill: 9999px;
  --pill-height: 44px;
  --button-padding: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Sheet dark */
    --ground: #1c1c1e;
    --text: #ffffff;
    --text-secondary: #9a9aa1;
    --list-fill: #2c2c2e;
    --hairline: rgba(255, 255, 255, 0.1);
    --link: #ffffff;
  }
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem var(--screen-margin) 4rem;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--screen-margin);
  top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--ground);
  color: var(--text);
  border-radius: var(--radius-chip);
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

.site-header {
  margin-bottom: 2.5rem;
}

.site-header a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2.125rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.5rem;
}

p,
ul {
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.35rem;
}

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

.card {
  background: var(--list-fill);
  border-radius: var(--radius-tile);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.draft {
  border: 1.5px dashed var(--text-secondary);
  border-radius: var(--radius-tile);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.draft > :last-child {
  margin-bottom: 0;
}

.todo {
  background: #ffd84a;
  color: #000000;
  padding: 0 0.25em;
  border-radius: 4px;
}

.site-footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-footer li + li {
  margin-top: 0;
}

.site-footer a {
  color: var(--text-secondary);
}

/* Home: the Block style of the app tabs, in both appearances. */

.home {
  background: var(--block-ground);
  color: var(--block-text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.home .page {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home h1 {
  font-size: clamp(3rem, 12vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 1.03;
  margin-bottom: 1rem;
}

.home .lead {
  font-size: 1.375rem;
  line-height: 1.3;
  color: var(--block-text-secondary);
  margin-bottom: 2.5rem;
}

.home nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home nav li + li {
  margin-top: 0;
}

.home nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--pill-height);
  padding: 0.5rem var(--button-padding);
  border-radius: var(--radius-pill);
  box-shadow: inset 0 0 0 1.5px var(--block-line);
  color: var(--block-text);
  font-weight: 600;
  text-decoration: none;
}

.home nav a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.home .site-footer {
  border-top-color: rgba(255, 255, 255, 0.3);
  color: var(--block-text-secondary);
}
