:root {
  color-scheme: light dark;
  --bg: #f6f4f0;
  --bg: light-dark(#f6f4f0, #141311);
  --ink: #1c1917;
  --ink: light-dark(#1c1917, #e8e4dc);
  --muted: #5c564e;
  --muted: light-dark(#5c564e, #b3aea4);
  --line: #e4dfd6;
  --line: light-dark(#e4dfd6, #2e2a26);
  --paper: #fffcf8;
  --paper: light-dark(#fffcf8, #1c1b19);
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --measure: 40rem;
  --wrap: 46rem;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f4f0;
  --ink: #1c1917;
  --muted: #5c564e;
  --line: #e4dfd6;
  --paper: #fffcf8;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141311;
  --ink: #e8e4dc;
  --muted: #b3aea4;
  --line: #2e2a26;
  --paper: #1c1b19;
}

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

html {
  background: var(--bg);
}

body,
body.oxygen-body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

[hidden] {
  display: none !important;
}

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

::selection {
  background: light-dark(#e4dfd6, #3a342c);
  background: var(--line);
  color: var(--ink);
}

body :any-link {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  cursor: pointer;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

button,
summary,
.gk-search button {
  cursor: pointer;
}

.gk-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gk-skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  z-index: 20;
}

.gk-skip:focus {
  top: 0.75rem;
}

.gk-wrap {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}

.gk-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0 1rem;
}

.gk-bar,
.gk-footer-row,
.gk-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.gk-mark {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.gk-mark a {
  text-decoration: none;
}

.gk-mark a:hover {
  text-decoration: underline;
}

.gk-tools {
  justify-content: flex-end;
}

.gk-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gk-search input,
.gk-search button,
.gk-theme,
.gk-theme-system {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  min-height: 2.75rem;
}

.gk-search input {
  border-bottom: 1px solid var(--line);
  padding: 0.35rem 0;
}

.gk-search input {
  width: min(14rem, 46vw);
}

.gk-search input::placeholder {
  color: var(--muted);
}

.gk-search button,
.gk-theme,
.gk-theme-system {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  padding: 0;
}

.gk-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gk-icon-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gk-icon-moon {
    display: none;
  }

  :root:not([data-theme="light"]) .gk-icon-sun {
    display: block;
  }
}

:root[data-theme="dark"] .gk-icon-moon {
  display: none;
}

:root[data-theme="dark"] .gk-icon-sun {
  display: block;
}

:root[data-theme="light"] .gk-icon-moon {
  display: block;
}

:root[data-theme="light"] .gk-icon-sun {
  display: none;
}

.gk-nav-row {
  margin-top: 0.85rem;
}

.gk-menu {
  display: none;
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: 0;
  min-height: 2.75rem;
  padding: 0;
}

.gk-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0;
}

.gk-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}

.gk-group a {
  font-family: var(--sans);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.35rem 0;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

.gk-group a:hover,
.gk-group a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.gk-group + .gk-group {
  margin-left: 1.1rem;
  padding-left: 1.1rem;
  border-left: 1px solid var(--line);
}

.gk-tagline {
  margin: 0.85rem 0 0.15rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.gk-main {
  padding: 2.25rem 0 4rem;
}

.gk-listing-head h1,
.gk-entry h1 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

.gk-listing-head h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.gk-entry h1 {
  font-size: clamp(2rem, 4vw, 2.7rem);
  max-width: var(--measure);
}

.gk-dek,
.gk-excerpt,
.gk-empty {
  color: var(--muted);
}

.gk-dek {
  margin-top: 0.6rem;
  max-width: var(--measure);
}

.gk-dek p {
  margin: 0;
}

.gk-list {
  margin-top: 1.5rem;
}

.gk-item {
  content-visibility: auto;
  contain-intrinsic-size: auto 7rem;
  padding: 1.6rem 0 1.7rem;
  border-top: 1px solid var(--line);
}

.gk-item time,
.gk-cats,
.gk-meta,
.gk-nav-kicker,
.navigation .nav-links,
.gk-footer,
.gk-pager {
  font-family: var(--sans);
}

.gk-item time,
.gk-meta,
.gk-nav-kicker {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.gk-item h2 {
  margin: 0.15rem 0 0.2rem;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-wrap: balance;
}

.gk-item h2 a,
.gk-footer a,
.post-navigation a {
  text-decoration: none;
}

.gk-item h2 a:hover,
.gk-footer a:hover,
.post-navigation a:hover .gk-nav-title {
  text-decoration: underline;
}

.gk-cats {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.gk-excerpt {
  margin: 0.45rem 0 0;
  max-width: var(--measure);
  font-size: 1.02rem;
}

.gk-entry-head {
  margin-bottom: 1.6rem;
}

.gk-meta {
  margin: 0.7rem 0 0;
}

.gk-figure {
  margin: 0 0 1.6rem;
  max-width: var(--measure);
}

.gk-figure-img,
.gk-prose img,
.gk-prose video,
.gk-prose svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.gk-figure figcaption,
.gk-prose figcaption,
.wp-element-caption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
}

.gk-prose {
  max-width: var(--measure);
  font-size: 1.125rem;
  line-height: 1.75;
  text-wrap: pretty;
}

.gk-prose > *:first-child {
  margin-top: 0;
}

.gk-prose p,
.gk-prose ul,
.gk-prose ol,
.gk-prose blockquote,
.gk-prose pre,
.gk-prose figure,
.gk-prose table {
  margin: 0 0 1.1rem;
}

.gk-prose h2,
.gk-prose h3,
.gk-prose h4 {
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-wrap: balance;
  margin: 2rem 0 0.55rem;
}

.gk-prose h2 { font-size: 1.45rem; }
.gk-prose h3 { font-size: 1.2rem; }

.gk-prose a {
  text-decoration: underline;
}

.gk-prose blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.gk-prose code,
.gk-prose kbd {
  font-family: var(--mono);
  font-size: 0.88em;
}

.gk-prose pre {
  overflow: auto;
  padding: 1rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  line-height: 1.55;
}

.gk-prose pre code {
  font-size: 0.85rem;
}

.gk-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}

.gk-prose th,
.gk-prose td {
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0.6rem 0.45rem 0;
  text-align: left;
  vertical-align: top;
}

.gk-prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.gk-prose .wp-block-embed {
  margin: 0 0 1.4rem;
  max-width: var(--measure);
}

.gk-prose .wp-block-embed iframe {
  border: 0;
}

.post-navigation {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  max-width: var(--measure);
}

.post-navigation .nav-links {
  display: grid;
  gap: 1rem;
}

.post-navigation a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 2.75rem;
}

.gk-nav-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.navigation.pagination,
.gk-pager {
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.navigation.pagination a,
.navigation.pagination .current {
  text-decoration: none;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

.navigation.pagination .current {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.gk-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.gk-footer p {
  margin: 0;
}

.gk-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.comment-list,
.comment-respond {
  max-width: var(--measure);
  margin-top: 2.5rem;
  font-size: 1rem;
}

.comment-list {
  padding: 0;
  list-style: none;
}

.comment-body {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.comment-form input,
.comment-form textarea,
.post-password-form input[type="password"] {
  width: min(100%, 24rem);
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.55rem 0.7rem;
}

.comment-form textarea {
  width: 100%;
  min-height: 8rem;
}

.comment-form .submit,
.post-password-form input[type="submit"] {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  min-height: 2.75rem;
  padding: 0.35rem 0;
  cursor: pointer;
}

.gk-rail {
  display: none;
}

@media (min-width: 1180px) {
  .gk-rail {
    display: block;
    position: fixed;
    z-index: 5;
    top: 8.25rem;
    bottom: 1.25rem;
    left: calc(50% + (var(--wrap) / 2) + 1.15rem);
    width: min(16rem, calc(50vw - (var(--wrap) / 2) - 2rem));
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
  }

  .gk-rail::-webkit-scrollbar {
    display: none;
  }

  .gk-rail ol {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0.15rem 0.4rem 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .gk-rail a {
    position: relative;
    display: block;
    min-height: 0.8rem;
    text-decoration: none;
  }

  .gk-rail a::before {
    content: "";
    position: absolute;
    top: -0.35rem;
    bottom: -0.35rem;
    left: 0.33rem;
    width: 1px;
    background: var(--line);
  }

  .gk-rail-dot {
    position: absolute;
    left: 0.16rem;
    top: 50%;
    width: 0.38rem;
    height: 0.38rem;
    margin-top: -0.19rem;
    border-radius: 50%;
    background: var(--muted);
    z-index: 1;
  }

  .gk-rail a[aria-current="page"] .gk-rail-dot,
  .gk-rail a:hover .gk-rail-dot,
  .gk-rail a:focus-visible .gk-rail-dot {
    background: var(--ink);
  }

  .gk-rail-tip {
    position: absolute;
    left: 1.2rem;
    right: 0.15rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    background: var(--bg);
  }

  .gk-rail-tip time {
    font-family: var(--sans);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }

  .gk-rail-tip span {
    font-family: var(--serif);
    font-size: 0.92rem;
    line-height: 1.25;
    color: var(--ink);
  }

  .gk-rail a:hover,
  .gk-rail a:focus-visible {
    z-index: 2;
  }

  .gk-rail a:hover .gk-rail-tip,
  .gk-rail a:focus-visible .gk-rail-tip {
    opacity: 1;
  }

  .gk-rail a:focus-visible {
    outline: none;
  }

  .gk-rail a:focus-visible .gk-rail-dot {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
  }
}

@media (max-width: 799px) {
  .gk-menu {
    display: inline-flex;
    align-items: center;
  }

  .gk-links {
    display: none;
  }

  .gk-links.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding-bottom: 0.35rem;
  }

  .gk-group + .gk-group {
    margin: 0.15rem 0 0;
    padding: 0.15rem 0 0;
    border-left: 0;
  }

  .gk-bar,
  .gk-tools,
  .gk-search {
    width: 100%;
  }

  .gk-search {
    justify-content: space-between;
  }

  .gk-search input {
    flex: 1;
    width: auto;
  }
}

@media (min-width: 800px) {
  .gk-links {
    display: flex;
  }
}

@media (min-width: 1100px) {
  :root {
    --wrap: 48rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  a,
  button,
  summary {
    transition: none;
  }
}

@media (forced-colors: active) {
  .gk-search input,
  .gk-search button,
  .gk-theme,
  .gk-theme-system {
    border-color: ButtonText;
  }
}
