/*
  Site styles: fonts, colour, type and components.
  chrome.css adds the masthead layout (nav in the header, one column) on top.

  The idea is a box score: a scoreboard up top, stat sheets below.

  Colour roles
    board   the scoreboard: masthead, hero, date cells, footer
    amber   the lit digits: tagline, dates, hover, selection
    orange  links and the primary button
*/

/* ---------- Fonts (self-hosted, see assets/fonts/LICENSE.txt) ---------- */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("../assets/fonts/big-shoulders-display-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Doto";
  src: url("../assets/fonts/doto-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../assets/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../assets/fonts/schibsted-grotesk-latin-wght-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --md-text-font: "Schibsted Grotesk";
  --md-code-font: "Geist Mono";
  --eb-display: "Big Shoulders Display", "Schibsted Grotesk", system-ui, sans-serif;
  --eb-dots: "Doto", "Geist Mono", ui-monospace, monospace;
  --eb-mono: "Geist Mono", ui-monospace, monospace;

  --eb-board: #0d0d0d;
  --eb-amber: #ffb000;
  --eb-orange: #c23a06;
  --eb-ink: #0d0d0d;

  --eb-radius: 0.1rem;
  --eb-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-md-color-scheme="default"] {
  color-scheme: light;
  --eb-ground: #f7f7f5;
  --eb-surface: #ffffff;
  --eb-text: #111111;
  --eb-muted: #55554f;
  --eb-rule: #d9d9d2;
  --eb-link: #c23a06;
  --eb-tint: #ecece7;

  --md-accent-fg-color: var(--eb-orange);
}

[data-md-color-scheme="slate"] {
  color-scheme: dark;
  --eb-ground: #161616;
  --eb-surface: #202020;
  --eb-text: #f2f2ee;
  --eb-muted: #aaa9a0;
  --eb-rule: #363632;
  --eb-link: #ff8f5e;
  --eb-tint: #242424;

  --md-accent-fg-color: var(--eb-amber);
}

[data-md-color-scheme="default"],
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: var(--eb-board);
  --md-primary-fg-color--light: #2a2a2a;
  --md-primary-fg-color--dark: var(--eb-board);
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: #d6d6cf;

  --md-accent-fg-color--transparent: color-mix(in srgb, var(--eb-amber) 30%, transparent);
  --md-accent-bg-color: var(--eb-ink);

  --md-default-bg-color: var(--eb-ground);
  --md-default-fg-color: var(--eb-text);
  --md-default-fg-color--light: var(--eb-muted);
  --md-default-fg-color--lighter: color-mix(in srgb, var(--eb-muted) 70%, var(--eb-ground));
  --md-default-fg-color--lightest: var(--eb-rule);

  --md-typeset-color: var(--eb-text);
  --md-typeset-a-color: var(--eb-link);
  --md-typeset-mark-color: var(--eb-amber);
  --md-typeset-table-color: var(--eb-rule);
  --md-typeset-table-color--light: var(--eb-tint);
  --md-typeset-kbd-color: var(--eb-surface);
  --md-typeset-kbd-accent-color: var(--eb-surface);
  --md-typeset-kbd-border-color: var(--eb-rule);

  --md-code-bg-color: var(--eb-tint);
  --md-code-fg-color: var(--eb-text);

  --md-footer-bg-color: var(--eb-ink);
  --md-footer-bg-color--dark: var(--eb-ink);
  --md-footer-fg-color: #ffffff;
  --md-footer-fg-color--light: #c9c9c0;
  --md-footer-fg-color--lighter: #aaa9a0;
}

/* ---------- Browser surfaces ---------- */

html {
  scrollbar-color: color-mix(in srgb, var(--eb-muted) 55%, transparent) transparent;
  caret-color: var(--eb-link);
}

::selection {
  background: var(--eb-amber);
  color: var(--eb-ink);
}

