:root {
  --bg-col: #f4f4f2;
  --bg-surface: #fff;
  --bg-light: #f0f0ee;
  --bg-light-hi: #e6e6e2;

  --text-color: #1c1c1c;
  --text-color-light: #666;

  --border-color: #ddd;
  --border-soft: #eee;

  --link-color: #0b62c4;
  --link-hover: #084e9e;

  --bg-banner-notice: #fff;

  --font-sans: system-ui, "Segoe UI", sans-serif;

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg-col: #121212;
  --bg-surface: #1c1c1c;
  --bg-light: #2a2a28;
  --bg-light-hi: #343432;
  --text-color: #e8e8e6;
  --text-color-light: #b0b0aa;
  --border-color: #3a3a3a;
  --border-soft: #2c2c2c;
  --link-color: #7eb6f0;
  --link-hover: #a8d0f7;
  --bg-banner-notice: #1c1c1c;

  color-scheme: dark;
}

body {
  background-color: var(--bg-col);
  color: var(--text-color);
  font-family: var(--font-sans);

  margin: 0;
  padding: 0 0 64px;

  font-size: 16px;
  line-height: 1.55;
}

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 600;
  margin-bottom: 0;
}

h1 {
  font-size: 28px;
  margin: 4px 0 16px;
}

h2 {
  font-size: 20px;
  margin: 28px 0 8px;
}

h3 {
  font-size: 17px;
  margin: 22px 0 8px;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.75em;
}

img {
  border: 0;
}

blockquote {
  font-style: italic;
}

td {
  padding-right: 1rem;
}

div#tophdr {
  font-size: 10pt;
  font-weight: bold;
  margin: 0px;
  padding: 6pt;
  padding-left: 16px;
  padding-right: 16px;
}

div.centered {
  text-align: center;
}

div.centered table {
  margin: 0 auto;
  text-align: left;
}

#content {
  display: flex;
  justify-content: center;
}

hr {
  border: 0;
  border-top: 1px solid var(--border-soft);
}

.lvl1 {
  margin-left: 1em;
}

.lvl2 {
  margin-left: 2em;
}

.lvl3 {
  margin-left: 3em;
}

.lvl4 {
  margin-left: 4em;
}

.column-list {
  display: flex;
  width: 100%;
}

/* size all columns equally */
.column-list > div {
  flex: 1;
}

.title {
  display: block;
  max-width: 100%;
  text-align: center;
  overflow-wrap: break-word;
  margin-block-end: 0.5em !important;
}

.article-date {
  margin-top: 0.3rem;
  color: var(--text-color-light);
  font-size: 70%;
}

a {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--link-color);
}

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

a.hdr {
  text-decoration: none;
}

.taglink {
  color: var(--text-color-light);
  text-decoration: none;
}

.taglink:hover {
  color: var(--link-color);
}

.article-header {
  margin-top: 16px;
}

.tryonline {
  font-size: 80%;
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.5rem;
  color: #484848;
  border: 1px solid #b8b8b8;
  /* border-radius: 0.5rem; */
  &:hover {
    color: #484848;
    background-color: #f8f8f8;
    /* background-color: var(--text-col); */
  }
}

.hdr-image:hover {
  filter: grayscale(100%);
}

.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.wrap {
  width: calc(100% - 2rem);
  max-width: 96ch;
  margin-left: auto;
  margin-right: auto;
}

.selected-img {
  border: 1px solid var(--link-color);
}

.img-wrapper-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.img-wrapper {
  position: relative;
}

.img-wrapper > img {
  object-fit: scale-down;
  max-width: 95vw;
  max-height: 480px;
}

.nav-icon-left {
  position: absolute;
  left: -16px;
  top: calc(50% - 24px);
}

.nav-icon-right {
  position: absolute;
  right: -16px;
  top: calc(50% - 24px);
}

a.for-nav-icon {
  display: flex;

  text-decoration: none;
  font-size: 0px;
  justify-content: center;
  align-items: center;

  fill: gray;
  width: 40px;
  height: 40px;

  border-radius: 24px;
  background-color: var(--bg-surface);
  box-shadow:
    0 4px 4px rgba(0, 0, 0, 0.3),
    0 0 4px rgba(0, 0, 0, 0.2);
}

