:root {
  color-scheme: light dark;
  --starmd-font-editorial: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --starmd-font-interface: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --starmd-font-literal: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --starmd-space-1: 0.375rem;
  --starmd-space-2: 0.75rem;
  --starmd-space-3: 1.5rem;
  --starmd-space-4: 3rem;
  --starmd-space-5: 6rem;
  --starmd-reading-measure: 68ch;
  --starmd-wide-measure: 78rem;
  --starmd-paper: #eef3f1;
  --starmd-surface: #f7faf8;
  --starmd-ink: #14231e;
  --starmd-muted: #53645d;
  --starmd-rule: #9aaba4;
  --starmd-accent: #bd432c;
  --starmd-focus: #0958a5;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--starmd-paper);
  color: var(--starmd-ink);
  font-family: var(--starmd-font-editorial);
  line-height: 1.62;
}

body {
  background: var(--starmd-paper);
  color: var(--starmd-ink);
  margin: 0;
}

a {
  color: currentColor;
  text-decoration-color: var(--starmd-accent);
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.16em;
}

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

:focus-visible {
  outline: 0.2rem solid var(--starmd-focus);
  outline-offset: 0.2rem;
}

.starmd-skip-link,
.starmd-site-header,
.starmd-publication-meta,
.starmd-route-notice,
.starmd-site-footer,
.starmd-table-hint,
button,
input,
select,
textarea,
table {
  font-family: var(--starmd-font-interface);
}

code,
kbd,
pre,
samp,
time,
[data-starmd-literal] {
  font-family: var(--starmd-font-literal);
}

.starmd-skip-link {
  background: var(--starmd-ink);
  color: var(--starmd-paper);
  inset-block-start: var(--starmd-space-2);
  inset-inline-start: var(--starmd-space-2);
  padding: var(--starmd-space-2);
  position: fixed;
  transform: translateY(-200%);
  z-index: 2;
}

.starmd-skip-link:focus {
  transform: translateY(0);
}

.starmd-site-header {
  border-block-end: 1px solid var(--starmd-rule);
}

.starmd-site-header__inner {
  align-items: baseline;
  display: grid;
  gap: var(--starmd-space-2) clamp(1rem, 2.4vw, var(--starmd-space-3));
  grid-template-columns: minmax(16rem, 1.35fr) auto auto;
  margin-inline: auto;
  max-inline-size: var(--starmd-wide-measure);
  padding: var(--starmd-space-2) clamp(1rem, 4vw, 3rem);
}

