/* FlashTeX website — a printer's proof.
   Key black for type, process cyan for TeX boxes, magenta for glue. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Fragment Mono";
  src: url("fonts/fragment-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Latin Modern Roman";
  src: url("fonts/lmroman10-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Latin Modern Roman";
  src: url("fonts/lmroman10-italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Latin Modern Roman";
  src: url("fonts/lmroman10-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f4f3ee;
  --sheet: #ffffff;
  --ink: #111214;
  --ink-2: #4b4e55;
  --ink-3: #5d6068;
  --rule: rgba(17, 18, 20, 0.14);
  --rule-strong: rgba(17, 18, 20, 0.32);
  --cyan: #0086bd;
  --cyan-wash: rgba(0, 134, 189, 0.08);
  --magenta: #c8006f;
  --on-ink: #f4f3ee;
  --shadow: 0 1px 2px rgba(17, 18, 20, 0.06), 0 18px 40px -18px rgba(17, 18, 20, 0.22);

  --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --text: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --tex: "Latin Modern Roman", "Computer Modern", "Times New Roman", serif;

  --gutter: clamp(16px, 4.5vw, 64px);
  --max: 1320px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0f1012;
    --sheet: #18191c;
    --ink: #ecebe6;
    --ink-2: #b3b4b8;
    --ink-3: #8c8e94;
    --rule: rgba(236, 235, 230, 0.13);
    --rule-strong: rgba(236, 235, 230, 0.32);
    --cyan: #3fbff2;
    --cyan-wash: rgba(63, 191, 242, 0.09);
    --magenta: #ff5aa9;
    --on-ink: #0f1012;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 24px 48px -20px rgba(0, 0, 0, 0.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1012;
  --sheet: #18191c;
  --ink: #ecebe6;
  --ink-2: #b3b4b8;
  --ink-3: #8c8e94;
  --rule: rgba(236, 235, 230, 0.13);
  --rule-strong: rgba(236, 235, 230, 0.32);
  --cyan: #3fbff2;
  --cyan-wash: rgba(63, 191, 242, 0.09);
  --magenta: #ff5aa9;
  --on-ink: #0f1012;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 24px 48px -20px rgba(0, 0, 0, 0.7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: var(--rule-strong) var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.55 var(--text);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--cyan); color: var(--sheet); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
button { font: inherit; color: inherit; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; z-index: 50; background: var(--ink); color: var(--on-ink); padding: 8px 12px; }

/* Wordmark: the TeX logo's lowered E, set in Archivo. */
.wordmark {
  font: 700 1.3rem/1 var(--display);
  font-stretch: 88%;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark .e { position: relative; top: 0.22em; margin-inline: -0.1em; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); font-size: 0.94rem; }
.nav a { text-decoration: none; color: var(--ink-2); transition: color 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .nav-dl { color: var(--ink); font-weight: 600; }
@media (max-width: 560px) { .nav .hide-sm { display: none; } }

/* Buttons: square, like a slug of type. */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 0 22px;
  border: 1px solid var(--ink); border-radius: 0;
  font: 600 1rem/1 var(--text); text-decoration: none; white-space: nowrap;
  color: var(--ink); background: transparent; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { background: var(--ink); color: var(--on-ink); }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { box-shadow: 5px 5px 0 -1px var(--cyan); transform: translate(-2px, -2px); }
.btn:active { transform: none; box-shadow: none; }
.btn-meta { font: 400 0.78rem/1 var(--mono); }
.btn.is-disabled { border-color: var(--rule-strong); color: var(--ink-2); cursor: default; }
.btn.is-disabled:hover { background: transparent; color: var(--ink-2); }
@media (max-width: 420px) { .btn { white-space: normal; } }

/* Command snippet with copy button */
.snippet {
  display: flex; align-items: stretch; min-width: 0;
  background: var(--sheet); border: 1px solid var(--rule-strong);
}
.snippet code {
  flex: 1; min-width: 0; padding: 14px 16px; font-size: 0.86rem; line-height: 1.6;
  overflow-x: auto; white-space: nowrap; scrollbar-width: thin;
}
.snippet .p { color: var(--ink-3); user-select: none; }
.copy {
  flex: none; min-width: 78px; padding: 0 16px; border: 0; border-left: 1px solid var(--rule-strong);
  background: transparent; cursor: pointer; font: 500 0.8rem/1 var(--mono); color: var(--ink-2);
  transition: background-color 0.2s, color 0.2s;
}
.copy:hover { background: var(--ink); color: var(--on-ink); }

/* Crop marks at the corners of a proof sheet */
.crop { position: relative; }
.crop > .mark { position: absolute; width: 18px; height: 18px; pointer-events: none; }
.crop > .mark::before, .crop > .mark::after { content: ""; position: absolute; background: var(--ink); }
.crop > .mark::before { width: 18px; height: 1px; }
.crop > .mark::after { width: 1px; height: 18px; }
.mark.tl { top: -26px; left: -26px; } .mark.tl::before { bottom: 0; right: 8px; } .mark.tl::after { right: 0; bottom: 8px; }
.mark.tr { top: -26px; right: -26px; } .mark.tr::before { bottom: 0; left: 8px; } .mark.tr::after { left: 0; bottom: 8px; }
.mark.bl { bottom: -26px; left: -26px; } .mark.bl::before { top: 0; right: 8px; } .mark.bl::after { right: 0; top: 8px; }
.mark.br { bottom: -26px; right: -26px; } .mark.br::before { top: 0; left: 8px; } .mark.br::after { left: 0; top: 8px; }

/* Footer colophon */
.site-footer { margin-top: clamp(96px, 14vw, 180px); border-top: 1px solid var(--ink); padding-block: 40px 56px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.colophon { color: var(--ink-2); font-size: 0.9rem; max-width: 36ch; margin-top: 14px; }
.colophon em { font-family: var(--tex); font-size: 1.08em; }
.site-footer h2 { font: 500 0.76rem/1 var(--mono); color: var(--ink-3); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.92rem; }
.site-footer ul a { text-decoration: none; color: var(--ink-2); }
.site-footer ul a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

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

/* First-launch warning on the DMG row, and the inline command block in notes. */
.row-warn { margin-top: 10px; font-size: 0.92rem; color: var(--text-2); }
.note pre.cmd { margin: 12px 0 4px; padding: 12px 14px; overflow-x: auto;
  background: var(--surface-2, rgba(127,127,127,0.08)); border-radius: 8px; }
.note pre.cmd code { font-size: 0.9rem; white-space: pre; }