a.for-nav-icon:hover {
  fill: var(--text-color);
  background-color: var(--bg-light);
}

.nav-icon {
  width: 24px;
  height: 24px;
  pointer-events: none;
  display: block;
}

.ib {
  display: inline-block;
}

/* https://stackoverflow.com/questions/19390690/css-media-queries-to-hide-and-show-page-elements
TODO: it still loads the image if it's inside div hidden with this trick, at least in Chrome's device simulator
See: https://timkadlec.com/2012/04/media-query-asset-downloading-results/
*/
@media only screen and (max-width: 767px), only screen and (max-device-width: 767px) {
  .hide-mobile {
    display: none;
  }
}

/* based on https://gomakethings.com/how-to-break-an-image-out-of-its-parent-container-with-css/ */

/* .page-cover-image {
  left: calc(50% - 8px);
  margin-left: -50vw;
  margin-right: -50vw;
  max-width: 100vw;
  position: relative;
  right: 50%;
  width: 100vw;
  overflow: hidden;

  height: 30vh;
  object-fit: cover;
  display: block;
  width: 100vw;
  margin-top: 10px;
} */

.page-cover-image {
  /* margin-top: 12px; */
  width: 100%;
}

/* was 768px but half size of my 15ich laptop screen is ~760 so it wasn't showing */
/* must update article.tmpl.html <source media="..."> */
@media (max-width: 748px) {
  .page-cover-image {
    display: none;
  }
}

.table_of_contents-item {
  display: block;
  font-size: 0.875rem;
  line-height: 1.3;
  padding: 0.125rem;
}

.table_of_contents-indent-1 {
  margin-left: 1.5rem;
}

.table_of_contents-indent-2 {
  margin-left: 3rem;
}

.table_of_contents-indent-3 {
  margin-left: 4.5rem;
}

.table_of_contents-link {
  text-decoration: none;
  opacity: 0.7;
  border-bottom: 1px solid rgba(55, 53, 47, 0.18);
}

nav div {
  margin-block-end: 0 !important;
}

.block-color-gray {
  color: rgba(55, 53, 47, 0.6);
  fill: rgba(55, 53, 47, 0.6);
}

.article-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10pt;
  line-height: 1.6;
  margin-top: 1rem;

  /* border-radius: 2rem; */
  padding: 0.5rem 1rem;

  color: var(--text-color-light);
  background-color: var(--bg-light);
}

div.indented {
  margin-left: 1em;
}

div#post div {
  min-height: 1em;
  /* line-height: 1.5em; */
  margin-block-start: 0;
  margin-block-end: 1rem;
}

div#post div.page {
  margin-block-end: 0;
}

#post {
  margin-top: 1rem;
}

#post img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border-color);
}

/* inline SVG diagrams in markdown articles (not header-anchor icons) */
#post > svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25em 0 1.5em;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.notion-callout {
  display: flex;
  background-color: var(--bg-light);
  padding: 0.5em 0.5em;
  padding-top: 1em;
  /* margin-block-start: -1em; */
}

.notion-figure-icon-wrap {
  padding-right: 0.3em;
}

.notion-date {
  opacity: 0.5;
}

.notion-video {
  max-width: 100%;
}

hr.notion-divider {
  margin-top: 1em;
  margin-bottom: 1em;

  border: 0;
  border-top: 1px solid var(--border-soft);
}

/* Note: there might be more elements we need to add here */
details.notion-toggle > div,
details.notion-toggle > details {
  margin-left: 1.4em;
}

/* neutralize dy margin at the top and the bottom of lists
   when nested inside toggle list */
details.notion-toggle > ul,
details.notion-toggle > ol {
  margin-block-start: 0;
  margin-block-end: 0;
}

details.notion-toggle > summary::-webkit-details-marker:hover {
  color: var(--text-color-light);
  cursor: pointer;
}

