/* Shared by every page of kcode.outhad.com: the fonts, the colors, the header and footer, code,
   and screenshots. Each page keeps its own layout in its <style>. Terminals and code blocks stay
   dark in both themes, the way a terminal does. */

@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 300 600;
  font-stretch: 75% 112.5%;
  font-display: swap;
  src: url("/fonts/martian-mono.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
    U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/hanken-grotesk.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
    U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #0c0c0e;
  --surface: #131316;
  --surface-2: #1a1a1f;
  --line: #25252b;
  --edge: #34343c;
  --text: #ececf0;
  --muted: #9a9aa5;
  --faint: #686873;
  --accent: #fab283;
  --accent-soft: rgba(250, 178, 131, 0.12);
  --on-accent: #1d120a;
  --ok: #7fd88f;
  --ok-soft: rgba(127, 216, 143, 0.14);
  --dot: #1e1e24;
  --shadow: rgba(0, 0, 0, 0.55);

  --term-bg: #0f0f12;
  --term-panel: #16161a;
  --term-line: #26262c;
  --term-text: #e6e6ea;
  --term-dim: #85858f;
  --term-accent: #fab283;
  --term-on-accent: #1d120a;
  --term-ok: #7fd88f;
  --term-warn: #f5c26b;
  --term-link: #9ec3ff;

  --display: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #fafaf8;
    --surface: #ffffff;
    --surface-2: #f1f1ed;
    --line: #e2e2dc;
    --edge: #cacac3;
    --text: #17171a;
    --muted: #5c5c66;
    --faint: #94949c;
    --accent: #c4621f;
    --accent-soft: rgba(196, 98, 31, 0.1);
    --on-accent: #ffffff;
    --ok: #2e8a45;
    --ok-soft: rgba(46, 138, 69, 0.12);
    --dot: #e3e3dd;
    --shadow: rgba(40, 30, 20, 0.16);
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
code,
kbd,
pre {
  font-family: var(--mono);
  font-stretch: 87.5%;
}
h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
  text-wrap: balance;
}
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: 28px;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}
.brand {
  font: 500 19px/1 var(--display);
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--text);
}
.brand span {
  color: var(--faint);
}
.brand em {
  font: 12px var(--mono);
  font-stretch: 87.5%;
  font-style: normal;
  letter-spacing: 0.02em;
  color: var(--faint);
  border-left: 1px solid var(--line);
  margin-left: 12px;
  padding-left: 12px;
  vertical-align: 2px;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
}
.top nav a {
  color: var(--muted);
  text-decoration: none;
}
.top nav a:hover,
.top nav a[aria-current="page"] {
  color: var(--text);
}
.top nav .ver {
  font: 12px var(--mono);
  font-stretch: 87.5%;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}
.top nav .ver:hover {
  color: var(--text);
  border-color: var(--edge);
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding-block: 26px 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 22px;
  font-size: 14px;
  color: var(--faint);
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
footer a {
  color: var(--muted);
  text-decoration: none;
}
footer a:hover {
  color: var(--text);
}

/* Screenshots */
.shot {
  margin: 0;
}
.shot picture {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 40px 80px -48px var(--shadow);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
}
.shot figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}
.shot figcaption strong {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 640px) {
  .wrap {
    padding-inline: 16px;
  }
  .brand em {
    display: none;
  }
  .top nav {
    gap: 18px;
  }
  .top nav a:not(.keep) {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
