@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

/* A subset of Cascadia Mono, renamed because its OFL reserves the Cascadia Code name. */
@font-face {
  font-family: "Site Mono";
  src: url("fonts/site-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0c0c0d;
  --panel: #121214;
  --fg: #ecebe8;
  --gray: #9d9ca3;
  --line: rgb(157 156 163 / 0.2);
  --cy: #89dceb;
  --gr: #a6e3a1;
  --ye: #f9e2af;
  --re: #f38ba8;
  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --mono: "Site Mono", ui-monospace, monospace;
  --pad: 24px;
  --term: 17px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(880px, 100% - 2 * var(--pad)); margin-inline: auto; }

a { color: inherit; text-decoration: underline; text-decoration-color: rgb(236 235 232 / 0.35); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }

code, pre { font-family: var(--mono); font-variant-ligatures: none; }
code { font-size: 0.88em; }
pre code { font-size: inherit; }
/* Inline code that cannot break sets a min width that scrolls phones sideways. */
:not(pre) > code { overflow-wrap: anywhere; }

h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p { margin: 0 0 16px; }
p, dd, li, td { text-wrap: pretty; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

button { font: inherit; color: inherit; cursor: pointer; }

/* Header */

.bar { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.wordmark { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.bar a { font-size: 15px; }

/* Hero */

.hero { padding-block: 72px 96px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 56px); line-height: 1.06; letter-spacing: -0.028em; margin: 0; max-width: 15em; }
.lede { font-size: clamp(18px, 2.1vw, 20px); line-height: 1.5; color: var(--gray); margin: 20px 0 0; max-width: 36em; }

.install { margin-top: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.install-bar { display: none; }
.js .install-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 10px 0 6px; border-bottom: 1px solid var(--line);
}
.tabs { display: flex; }
[role="tab"] {
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 12px 12px 11px; font-size: 15px; font-weight: 500; color: var(--gray); white-space: nowrap;
}
[role="tab"]:hover { color: var(--fg); }
.js[data-os="win"] #tab-win, .js[data-os="unix"] #tab-unix { color: var(--fg); border-bottom-color: var(--fg); }
.copy {
  background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 12px; font-size: 14px; font-weight: 500; min-width: 76px;
}
.copy:hover { border-color: var(--gray); }

.panels { display: grid; }
.js .panel { grid-area: 1 / 1; }
.js[data-os="win"] #panel-unix, .js[data-os="unix"] #panel-win { visibility: hidden; }
html:not(.js) .panel + .panel { border-top: 1px solid var(--line); }
.panel-label { margin: 0; padding: 14px 20px 0; font-size: 15px; color: var(--gray); }
.js .panel-label { display: none; }
.panel pre { margin: 0; padding: 16px 20px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }

.after { margin: 12px 0 0; font-size: 15px; color: var(--gray); }

.showcase { margin: 56px 0 0; }

/* Terminal output */

.term {
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  padding: 24px 28px; overflow-x: auto;
}
.screen { display: grid; }
.term-out {
  grid-area: 1 / 1; margin: 0; font-size: var(--term); line-height: 1.7; white-space: pre;
  opacity: 0; visibility: hidden; transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.term-out.is-active { opacity: 1; visibility: visible; transition: opacity 0.6s ease, visibility 0s; }
.term-out[data-width="narrow"] { display: none; }
.cy { color: var(--cy); }
.gr { color: var(--gr); }
.ye { color: var(--ye); }
.re { color: var(--re); }
.dim { color: var(--gray); }

.states { display: none; }
.js .states { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.states button {
  background: none; border: 1px solid transparent; border-radius: 999px;
  padding: 4px 12px; font-size: 14px; font-weight: 500; color: var(--gray);
}
.states button:hover { color: var(--fg); }
.states button[aria-pressed="true"] { color: var(--fg); border-color: var(--line); }

/* Sections */

.section > .wrap { border-top: 1px solid var(--line); padding-block: 72px 88px; }
.section h2 { font-size: 30px; line-height: 1.2; letter-spacing: -0.018em; margin: 0 0 12px; }
.section h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; margin: 48px 0 8px; }
.intro { color: var(--gray); margin-bottom: 32px; max-width: 40em; }
.note { color: var(--gray); font-size: 15px; margin: 20px 0 0; }
.links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 24px 0 0; font-size: 15px; }

.rows { display: grid; grid-template-columns: max-content 1fr; column-gap: 48px; margin: 0; }
.rows > div {
  display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: baseline;
  padding-block: 13px; border-top: 1px solid var(--line);
}
.rows > div:last-child { border-bottom: 1px solid var(--line); }
.rows dd { margin: 0; }
.segments dt { font-family: var(--mono); font-size: 15px; white-space: pre; }
.segments dd { color: var(--gray); }
.facts { margin-bottom: 24px; }
.facts dt { font-weight: 500; }

.legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; list-style: none; padding: 0; margin: 20px 0 0; }
.legend li { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.legend .sample { font-family: var(--mono); font-size: 15px; white-space: pre; }
.legend li > span:last-child { color: var(--gray); font-size: 15px; }

table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; vertical-align: baseline; padding: 12px 24px 12px 0; border-top: 1px solid var(--line); }
tbody tr:last-child > * { border-bottom: 1px solid var(--line); }
thead th { font-size: 15px; font-weight: 500; color: var(--gray); }
tbody th { font-weight: 500; }

.preset h3 { margin-top: 40px; }
.preset p { color: var(--gray); margin-bottom: 14px; }
.preset .term { border-radius: 10px 10px 0 0; padding: 20px 26px; }
.preset .term-out { font-size: 14px; }
.preset .code {
  margin: 0; padding: 14px 26px; font-size: 14px; line-height: 1.6; overflow-x: auto;
  border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px;
}

.env { margin-top: 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.env summary { padding-block: 14px; font-weight: 500; cursor: pointer; }
.env[open] summary { border-bottom: 1px solid var(--line); }
.table-scroll { overflow-x: auto; padding-bottom: 8px; }
.env table { min-width: 560px; font-size: 15px; }
.env thead th { border-top: 0; }
.env tbody tr:last-child > * { border-bottom: 0; }
.env td:first-child, .env td:nth-child(2) { white-space: nowrap; }

/* Footer */

.site-footer { padding-block: 0 56px; font-size: 15px; color: var(--gray); }
.site-footer .wrap { border-top: 1px solid var(--line); padding-top: 32px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot-row nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-row p { margin: 0; }
.site-footer a { color: var(--fg); }

/* Narrower screens */

@media (max-width: 899px) {
  :root { --term: 14px; }
}

@media (max-width: 699px) {
  :root { --pad: 20px; --term: 13px; }
  .term { padding: 16px 16px; }
  .term-out[data-width="wide"] { display: none; }
  .term-out[data-width="narrow"] { display: block; }
  .hero { padding-block: 48px 80px; }
  .section > .wrap { padding-block: 56px 72px; }
  .section h2 { font-size: 26px; }
  .panel pre { padding: 14px 16px; font-size: 13px; }
  .preset .term-out, .preset .code { font-size: 13px; }
  .preset .code { padding-inline: 16px; }
  .rows { column-gap: 24px; }
  .segments dt, .legend .sample { font-size: 13px; }
}

@media (max-width: 520px) {
  .rows { grid-template-columns: 1fr; }
  .rows > div { grid-template-columns: 1fr; row-gap: 2px; }
  .legend { grid-template-columns: 1fr; gap: 0; }
  .legend li { padding-block: 12px; }
  .legend li:last-child { border-bottom: 1px solid var(--line); }
  .js .install { display: grid; }
  .js .install-bar { display: contents; }
  .tabs { border-bottom: 1px solid var(--line); padding: 0 4px; }
  [role="tab"] { padding-inline: 10px; font-size: 14px; }
  .panels { order: 1; }
  .copy { order: 2; justify-self: start; margin: 0 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .term-out, .term-out.is-active { transition: none; }
}
