@font-face {
  font-family: "iA Writer Duos";
  src: url("/assets/fonts/iawriterduos-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "iA Writer Duos";
  src: url("/assets/fonts/iawriterduos-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "iA Writer Duos";
  src: url("/assets/fonts/iawriterduos-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "iA Writer Duos";
  src: url("/assets/fonts/iawriterduos-bolditalic.woff2") format("woff2");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/AtkinsonHyperlegibleNextVF-Variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("/assets/fonts/AtkinsonHyperlegibleMonoVF-Variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("/assets/fonts/AtkinsonHyperlegibleMonoVF-Variable.woff2") format("woff2-variations");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

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

html {
  scrollbar-color: var(--scrollbar-thumb) var(--background-body);
  scrollbar-width: thin;
}

body {
  line-height: 1.45;
  max-width: 800px;
  margin: 20px auto;
  padding: 0 10px;
  color: var(--text-main);
  background: var(--background-body);
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--selection);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-bright);
  margin-top: 1.25rem;
  margin-bottom: 0.65rem;
  line-height: 1.25;
}

h1 {
  margin-top: 0;
}

p,
ul,
ol,
dl,
table,
blockquote,
pre {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--text-bright);
  text-decoration: underline;
  text-decoration-color: var(--links);
  text-decoration-thickness: 0.2ex;
  text-underline-offset: 0.5ex;
  border-radius: 0.2rem;
}

a:hover,
a:focus-visible {
  background: var(--accent-bg);
  color: var(--background-body);
  outline: none;
}

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

blockquote {
  margin-left: 0;
  padding: 0.15rem 0 0.15rem 0.9rem;
  border-left: 4px solid var(--border);
  color: var(--text-muted);
}

code,
kbd,
samp,
pre {
  font-family: var(--site-font-family-mono, "Atkinson Hyperlegible Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace);
}

code,
kbd,
samp {
  background: var(--background-alt);
  color: var(--code);
  padding: 0.06em 0.35em;
  border-radius: 0.2rem;
}

pre {
  overflow-x: auto;
  background: var(--background-alt);
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.7rem 0.8rem;
}

pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

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

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

thead th {
  background: var(--background-alt);
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
  margin: 0 auto;
  padding: 5px;
  border: 1px solid color-mix(in oklab, var(--border) 60%, var(--text-bright) 40%);
  background: color-mix(in oklab, var(--background-alt) 88%, var(--background));
  border-radius: 7px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: var(--form-text);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.42rem 0.5rem;
  transition:
    background-color var(--animation-duration) linear,
    border-color var(--animation-duration) linear,
    color var(--animation-duration) linear,
    box-shadow var(--animation-duration) linear;
}

button {
  cursor: pointer;
  background: var(--button-base);
  color: var(--text-bright);
}

button:hover,
button:focus-visible {
  background: var(--button-hover);
  outline: none;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="color"],
input[type="file"],
select,
textarea {
  width: 100%;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="time"],
textarea {
  font-family: "Atkinson Hyperlegible Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

input::placeholder,
textarea::placeholder {
  color: var(--form-placeholder);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.75rem;
}

legend {
  padding: 0 0.25rem;
  color: var(--text-bright);
}

body.site-font-ia_writer_duos {
  --site-font-family: "iA Writer Duos", monospace;
  --site-font-family-mono: "iA Writer Duos", monospace;
}

body.site-font-atkinson_hyperlegible_next {
  --site-font-family: "Atkinson Hyperlegible Next", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --site-font-family-mono: "Atkinson Hyperlegible Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

body.site-font-atkinson_hyperlegible_mono {
  --site-font-family: "Atkinson Hyperlegible Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --site-font-family-mono: "Atkinson Hyperlegible Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

body.site-font-os_sans {
  --site-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --site-font-family-mono: "Atkinson Hyperlegible Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

body.site-font-os_serif {
  --site-font-family: Georgia, "Times New Roman", Times, serif;
  --site-font-family-mono: "Atkinson Hyperlegible Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

body.site-font-monospace {
  --site-font-family: "Atkinson Hyperlegible Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --site-font-family-mono: "Atkinson Hyperlegible Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

body,
button,
input,
select,
textarea {
  font-family: var(--site-font-family, "Atkinson Hyperlegible Next", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif);
  font-size: 18px;
  line-height: 31px;
}

h1 {
  font-size: 37px;
  line-height: 59px;
  font-weight: 400;
}

h2 {
  font-size: 29px;
  line-height: 47px;
  font-weight: 400;
}

h3 {
  font-size: 23px;
  line-height: 38px;
  font-weight: 400;
}

h4 {
  font-size: 18px;
  line-height: 31px;
  font-weight: 400;
}

h5 {
  font-size: 14px;
  line-height: 25px;
  font-weight: 400;
}

article {
  margin-bottom: 1.2rem;
}

.post-meta {
  margin-top: 2.5em;
  margin-bottom: 0;
}

.post-reply-by-email {
  margin-top: 1.6em;
  margin-bottom: 0;
}

.content-meta-divider {
  margin-top: 2.5em;
  margin-bottom: 0;
}

.post-neighbor-nav {
  margin-top: 1.2em;
  display: flex;
  justify-content: space-between;
  gap: 0.8em;
}

.post-neighbor-nav > div > span {
  font-size: 15px;
}

.post-neighbor-nav > div {
  max-width: 40%;
}

.post-neighbor-nav a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.neighbor-right {
  text-align: right;
}

a {
  color: var(--text-bright);
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: var(--links);
  text-decoration-thickness: 0.2ex;
  text-underline-offset: 0.5ex;
  border-radius: 0.2rem;
}

a:hover,
a:focus-visible {
  background: var(--accent-bg, var(--links));
  color: var(--background);
  text-decoration-color: var(--links);
  outline: none;
}

a.is-active {
  background: var(--accent-bg, var(--links));
  color: var(--background-body);
  text-decoration: none;
  outline: none;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.4rem 0.7rem;
}

header nav li a {
  display: inline-block;
  padding: 0.08em 0.22em;
  line-height: 1.6;
  cursor: pointer;
}

.header-divider {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.site-tagline {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
}

.site-title {
  margin: 0 0 0.55rem;
  font-size: clamp(34px, 6.2vw, 74px);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.site-title-link {
  color: var(--text-bright);
  text-decoration: none;
  transition: color var(--animation-duration) ease;
}

.site-title-link:hover,
.site-title-link:focus-visible {
  color: var(--links);
  background: transparent;
  text-decoration: none;
}

header nav {
  margin-top: 1rem;
}

footer {
  margin-top: 2.5em;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.admonition {
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 0.3rem;
  background: color-mix(in oklab, var(--background-alt) 75%, var(--background));
  overflow: hidden;
}

.adm-title {
  margin: 0;
  padding: 0.35rem 0.65rem;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--adm-title-color, var(--text-bright));
  background: color-mix(in oklab, var(--background-alt) 45%, var(--background));
  border-bottom: 1px solid var(--border);
}

.adm-body {
  padding: 0.6rem 0.75rem 0.1rem;
}

.adm-note {
  border-left-color: #2f7ecb;
  --adm-title-color: #2f7ecb;
}

.adm-note .adm-title {
  background: color-mix(in oklab, #2f7ecb 15%, var(--background));
}

.adm-tip {
  border-left-color: #2b8a3e;
  --adm-title-color: #2b8a3e;
}

.adm-tip .adm-title {
  background: color-mix(in oklab, #2b8a3e 14%, var(--background));
}

.adm-warn {
  border-left-color: #b7791f;
  --adm-title-color: #b7791f;
}

.adm-warn .adm-title {
  background: color-mix(in oklab, #b7791f 16%, var(--background));
}

.adm-warning {
  border-left-color: #b7791f;
  --adm-title-color: #b7791f;
}

.adm-warning .adm-title {
  background: color-mix(in oklab, #b7791f 16%, var(--background));
}

.adm-danger {
  border-left-color: #b42318;
  --adm-title-color: #b42318;
}

.adm-danger .adm-title {
  background: color-mix(in oklab, #b42318 14%, var(--background));
}

.adm-error {
  border-left-color: #a61b4a;
  --adm-title-color: #a61b4a;
}

.adm-error .adm-title {
  background: color-mix(in oklab, #a61b4a 14%, var(--background));
}

.adm-info {
  border-left-color: #0f766e;
  --adm-title-color: #0f766e;
}

.adm-info .adm-title {
  background: color-mix(in oklab, #0f766e 14%, var(--background));
}

.admonition .adm-body > :last-child {
  margin-bottom: 0.6rem;
}

.admonition .adm-title + .adm-body {
  padding-top: 0.55rem;
}

.admonition .adm-body pre {
  margin-top: 0.25rem;
}

.admonition .adm-body code,
.admonition .adm-body pre code {
  font-size: 0.92em;
}

.admonition .adm-title:empty {
  display: none;
}

.adm-none .adm-title {
  background: color-mix(in oklab, var(--background-alt) 45%, var(--background));
}

.adm-none {
  --adm-title-color: color-mix(in oklab, var(--text-main) 80%, var(--background-alt));
}

#table-of-contents {
  margin: 0 0 0;
  padding: 0.55rem 0.8rem 0.4rem;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-top-left-radius: 0.3rem;
  border-top-right-radius: 0.3rem;
  background: color-mix(in oklab, var(--background-alt) 70%, var(--background));
  font-size: 0.95rem;
  line-height: 1.3;
}

#table-of-contents-list {
  margin: 0 0 1.2rem;
  padding: 0.35rem 0.8rem 0.6rem 1.75rem;
  border: 1px solid var(--border);
  border-top: 0;
  border-bottom-left-radius: 0.3rem;
  border-bottom-right-radius: 0.3rem;
  background: color-mix(in oklab, var(--background-alt) 70%, var(--background));
}

#table-of-contents-list li {
  margin: 0.12rem 0;
}

#table-of-contents-list ul {
  margin-top: 0.15rem;
  margin-bottom: 0.15rem;
  padding-left: 1.15rem;
}

.footnotes {
  margin-top: 1.5rem;
  padding-top: 0.2rem;
  padding-left: 0.75rem;
  font-size: 0.92em;
  line-height: 1.5;
  color: var(--text-muted);
}

.footnotes ol {
  margin-top: 0.4rem;
  margin-left: 2em;
  padding-left: 1.15rem;
}

.footnotes li {
  margin-bottom: 0.35rem;
}

.footnotes p {
  margin: 0 0 0.25rem;
}

.footnote-ref {
  font-size: 0.85em;
}

.footnote-ref a,
.footnote-backref {
  text-decoration-thickness: 0.12ex;
  text-underline-offset: 0.18ex;
}

.footnote-backref {
  margin-left: 0.25rem;
  white-space: nowrap;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.92rem;
}

.footer-shortcuts-hint {
  color: var(--text-muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.footer-extra {
  margin-bottom: 3.5rem;
}

.footer-extra > :first-child {
  margin-top: 0;
}

.footer-extra > :last-child {
  margin-bottom: 0;
}

.post-list h2 {
  font-size: 23px;
  line-height: 38px;
  font-weight: 400;
}

.post-list article {
  margin-bottom: 2.4rem;
}

.post-compact-list {
  margin: 0;
  padding-left: 1.2rem;
}

.post-compact-list li {
  margin-bottom: 0.45rem;
}

.post-compact-list a {
  text-decoration-thickness: 0.16ex;
}

.post-full {
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.post-full > h2 {
  margin-top: 0;
  margin-bottom: 0.55rem;
}

.index-layout-full .post-full > h2 {
  font-size: clamp(30px, 3.8vw, 38px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.post-full > h2 a {
  text-decoration: none;
}

.post-full-description {
  margin-bottom: 0.8rem;
  color: var(--text-muted);
}

.post-full-body > :last-child {
  margin-bottom: 0;
}

.post-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  background: transparent;
}

.post-card-link:hover,
.post-card-link:focus-visible {
  text-decoration: none;
  color: inherit;
  background: transparent;
  outline: none;
}

.post-list .post-card {
  border: 1px solid var(--links);
  border-radius: 0.3rem;
  background: var(--background-alt);
  padding: 0.9em 1em;
  transition:
    border-color var(--animation-duration) ease,
    background-color var(--animation-duration) ease;
}

.post-list .post-card h2 {
  margin-top: 0;
  transition:
    color var(--animation-duration) ease,
    text-decoration-color var(--animation-duration) ease;
}

.post-card-link:hover .post-card h2,
.post-card-link:focus-visible .post-card h2 {
  color: var(--background);
  background: var(--links);
  text-decoration: underline;
  text-decoration-color: var(--background);
  text-decoration-thickness: 0.2ex;
}

.post-card-link:hover .post-card,
.post-card-link:focus-visible .post-card {
  border-color: var(--links);
  background: var(--background);
}

.post-card-link.is-kb-active .post-card {
  border-color: var(--links);
  background: var(--background);
}

.post-card-link.is-kb-active .post-card h2 {
  color: var(--background);
  background: var(--links);
  text-decoration: underline;
  text-decoration-color: var(--background);
  text-decoration-thickness: 0.2ex;
}

.post-list article p:last-child {
  font-size: 16px;
  line-height: 1.6;
}

.post-list-meta {
  margin-top: 0.5em;
  margin-bottom: 0;
  font-size: 12px;
  line-height: 1.4;
}

.pagination-divider {
  margin-top: 2.5em;
  margin-bottom: 1em;
}

.pagination-nav {
  margin-top: 1.2em;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
}

.end-of-feed-note {
  margin-top: 1rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

.journal-intro {
  margin-bottom: 3em;
}

.search-form-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-form-row input[type="search"] {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.search-form-row button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.search-form-row button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--background-alt);
  color: var(--text-muted);
}

.doc-description {
  margin-bottom: 1.25em;
}

.doc-description p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.shortcut-help {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.shortcut-help.is-open {
  display: flex;
}

.shortcut-help-backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.shortcut-help-backdrop:hover,
.shortcut-help-backdrop:focus-visible {
  background: rgba(0, 0, 0, 0.55);
  outline: none;
}

.shortcut-help-panel {
  position: relative;
  width: min(32rem, 100%);
  max-height: 85vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  background: var(--background-alt);
  color: var(--text-main);
  padding: 1rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.shortcut-help-panel h2 {
  margin-top: 0;
  margin-bottom: 0.7rem;
}

.shortcut-help-panel ul {
  margin: 0;
  padding-left: 1.1rem;
}

.shortcut-help-panel li {
  margin-bottom: 0.3rem;
}

.shortcut-help-key {
  display: inline-block;
  min-width: 1.4em;
  padding: 0.05em 0.35em;
  border: 1px solid var(--border);
  border-radius: 0.2rem;
  background: var(--background);
  color: var(--text-bright);
  font-family: var(--site-font-family-mono, "Atkinson Hyperlegible Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace);
  font-size: 0.9em;
  line-height: 1.2;
}

@media (min-width: 960px) {
  header nav ul {
    gap: 0.45rem 1rem;
  }
}

@media (max-width: 700px) {
  .post-neighbor-nav {
    display: block;
  }

  .neighbor-right {
    margin-top: 0.8em;
    text-align: left;
  }

  .post-neighbor-nav > div {
    max-width: 100%;
  }
}
