/* protocol.frida.chat: the technical home of Frida Protocol. The same type as the field guide on
   frida.chat (Source Serif for titles, the system sans for text, one reading column), bordered
   tables and LaTeX figures. Served from /assets because the CSP allows only same-origin styles. */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/source-serif-4.woff2) format("woff2");
}

:root {
  color-scheme: light dark;
  --ink: #1d1d1f;
  --mute: #6e6e73;
  --faint: #a1a1a6;
  --rule: #e5e5ea;
  --link: #0066cc;
  --bg: #fff;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f5f5f7; --mute: #a1a1a6; --faint: #6e6e73; --rule: #2c2c2e; --link: #2997ff; --bg: #0a0a0a; }
  img { background: #fff; }
}

html, body { margin: 0; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* header and footer */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem 1.75rem;
  padding: 1.4rem clamp(16px, 4vw, 2.5rem);
}
/* The wordmark: the same handwritten "frida" as frida.chat. Its baseline sits on the links'. */
.wordmark { display: block; line-height: 0; }
.wordmark img { display: block; height: 32px; width: auto; opacity: 0.85; transition: opacity 160ms ease; }
.wordmark:hover img { opacity: 1; }
/* "Developer" in a grey outlined tag beside the wordmark, which stays as it is. The tag sits on
   the letters' baseline (the image's bottom edge), level with "ida" rather than the tall f. */
.brand { display: flex; align-items: flex-end; gap: 0.5rem; }
.brand .tag {
  padding: 0.25rem 0.55rem;
  /* The logo's ink: a grey with a little violet in it. */
  border: 1px solid #dddce1;
  border-radius: 999px;
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
  color: #8b8993;
  /* frida.svg writes itself on and dots its i at 2.95s; the tag fades in once it has. */
  animation: tag-in 0.3s ease-out 2.95s both;
}
@keyframes tag-in { from { opacity: 0; transform: translateX(-4px); } }
@media (prefers-reduced-motion: reduce) {
  .brand .tag { animation: none; }
}
@media (prefers-color-scheme: dark) {
  .brand .tag { border-color: #3a3a3e; color: #8e8c96; }
}
/* The header links: the same rounded type as frida.chat's. */
.site-nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; font-family: ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, BlinkMacSystemFont, sans-serif; font-size: 1rem; font-weight: 500; line-height: 1; }
.site-nav a { color: #8a8a8a; text-decoration: none; transition: color 160ms ease; }
.site-nav a:hover, .site-nav a[aria-current] { color: #3a3a3a; text-decoration: none; }
main { flex: 1; width: 100%; max-width: 46rem; box-sizing: border-box; margin: 0 auto; padding: 1rem 16px 5rem; }
.site-footer { padding: 2rem 16px 2.5rem; text-align: center; font-size: 0.8125rem; color: var(--faint); }
.site-footer p { margin: 0.35rem 0; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--ink); text-decoration: none; }

/* text */
h1, h2, h3, h4 { font-family: "Source Serif 4", Georgia, serif; font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }
h1 { margin: 1.25rem 0 0.75rem; font-size: clamp(1.625rem, 1.4rem + 0.8vw, 2rem); letter-spacing: -0.015em; }
h2 { margin: 2.5rem 0 0.6rem; font-size: 1.375rem; }
h3 { margin: 2rem 0 0.45rem; font-size: 1.1875rem; }
h4 { margin: 1.5rem 0 0.35rem; font-size: 1.0625rem; }
.lede { margin-bottom: 1.75rem; font-size: 1.125rem; color: var(--mute); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
small, figcaption { color: var(--mute); }
hr { margin: 3rem 0; border: 0; border-top: 1px solid var(--rule); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
code { font-size: 0.88em; overflow-wrap: anywhere; }
pre { overflow-x: auto; padding: 0.9rem 1rem; border: 1px solid var(--rule); border-radius: 10px; font-size: 0.8125rem; line-height: 1.5; }
pre code { font-size: inherit; overflow-wrap: normal; }
blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 2px solid var(--rule); color: var(--mute); }

/* tables, figures, forms */
table { max-width: 100%; font-size: 0.9375rem; line-height: 1.4; }
.scroll { overflow-x: auto; }
figure { margin: 2.25rem 0; }
figcaption { margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.5; }
img { max-width: 100%; height: auto; }
fieldset { min-width: 0; }
input, select, textarea { max-width: 100%; box-sizing: border-box; }
textarea { font: inherit; }

/* the home page's ways in */
.doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.75rem 2.5rem; margin: 2.5rem 0 0; padding: 0; list-style: none; }
.doors a { font-family: "Source Serif 4", Georgia, serif; font-size: 1.1875rem; }
.doors p { margin: 0.3rem 0 0; font-size: 0.9375rem; color: var(--mute); }