.starmd-publication-breadcrumb ol,
.starmd-site-nav ul {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: var(--starmd-space-1) var(--starmd-space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.starmd-publication-breadcrumb li {
  display: flex;
}

.starmd-publication-breadcrumb li + li::before {
  color: var(--starmd-accent);
  content: "/";
  font-family: var(--starmd-font-literal);
  margin-inline-end: var(--starmd-space-2);
}

.starmd-site-name {
  font-family: var(--starmd-font-editorial);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.starmd-publication-name {
  color: var(--starmd-muted);
  font-family: var(--starmd-font-literal);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
}

.starmd-site-nav {
  font-size: 0.9rem;
  font-weight: 650;
  grid-column: 2;
  grid-row: 1;
}

.starmd-site-nav a {
  text-decoration: none;
}

.starmd-site-nav a[aria-current="page"] {
  border-block-end: 0.18rem solid var(--starmd-accent);
  padding-block-end: var(--starmd-space-1);
}

.starmd-site-nav--utility {
  color: var(--starmd-muted);
  font-size: 0.78rem;
  grid-column: 3;
  grid-row: 1;
}

.starmd-publication-context {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
  margin: var(--starmd-space-3) auto 0;
  max-inline-size: calc(var(--starmd-wide-measure) - 6rem);
}

.starmd-publication-meta {
  border: 1px solid var(--starmd-rule);
  margin: 0;
  max-inline-size: none;
  padding: var(--starmd-space-2) var(--starmd-space-3);
}

.starmd-publication-meta p {
  margin: 0;
}

.starmd-publication-meta strong {
  color: var(--starmd-accent);
}

.starmd-route-notice {
  border-block: 1px solid var(--starmd-rule);
  border-inline-end: 1px solid var(--starmd-rule);
  margin: 0;
  max-inline-size: none;
  padding: var(--starmd-space-2) var(--starmd-space-3);
}

.starmd-route-notice::before {
  content: "Route status";
  display: block;
  font-family: var(--starmd-font-literal);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.starmd-route-notice p {
  margin: var(--starmd-space-1) 0 0;
}

main {
  margin-inline: auto;
  max-inline-size: var(--starmd-wide-measure);
  padding: clamp(3rem, 8vw, var(--starmd-space-5)) clamp(1rem, 4vw, 3rem);
}

main > :is(h1, h2, h3, h4, p, ul, ol, blockquote, pre) {
  max-inline-size: var(--starmd-reading-measure);
}

h1,
h2,
h3,
h4 {
  font-family: var(--starmd-font-editorial);
  line-height: 1.08;
  scroll-margin-block-start: var(--starmd-space-3);
}

h1 {
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  letter-spacing: -0.035em;
  margin-block: 0 var(--starmd-space-3);
  max-inline-size: 12ch;
}

h2 {
  border-block-start: 1px solid var(--starmd-rule);
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-block: var(--starmd-space-5) var(--starmd-space-3);
  padding-block-start: var(--starmd-space-3);
}

p,
li {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}

blockquote {
  border-inline-start: 0.25rem solid var(--starmd-accent);
  margin-inline: 0;
  padding-inline-start: var(--starmd-space-3);
}

.starmd-table-hint {
  color: var(--starmd-muted);
  font-size: 0.9rem;
  margin-block-end: var(--starmd-space-2);
}

.starmd-table-region {
  margin-block: var(--starmd-space-4);
  max-inline-size: 100%;
}

.starmd-table-region[data-starmd-table-mode="scroll"] {
  border-inline-end: 0.3rem solid var(--starmd-accent);
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  inline-size: 100%;
}

table[data-starmd-table-mode="scroll"] {
  min-inline-size: 58rem;
}

th,
td {
  border-block-end: 1px solid var(--starmd-rule);
  padding: var(--starmd-space-2);
  text-align: start;
  vertical-align: top;
}

thead th {
  border-block-end: 0.15rem solid var(--starmd-ink);
}

.starmd-site-footer {
  border-block-start: 1px solid var(--starmd-rule);
  color: var(--starmd-muted);
  margin-inline: auto;
  max-inline-size: var(--starmd-wide-measure);
  padding: var(--starmd-space-3) clamp(1rem, 4vw, 3rem);
}

@media (max-width: 68rem) {
  .starmd-site-header__inner {
    grid-template-columns: 1fr;
  }

  .starmd-site-nav,
  .starmd-site-nav--utility {
    grid-column: 1;
    grid-row: auto;
  }

  .starmd-publication-context {
    grid-template-columns: 1fr;
  }

  .starmd-route-notice {
    border-inline-start: 1px solid var(--starmd-rule);
  }

  main {
    padding-block-start: var(--starmd-space-4);
  }
}

@media (max-width: 42rem) {
  :is(.starmd-publication-meta, .starmd-route-notice) {
    margin-inline: 0;
    padding: var(--starmd-space-2) 1rem;
  }

  table[data-starmd-table-mode="reflow"] thead {
    block-size: 1px;
    clip-path: inset(50%);
    inline-size: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
  }

  table[data-starmd-table-mode="reflow"] :is(tbody, tr, td) {
    display: block;
    inline-size: 100%;
  }

  table[data-starmd-table-mode="reflow"] tr {
    border-block-start: 1px solid var(--starmd-ink);
    padding-block: var(--starmd-space-2);
  }

  table[data-starmd-table-mode="reflow"] td {
    border: 0;
    display: grid;
    gap: var(--starmd-space-2);
    grid-template-columns: minmax(7rem, 0.45fr) minmax(0, 1fr);
    overflow-wrap: anywhere;
  }

  table[data-starmd-table-mode="reflow"] td::before {
    color: var(--starmd-muted);
    content: attr(data-starmd-column);
    font-size: 0.82rem;
    font-weight: 700;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --starmd-paper: #13201c;
    --starmd-surface: #1a2a24;
    --starmd-ink: #e8efeb;
    --starmd-muted: #b4c2bb;
    --starmd-rule: #66766f;
    --starmd-accent: #ef765d;
    --starmd-focus: #8fc7ff;
  }
}

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

@media (forced-colors: active) {
  :focus-visible {
    outline-color: Highlight;
  }

  .starmd-site-nav a[aria-current="page"],
  .starmd-publication-meta strong,
  .starmd-table-region[data-starmd-table-mode="scroll"] {
    border-color: Highlight;
    color: CanvasText;
  }
}