:focus-visible {
  outline: 0.125rem solid var(--eb-link);
  outline-offset: 0.125rem;
  border-radius: 0.1rem;
}

.md-header :focus-visible,
.md-footer :focus-visible,
.eb-hero :focus-visible {
  outline-color: var(--eb-amber);
}

.eb-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Type ---------- */

.md-typeset {
  font-size: 0.85rem;
  line-height: 1.65;
  font-variant-numeric: proportional-nums;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  font-family: var(--eb-display);
  color: var(--eb-text);
  text-wrap: balance;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

.md-typeset h1 {
  margin: 0 0 1.4rem;
  font-size: clamp(2.5rem, 1.8rem + 3vw, 3.9rem);
  font-weight: 900;
  line-height: 0.94;
}

.md-typeset h2 {
  margin: 2.6rem 0 0.7rem;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
}

/* The markdown bolds some headings; the heading already carries the weight. */
.md-typeset h2 strong,
.md-typeset h3 strong {
  font-weight: inherit;
}

.md-typeset h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.05;
}

.md-typeset h4 {
  margin: 1.6rem 0 0.4rem;
  font-family: var(--md-text-font-family);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
}

.md-typeset p,
.md-typeset li {
  text-wrap: pretty;
}

.md-typeset strong {
  font-weight: 700;
}

/* Links: a plain underline that lights up amber. */
.md-typeset a {
  color: var(--eb-link);
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--eb-link) 45%, transparent);
  border-radius: 0.12em;
  transition: background-color 140ms var(--eb-ease), color 140ms var(--eb-ease);
}

.md-typeset a:hover,
.md-typeset a:focus-visible {
  color: var(--eb-ink);
  background-color: var(--eb-amber);
  text-decoration-color: transparent;
}

.md-typeset h1 a,
.md-typeset h2 a,
.md-typeset h3 a {
  color: var(--eb-text);
  text-decoration-color: var(--eb-link);
  text-decoration-thickness: 0.1em;
}

.md-typeset .headerlink,
.md-typeset a.headerlink:hover {
  background: none;
  text-decoration: none;
}

.md-typeset a.glightbox,
.md-typeset a.glightbox:hover {
  background: none;
}

.md-typeset hr {
  margin: 2.2rem 0;
  border-bottom: 0.05rem solid var(--eb-rule);
}

.md-typeset mark {
  color: var(--eb-ink);
  padding: 0 0.15em;
  border-radius: 0.12em;
}

.md-typeset blockquote {
  margin-inline: 0;
  padding-left: 1rem;
  border-left: 0.15rem solid var(--eb-link);
  color: var(--eb-text);
  font-size: 1.05em;
}

.md-typeset figure figcaption,
.md-typeset figcaption {
  max-width: none;
  margin: 0.6rem auto 1.6rem;
  color: var(--eb-muted);
  font-size: 0.72rem;
  font-style: normal;
}

.md-typeset img,
.md-typeset video {
  border-radius: var(--eb-radius);
}

.md-typeset .twemoji img,
.md-typeset img.twemoji,
.md-typeset img.emojione {
  border-radius: 0;
}

.md-typeset .footnote {
  color: var(--eb-muted);
}

/* ---------- Code ---------- */

.md-typeset code {
  padding: 0.1em 0.35em;
  border-radius: 0.2rem;
  font-size: 0.82em;
  font-variant-ligatures: none;
}

.md-typeset pre > code {
  padding: 0.9rem 1rem;
  border-radius: var(--eb-radius);
  font-size: 0.72rem;
  line-height: 1.6;
  scrollbar-color: color-mix(in srgb, var(--eb-muted) 55%, transparent) transparent;
}

.md-typeset .highlight {
  border-radius: var(--eb-radius);
}

/* ---------- Tables: set like a stat sheet ---------- */

