@font-face {
  font-family: "Brygada 1918";
  src: url("fonts/Brygada1918-Bold.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* The same type and colors as the Small Fig app and billing portal. */
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-brand: "Brygada 1918", Georgia, "Times New Roman", serif;
  --page: #ffffff;
  --ink: #18181a;
  --ink-muted: #5f6067;
  --line: #e6e6e8;
  --accent: #7b4e71;
  --accent-soft: #ead8e5;
  --logo: url("images/figs_light_mode.svg");
  color-scheme: light;
}

[data-theme="dark"] {
  --page: #18181a;
  --ink: #ffffff;
  --ink-muted: #acacaf;
  --line: #454549;
  --accent: #e8c4e3;
  --accent-soft: #4a3548;
  --logo: url("images/figs_dark_mode.svg");
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--page);
  font-family: var(--font-ui);
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, figure { margin: 0; }

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover { color: var(--ink); }

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

[id] { scroll-margin-top: 24px; }

.page {
  width: min(900px, calc(100% - 48px));
  margin-inline: auto;
}

.reading-width { max-width: 720px; }

.site-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 38px;
  flex: 0 0 auto;
  background: var(--logo) center / contain no-repeat;
}

.brand-name {
  font-family: var(--font-brand);
  font-size: 1.875rem;
  font-weight: 400;
  line-height: 1;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.introduction { padding-top: 24px; }

h1 {
  max-width: 660px;
  font-size: clamp(1.875rem, 3.2vw, 2.25rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.intro-copy {
  margin-top: 20px;
  font-size: 1.125rem;
}

.introduction > p + p { margin-top: 16px; }

.introduction + .product-figure { margin-top: 32px; }

.screenshot-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
}

.screenshot-link img {
  display: block;
  width: 100%;
  height: auto;
}

.theme-image-dark { display: none; }
[data-theme="dark"] .theme-image-light { display: none; }
[data-theme="dark"] .theme-image-dark { display: block; }

.product-figure figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.product-notes { margin-top: 48px; }

.product-notes section + section { margin-top: 40px; }

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.product-notes p { margin-top: 16px; }

.storage-figure { margin-top: 24px; }

.hosting-options {
  margin: 12px 0 0;
  padding-left: 22px;
}

.hosting-options li + li { margin-top: 8px; }

.hosting-options strong { font-weight: 600; }

.site-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 48px;
  padding-block: 24px 32px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--page);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); color: var(--page); }

@media (max-width: 600px) {
  .page { width: calc(100% - 40px); }
  .site-header { min-height: 88px; }
  .introduction { padding-top: 12px; }
  .intro-copy { font-size: 1rem; }
  .product-notes { margin-top: 40px; }
  .product-figure figcaption { font-size: 0.75rem; }
}