img.notion-image {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

div.column-list {
  display: flex;
  width: 100%;
}

/* size all columns equally */
div.column {
  flex: 1;
  padding-right: 8px;
}

table.notion-table {
  background-color: var(--bg-surface);
}

table.notion-table th {
  color: var(--text-color-light);
  font-weight: 600;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  padding: 5px 8px 5px 0;
  margin: 0px;
}

table.notion-table td {
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-color);
  border-top: 1px solid var(--border-soft);
  padding: 5px 8px 5px 0;
  margin: 0px;
  font-size: 14px;
}

.ad {
  font-family: geneva, helvetica, arial, sans-serif;
  font-size: 12pt;
  background-color: #fbf0fa;
  padding: 4px 8px;
}

.adl {
  color: green;
}

.light {
  color: var(--text-color-light);
}

.blog-img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

.blog-youtube {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

#container {
  margin-left: 16pt;
  margin-right: 16pt;
}

.hdr-small {
  padding: 4px 8px;
  /* border-bottom: 1px solid #0894f1; */
  box-shadow: 4px 3px 4px -4px #0894f1;
}

.hdr {
  padding-top: 2px;
  /* border-bottom: 1px solid #0894f1; */
  /* box-shadow: 0px 3px 4px -4px #0894f1; */
}

.footer {
  margin-top: 1.5rem;
  margin-bottom: 3rem;
  /* border-top: 1px solid #0894f1; */
  /* box-shadow: 0px 3px 4px -4px #0894f1; */
}

/* header with link anchor */
.hdr-with-anchor {
  display: flex;
  align-items: baseline;
}

.hdr-with-anchor:hover .header-anchor {
  display: block;
}

h1 .header-anchor {
  transform: translateY(3px);
}

h2 .header-anchor {
  transform: translateY(2px);
}

h3 .header-anchor {
  transform: translateY(1px);
}

.header-anchor {
  margin-left: 0.5rem;
  font-size: 70%;
  color: var(--text-color-light);
  display: none;
}

/* used in homepage.html */

.underline {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 4px;
  margin-bottom: 24px;
}

.book-cover {
  width: 160px;
  height: 160px;
  margin-left: 4px;
  margin-right: 4px;
  object-fit: contain;
}

.book-list-headline {
  margin-bottom: 1em;
  margin-top: 0.5em;

  text-align: center;
  font-weight: bold;
}

#books-list {
  justify-content: center;
}

.headline {
  line-height: 1.4em;
}

#soft-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.soft-title {
  align-self: center;
  margin-top: 8px;

  font-weight: bold;
}

.soft-card {
  display: flex;
  flex-direction: column;
  padding: 15px;
  margin-left: 16px;
  box-shadow:
    0 7px 14px 0 rgba(60, 66, 87, 0.1),
    0 3px 6px 0 rgba(0, 0, 0, 0.07);
}

.shadow {
  box-shadow:
    0 7px 14px 0 rgba(60, 66, 87, 0.1),
    0 3px 6px 0 rgba(0, 0, 0, 0.07);
}

.soft-desc {
  font-size: 90%;
  max-width: 240px; /* same as soft-card-img */
  margin-top: 8px;
}

.soft-card-img {
  width: 240px;
  height: 240px;
  /* object-fit: contain; */
}

.for-win {
  display: none;
}

.banner-notice {
  background-color: var(--bg-banner-notice);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-sizing: border-box;
  position: absolute;

  padding: 0.5rem 1rem;
  margin-top: 1.5rem;

  .bhdr {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-color-light);
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 0;
    transform: translate(-50%, -100%);
    padding: 0.2rem 1rem;
    background-color: var(--bg-banner-notice);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    white-space: nowrap;
    margin-top: 1px;
  }

  div {
    background-color: transparent;
    max-width: 80ch;
  }

  a {
    font-weight: bold;
    font-size: 120%;
    line-height: 150%;
    margin-top: 0.5rem;
    text-decoration: underline;
  }
}

