/* Layout: one narrow column like a service manual. Black rules, IBM Plex Sans for reading,
   IBM Plex Mono for anything you type or read off a machine. Fonts are served from ./fonts
   (SIL Open Font License, see fonts/OFL.txt): the site makes no requests to other hosts. */
@font-face { font-family: "Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/plex-sans-700.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/plex-mono-600.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #5b5b5b;
  --rule: #e4e4e4;
  --soft: #f4f4f4;
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0a0a0a; --fg: #f2f2f2; --muted: #9c9c9c; --rule: #262626; --soft: #161616; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0a0a0a; --fg: #f2f2f2; --muted: #9c9c9c; --rule: #262626; --soft: #161616; color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.65 var(--sans);
  font-feature-settings: "kern";
}
a { color: var(--fg); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; }

.top, main, footer, article {
  max-width: 780px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
main > *, article > * { min-width: 0; }

/* header */
.top {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px;
  padding-block: 26px; border-bottom: 1px solid var(--fg);
}
.mark { font: 600 14px/1 var(--mono); letter-spacing: 0.14em; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 15px; }
/* links in the header and footer: an underline that draws in from the left */
nav a, footer .links a {
  text-decoration: none; color: var(--muted); padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .28s cubic-bezier(.2,.7,.2,1), color .2s;
}
nav a:hover, nav a[aria-current], footer .links a:hover { color: var(--fg); background-size: 100% 1px; }
footer .links { display: flex; flex-wrap: wrap; gap: 4px 20px; }

/* landing */
section { padding: 52px 0 4px; }
.hero { padding-top: 72px; }
h1 { font-size: clamp(32px, 6.4vw, 52px); line-height: 1.06; letter-spacing: -0.025em; margin: 0 0 22px; font-weight: 700; }
h2 { font: 600 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.14em; margin: 0 0 20px; }
h3 { font-size: 16px; font-weight: 500; margin: 0 0 4px; }
.lead { font-size: 19px; line-height: 1.6; max-width: 640px; margin: 0; }
.fine { font-size: 14px; color: var(--muted); }
.more { margin-top: 20px; }

/* operating system switch */
.os { display: flex; flex-wrap: wrap; border: 1px solid var(--fg); border-bottom: 0; width: fit-content; max-width: 100%; }
.os button {
  font: 500 13px/1 var(--mono); padding: 10px 16px; cursor: pointer;
  background: var(--bg); color: var(--muted); border: 0; border-right: 1px solid var(--fg);
}
.os button:last-child { border-right: 0; }
.os button { transition: background-color .2s, color .2s; }
.os button:hover { color: var(--fg); background: var(--soft); }
.os button[aria-selected="true"] { background: var(--fg); color: var(--bg); }
.os-panel:not([hidden]) { animation: swap .32s cubic-bezier(.2,.7,.2,1); }
.os-panel .note { font-size: 14px; color: var(--muted); margin: 10px 0 0; }

/* code: a label bar on top carries the copy button, so it never covers the command */
.code { border: 1px solid var(--fg); margin: 0; }
.code-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--rule);
  font: 12px/1.4 var(--mono); color: var(--muted);
}
.copy {
  font: 600 12px/1 var(--mono); cursor: pointer; flex: none;
  background: var(--fg); color: var(--bg); border: 0; padding: 7px 11px;
}
pre, code { font-family: var(--mono); font-size: 13.5px; }
.code pre {
  margin: 0; padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6;
}

/* what it checks */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.grid > div { padding: 18px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.grid p { margin: 0; color: var(--muted); font-size: 15px; }

/* the three questions */
.qs { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--fg); }
.qs li { border-bottom: 1px solid var(--rule); }
.qs a {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 20px; align-items: center;
  padding: 18px 12px; margin: 0 -12px; text-decoration: none;
  transition: background-color .25s;
}
.qs .q { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.qs .a { grid-column: 1; color: var(--muted); font-size: 15px; min-width: 0; }
.qs .arrow { grid-column: 2; grid-row: 1 / span 2; font: 18px var(--mono); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.qs a:hover { background: var(--soft); }
.qs a:hover .arrow { transform: translateX(6px); }

/* sample result: a scan line sweeps down and each tag stamps as it passes */
.result { position: relative; overflow: hidden; border: 1px solid var(--fg); font: 13.5px/1.5 var(--mono); }
.result .code-bar span:last-child { color: var(--muted); }
.result.run::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--fg);
  animation: scan 1.5s .35s cubic-bezier(.45,0,.25,1) both;
}
.result.run .row:nth-of-type(2) .tag { animation: stamp .4s .55s both; }
.result.run .row:nth-of-type(3) .tag { animation: stamp .4s .85s both; }
.result.run .row:nth-of-type(4) .tag { animation: stamp .4s 1.15s both; }
.result.run .row:nth-of-type(5) .tag { animation: stamp .4s 1.45s both; }
.row { display: flex; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--rule); align-items: baseline; transition: background-color .2s; }
.row:hover { background: var(--soft); }
.row:last-child { border-bottom: 0; }
.row > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.tag { flex: 0 0 48px; text-align: center; font-weight: 600; font-size: 12px; padding: 1px 0; }
.tag.fail { background: var(--fg); color: var(--bg); }
.tag.warn { border: 1px solid var(--fg); }
.tag.pass { color: var(--muted); }

/* platform table */
.matrix { overflow-x: auto; }
.matrix table, article table { border-collapse: collapse; width: 100%; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.matrix th, .matrix td, article th, article td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.matrix th, article th { border-bottom: 1px solid var(--fg); font-weight: 500; }

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 10px 0; border-bottom: 1px solid var(--rule); }

footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: 72px; padding-block: 20px 40px; border-top: 1px solid var(--fg);
  font-size: 14px; color: var(--muted);
}

/* rendered Markdown pages */
article { padding-top: 44px; }
article h1 { font-size: clamp(30px, 5vw, 40px); }
article h2 { font: 700 21px/1.3 var(--sans); text-transform: none; letter-spacing: -0.01em; margin: 46px 0 12px; }
article h3 { margin-top: 28px; font-weight: 700; }
article p, article li { max-width: 680px; }
article :not(pre) > code { background: var(--soft); padding: 1px 5px; font-size: 0.88em; overflow-wrap: anywhere; }
article .scroll { overflow-x: auto; margin: 16px 0; }
article input[type="checkbox"] { accent-color: var(--fg); margin-right: 6px; }
article .code { margin: 16px 0; }
.status { color: var(--muted); }

/* motion: short, and every animated thing is readable before, during and after */
.copy { transition: background-color .2s, color .2s, box-shadow .2s; }
.copy:hover { background: var(--bg); color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.hero h1, .hero .lead { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero .lead { animation-delay: .08s; }
.cmd { animation: rise .7s .14s cubic-bezier(.2,.7,.2,1) both; }
.caret {
  display: inline-block; width: .42em; height: .78em; margin-left: .1em; vertical-align: -0.04em;
  background: var(--fg); animation: blink 1.1s steps(1) infinite;
}
article.in { animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }

@keyframes rise  { from { transform: translateY(12px); } to { transform: none; } }
@keyframes swap  { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes scan  { 0% { top: 0; opacity: 1; } 92% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes stamp { 0% { transform: scale(1.3); } 60% { transform: scale(.94); } 100% { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .result.run::after { display: none; }
}
