:root {
  --color-light-primary: #111;
  --color-light-secondary: #333;
  --color-light-background: #fff;
  --color-light-tertiary: #4966c9;
  --color-light-code: #111;
  --color-light-code-background: #f6f8fa;
  --color-light-filtering: 0%;

  --color-dark-primary: rgb(255, 255, 255);
  --color-dark-secondary: rgb(175, 175, 175);
  --color-dark-background: #171717;
  --color-dark-tertiary: #6c7eba;
  --color-dark-code: hsl(211 calc(100% - 10%) 63% / 0.075);
  --color-dark-code-background: hsl(211 calc(100% - 10%) 63% / 0.075);
  --color-dark-filtering: 100%;

  --primary: var(--color-light-primary);
  --secondary: var(--color-light-secondary);
  --tertiary: var(--color-light-tertiary);
  --background: var(--color-light-background);
  --image-filtering: var(--color-light-filtering);
  --code-color: var(--color-light-code);
  --code-background: var(--color-light-code-background);
  --base-font: system-ui, helvetica, ubuntu, roboto, "segoe ui", sans-serif;
  --fancy-font: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
  --code-font: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas,
    'DejaVu Sans Mono', monospace;
}

body {
  color: var(--primary);
  background-color: var(--background);
  font-family: var(--base-font);
  margin: 0 auto;
  --font-size: 1rem;
  font-size: var(--font-size);
  padding-top: 20px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  font-family: var(--fancy-font);
  color: var(--primary);
}

.article-title {
  font-weight: 600;
  overflow-wrap: break-word;
}

.article-title a {
  text-decoration: none;
}

.article-body a {
  color: var(--tertiary);
  text-decoration: none;
}

.article-body a:hover {
  text-decoration: underline;
}

.container {
  max-width: 640px;
  padding-left: 20px;
  padding-right: 20px;
  margin-left: auto;
  margin-right: auto;
}

.no-top > :first-child {
  margin-top: 0;
  line-height: 1.25;
}

.vertical-spacing {
  padding-top: 20px;
  padding-bottom: 20px;
}

header {
  letter-spacing: -0.009em;
}

header h1 {
  font-size: 1.1rem;
  font-family: var(--fancy-font);
  margin: 0 0 0.5em 0;
}

.article-list {
  display: grid;
  grid-column-gap: 8px;
  grid-row-gap: 8px;
  grid-template-columns: 1fr min-content;
}

.article-list-item {
  display: grid;
  grid-template-columns: min-content auto;
}

.article-list-item hr {
  height: 0;
  border: 0;
  margin: 0.5rem;
  align-self: center;
  width: 100%;
  border-bottom: 0.6px dashed var(--tertiary);
  display: none;
}

.article-list time {
  padding-right: 0.25em;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.012em;
  white-space: pre;
}

.article-list > div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-list a {
  font-weight: 500;
  letter-spacing: -0.015em;
}

.article-list a:visited {
  color: var(--secondary);
}

a {
  color: var(--primary);
  text-decoration-skip-ink: auto;
  text-decoration: underline;
}

.nu a {
  text-decoration: none;
}

.nu a:hover {
  text-decoration: underline;
  color: var(--tertiary);
}

code {
  font-family: var(--code-font);
  background-color: var(--code-background);
  font-size: 90%;
  padding-top: 2px;
  padding-bottom: 2px;
  padding-left: 2px;
  padding-right: 2px;
  border-radius: 6px;
}

pre code {
  background-color: var(--code-background);
  font-size: 80%;
  display: block;
  white-space: pre;
  --webkit-overflow-scrolling: touch;
  overflow-x: auto;
  max-width: 100%;
  min-width: 100px;
  line-height: 1.5;
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 6px;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.1);
  border: 0.5px solid black;
}

footer {
  padding-top: 0px;
  padding-bottom: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: var(--color-dark-primary);
    --secondary: var(--color-dark-secondary);
    --tertiary: var(--color-dark-tertiary);
    --background: var(--color-dark-background);
    --image-filtering: var(--color-dark-filtering);
    --code-color: var(--color-dark-code);
    --code-background: var(--color-dark-code-background);
  }

  img.companies {
    filter: invert(100%);
  }

  pre code {
    border: 0.5px solid #444;
    box-shadow:
      0 4px 8px rgba(0, 0, 0, 0.3),
      0 2px 4px rgba(0, 0, 0, 0.2);
  }
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

table {
  overflow-x: auto;
  display: block;
}

.grayed-out {
  color: var(--secondary);
}

.highlighted {
  color: var(--tertiary);
  font-weight: bold;
}

.underlined {
  text-decoration: underline !important;
}