.banner-notice-compact {
  align-self: center;
  box-sizing: border-box;
  background-color: var(--bg-banner-notice);
  border: 1px solid var(--border-color);
  border-radius: 6px;

  padding: 0.5rem 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  max-width: 600px;

  font-size: 14px;

  .bhdr {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-color-light);
    z-index: 1;
    left: 50%;
    top: 0;
    transform: translate(-50%, -100%);
    padding: 0.2rem 1rem;
    background-color: var(--bg-banner-notice);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    white-space: nowrap;
    margin-top: 1px;
  }

  td:first-child {
    white-space: nowrap;
  }

  div {
    background-color: transparent;
    max-width: 80ch;
  }

  a {
    font-weight: bold;
    font-size: 110%;
    line-height: 150%;
    margin-top: 0.5rem;
    text-decoration: none;
  }
}

.edit-link {
  color: transparent;
}

.edit-link:hover {
  color: var(--link-color);
}

#msg-for-chris {
  width: 100%;
  height: 8em;
}

textarea,
input,
select {
  font-size: 12pt;
  color: var(--text-color);
  background-color: var(--bg-surface);
  border-color: var(--border-color);
}

#contact-form {
  padding: 1em 2em;
  width: 75vw;
  position: fixed;
  right: 8px;
  bottom: 2em;
  z-index: 99;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow:
    0 4px 4px rgba(0, 0, 0, 0.3),
    0 0 4px rgba(0, 0, 0, 0.2);

  /* initially hidden */
  display: none;
}

#contact-form button {
  padding: 8px 8px;
}

#contact-page-url {
  font-size: 85%;
  border: 0;
  color: grey;
  margin-left: 2px;
  background-color: inherit;
}

form > input {
  width: 100%;
}

form > button {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-color);
  border-radius: 6px;
}

form > button:hover {
  background-color: var(--bg-light);
}

.contact-light {
  font-size: 85%;
  color: var(--text-color-light);
  margin-left: 2px;
  margin-bottom: 4px;
}

/* mini tailwindcss */
/*
https://github.com/tachyons-css/tachyons-flexbox
http://tachyons.io/docs/
*/
.sticky {
  position: sticky;
}

.hidden {
  display: none;
}

