@import url("https://fonts.cdnfonts.com/css/liberation-sans");

@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/jetbrains-mono:vf@5.3.0/latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  color-scheme: dark;
  --bg: #282828;
  --bg-soft: #32302f;
  --surface: #3c3836;
  --surface-hover: #504945;
  --text: #ebdbb2;
  --text-muted: #a89984;
  --border: #665c54;
  --accent: #83a598;
  --accent-hover: #8ec07c;
  --warning: #fabd2f;
  --danger: #fb4934;
  --gruvbox-orange: #fe8019;
  --gruvbox-red: #fb4934;
  --gruvbox-aqua: #83a598;
  --gruvbox-gray: #a89984;
  --radius: 0.4rem;
  --sans: "Liberation Sans", Arial, sans-serif;
  --mono: "JetBrains Mono Variable", "JetBrains Mono", "Liberation Mono", monospace;
}

.lab-openai { --lab-color: var(--gruvbox-aqua); }
.lab-anthropic { --lab-color: var(--gruvbox-orange); }
.lab-google { --lab-color: var(--gruvbox-red); }
.lab-other { --lab-color: var(--gruvbox-gray); }

.lab-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--lab-color);
}

.float-end {
  float: right;
}

.compact-ui {
  line-height: 1.3;
}

.compact-ui button,
.compact-ui input,
.compact-ui select,
.compact-ui textarea {
  line-height: inherit;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  scrollbar-color: var(--border) var(--bg-soft);
}

body {
  width: min(100% - 2rem, 72rem);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) 0;
  background: var(--bg);
}

main,
article,
section,
header,
footer,
nav {
  display: block;
}

main,
article {
  max-width: 48rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 2rem 0 0.75rem;
  color: #fbf1c7;
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h3 { font-size: 1.35rem; }

p,
ul,
ol,
dl,
pre,
table,
blockquote {
  margin: 0 0 1.25rem;
}

p {
  max-width: 70ch;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--warning);
  outline-offset: 3px;
}

hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

small,
figcaption,
caption {
  color: var(--text-muted);
}

strong {
  color: #fbf1c7;
}

code,
kbd,
samp,
pre {
  font-family: var(--mono);
}

code,
kbd {
  padding: 0.15em 0.35em;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  background: var(--bg-soft);
  font-size: 0.9em;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #1d2021;
  line-height: 1.55;
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: inherit;
}

blockquote {
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 0.25rem solid var(--accent);
  color: var(--text-muted);
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

th,
td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  background: var(--surface);
  color: #fbf1c7;
}

tr:last-child td {
  border-bottom: 0;
}

button,
input,
select,
textarea {
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
}

input,
select,
textarea {
  padding: 0.55rem 0.7rem;
}

button,
input[type="button"],
input[type="submit"] {
  padding: 0.55rem 0.9rem;
  background: var(--accent);
  color: #1d2021;
  font-weight: 700;
  cursor: pointer;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  background: var(--accent-hover);
}

::selection {
  background: #d79921;
  color: #1d2021;
}

@media (max-width: 40rem) {
  body {
    width: min(100% - 1.25rem, 72rem);
    padding-block: 1.5rem;
  }

  th,
  td {
    padding: 0.5rem;
  }
}