.md-typeset table:not([class]) {
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.md-typeset table:not([class]) th {
  padding: 0.5rem 0.9rem 0.5rem 0;
  border-bottom: 0.1rem solid var(--eb-text);
  font-family: var(--eb-display);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.md-typeset table:not([class]) td {
  padding: 0.55rem 0.9rem 0.55rem 0;
  border-top: 0;
  border-bottom: 0.05rem solid var(--eb-rule);
}

.md-typeset table:not([class]) tbody tr:hover {
  background-color: var(--eb-tint);
  box-shadow: none;
}

.md-typeset__scrollwrap {
  margin-inline: 0;
}

.md-typeset__table {
  padding: 0;
}

/* ---------- Buttons ---------- */

.md-typeset .md-button {
  padding: 0.5em 1.1em;
  border: 0.09rem solid var(--eb-text);
  border-radius: var(--eb-radius);
  background: transparent;
  color: var(--eb-text);
  font-family: var(--eb-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 140ms var(--eb-ease), color 140ms var(--eb-ease),
    border-color 140ms var(--eb-ease);
}

.md-typeset .md-button--primary {
  border-color: var(--eb-orange);
  background-color: var(--eb-orange);
  color: #ffffff;
}

.md-typeset .md-button:hover,
.md-typeset .md-button:focus-visible {
  border-color: var(--eb-ink);
  background-color: var(--eb-amber);
  color: var(--eb-ink);
}

.md-typeset .md-button:active {
  transform: translateY(1px);
}

.md-typeset .md-button .twemoji {
  vertical-align: -0.15em;
}

/* ---------- Admonitions, details, tabs ---------- */

.md-typeset .admonition,
.md-typeset details {
  border-width: 0.05rem;
  border-radius: var(--eb-radius);
  background: var(--eb-surface);
  box-shadow: none;
  font-size: 0.76rem;
}

.md-typeset .admonition-title,
.md-typeset summary {
  font-weight: 700;
}

.md-typeset .tabbed-labels > label {
  font-family: var(--eb-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Dates: lit digits in a scoreboard cell ---------- */

.eb-date {
  display: flex;
  flex-direction: column;
  flex: none;
  align-items: center;
  align-self: flex-start;
  min-width: 4.5rem;
  padding: 0.45rem 0.5rem 0.4rem;
  border-radius: var(--eb-radius);
  background-color: var(--eb-board);
  color: var(--eb-amber);
  font-family: var(--eb-dots);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

[data-md-color-scheme="slate"] .eb-date {
  background-color: #000000;
}

.eb-date__day {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.eb-date__year {
  margin-top: 0.3rem;
  font-family: var(--eb-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #c9c9c0;
}

/* board.js wraps each lit character in an <i> so it can roll into place.
   A character is dimmed while it is still rolling. */
.eb-roll i {
  font-style: normal;
}

.eb-roll .eb-roll__dim {
  opacity: 0.5;
}

/* ---------- Post lists (Ramblings index, archive, categories) ---------- */

.eb-posts {
  margin-top: 0.4rem;
  border-top: 0.2rem solid var(--eb-text);
}

.eb-post {
  display: flex;
  margin: 0;
  gap: 1.2rem;
  padding: 1.5rem 0 1.6rem;
  border-bottom: 0.05rem solid var(--eb-rule);
}

.eb-post__body {
  min-width: 0;
  flex: 1;
}

.eb-post .md-post__content > h2:first-child,
.md-post--excerpt .md-post__content > h2:first-child {
  margin-top: 0;
}

.eb-post .md-post__content h2 {
  margin-bottom: 0.5rem;
  font-size: 1.7rem;
}

.eb-post .md-post__content h2 a {
  color: var(--eb-text);
}

.eb-post .md-post__content h2 a:hover {
  color: var(--eb-ink);
}

.eb-post .md-post__content > :last-child {
  margin-bottom: 0;
}

.eb-post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 1rem;
  margin-top: 0.8rem;
  font-family: var(--eb-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--eb-muted);
}

.eb-post__meta a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-underline-offset: 0.2em;
}

.eb-post__meta a:hover {
  color: var(--eb-link);
}

.eb-post__meta .eb-post__more {
  margin-left: auto;
  color: var(--eb-link);
  font-weight: 600;
}

/* `ul.` outranks the theme's `.md-typeset ul:not([hidden])` display rule. */
.md-typeset ul.eb-views {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
  font-family: var(--eb-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

[dir] .md-typeset .eb-views li {
  margin: 0;
}

.md-typeset .eb-views__label {
  color: var(--eb-muted);
}

.md-typeset .eb-views__label:not(:first-child) {
  margin-left: 0.9rem;
}

.eb-blog > .md-content__inner > header > :last-child {
  margin-bottom: 0.7rem;
}

.md-pagination {
  font-family: var(--eb-display);
  font-variant-numeric: tabular-nums;
}

/* Post pages: the metadata rail */
.md-post__meta .md-nav__link,
.md-post__back .md-nav__link {
  font-variant-numeric: tabular-nums;
}

.md-content--post .md-post__title {
  font-family: var(--eb-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--eb-muted);
}

/* ---------- Home: one tile per section ----------

   Written in markdown as a list of links inside <div class="eb-tiles">:

       - [**Ramblings** Posts on running and tech](ramblings/index.md)

   The bold name is the tile's heading and the rest is a short line under it.
   The whole tile is the link. On hover the amber drops down from its top
   rule and the arrow moves right. */

[dir] .md-typeset .eb-tiles ul {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

[dir] .md-typeset .eb-tiles li {
  display: flex;
  margin: 0;
}

.md-typeset .eb-tiles a {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 9rem;
  padding: 1rem 1.1rem 1.1rem;
  border: 0.05rem solid var(--eb-rule);
  border-top: 0.2rem solid var(--eb-text);
  border-radius: var(--eb-radius);
  background-color: var(--eb-surface);
  color: var(--eb-muted);
  font-size: 0.78rem;
  line-height: 1.5;
  text-decoration: none;
  transition: color 200ms var(--eb-ease), border-color 200ms var(--eb-ease),
    transform 120ms var(--eb-ease);
}

/* The amber fill. It drops down from the top rule on hover, focus or press. */
.md-typeset .eb-tiles a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--eb-amber);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 260ms var(--eb-ease);
}

.md-typeset .eb-tiles a::after {
  content: "\2192";
  align-self: flex-start;
  margin-top: auto;
  padding-top: 0.8rem;
  font-family: var(--eb-display);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--eb-link);
  transition: color 200ms var(--eb-ease), transform 260ms var(--eb-ease);
}

.md-typeset .eb-tiles strong {
  margin-bottom: 0.35rem;
  font-family: var(--eb-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--eb-text);
  transition: color 200ms var(--eb-ease);
}

.md-typeset .eb-tiles a:is(:hover, :focus-visible, :active) {
  border-color: var(--eb-amber);
  color: var(--eb-ink);
}

.md-typeset .eb-tiles a:is(:hover, :focus-visible, :active)::before {
  transform: scaleY(1);
}

.md-typeset .eb-tiles a:is(:hover, :focus-visible, :active) strong,
.md-typeset .eb-tiles a:is(:hover, :focus-visible, :active)::after {
  color: var(--eb-ink);
}

.md-typeset .eb-tiles a:is(:hover, :focus-visible, :active)::after {
  transform: translateX(0.35rem);
}

/* The tile sinks a little while it is pressed. */
.md-typeset .eb-tiles a:active {
  transform: translateY(0.1rem);
}

@media screen and (min-width: 40em) {
  [dir] .md-typeset .eb-tiles ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (min-width: 76.25em) {
  [dir] .md-typeset .eb-tiles ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Projects: one row per project ----------

   Written in markdown inside <div class="eb-projects">, one
   <div class="eb-project"> each. In order: a screenshot, an h2 with the
   name, a paragraph, a list of the tech, and a line of
   links with {: .eb-links }.

   The screenshot has no frame, only a hairline so a light one keeps its
   edge. It goes above the text on a phone and beside it from 40em up. */

.md-typeset .eb-projects {
  margin-top: 1.5rem;
  border-top: 0.2rem solid var(--eb-text);
}

.md-typeset .eb-project {
  padding: 1.2rem 0 1.4rem;
  border-bottom: 0.05rem solid var(--eb-rule);
}

[dir] .md-typeset .eb-project > p:first-child {
  display: flex;
  margin: 0 0 1rem;
}

.md-typeset .eb-project > p:first-child a {
  display: flex;
}

.md-typeset .eb-project > p:first-child img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 20rem;
  border: 0.05rem solid var(--eb-rule);
  border-radius: 0.3rem;
}

[dir] .md-typeset .eb-project h2 {
  margin: 0 0 0.5rem;
  font-family: var(--eb-display);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

[dir] .md-typeset .eb-project > p {
  margin: 0 0 0.8rem;
}

[dir] .md-typeset .eb-project ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.9rem;
  padding: 0;
  list-style: none;
}

[dir] .md-typeset .eb-project ul li {
  margin: 0;
  padding: 0.2rem 0.45rem;
  border: 0.05rem solid var(--eb-rule);
  border-radius: var(--eb-radius);
  font-family: var(--eb-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eb-muted);
}

[dir] .md-typeset .eb-project > p.eb-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 0;
}

/* Tall enough to tap: 44px. */
.md-typeset .eb-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  font-family: var(--eb-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.md-typeset .eb-links a::after {
  content: "\2192";
  margin-left: 0.35em;
}

@media screen and (min-width: 40em) {
  .md-typeset .eb-project {
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    column-gap: 1.6rem;
    align-content: start;
  }

  [dir] .md-typeset .eb-project > p:first-child {
    grid-column: 1;
    grid-row: 1 / span 5;
    align-self: start;
    margin: 0;
  }

  /* One width for every screenshot, so the text lines up down the page. */
  .md-typeset .eb-project > p:first-child img {
    width: 100%;
    max-height: none;
  }

  .md-typeset .eb-project > :not(:first-child) {
    grid-column: 2;
  }
}

/* ---------- Experience: a career stat sheet ----------

   Written in markdown as a definition list inside <div class="eb-career">.
   One entry per employer. The term is the start year with the end in a
   span, set in a date cell; the definition is the employer in bold, then
   the titles held there, oldest first, joined with arrows:

       2021 <span>to 2026</span>
       :   **GitHub** ML Engineer → Senior ML Engineer

   The bold employer sits on its own line and the titles become a
   subheading. Any further paragraphs in the definition are body copy. */

.md-typeset .eb-career dl {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  column-gap: 1rem;
  margin: 0;
  border-top: 0.2rem solid var(--eb-text);
}

.md-typeset .eb-career dt {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: start;
  grid-column: 1;
  margin: 1rem 0;
  padding: 0.45rem 0.3rem 0.4rem;
  border-radius: var(--eb-radius);
  background-color: var(--eb-board);
  color: var(--eb-amber);
  font-family: var(--eb-dots);
  font-size: 1.35rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1;
}

[data-md-color-scheme="slate"] .md-typeset .eb-career dt {
  background-color: #000000;
}

/* The "to 2026" line. board.js adds spans of its own around the year. */
.md-typeset .eb-career dt span:not(.eb-roll, .eb-sr) {
  margin-top: 0.3rem;
  font-family: var(--eb-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9c9c0;
}

[dir] .md-typeset .eb-career dd {
  position: relative;
  grid-column: 2;
  margin: 0;
  padding: 1rem 0 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--eb-muted);
}

/* The rule under each row runs under the date cell too. */
.md-typeset .eb-career dd::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: -5.5rem;
  border-bottom: 0.05rem solid var(--eb-rule);
}

.md-typeset .eb-career dd strong {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--eb-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--eb-text);
  text-transform: uppercase;
}

.md-typeset .eb-career dd p {
  margin: 0;
}

.md-typeset .eb-career dd p + p {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--eb-text);
}

/* ---------- Contact: reading cards ---------- */

.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  border: 0.05rem solid var(--eb-rule);
  border-radius: var(--eb-radius);
  background: var(--eb-surface);
  box-shadow: none;
  transition: border-color 140ms var(--eb-ease);
}

.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid > .card:hover {
  border-color: var(--eb-text);
  box-shadow: none;
}

.md-typeset .grid.cards > ul > li > hr {
  margin-block: 0.8rem;
}

.md-typeset iframe {
  max-width: 100%;
  border-radius: var(--eb-radius);
  background: #ffffff;
}

/* ---------- Header, search and footer ---------- */

.md-header {
  background-color: var(--eb-board);
  color: #ffffff;
}

.md-header__title {
  font-family: var(--eb-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.md-tabs {
  background-color: var(--eb-board);
  font-family: var(--eb-display);
}

.md-tabs__link {
  font-weight: 700;
}

.md-search__form {
  border-radius: var(--eb-radius);
}

.md-nav__title,
.md-nav__item--section > .md-nav__link,
.md-post__back .md-nav__link {
  font-family: var(--eb-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.md-nav__link--active,
.md-nav__item .md-nav__link--active {
  color: var(--eb-link);
}

.md-footer-meta {
  background-color: var(--eb-board);
  color: #c9c9c0;
}

.md-footer-meta .md-copyright__highlight,
.md-footer-meta .md-social .md-social__link {
  color: #f2f2ee;
}

.md-footer-meta .md-social__link svg {
  fill: currentcolor;
}

[data-md-color-scheme="slate"] .md-footer,
[data-md-color-scheme="slate"] .md-footer-meta {
  background-color: #000000;
}

.md-copyright {
  font-family: var(--eb-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c9c9c0;
}

.md-social__link {
  border-radius: 0.2rem;
  transition: background-color 140ms var(--eb-ease), color 140ms var(--eb-ease);
}

.md-footer-meta .md-social__link:hover,
.md-footer-meta .md-social__link:focus-visible {
  background-color: var(--eb-amber);
  color: var(--eb-ink);
}

.md-top {
  border-radius: var(--eb-radius);
  font-family: var(--eb-display);
}

/* ---------- Cookie consent: a quiet corner note, not a wall ---------- */

.md-consent__overlay {
  display: none;
}

.md-consent__inner {
  right: 0.8rem;
  bottom: 0.8rem;
  width: min(21rem, calc(100vw - 1.6rem));
  max-height: calc(100vh - 1.6rem);
  display: block;
  overflow: auto;
  padding: 0;
  border: 0.05rem solid var(--eb-rule);
  border-radius: 0.5rem;
  background-color: var(--eb-surface);
  box-shadow: 0 0.6rem 1.8rem -0.4rem rgb(0 0 0 / 0.3);
}

/* Zensical's modern theme draws the card on the form, inside the inner box.
   The inner box is the card here, so the form is just padding. */
.md-consent__form {
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  animation: none;
  padding: 1rem 1.1rem 1.1rem;
  font-size: 0.72rem;
  line-height: 1.5;
}

.md-consent__form h4 {
  margin: 0 0 0.3rem;
  font-family: var(--eb-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.md-consent__form p {
  margin: 0 0 0.8rem;
}

.md-consent__settings {
  margin: 0 0 0.8rem;
}

.md-consent__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
}

.md-typeset .md-consent__controls .md-button {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 0.3em 0.9em;
  font-size: 0.85rem;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