.top-0 {
  top: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.bg-white {
  background-color: var(--bg-surface);
}

.relative {
  position: relative;
}

.fixed {
  position: fixed;
}

.pb-4 {
  padding-bottom: 1rem;
}

.pt-4 {
  padding-top: 1rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.w-full {
  width: 100%;
}

.font-bold {
  font-weight: bold;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.grow {
  flex-grow: 1;
}

.flex-1 {
  flex: 1 1 0%; /* or Tailwind: flex-1 */
}

.flex-none {
  flex: 0 0 auto; /* or Tailwind: flex-none */
}

.items-center {
  align-items: center;
}

.justify-self-center {
  justify-self: center;
}

.justify-center {
  justify-content: center;
}

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

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

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.px-1 {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.z-10 {
  z-index: 10;
}

.f7 {
  font-size: 0.75rem;
}
.mt1 {
  margin-top: 0.25rem;
}

.mt2 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

.pt-8 {
  padding-top: 2rem;
}

.mb-6 {
  margin-bottom: 2rem;
}

.pa1 {
  padding: 4px;
}

.nowrap {
  white-space: nowrap;
}

.draft {
  color: #ff0591;
}

.homepage-article-link {
  /* margin-left: 1rem; */
}

.daily-note-link {
  /* font-size: 75%; */
  /* justify-self: end; */
}

code {
  background: var(--bg-light);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 90%;
}

.code-block {
  display: block;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow-x: visible;
  tab-size: 2;
  padding: 0.5rem;
  font-size: 90%;
  white-space: pre-wrap;
  box-sizing: border-box;
}

.code-block > code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.text-gray-50 {
  color: rgb(249 250 251);
}
.text-gray-100 {
  color: rgb(243 244 246);
}
.text-gray-200 {
  color: rgb(229 231 235);
}
.text-gray-300 {
  color: rgb(209 213 219);
}
.text-gray-400 {
  color: rgb(156 163 175);
}
.text-gray-500 {
  color: rgb(107 114 128);
}
.text-gray-600 {
  color: rgb(75 85 99);
}
.text-gray-700 {
  color: rgb(55 65 81);
}
.text-gray-800 {
  color: rgb(31 41 55);
}
.text-gray-900 {
  color: rgb(17 24 39);
}
.text-gray-950 {
  color: rgb(3 7 18);
}

/* Site Header - Charlie Deets Inspired */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.site-header-search {
  flex: 1 1 0%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.site-header-nav {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

.site-header-social {
  flex: 1 1 0%;
  display: flex;
  justify-content: flex-end;
}

/* Nav Segmented Control */
.nav-filter-track {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 46px;
  padding: 4px;
  border-radius: 46px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-sizing: border-box;
}

.nav-filter-thumb {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 38px;
  border-radius: 38px;
  background: var(--bg-light);
  pointer-events: none;
  opacity: 0;
  transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease;
  z-index: 1;
}

.nav-filter-segment {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  line-height: 38px;
  padding: 0 18px;
  border-radius: 38px;
  font-size: 15px;
  font-weight: 450;
  color: var(--text-color-light);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.nav-filter-segment:hover {
  color: var(--text-color);
  text-decoration: none;
}

.nav-filter-segment.is-active {
  color: var(--text-color);
  text-decoration: none;
}

/* Search icon, same size as the theme switch buttons */
.search-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-color-light);
  font-family: inherit;
  cursor: pointer;
  box-sizing: border-box;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.search-trigger:hover {
  background: var(--bg-light);
  border-color: var(--border-color);
  color: var(--text-color);
}

.search-trigger:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.25);
  outline-offset: 2px;
}

.search-icon {
  flex-shrink: 0;
  stroke: var(--text-color-light);
  transition: stroke 0.2s ease;
}

.search-trigger:hover .search-icon {
  stroke: var(--text-color);
}

/* Theme switch: current choice only, expands on hover. */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-color);
}

html[data-theme="dark"] .theme-switch {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.theme-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  overflow: hidden;
  flex: 0 0 auto;
}

.theme-opt svg {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
  flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
  .theme-switch {
    gap: 0;
    overflow: hidden;
  }

  .theme-switch .theme-opt:not([aria-pressed="true"]) {
    width: 0;
    min-width: 0;
    opacity: 0;
    pointer-events: none;
  }

  .theme-switch:is(:hover, :focus-within):not(.is-locked) {
    gap: 2px;
  }

  .theme-switch:is(:hover, :focus-within):not(.is-locked) .theme-opt:not([aria-pressed="true"]) {
    width: 2rem;
    min-width: 2rem;
    opacity: 1;
    pointer-events: auto;
  }
}

.theme-opt:hover {
  color: var(--text-color);
}

.theme-opt-active,
.theme-opt[aria-pressed="true"] {
  background: #fff;
  color: #111;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .theme-opt-active,
html[data-theme="dark"] .theme-opt[aria-pressed="true"] {
  background: #374151;
  color: #fff;
  box-shadow: none;
}

html[data-theme="dark"] .toc-light {
  color: #5c5c58;
}

/* Microlighter sets color-scheme: light dark, which follows the OS.
   Pin it to the chosen theme so code blocks match the page. */
html[data-theme="light"] [data-syntax-theme] {
  color-scheme: light;
}

html[data-theme="dark"] [data-syntax-theme] {
  color-scheme: dark;
}

/* Social Track Capsule */
.social-track {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 46px;
  padding: 4px;
  border-radius: 46px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-sizing: border-box;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 38px;
  color: var(--text-color-light);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.social-link:hover {
  background: var(--bg-light);
  color: var(--text-color);
  text-decoration: none;
}

@media (max-width: 680px) {
  .site-header {
    display: grid;
    grid-template-areas:
      "nav nav"
      "search social";
    grid-template-columns: 1fr auto;
    justify-items: center;
    gap: 12px;
  }
  .site-header-nav {
    grid-area: nav;
  }
  .site-header-search {
    grid-area: search;
    justify-self: start;
  }
  .site-header-social {
    grid-area: social;
    justify-self: end;
  }
}

@media (max-width: 440px) {
  .nav-filter-segment {
    padding: 0 12px;
    font-size: 13.5px;
  }
}
