:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-mono: "SF Mono", ui-monospace, "Cascadia Code", Monaco, monospace;
  --site-font-family: var(--font-sans);
  --code-font-family: var(--font-mono);
  --display-font-family: var(--font-serif);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #0b0d10;
  color: #e7e9ec;
}

h1,
.hero-name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 1;
}

h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.01em;
}

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10050;
  transform: translateY(-180%);
  padding: 0.65rem 0.9rem;
  background: #101a2b;
  color: #e7e9ec;
  font-weight: 700;
  text-decoration: none;
}

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

a {
  color: inherit;
}

.site-header {
  border-bottom: 1px solid #252a31;
  padding: 1rem max(1rem, calc((100% - 1100px) / 2));
}

.nav-wrapper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.site-title {
  justify-self: start;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  text-decoration: none;
  font-size: 1.25rem;
  white-space: nowrap;
}

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

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.page-link {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0.9;
}

.page-link:hover {
  text-decoration: none;
  background: rgba(133, 133, 255, 0.12);
  opacity: 1;
}

.page-link-eng {
  position: relative;
  background: #ffd84d;
  color: #101216;
  font-weight: 600;
  opacity: 1;
  padding: 5px 12px 7px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.page-link-eng::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: #101216;
  opacity: 0.8;
}

.page-link-eng:hover {
  background: #ffe07a;
  color: #101216;
  text-decoration: none;
  opacity: 1;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Live visitor badge - hidden until the first count arrives. */
.header-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #89919b;
  white-space: nowrap;
}

/* An author display rule beats the UA's [hidden] { display: none }. */
.header-live[hidden] {
  display: none;
}

.header-live-count {
  font-variant-numeric: tabular-nums;
}

.header-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8585ff;
  animation: header-live-pulse 2.4s ease-out infinite;
}

@keyframes header-live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(133, 133, 255, 0.45); }
  70%  { box-shadow: 0 0 0 6px rgba(133, 133, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(133, 133, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .header-live-dot {
    animation: none;
  }
}

/* Header space is tight on phones - keep the dot and number only. */
@media (max-width: 640px) {
  .header-live-label {
    display: none;
  }
}

html[data-theme="light"] .header-live {
  color: #5c6470;
}

.theme-toggle {
  background: transparent;
  border: 1px solid #252a31;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: #8585ff;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid #252a31;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: inherit;
  flex-shrink: 0;
}

.nav-toggle:hover {
  border-color: #8585ff;
}

.hamburger-box {
  width: 18px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 18px;
  height: 2px;
  background-color: #e7e9ec;
  position: absolute;
  border-radius: 4px;
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}

html[data-theme="light"] .hamburger-inner,
html[data-theme="light"] .hamburger-inner::before,
html[data-theme="light"] .hamburger-inner::after {
  background-color: #303845;
}

.hamburger-inner {
  top: 50%;
  transform: translateY(-50%);
  left: 0;
}

.hamburger-inner::before {
  content: "";
  top: -6px;
  left: 0;
}

.hamburger-inner::after {
  content: "";
  top: 6px;
  left: 0;
}

.nav-toggle.is-active .hamburger-inner {
  transform: rotate(225deg);
}

.nav-toggle.is-active .hamburger-inner::before {
  top: 0;
  opacity: 0;
}

.nav-toggle.is-active .hamburger-inner::after {
  top: 0;
  transform: rotate(-90deg);
}

.nav-close {
  display: none;
}

@media (max-width: 860px) {
  .nav-wrapper {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
  }

  .site-nav.is-open {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 4rem 1.5rem 3rem;
    overflow-y: auto;
    animation: nav-fade-in 0.22s ease both;
  }

  /*
   * The actual dim + blur lives on #nav-backdrop (a direct child of
   * <body>, see partials/header.ejs) instead of on .site-nav itself.
   * .site-nav.is-open only has to size/center the link buttons; the
   * backdrop below is guaranteed to cover the true full viewport.
   */
  .nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    inset: 0;
    width: 100%;
    height: 100dvh;
    z-index: 1990;
    background: rgba(11, 13, 16, 0.72);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Browsers/webviews without backdrop-filter support still get a solid,
     unmistakably full-viewport dim - never a half-transparent gap. */
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .nav-backdrop {
      background: rgba(8, 10, 14, 0.94);
    }
  }

  .site-nav.is-open .site-nav-links {
    animation: nav-links-in 0.28s 0.05s ease both;
  }

  @keyframes nav-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes nav-links-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @media (prefers-reduced-motion: reduce) {
    .site-nav.is-open,
    .site-nav.is-open .site-nav-links,
    .nav-backdrop {
      animation: none;
      transition: none;
    }
  }

  .site-nav.is-open .nav-close {
    display: inline-flex;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: #1a2027;
    border: 1px solid #3a434e;
    border-radius: 10px;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
  }

  .site-nav.is-open .nav-close:hover {
    border-color: #8585ff;
    color: #8585ff;
  }

  .site-nav.is-open .site-nav-links {
    flex-direction: column;
    gap: 0.9rem;
    width: 100%;
    max-width: 360px;
  }

  .site-nav.is-open .page-link {
    font-size: 1.3rem;
    padding: 0.8rem 1.25rem;
    width: 100%;
    text-align: center;
    background: #1a2027;
    border: 1px solid #3a434e;
    border-radius: 10px;
    color: #fff;
    opacity: 1;
  }

  html[data-theme="light"] .site-nav.is-open .page-link {
    background: #fffdf8;
    border-color: #e2ddd0;
    color: #1a1d21;
  }

  .site-nav.is-open .page-link-eng {
    background: #ffd84d;
    border-color: #ffd84d;
    color: #101216;
  }

  .site-nav.is-open .page-link-eng::after {
    left: 50%;
    right: auto;
    bottom: 0.55rem;
    width: 3.5rem;
    transform: translateX(-50%);
  }

  html[data-theme="light"] .site-nav.is-open .page-link-eng {
    background: #f5c518;
    border-color: #f5c518;
    color: #101216;
  }

  html[data-theme="light"] .site-nav.is-open .nav-close {
    background: #fffdf8;
    border-color: #e2ddd0;
    color: #1a1d21;
  }

  html[data-theme="light"] .nav-toggle,
  html[data-theme="light"] .theme-toggle {
    color: #1a1d21;
  }

  body.nav-open .site-header {
    position: relative;
    z-index: 2000;
    background: transparent;
    border-bottom-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body.nav-open .site-title {
    display: none;
  }

  body.nav-open .header-actions {
    display: none;
  }

  body.nav-open .theme-toggle,
  body.nav-open .nav-toggle {
    visibility: hidden;
  }

  body.nav-open {
    overflow: hidden;
  }
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

.container {
  max-width: 860px;
  margin: auto;
  padding: 2rem 1.5rem;
}

.wrapper {
  width: 100%;
}

.hero {
  margin-bottom: 2rem;
}

.post-list {
  display: grid;
  gap: 1rem;
}

.card {
  padding: 1.25rem;
  border: 1px solid #252a31;
  border-radius: 10px;
  background: #11151a;
}

.card h2 {
  margin: 0.35rem 0;
}

.card h2 a {
  text-decoration: none;
}

.meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
  color: #aeb5bd;
}

.htb-card-machine {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0.9rem 0;
}

.htb-card-machine > img {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  border-radius: 10px;
  object-fit: cover;
  background: #202832;
}

.htb-card-machine strong {
  display: block;
  margin-bottom: 0.4rem;
}

.htb-card-details {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #c7d0d9;
  font-size: 0.82rem;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.badge.active {
  color: #ffb4b4;
}

.badge.retired {
  color: #a9e7b0;
}

.post {
  max-width: 850px;
  margin: auto;
}

.post-header {
  margin-bottom: 2rem;
}

.post-header h1 {
  line-height: 1.2;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #89919b;
  margin-top: 0.5rem;
}

.post-author {
  color: #aeb5bd;
}

.post-author strong {
  color: #c5cbf7;
  font-weight: 600;
}

html[data-theme="light"] .post-author strong {
  color: #5b5ec9;
}

.views-live {
  cursor: help;
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ---------------- reading progress + back to top ---------------- */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 999;
  background: transparent;
  pointer-events: none;
}

.reading-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4a90d9, #7dc4ff);
  transition: width 0.08s linear;
}

.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #252a31;
  background: #0f141b;
  color: #c7cdd4;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 998;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #182029;
  border-color: #4a90d9;
  color: #7dc4ff;
}

html[data-theme="light"] .back-to-top {
  background: #f0ede6;
  border-color: #d8d2c4;
  color: #3d4450;
}

/* ---------------- series box ---------------- */

.series-box {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid #2a313c;
  border-left: 3px solid #4a90d9;
  border-radius: 8px;
  background: #0d1219;
}

.series-box h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.series-list {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.92rem;
}

.series-list li.series-current {
  color: #7dc4ff;
  font-weight: 600;
}

.series-list li.series-current::marker {
  content: "▸ ";
  color: #4a90d9;
}

html[data-theme="light"] .series-box {
  background: #f0ede6;
  border-color: #d8d2c4;
}

/* ---------------- admin dashboard ---------------- */

.admin-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  border-bottom: 1px solid #252a31;
  margin: 1.25rem 0 1.5rem;
}

.admin-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #89919b;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-tab:hover {
  color: #c7cdd4;
}

.admin-tab.is-active {
  color: #7dc4ff;
  border-bottom-color: #4a90d9;
}

.admin-tab-count {
  font-size: 0.7rem;
  font-weight: 700;
  background: #d9635a;
  color: #fff;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
}

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-card,
.admin-card-wide {
  border: 1px solid #1d232c;
  border-radius: 10px;
  background: #0d1219;
  padding: 1rem 1.1rem;
}

.admin-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #89919b;
}

.admin-card-value {
  font-size: 1.6rem;
  line-height: 1.1;
}

.admin-card-sub {
  font-size: 0.75rem;
  color: #89919b;
}

.admin-card-wide {
  margin-bottom: 1rem;
}

.admin-card-wide h3 {
  margin: 0 0 0.5rem;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.admin-status {
  font-size: 0.82rem;
  color: #89919b;
}

.admin-hint {
  font-size: 0.82rem;
  color: #89919b;
  margin: 0.25rem 0 0.75rem;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.admin-filter {
  display: flex;
  gap: 0.4rem;
}

.admin-chip {
  background: none;
  border: 1px solid #252a31;
  border-radius: 999px;
  color: #89919b;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.25rem 0.85rem;
  cursor: pointer;
}

.admin-chip.is-active {
  color: #7dc4ff;
  border-color: #4a90d9;
}

#admin-post-search {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #252a31;
  border-radius: 8px;
  background: #0f141b;
  color: inherit;
  font: inherit;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid #1d232c;
  border-radius: 10px;
  background: #0d1219;
}

.admin-row-main {
  flex: 1;
  min-width: 0;
}

.admin-row-slug {
  font-size: 0.75rem;
  color: #89919b;
  margin-left: 0.5rem;
}

.admin-row-meta {
  font-size: 0.8rem;
  color: #89919b;
  margin-top: 0.15rem;
  overflow-wrap: break-word;
}

.admin-label {
  display: block;
  font-size: 0.85rem;
  color: #c7cdd4;
  margin: 0.75rem 0 0.3rem;
}

.admin-label input[type="checkbox"] {
  margin-right: 0.4rem;
}

#editor-text {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #252a31;
  border-radius: 8px;
  background: #0f141b;
  color: inherit;
  font: inherit;
}

#editor-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  min-height: 420px;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

.admin-editor {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid #2a313c;
  border-radius: 10px;
  background: #0d1219;
}

.admin-editor h3 {
  margin: 0 0 0.25rem;
}

.admin-kv {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.admin-logout {
  margin: 2rem 0;
  text-align: center;
}

html[data-theme="light"] .admin-card,
html[data-theme="light"] .admin-card-wide,
html[data-theme="light"] .admin-row,
html[data-theme="light"] .admin-editor,
html[data-theme="light"] #editor-text,
html[data-theme="light"] #admin-post-search {
  background: #f0ede6;
  border-color: #d8d2c4;
}


.toc {
  max-width: 320px;
  margin: 1rem 0 2rem;
  border: 1px solid #252a31;
  border-radius: 8px;
  background: #11151a;
  padding: 0.75rem;
}

.toc details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.toc ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  list-style: none;
}

.toc li {
  margin: 0.25rem 0;
}

.toc a {
  color: #89919b;
  font-size: 0.85rem;
  text-decoration: none;
}

.toc a:hover {
  color: #8585ff;
}

.related {
  max-width: 850px;
  margin: 2rem auto;
}

.related h2 {
  margin-bottom: 1rem;
}

.about-author {
  max-width: 640px;
  margin: 2rem auto;
  padding: 1rem 1.25rem;
  border: 1px solid #252a31;
  border-radius: 10px;
  background: #11151a;
  text-align: center;
}

.about-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.about-author p {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  color: #aeb5bd;
}

.about-author a {
  color: #8585ff;
}

.share-buttons {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1rem;
}

.share-btn {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border: 1px solid #252a31;
  border-radius: 6px;
  background: transparent;
  color: #aeb5bd;
  font-size: 0.8rem;
  text-decoration: none;
}

.share-btn:hover {
  border-color: #8585ff;
  color: #8585ff;
}

html[data-theme="light"] .about-author {
  background: #fffdf8;
  border-color: #e2ddd0;
}

.lead {
  color: #b7bec7;
  font-size: 1.1rem;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25rem auto;
  object-fit: contain;
}

.prose pre {
  overflow-x: auto;
  padding: 1rem;
  background: #07090b;
  border-radius: 8px;
}

.code-window {
  margin: 1.5rem 0;
  border: 1px solid #252a31;
  border-radius: 12px;
  overflow: hidden;
  background: #07090b;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem;
  background: rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid #252a31;
}

.code-window-dots {
  display: inline-flex;
  gap: 0.45rem;
}

.code-window-dots i {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-window-dots i:nth-child(1) {
  background: #ff5f57;
}

.code-window-dots i:nth-child(2) {
  background: #febc2e;
}

.code-window-dots i:nth-child(3) {
  background: #28c840;
}

.code-window-lang {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b93a0;
}

.code-window pre {
  margin: 0;
  border-radius: 0;
  background: transparent;
}

.code-window-bar .copy-btn {
  position: static;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.prose :not(pre) > code {
  background: rgba(133, 133, 255, 0.14);
  color: #b7b7ff;
  padding: 0.15em 0.4em;
  border-radius: 5px;
  font-size: 0.88em;
  border: 1px solid rgba(133, 133, 255, 0.25);
  white-space: nowrap;
}

.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  line-height: 1.5;
  border: 1px solid #252a31;
  border-radius: 10px;
}

.prose thead {
  background: linear-gradient(135deg, rgba(133, 133, 255, 0.22), rgba(0, 209, 178, 0.16));
}

.prose th {
  color: #b7b7ff;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}

.prose th,
.prose td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #252a31;
  vertical-align: top;
}

.prose tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

.prose tbody tr:hover {
  background: rgba(133, 133, 255, 0.08);
}

.prose tbody tr:last-child th,
.prose tbody tr:last-child td {
  border-bottom: none;
}

.prose td code {
  white-space: nowrap;
}

.locked,
.auth-box,
.center {
  max-width: 650px;
  margin: 5rem auto;
  text-align: center;
}

.auth-box form {
  display: grid;
  gap: 0.75rem;
  text-align: left;
}

input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid #343b44;
  background: #0d1116;
  color: inherit;
}

.button {
  display: inline-block;
  padding: 0.65rem 1rem;
  border: 0;
  border-radius: 6px;
  background: #e7e9ec;
  color: #0b0d10;
  text-decoration: none;
  cursor: pointer;
}

.error {
  margin: 1rem 0;
  padding: 0.75rem;
  border: 1px solid #8b4141;
  border-radius: 6px;
}

.site-footer {
  padding: 2.5rem clamp(1rem, 4vw, 3rem) 3rem;
  color: #a9b3c2;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(88, 101, 242, 0.13), transparent 38%),
    radial-gradient(ellipse at 88% 100%, rgba(66, 211, 190, 0.08), transparent 35%);
}

.footer-simple-wrapper {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) minmax(260px, 1.15fr) minmax(145px, 0.7fr) minmax(170px, 0.8fr);
  align-items: start;
  gap: 1.8rem;
  padding: clamp(1.35rem, 3vw, 2.25rem);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025) 48%, rgba(98, 111, 160, 0.07));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  backdrop-filter: blur(24px) saturate(145%);
}

.footer-simple-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.footer-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #89919b;
}

.footer-simple-title {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.25rem;
  color: #e7e9ec;
}

.footer-simple-description {
  margin: 0;
  font-size: 0.9rem;
}

.footer-email {
  color: inherit;
  font-size: 0.9rem;
}

.discord-presence-card {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(180, 192, 255, 0.2);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(88, 101, 242, 0.17), rgba(20, 27, 38, 0.38));
  text-align: left;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12), 0 10px 28px rgba(0, 0, 0, 0.12);
}

.discord-presence-heading,
.discord-presence-status,
.discord-presence-foot {
  display: flex;
  align-items: center;
}

.discord-presence-heading { gap: 0.7rem; }

.discord-presence-dot {
  width: 0.7rem;
  height: 0.7rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #89919b;
  box-shadow: 0 0 0 3px rgba(137, 145, 155, 0.12);
}

.discord-presence-dot.is-online { background: #3ba55c; box-shadow: 0 0 0 3px rgba(59, 165, 92, 0.16); }
.discord-presence-dot.is-idle { background: #faa61a; box-shadow: 0 0 0 3px rgba(250, 166, 26, 0.16); }
.discord-presence-dot.is-dnd { background: #ed4245; box-shadow: 0 0 0 3px rgba(237, 66, 69, 0.16); }
.discord-presence-dot.is-offline,
.discord-presence-dot.is-unavailable { background: #747f8d; }
.discord-presence-dot.is-loading { animation: discord-presence-pulse 1.4s ease-in-out infinite; }

@keyframes discord-presence-pulse {
  50% { opacity: 0.4; }
}

.discord-presence-label {
  margin: 0 0 0.2rem;
  color: #929cab;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discord-presence-status {
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0;
  color: #aab4c0;
  font-size: 0.82rem;
}

.discord-presence-status strong { color: #f1f3f5; font-weight: 600; }
.discord-presence-activity { margin: 0.7rem 0 0; color: #cbd4df; font-size: 0.82rem; }

.discord-presence-foot {
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #929cab;
  font-size: 0.72rem;
}

html[data-theme="light"] .discord-presence-card {
  border-color: #d8d9e5;
  background: linear-gradient(145deg, #f4f5ff, #fffdf8);
}

html[data-theme="light"] .discord-presence-label,
html[data-theme="light"] .discord-presence-foot { color: #687080; }
html[data-theme="light"] .discord-presence-status { color: #505968; }
html[data-theme="light"] .discord-presence-status strong { color: #20242c; }
html[data-theme="light"] .discord-presence-activity { color: #3c4552; }
html[data-theme="light"] .discord-presence-foot { border-top-color: rgba(0, 0, 0, 0.09); }

.footer-simple-nav,
.footer-simple-social {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.65rem;
  flex-direction: column;
  font-size: 0.85rem;
}

.footer-section-label {
  margin-bottom: 0.25rem;
  color: #8995a7;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-simple-nav a,
.footer-simple-nav button,
.footer-simple-social a {
  display: inline-flex;
  min-height: 2.2rem;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 5px 15px rgba(0, 0, 0, 0.08);
  color: #d4d9e2;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
}

.footer-simple-nav a:hover,
.footer-simple-nav button:hover,
.footer-simple-social a:hover {
  color: #fff;
  border-color: rgba(168, 180, 255, 0.36);
  background: linear-gradient(135deg, rgba(107, 120, 242, 0.22), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.17), 0 8px 22px rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}

.footer-simple-nav button {
  font: inherit;
  cursor: pointer;
}

.footer-simple-nav a:focus-visible,
.footer-simple-nav button:focus-visible,
.footer-simple-social a:focus-visible,
.footer-simple-bottom a:focus-visible {
  outline: 2px solid #9ca8ff;
  outline-offset: 3px;
}

.footer-simple-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-simple-social svg {
  flex-shrink: 0;
}

.footer-simple-bottom {
  display: flex;
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  width: 100%;
  font-size: 0.78rem;
}

.footer-simple-bottom p {
  margin: 0;
}

html[data-theme="light"] .footer-simple-wrapper {
  border-color: rgba(64, 75, 103, 0.14);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(244, 246, 255, 0.68) 55%, rgba(232, 248, 245, 0.62));
  box-shadow: 0 24px 70px rgba(43, 51, 75, 0.1), inset 0 1px rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .footer-simple-nav a,
html[data-theme="light"] .footer-simple-nav button,
html[data-theme="light"] .footer-simple-social a,
html[data-theme="light"] .footer-simple-bottom a {
  border-color: rgba(54, 66, 100, 0.14);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(234, 238, 250, 0.52));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.95), 0 5px 15px rgba(39, 49, 74, 0.07);
  color: #394252;
}

html[data-theme="light"] .footer-simple-nav a:hover,
html[data-theme="light"] .footer-simple-nav button:hover,
html[data-theme="light"] .footer-simple-social a:hover,
html[data-theme="light"] .footer-simple-bottom a:hover {
  border-color: rgba(70, 81, 195, 0.28);
  background: linear-gradient(135deg, rgba(226, 230, 255, 0.96), rgba(255, 255, 255, 0.8));
  color: #303d9c;
}

html[data-theme="light"] .footer-simple-bottom a {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(54, 66, 100, 0.14);
  border-radius: 999px;
  text-decoration: none;
}

html[data-theme="light"] .footer-section-label { color: #69748a; }
html[data-theme="light"] .footer-simple-bottom { border-top-color: rgba(35, 44, 60, 0.12); }

@media (max-width: 960px) {
  .footer-simple-wrapper {
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr);
  }

  .footer-simple-nav,
  .footer-simple-social {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
  }

  .footer-section-label { width: 100%; }
}

@media (max-width: 560px) {
  .site-footer { padding: 1.5rem 0.75rem 2rem; }

  .footer-simple-wrapper {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
    padding: 1.15rem;
    border-radius: 19px;
  }

  .footer-simple-bottom {
    grid-column: auto;
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-start;
  }
}

.latest {
  margin: 2rem 0 1rem;
}

.page {
  max-width: 850px;
  margin: auto;
}

.privacy-consent-banner[hidden],
.privacy-consent-dialog[hidden] {
  display: none;
}

.privacy-consent-banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 11000;
  display: grid;
  gap: 1rem;
  width: min(960px, calc(100vw - 2rem));
  padding: 1.2rem 1.25rem;
  border: 1px solid #8585ff;
  border-radius: 10px;
  background: #242018;
  color: #f5eedc;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
}

.privacy-consent-dialog {
  position: fixed;
  inset: 0;
  z-index: 11001;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.privacy-consent-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
}

.privacy-consent-panel {
  position: relative;
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 2rem));
  overflow-y: auto;
  padding: 1.35rem;
  border: 1px solid #8585ff;
  border-radius: 10px;
  background: #0b0d10;
}

.privacy-consent-options {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.privacy-consent-option {
  display: block;
  padding: 0.85rem;
  border: 1px solid #3d3628;
  border-radius: 6px;
  background: #242018;
  cursor: pointer;
}

.privacy-consent-btn {
  min-height: 2.35rem;
  border: 1px solid #8585ff;
  border-radius: 6px;
  padding: 0.55rem 0.8rem;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.privacy-consent-btn-primary {
  background: #8585ff;
  color: #fff;
}

.privacy-choices-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #8585ff;
  font: inherit;
  cursor: pointer;
}

html[data-theme="light"] .privacy-consent-panel {
  border-color: #6257d9;
  background: #fff;
  color: #1a1d21;
}

html[data-theme="light"] .privacy-consent-panel a,
html[data-theme="light"] .privacy-choices-link {
  color: #4438b5;
}

html[data-theme="light"] .privacy-consent-btn {
  border-color: #6257d9;
  color: #211b56;
}

html[data-theme="light"] .privacy-consent-btn-primary {
  background: #5146c8;
  color: #fff;
}

html[data-theme="light"] .privacy-consent-btn:focus-visible,
html[data-theme="light"] .privacy-consent-panel a:focus-visible,
html[data-theme="light"] .privacy-choices-link:focus-visible {
  outline: 3px solid #5146c8;
  outline-offset: 3px;
}

.about-page {
  max-width: 640px;
  margin: 0 auto;
}

.about-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #89919b;
  margin: 0 0 0.5rem;
}

.about-intro h1 {
  margin: 0 0 0.75rem;
  font-size: 2.5rem;
}

.about-lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.5;
  color: #c6cdd6;
  margin: 0 0 1.5rem;
}

.about-story p,
.about-note {
  color: #aeb5bd;
}

.about-section {
  margin-top: 2.5rem;
}

.about-section-heading {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.about-section-number {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #89919b;
}

.about-section-heading h2 {
  margin: 0;
  font-size: 1.4rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.tool-card,
.security-card,
.profile-card {
  border: 1px solid #252a31;
  border-radius: 10px;
  background: #11151a;
  padding: 0.8rem 0.9rem;
}

.tool-card span {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
}

.tool-card small {
  color: #89919b;
  font-size: 0.78rem;
}

.tool-group {
  margin-bottom: 1rem;
}

.tool-group h3 {
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
}

.tool-icon {
  width: 28px;
  height: 28px;
  display: block;
  margin-bottom: 0.4rem;
}

.tool-invert {
  filter: invert(1);
}

html[data-theme="light"] .tool-invert {
  filter: none;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.security-card h3,
.profile-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.security-card p {
  margin: 0;
  font-size: 0.88rem;
  color: #aeb5bd;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.profile-card img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.about-links {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
}

.eng-page {
  max-width: 720px;
  margin: 0 auto;
  color: #f3f5f8;
}

.post:has(.eng-page) .post-header h1,
.eng-page h1,
.eng-page h2,
.eng-page h3 {
  font-family: var(--font-sans);
  font-style: normal;
}

.eng-page h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.eng-page h2 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.eng-page h3 {
  font-weight: 600;
}

.eng-page .about-lead {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1.6;
  color: inherit;
}

.eng-page .about-story p,
.eng-page .about-note {
  color: inherit;
}

.eng-page .about-intro h1,
.eng-page .about-section-heading h2 {
  width: fit-content;
  background: #ffd84d;
  color: #101216;
  padding: 0.14em 0.42em;
  border-radius: 4px;
}

.eng-page .eng-card h3 {
  width: fit-content;
  background: #ffd84d;
  color: #101216;
  padding: 0.12em 0.42em;
  border-radius: 4px;
}

.eng-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.eng-card {
  border: 1px solid #252a31;
  border-radius: 10px;
  background: #11151a;
  padding: 0.85rem 1rem;
}

.eng-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.eng-card p {
  margin: 0;
  font-size: 0.88rem;
  color: inherit;
}

.eng-card-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.4rem;
}

.eng-card-head h3 {
  margin: 0;
}

.eng-icon {
  width: 20px;
  height: 20px;
  flex: none;
  filter: invert(1);
  opacity: 0.85;
}

.eng-icon.is-brand {
  filter: none;
  opacity: 1;
}

.eng-node-title .eng-icon {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  margin-right: 0.35rem;
}

html[data-theme="light"] .eng-icon {
  filter: none;
}

.eng-page code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #8585ff;
  background: rgba(133, 133, 255, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  word-break: break-word;
}

.eng-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: eng-step;
}

.eng-flow li {
  position: relative;
  margin-left: 0.7rem;
  padding: 0 0 1.1rem 2.1rem;
  border-left: 1px solid #252a31;
}

.eng-flow li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.eng-flow li::before {
  counter-increment: eng-step;
  content: counter(eng-step, decimal-leading-zero);
  position: absolute;
  left: -0.85rem;
  top: 0.1rem;
  width: 1.7rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #8585ff;
  background: #0b0d10;
}

.eng-flow strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.eng-flow p {
  margin: 0;
  font-size: 0.9rem;
  color: inherit;
}

.eng-note {
  border-left: 3px solid #ffd84d;
  background: rgba(255, 216, 77, 0.07);
  border-radius: 0 8px 8px 0;
  padding: 0.8rem 1rem;
  margin: 1.25rem 0;
  font-size: 0.9rem;
  color: inherit;
}

.eng-note p {
  margin: 0;
}

.eng-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-top: 1rem;
}

.eng-metric {
  border: 1px solid #252a31;
  border-radius: 10px;
  background: #11151a;
  padding: 0.7rem 0.5rem;
  text-align: center;
}

.eng-metric-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: #ffd84d;
}

.eng-metric-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: #89919b;
}

.eng-figure {
  border: 1px solid #252a31;
  border-radius: 12px;
  background: #11151a;
  padding: 1.15rem 1rem;
  margin: 1.5rem 0;
}

.eng-figure-caption {
  margin: 0.9rem 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #89919b;
  text-align: center;
}

.eng-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.eng-node {
  width: 100%;
  max-width: 430px;
  border: 1px solid #2f3742;
  border-radius: 9px;
  background: #151a21;
  padding: 0.5rem 0.85rem;
  text-align: center;
}

.eng-node-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
}

.eng-node-sub {
  display: block;
  font-size: 0.76rem;
  color: #89919b;
  margin-top: 0.1rem;
}

.eng-node.is-accent {
  border-color: #ffd84d;
  background: rgba(255, 216, 77, 0.08);
}

.eng-node.is-accent .eng-node-title {
  color: #ffd84d;
}

.eng-node.is-muted .eng-node-title {
  color: #b6bdc6;
  font-weight: 500;
}

.eng-arrow {
  font-size: 0.82rem;
  line-height: 1;
  color: #6c7681;
}

.eng-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  width: 100%;
}

.eng-pair .eng-node {
  width: auto;
  flex: 1 1 190px;
  max-width: 300px;
}

.eng-bucket {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.28rem;
  border: 1px dashed #3a434e;
  border-radius: 9px;
  padding: 0.5rem 0.6rem;
  max-width: 260px;
  margin: 0 auto;
}

.eng-token {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffd84d;
}

.eng-token.is-spent {
  background: transparent;
  border: 1px dashed #4b5560;
}

.eng-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: #89919b;
}

.eng-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.eng-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffd84d;
}

.eng-swatch.is-spent {
  background: transparent;
  border: 1px dashed #4b5560;
}

@media (max-width: 640px) {
  .eng-grid,
  .eng-metrics {
    grid-template-columns: 1fr;
  }

  .eng-pair {
    flex-direction: column;
  }

  .eng-pair .eng-arrow {
    transform: rotate(90deg);
  }
}

.card {
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: #3a434e;
}

.prose {
  font-size: 1rem;
  line-height: 1.75;
}

#post-comments-slot,
#post-comments-mid,
#post-comments-bottom,
#locked-comments-mid,
#locked-comments-bottom {
  max-width: 720px;
  margin: 2.5rem auto;
  text-align: center;
}

#post-comments-slot.in-content,
#post-comments-mid.in-content,
#locked-comments-mid.in-content {
  border-top: 1px solid #252a31;
  border-bottom: 1px solid #252a31;
  padding: 2rem 0;
}

/* ---------------- custom comment system ---------------- */

.post-comments {
  text-align: left;
}

.post-comments h2 {
  margin-bottom: 1rem;
}

.comment-form,
.comment {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 8px;
  border: 1px solid #252a31;
  background: #131820;
}

.comment-form-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.commenting-as {
  font-size: 0.8rem;
  color: #e8b341;
}

.comment-form-main input[type="text"],
.comment-form-main textarea,
.comment-reply-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #252a31;
  border-radius: 8px;
  background: #0f141b;
  color: inherit;
  font: inherit;
  font-size: 0.95rem;
}

.comment-form-main input[type="text"]:focus,
.comment-form-main textarea:focus,
.comment-reply-form textarea:focus {
  outline: 1px solid #4a90d9;
  border-color: #4a90d9;
}

.comment-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.comment-form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.comment-status {
  font-size: 0.8rem;
  color: #89919b;
}

.comment-cancel-btn {
  background: none;
  border: none;
  color: #89919b;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
}

.comment {
  padding: 0.85rem 1rem;
  border: 1px solid #1d232c;
  border-radius: 10px;
  background: #0d1219;
}

.comment-admin {
  border-color: #6e5416;
  background: #171307;
}

.comment-main {
  flex: 1;
  min-width: 0;
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.comment-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.comment-badge-admin {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: linear-gradient(135deg, #e8b341, #c98a1b);
  color: #14100a;
}

.comment-badge-pending {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #3a2a10;
  color: #e8b341;
  border: 1px solid #6e5416;
}

.comment.comment-pending {
  border-style: dashed;
  opacity: 0.85;
}

.comment-approve-btn,
.comment-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  padding: 0;
}

.comment-approve-btn {
  color: #3fb68b;
}

.comment-approve-btn:hover {
  text-decoration: underline;
}

.comment-delete-btn {
  color: #d9635a;
}

.comment-delete-btn:hover {
  text-decoration: underline;
}

.comment-admin > .comment-main > .comment-head > .comment-name {
  color: #e8b341;
}

.comment-time {
  font-size: 0.75rem;
  color: #89919b;
}

.comment-body {
  margin: 0.4rem 0 0.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.comment-actions {
  display: flex;
  gap: 0.75rem;
}

.comment-reply-btn {
  background: none;
  border: none;
  color: #4a90d9;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  padding: 0;
}

.comment-reply-btn:hover {
  text-decoration: underline;
}

.comment-replies {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-replies .comment {
  margin-bottom: 0;
}

.comment-replies .comment-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
}

.comment-reply-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px dashed #2a313c;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.comment-replying-as {
  font-size: 0.75rem;
  color: #89919b;
}

.comment-reply-row {
  display: flex;
}

.comment-empty {
  color: #89919b;
  font-size: 0.9rem;
  text-align: center;
  padding: 1.5rem 0;
}

html[data-theme="light"] .comment,
html[data-theme="light"] .comment-form-main input[type="text"],
html[data-theme="light"] .comment-form-main textarea,
html[data-theme="light"] .comment-reply-form textarea {
  background: #f0ede6;
  border-color: #d8d2c4;
}

html[data-theme="light"] .comment-avatar {
  background: #e6e1d5;
  border-color: #d8d2c4;
}

html[data-theme="light"] .comment-admin {
  background: #faf0d7;
  border-color: #e0c875;
}


html[data-theme="light"] #post-comments-slot.in-content,
html[data-theme="light"] #post-comments-mid.in-content,
html[data-theme="light"] #locked-comments-mid.in-content {
  border-color: #e2ddd0;
}

.prose img {
  border-radius: 8px;
}

.prose {
  -webkit-user-select: none;
  user-select: none;
}

.prose pre,
.prose pre code {
  -webkit-user-select: text;
  user-select: text;
}

.prose img {
  cursor: zoom-in;
}

.zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 10, 0.92);
  cursor: zoom-out;
  animation: zoom-fade-in 0.18s ease both;
}

.zoom-overlay img {
  max-width: 95vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@keyframes zoom-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.page {
  max-width: 640px;
}

@media (max-width: 640px) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .security-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .about-intro h1 {
    font-size: 2rem;
  }

  .site-nav-links {
    gap: 0.6rem;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.prose pre {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  background: #0b0d10;
  border: 1px solid #252a31;
  color: #aeb5bd;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  cursor: pointer;
}

.copy-btn:hover {
  border-color: #8585ff;
  color: #8585ff;
}

.copy-btn.copied {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.optional-comments {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px dashed #252a31;
  border-radius: 10px;
  background: #11151a;
}

.optional-comments-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
}

.optional-comments p:not(.optional-comments-title) {
  margin: 0 0 0.8rem;
  color: #aeb5bd;
  font-size: 0.9rem;
}

.consent-action-btn {
  border: 1px solid #8585ff;
  border-radius: 6px;
  padding: 0.5rem 0.85rem;
  background: rgba(133, 133, 255, 0.12);
  color: #8585ff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.consent-action-btn:hover {
  background: #8585ff;
  color: #fff;
}

/* ---------------------------------------------------------------- */
/* Simple 404 page                                                   */
/* ---------------------------------------------------------------- */
.button-secondary {
  background: transparent;
  color: #e7e9ec;
  border: 1px solid #343b44;
}

.button-secondary:hover {
  border-color: #8585ff;
  color: #8585ff;
}

.error-simple {
  text-align: center;
  padding: 4rem 1rem 5rem;
}

.error-simple-code {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(3.5rem, 14vw, 6rem);
  letter-spacing: -0.04em;
  color: #8585ff;
  line-height: 1;
}

.error-simple h1 {
  margin: 1rem 0 0.5rem;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
}

.error-simple p {
  color: #a5abc2;
  max-width: 480px;
  margin: 0 auto;
}

.error-simple-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.notice-banner {
  background: none;
  color: #f5d78e;
  font-size: 0.85rem;
  line-height: 1.55;
  text-align: center;
}

.notice-banner-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.4rem 2.75rem 0.4rem 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: center;
  position: relative;
}

.notice-banner-text {
  display: block;
  width: 100%;
}

.notice-banner-text strong {
  display: block;
  color: #ffe9b0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.1rem;
}

.notice-banner-text a {
  color: #ffe9b0;
  font-weight: 600;
}

.notice-banner-text s {
  opacity: 0.7;
}

/* Light mode: dark amber so the text stays readable on a light page. */
html[data-theme="light"] .notice-banner {
  color: #7a5a0a;
}

html[data-theme="light"] .notice-banner-text strong {
  color: #57400a;
}

html[data-theme="light"] .notice-banner-text a {
  color: #8a6408;
}

.notice-banner-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: inherit;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  opacity: 0.4;
}

.notice-banner-close:hover {
  opacity: 1;
}

html[data-theme="light"] .notice-banner-close:hover {
  color: #57400a;
}

.discuss-strip {
  background: #141b2e;
  border-bottom: 1px solid #2b3a5e;
  color: #c9d6ff;
  font-size: 0.85rem;
  text-align: center;
  padding: 0.45rem 1rem;
}

.discuss-strip a {
  color: #fff;
  font-weight: 700;
}

html[data-theme="light"] .discuss-strip {
  background: #eef2ff;
  border-bottom-color: #c9d6ff;
  color: #2b3a5e;
}

html[data-theme="light"] .discuss-strip a {
  color: #2b3a5e;
}

html[data-theme="light"] body {
  background: #f6f4ee;
  color: #1a1d21;
}

html[data-theme="light"] .site-header {
  border-bottom-color: #e2ddd0;
  background: #f6f4ee;
}

html[data-theme="light"] .page-link:hover {
  background: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .page-link-eng {
  background: #f5c518;
  color: #17181c;
}

html[data-theme="light"] .page-link-eng:hover {
  background: #ffd94a;
  color: #17181c;
}

html[data-theme="light"] .card {
  background: #fffdf8;
  border-color: #e2ddd0;
}

html[data-theme="light"] .meta {
  color: #5c6470;
}

html[data-theme="light"] .lead {
  color: #4a5058;
}

html[data-theme="light"] .prose pre {
  background: #1a1d21;
  color: #e7e9ec;
}

html[data-theme="light"] .code-window {
  border-color: #2a2f36;
}

html[data-theme="light"] .prose :not(pre) > code {
  background: rgba(76, 76, 200, 0.1);
  color: #3f3fb0;
  border-color: rgba(76, 76, 200, 0.25);
}

html[data-theme="light"] .prose table {
  border-color: #e2ddd0;
  background: #fff;
}

html[data-theme="light"] .prose thead {
  background: linear-gradient(135deg, rgba(76, 76, 200, 0.14), rgba(0, 150, 130, 0.12));
}

html[data-theme="light"] .prose th {
  color: #3f3fb0;
}

html[data-theme="light"] .prose th,
html[data-theme="light"] .prose td {
  border-bottom-color: #e2ddd0;
}

html[data-theme="light"] .prose tbody tr:nth-child(even) {
  background: rgba(76, 76, 200, 0.04);
}

html[data-theme="light"] .prose tbody tr:hover {
  background: rgba(76, 76, 200, 0.08);
}

html[data-theme="light"] input {
  background: #fff;
  border-color: #d4cFC2;
  color: #1a1d21;
}

html[data-theme="light"] .button {
  background: #1a1d21;
  color: #f6f4ee;
}

html[data-theme="light"] .site-footer {
  border-top-color: #e2ddd0;
  color: #5c6470;
}

html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .nav-toggle {
  border-color: #d4cfc2;
}

html[data-theme="light"] .about-lead {
  color: #3d434c;
}

html[data-theme="light"] .about-story p,
html[data-theme="light"] .about-note {
  color: #4a5058;
}

html[data-theme="light"] .about-kicker,
html[data-theme="light"] .about-section-number {
  color: #6b7280;
}

html[data-theme="light"] .tool-card,
html[data-theme="light"] .security-card,
html[data-theme="light"] .profile-card {
  background: #fffdf8;
  border-color: #e2ddd0;
  color: #1a1d21;
}

html[data-theme="light"] .tool-card small {
  color: #6b7280;
}

html[data-theme="light"] .security-card p {
  color: #4a5058;
}

html[data-theme="light"] .tool-group h3 {
  color: #1a1d21;
}

html[data-theme="light"] .eng-page {
  color: #101216;
}

html[data-theme="light"] .eng-card,
html[data-theme="light"] .eng-metric {
  background: #fffdf8;
  border-color: #e2ddd0;
}

html[data-theme="light"] .eng-flow li {
  border-left-color: #e2ddd0;
}

html[data-theme="light"] .eng-flow li:last-child {
  border-left-color: transparent;
}

html[data-theme="light"] .eng-flow li::before {
  background: #f6f4ee;
}

html[data-theme="light"] .eng-metric-label {
  color: #5c6470;
}

html[data-theme="light"] .eng-metric-value {
  color: #7a6000;
}

html[data-theme="light"] .eng-figure {
  background: #fffdf8;
  border-color: #e2ddd0;
}

html[data-theme="light"] .eng-node {
  background: #fbf9f4;
  border-color: #e2ddd0;
}

html[data-theme="light"] .eng-node-sub,
html[data-theme="light"] .eng-figure-caption,
html[data-theme="light"] .eng-legend {
  color: #5c6470;
}

html[data-theme="light"] .eng-node.is-accent {
  background: rgba(255, 216, 77, 0.22);
}

html[data-theme="light"] .eng-node.is-accent .eng-node-title {
  color: #7a6000;
}

html[data-theme="light"] .eng-node.is-muted .eng-node-title {
  color: #4a5058;
}

html[data-theme="light"] .eng-arrow {
  color: #8a919b;
}

html[data-theme="light"] .eng-bucket {
  border-color: #ddd7c8;
}

html[data-theme="light"] .eng-token.is-spent,
html[data-theme="light"] .eng-swatch.is-spent {
  border-color: #b9b2a2;
}

.notice-card {
  border: 1px solid #252a31;
  border-radius: 10px;
  background: #11151a;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

html[data-theme="light"] .notice-card {
  background: #fffdf8;
  border-color: #e2ddd0;
}

.policy-warning {
  border: 1px solid rgba(255, 95, 87, 0.5);
  border-radius: 10px;
  background: rgba(255, 95, 87, 0.1);
  padding: 0.9rem 1.1rem;
  margin: 1.2rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.policy-warning strong {
  color: #ff7b72;
}

.policy-warning a {
  color: #ff7b72;
  font-weight: 600;
}

html[data-theme="light"] .policy-warning {
  background: rgba(200, 40, 30, 0.07);
  border-color: rgba(200, 40, 30, 0.35);
}

html[data-theme="light"] .policy-warning strong,
html[data-theme="light"] .policy-warning a {
  color: #b3261e;
}

.machine-banner {
  position: relative;
  display: flex;
  min-height: 230px;
  border: 1px solid #252a31;
  border-radius: 14px;
  overflow: hidden;
  margin: 1.5rem 0 0;
  background: linear-gradient(115deg, #161c3f 0%, #0d3a3a 55%, #0a1512 100%);
  background-size: cover;
  background-position: center;
}

.machine-banner-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 8, 12, 0.05) 0%, rgba(5, 8, 12, 0.45) 55%, rgba(5, 8, 12, 0.9) 100%);
}

.machine-watermark {
  position: absolute;
  right: 0.5rem;
  bottom: -3.2rem;
  font-family: var(--font-mono);
  font-size: 11rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.07);
  pointer-events: none;
  user-select: none;
}

.machine-banner-inner {
  position: relative;
  width: 100%;
  margin-top: auto;
  padding: 1.1rem 1.3rem;
}

.machine-name {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #f2f4f8;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.machine-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.machine-platform {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
}

.machine-monogram {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 800;
  color: #0b1220;
  background: linear-gradient(135deg, #8585ff, #00d1b2);
}

.machine-box {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #252a31;
}

.machine-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.machine-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.machine-platform {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b93a0;
}

.diff {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.diff-easy {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.12);
}

.diff-medium {
  color: #f5a524;
  border-color: rgba(245, 165, 36, 0.5);
  background: rgba(245, 165, 36, 0.12);
}

.diff-hard {
  color: #ff5f57;
  border-color: rgba(255, 95, 87, 0.5);
  background: rgba(255, 95, 87, 0.12);
}

.diff-insane {
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.5);
  background: rgba(192, 132, 252, 0.12);
}

.machine-completion {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #252a31;
  margin: 1rem 0 0;
}

html[data-theme="light"] .machine-banner {
  border-color: #2a2f36;
}

html[data-theme="light"] .machine-completion {
  border-color: #e2ddd0;
}

.feedback {
  border: 1px solid #252a31;
  border-radius: 12px;
  background: #11151a;
  padding: 1.25rem;
  margin: 2rem 0 0;
  text-align: center;
}

.feedback h2 {
  font-size: 1.05rem;
  margin: 0 0 0.3rem;
}

.feedback-meta {
  color: #8b93a0;
  font-size: 0.85rem;
  margin: 0 0 0.9rem;
}

.feedback-buttons {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}

.feedback-btn {
  background: #0b0d10;
  border: 1px solid #252a31;
  color: #e7e9ec;
  border-radius: 8px;
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.feedback-btn:hover:not(:disabled) {
  border-color: #8585ff;
  color: #8585ff;
}

.feedback-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.feedback-thanks {
  color: #22c55e;
  font-size: 0.85rem;
  margin: 0.7rem 0 0;
}

.chart-card {
  border: 1px solid #252a31;
  border-radius: 12px;
  background: #11151a;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.chart-card h2 {
  font-size: 1rem;
  margin: 0 0 0.8rem;
}

.chart-card canvas {
  max-height: 260px;
}

html[data-theme="light"] .feedback,
html[data-theme="light"] .chart-card {
  background: #fffdf8;
  border-color: #e2ddd0;
}

html[data-theme="light"] .feedback-btn {
  background: #fff;
  border-color: #d4cfc2;
  color: #1a1d21;
}

html[data-theme="light"] .feedback-meta {
  color: #5c6470;
}

.discuss-notice {
  border: 1px solid #252a31;
  border-radius: 10px;
  background: #11151a;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  text-align: left;
}

.discuss-notice strong {
  display: block;
  margin-bottom: 0.15rem;
}

.discuss-notice a {
  color: #8585ff;
  font-weight: 600;
}

html[data-theme="light"] .discuss-notice {
  background: #fffdf8;
  border-color: #e2ddd0;
}

.contact-grid {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
  max-width: 560px;
}

.contact-card {
  padding: 1rem 1.25rem;
  background: #11151a;
  border: 1px solid #252a31;
  border-radius: 12px;
}

.contact-card strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #8585ff;
}

.contact-card a {
  color: inherit;
  overflow-wrap: anywhere;
}

html[data-theme="light"] .contact-card {
  background: #fffdf8;
  border-color: #e2ddd0;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin: 1.5rem auto;
  max-width: 600px;
}

.pagination .page-link {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border: 1px solid #252a31;
  border-radius: 6px;
  background: #11151a;
  color: #e7e9ec;
  text-decoration: none;
  font-size: 0.85rem;
}

.pagination .page-link:hover {
  border-color: #8585ff;
  color: #8585ff;
}

.pagination .page-link.is-active {
  background: #8585ff;
  color: #fff;
  border-color: #8585ff;
}

html[data-theme="light"] .pagination .page-link {
  background: #fffdf8;
  border-color: #e2ddd0;
  color: #1a1d21;
}

html[data-theme="light"] .pagination .page-link:hover {
  border-color: #8585ff;
  color: #8585ff;
}

html[data-theme="light"] .pagination .page-link.is-active {
  background: #1a1d21;
  color: #f6f4ee;
}

.tag-list,
.archive-list,
.related-list {
  display: grid;
  gap: 0.75rem;
}

.tag-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border: 1px solid #252a31;
  border-radius: 8px;
  background: #11151a;
}

.tag-item a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

.tag-item span {
  color: #89919b;
  font-size: 0.85rem;
}

.archive-entry {
  padding: 0.8rem 0.9rem;
  border: 1px solid #252a31;
  border-radius: 10px;
  background: #11151a;
}

.archive-entry h3 {
  margin: 0 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.archive-count {
  font-size: 0.75rem;
  font-weight: 400;
  color: #89919b;
  border: 1px solid #252a31;
  border-radius: 999px;
  padding: 0 0.5rem;
}

.archive-entry .meta {
  font-size: 0.85rem;
  color: #89919b;
}

.archive-posts {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
}

.archive-posts li {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.45rem 0;
  border-top: 1px solid #252a31;
}

.archive-posts li:first-child {
  border-top: 0;
}

.archive-posts time {
  flex: none;
  width: 3rem;
  font-size: 0.8rem;
  color: #89919b;
  font-variant-numeric: tabular-nums;
}

.archive-posts a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

.archive-posts a:hover {
  text-decoration: underline;
}

.archive-platform {
  margin-left: auto;
  flex: none;
  font-size: 0.72rem;
  color: #89919b;
}

.related-card {
  padding: 0.8rem 0.9rem;
  border: 1px solid #252a31;
  border-radius: 10px;
  background: #11151a;
}

.related-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.related-card a {
  color: inherit;
  text-decoration: none;
}

.related-card .tags {
  font-size: 0.78rem;
  color: #89919b;
}

.tags-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: rgba(133, 133, 255, 0.12);
  color: #8585ff;
  font-size: 0.72rem;
  margin-right: 0.3rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.tool-card,
.security-card,
.profile-card,
.post-list .card,
.related-card,
.archive-entry,
.tag-item {
  border-color: #252a31;
}

html[data-theme="light"] .related-card,
html[data-theme="light"] .archive-entry,
html[data-theme="light"] .tag-item {
  background: #fffdf8;
  border-color: #e2ddd0;
  color: #1a1d21;
}

html[data-theme="light"] .related-card .tags,
html[data-theme="light"] .archive-entry .meta,
html[data-theme="light"] .tag-item span {
  color: #6b7280;
}

.cookie-consent {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  max-width: 400px;
  width: calc(100% - 2rem);
  border: 1px solid #2b3a5e;
  border-radius: 10px;
  background: #141b2e;
  color: #c9d6ff;
  padding: 0.9rem 1.1rem;
  font-size: 0.82rem;
  line-height: 1.5;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.cookie-consent p {
  margin: 0 0 0.6rem;
}

.cookie-consent p:last-child {
  margin-bottom: 0;
}

.cookie-consent a {
  color: #fff;
  font-weight: 600;
}

.cookie-consent button {
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  border: 1px solid #2b3a5e;
  background: #2b3a5e;
  color: #fff;
  cursor: pointer;
  font-size: 0.82rem;
}

.cookie-consent button:hover {
  background: #3b4a6e;
}

@media (max-width: 640px) {
  .cookie-consent {
    right: 0.5rem;
    bottom: 0.5rem;
    width: calc(100% - 1rem);
    max-width: none;
  }
}

@media (max-width: 640px) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pagination .page-link {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }
}

@media (min-width: 641px) {
  .tag-list {
    display: grid;
    gap: 0.75rem;
  }
  .archive-list {
    display: grid;
    gap: 0.75rem;
  }
  .related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
  }
}

.toc {
  max-width: 320px;
  margin: 1rem 0 2rem;
  border: 1px solid #252a31;
  border-radius: 8px;
  background: #11151a;
  padding: 0.75rem;
}

.toc details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.toc ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  list-style: none;
}

.toc li {
  margin: 0.25rem 0;
}

.toc a {
  color: #c9d6ff;
  font-size: 0.85rem;
  text-decoration: none;
}

.toc a:hover {
  color: #fff;
}

html[data-theme="light"] .toc {
  border-color: #e2ddd0;
  background: #fffdf8;
}

html[data-theme="light"] .toc a {
  color: #2b3a5e;
}

html[data-theme="light"] .toc a:hover {
  color: #8585ff;
}



.post-feedback {
  margin: 2rem 0 1rem;
  padding: 1.25rem 1.25rem 1rem;
  border: 1px solid #252a31;
  border-radius: 12px;
  background: #11151a;
  text-align: center;
}

html[data-theme="light"] .post-feedback {
  border-color: #e2ddd0;
  background: #fffdf8;
}

.post-feedback h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}

.feedback-buttons {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}

.feedback-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  border: 1px solid #2c333c;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.feedback-btn:hover:not(:disabled) {
  border-color: #8585ff;
}

.feedback-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.feedback-status {
  font-size: 0.82rem;
  color: #89919b;
  margin: 0.6rem 0 0;
  min-height: 1.2em;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid #252a31;
}

html[data-theme="light"] .post-nav {
  border-top-color: #e2ddd0;
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-width: 48%;
  text-decoration: none;
  color: inherit;
}

.post-nav-older {
  text-align: right;
  margin-left: auto;
}

.post-nav-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #89919b;
}

.post-nav-title {
  font-weight: 600;
}

.post-nav-link:hover .post-nav-title {
  text-decoration: underline;
}

.card-meta {
  font-size: 0.82rem;
  color: #89919b;
  margin-top: 0.4rem;
}

.card-author {
  color: #c5cbf7;
  font-weight: 500;
}

html[data-theme="light"] .card-author {
  color: #5b5ec9;
}

.card-meta time {
  color: inherit;
}

.archive-author {
  font-size: 0.78rem;
  color: #c5cbf7;
  font-style: italic;
  margin-left: 0.35rem;
}

html[data-theme="light"] .archive-author {
  color: #5b5ec9;
}

.archive-readtime {
  font-size: 0.78rem;
  color: #89919b;
  margin-left: 0.5rem;
}

.post-comments {
  max-width: 100%;
  overflow-x: hidden;
}

.post-comments iframe {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.bx-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  opacity: 0.8;
  animation: bx-spin 0.7s linear infinite;
}

@keyframes bx-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .bx-spinner { animation: none; }
}

/* ============================================================
   Protected (locked) writeup page
   The locked page is the only public surface for an active
   machine, so it presents the machine profile and its topics as
   structured, scannable groups rather than one undifferentiated
   cloud of tag chips.
   ============================================================ */

.locked-section {
  margin: 0 0 2.2rem;
}

.locked-section > h2 {
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .locked-section > h2 {
  border-bottom-color: rgba(0, 0, 0, 0.09);
}

/* ---- status banner ---- */

.locked-status {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  border: 1px solid rgba(255, 166, 87, 0.4);
  border-left: 3px solid #ffa657;
  border-radius: 10px;
  background: rgba(255, 166, 87, 0.08);
  padding: 0.95rem 1.15rem;
  margin: 1.1rem 0 1.8rem;
}

.locked-status-icon {
  flex: 0 0 auto;
  color: #ffa657;
  margin-top: 0.15rem;
}

.locked-status-body strong {
  display: block;
  color: #ffa657;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.locked-status-body p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #c9d1d9;
}

.locked-status-body a {
  color: #ffa657;
  font-weight: 600;
}

html[data-theme="light"] .locked-status {
  background: rgba(191, 110, 0, 0.06);
  border-color: rgba(191, 110, 0, 0.3);
  border-left-color: #bf6e00;
}

html[data-theme="light"] .locked-status-icon,
html[data-theme="light"] .locked-status-body strong,
html[data-theme="light"] .locked-status-body a {
  color: #bf6e00;
}

html[data-theme="light"] .locked-status-body p {
  color: #3d4450;
}

/* ---- machine facts ---- */

.machine-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
  margin: 0;
}

.machine-fact {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.6rem 0.75rem;
}

.machine-fact dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #8b949e;
  margin-bottom: 0.2rem;
}

.machine-fact dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e6edf3;
  overflow-wrap: anywhere;
}

html[data-theme="light"] .machine-fact {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.015);
}

html[data-theme="light"] .machine-fact dt {
  color: #6a737d;
}

html[data-theme="light"] .machine-fact dd {
  color: #1f2328;
}

.locked-pill {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.locked-pill-active {
  background: rgba(255, 166, 87, 0.15);
  color: #ffa657;
  border: 1px solid rgba(255, 166, 87, 0.4);
}

.locked-pill-retired {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
  border: 1px solid rgba(63, 185, 80, 0.4);
}

/* ---- topic groups ---- */

.topic-group {
  margin-bottom: 1.1rem;
}

.topic-group-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b949e;
  margin: 0 0 0.55rem;
}

.topic-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.topic-dot-cve { background: #f85149; }
.topic-dot-software { background: #58a6ff; }
.topic-dot-technique { background: #a371f7; }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.chip-cve {
  background: rgba(248, 81, 73, 0.12);
  border-color: rgba(248, 81, 73, 0.35);
  color: #ff9492;
  font-family: var(--code-font-family);
  font-size: 0.75rem;
}

a.chip-cve:hover {
  background: rgba(248, 81, 73, 0.22);
  border-color: rgba(248, 81, 73, 0.6);
  color: #ffb3b1;
}

.chip-software {
  background: rgba(88, 166, 255, 0.12);
  border-color: rgba(88, 166, 255, 0.32);
  color: #9ecbff;
}

.chip-technique {
  background: rgba(163, 113, 247, 0.12);
  border-color: rgba(163, 113, 247, 0.32);
  color: #c9a6f7;
}

html[data-theme="light"] .chip-cve {
  background: rgba(207, 34, 46, 0.07);
  border-color: rgba(207, 34, 46, 0.28);
  color: #a40e26;
}

html[data-theme="light"] a.chip-cve:hover {
  background: rgba(207, 34, 46, 0.14);
  color: #86181d;
}

html[data-theme="light"] .chip-software {
  background: rgba(9, 105, 218, 0.07);
  border-color: rgba(9, 105, 218, 0.25);
  color: #0550ae;
}

html[data-theme="light"] .chip-technique {
  background: rgba(130, 80, 223, 0.08);
  border-color: rgba(130, 80, 223, 0.28);
  color: #6639ba;
}

html[data-theme="light"] .topic-dot-cve { background: #cf222e; }
html[data-theme="light"] .topic-dot-software { background: #0969da; }
html[data-theme="light"] .topic-dot-technique { background: #8250df; }

html[data-theme="light"] .topic-group-title { color: #6a737d; }
html[data-theme="light"] .locked-pill-active {
  background: rgba(191, 110, 0, 0.1);
  color: #bf6e00;
  border-color: rgba(191, 110, 0, 0.35);
}

html[data-theme="light"] .locked-pill-retired {
  background: rgba(26, 127, 55, 0.1);
  color: #1a7f37;
  border-color: rgba(26, 127, 55, 0.35);
}

/* ---- coverage steps ---- */

.coverage-steps {
  list-style: none;
  counter-reset: step;
  margin: 0.9rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.coverage-steps li {
  counter-increment: step;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
  padding: 0.55rem 0.8rem;
}

.coverage-steps li::before {
  content: counter(step);
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(133, 133, 255, 0.14);
  color: #a5a5ff;
  align-self: center;
}

.coverage-step-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #e6edf3;
  flex: 0 0 auto;
}

.coverage-step-note {
  font-size: 0.83rem;
  color: #8b949e;
  line-height: 1.5;
}

html[data-theme="light"] .coverage-steps li {
  border-color: rgba(0, 0, 0, 0.09);
  background: rgba(0, 0, 0, 0.015);
}

html[data-theme="light"] .coverage-steps li::before {
  background: rgba(130, 80, 223, 0.1);
  color: #6639ba;
}

html[data-theme="light"] .coverage-step-label { color: #1f2328; }
html[data-theme="light"] .coverage-step-note { color: #57606a; }

/* ---- call to action ---- */

.locked-cta {
  margin: 1.6rem 0 1.2rem;
  text-align: center;
  padding: 1.1rem;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.locked-cta-owner { display: flex; justify-content: center; align-items: center; }
.locked-cta p {
  margin: 0;
  color: #8b949e;
}

.locked-community-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: min(100%, 310px);
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(88, 101, 242, 0.38);
  border-radius: 9px;
  background: rgba(88, 101, 242, 0.1);
  color: #e6e8ff;
  text-align: left;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.locked-community-card:hover {
  border-color: rgba(124, 134, 255, 0.75);
  background: rgba(88, 101, 242, 0.16);
  transform: translateY(-1px);
}

.locked-community-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: rgba(88, 101, 242, 0.22);
  color: #aeb5ff;
  font-size: 1.1rem;
}

.locked-community-card strong,
.locked-community-card small { display: block; }
.locked-community-card strong { font-size: 0.86rem; font-weight: 600; }
.locked-community-card small { margin-top: 0.18rem; color: #aab4c0; font-size: 0.73rem; line-height: 1.4; }

html[data-theme="light"] .locked-cta {
  border-color: rgba(0, 0, 0, 0.16);
}

html[data-theme="light"] .locked-cta p { color: #57606a; }
html[data-theme="light"] .locked-community-card {
  border-color: rgba(79, 70, 200, 0.26);
  background: rgba(79, 70, 200, 0.06);
  color: #29265f;
}
html[data-theme="light"] .locked-community-card:hover { background: rgba(79, 70, 200, 0.1); }
html[data-theme="light"] .locked-community-icon { background: rgba(79, 70, 200, 0.1); color: #4f46c8; }
html[data-theme="light"] .locked-community-card small { color: #57606a; }

.post-lede {
  font-size: 1.02rem;
  line-height: 1.65;
  color: #b6c0cb;
  margin: 0.6rem 0 0;
}

html[data-theme="light"] .post-lede { color: #444c56; }

@media (max-width: 640px) {
  .machine-facts {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .coverage-steps li {
    flex-direction: column;
    gap: 0.2rem;
  }
}

/* ---- relative publish age ---- */

.rel-time-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
}

.rel-time-prefix {
  opacity: 0.75;
}

time.rel-time {
  color: inherit;
  font-variant-numeric: tabular-nums;
  cursor: help;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.28);
}

html[data-theme="light"] time.rel-time {
  border-bottom-color: rgba(0, 0, 0, 0.3);
}

.post .post-header .meta time.rel-time {
  color: #8b949e;
  font-weight: 500;
}

html[data-theme="light"] .post .post-header .meta time.rel-time {
  color: #57606a;
}

.post .post-meta time.rel-time {
  color: inherit;
}

/* Site-wide liquid glass surfaces. */
html body {
  background:
    radial-gradient(ellipse at 8% 4%, rgba(88, 101, 242, 0.1), transparent 32rem),
    radial-gradient(ellipse at 94% 38%, rgba(51, 190, 172, 0.055), transparent 34rem),
    #0b0d10;
}

html body .site-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: rgba(11, 13, 16, 0.66);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
}

html body .page-link,
html body .theme-toggle,
html body .nav-toggle,
html body .site-nav.is-open .nav-close {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background-color: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 6px 20px rgba(0, 0, 0, 0.12);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  backdrop-filter: blur(14px) saturate(145%);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

html body .page-link:hover,
html body .theme-toggle:hover,
html body .nav-toggle:hover,
html body .site-nav.is-open .nav-close:hover {
  border-color: rgba(161, 173, 255, 0.4);
  background-color: rgba(115, 128, 245, 0.16);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.13), 0 8px 24px rgba(0, 0, 0, 0.17);
}

html body .page-link-eng {
  border-color: rgba(255, 235, 145, 0.55);
  background: linear-gradient(135deg, rgba(255, 226, 108, 0.95), rgba(255, 203, 65, 0.82));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.6), 0 6px 18px rgba(255, 206, 73, 0.13);
}

html body .card,
html body .related-card,
html body .series-box,
html body .toc,
html body .about-author,
html body .chart-card,
html body .admin-card,
html body .admin-card-wide,
html body .admin-row,
html body .admin-panel,
html body .admin-editor,
html body .auth-box,
html body .privacy-consent-panel,
html body .privacy-consent-option,
html body .locked-community-card,
html body .machine-fact,
html body .post-nav-link,
html body .share-btn {
  border-color: rgba(255, 255, 255, 0.13);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018) 58%, rgba(100, 115, 175, 0.055));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.09), 0 12px 32px rgba(0, 0, 0, 0.13);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

html body .auth-box,
html body .post-nav-link {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  padding: 1.25rem;
  background-color: rgba(17, 21, 26, 0.72);
}

html body .card,
html body .related-card,
html body .post-nav-link,
html body .share-btn,
html body .locked-community-card {
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

html body .card:hover,
html body .related-card:hover,
html body .post-nav-link:hover,
html body .share-btn:hover,
html body .locked-community-card:hover {
  border-color: rgba(156, 169, 255, 0.32);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.13), 0 16px 38px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

html body .button,
html body .button-secondary,
html body button,
html body input[type="submit"],
html body input[type="button"],
html body input[type="reset"] {
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12), 0 7px 20px rgba(0, 0, 0, 0.12);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  backdrop-filter: blur(14px) saturate(145%);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

html body .button:hover,
html body .button-secondary:hover,
html body button:hover:not(:disabled),
html body input[type="submit"]:hover,
html body input[type="button"]:hover,
html body input[type="reset"]:hover {
  border-color: rgba(161, 173, 255, 0.42);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.17), 0 10px 24px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

html body input:not([type="checkbox"]):not([type="radio"]),
html body textarea,
html body select {
  border-color: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07), 0 7px 20px rgba(0, 0, 0, 0.08);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  backdrop-filter: blur(12px) saturate(135%);
}

html body input:focus-visible,
html body textarea:focus-visible,
html body select:focus-visible,
html body button:focus-visible,
html body a:focus-visible {
  outline: 2px solid rgba(151, 164, 255, 0.9);
  outline-offset: 3px;
}

html body .notice-banner,
html body .privacy-consent-banner,
html body .discuss-strip,
html body .machine-banner {
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  backdrop-filter: blur(20px) saturate(145%);
}

html[data-theme="light"] body {
  background:
    radial-gradient(ellipse at 8% 4%, rgba(88, 101, 242, 0.085), transparent 32rem),
    radial-gradient(ellipse at 94% 38%, rgba(51, 190, 172, 0.06), transparent 34rem),
    #f6f4ee;
}

html[data-theme="light"] body .site-header {
  border-bottom-color: rgba(47, 56, 75, 0.12);
  background: rgba(246, 244, 238, 0.72);
}

html[data-theme="light"] body .page-link,
html[data-theme="light"] body .theme-toggle,
html[data-theme="light"] body .nav-toggle,
html[data-theme="light"] body .site-nav.is-open .page-link,
html[data-theme="light"] body .site-nav.is-open .nav-close {
  border-color: rgba(47, 56, 75, 0.14);
  background-color: rgba(255, 255, 255, 0.48);
  color: #303845;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.85), 0 6px 18px rgba(43, 51, 75, 0.08);
}

html[data-theme="light"] body .page-link:hover,
html[data-theme="light"] body .theme-toggle:hover,
html[data-theme="light"] body .nav-toggle:hover,
html[data-theme="light"] body .site-nav.is-open .page-link:hover,
html[data-theme="light"] body .site-nav.is-open .nav-close:hover {
  border-color: rgba(70, 81, 195, 0.28);
  background-color: rgba(226, 230, 255, 0.72);
  color: #303d9c;
}

html[data-theme="light"] body .page-link-eng,
html[data-theme="light"] body .site-nav.is-open .page-link-eng {
  border-color: rgba(226, 183, 40, 0.55);
  background: linear-gradient(135deg, rgba(255, 226, 108, 0.96), rgba(245, 197, 24, 0.86));
  color: #17181c;
}

html[data-theme="light"] body .card,
html[data-theme="light"] body .related-card,
html[data-theme="light"] body .series-box,
html[data-theme="light"] body .toc,
html[data-theme="light"] body .about-author,
html[data-theme="light"] body .chart-card,
html[data-theme="light"] body .admin-card,
html[data-theme="light"] body .admin-card-wide,
html[data-theme="light"] body .admin-row,
html[data-theme="light"] body .admin-panel,
html[data-theme="light"] body .admin-editor,
html[data-theme="light"] body .auth-box,
html[data-theme="light"] body .privacy-consent-panel,
html[data-theme="light"] body .privacy-consent-option,
html[data-theme="light"] body .locked-community-card,
html[data-theme="light"] body .machine-fact,
html[data-theme="light"] body .post-nav-link,
html[data-theme="light"] body .share-btn {
  border-color: rgba(47, 56, 75, 0.13);
  background-color: rgba(255, 255, 255, 0.62);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(242, 245, 255, 0.45) 62%, rgba(226, 247, 241, 0.35));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.92), 0 12px 30px rgba(43, 51, 75, 0.075);
}

html[data-theme="light"] body .auth-box,
html[data-theme="light"] body .post-nav-link {
  border-color: rgba(47, 56, 75, 0.13);
  background-color: rgba(255, 255, 255, 0.62);
}

html[data-theme="light"] body .button,
html[data-theme="light"] body .button-secondary,
html[data-theme="light"] body button,
html[data-theme="light"] body input[type="submit"],
html[data-theme="light"] body input[type="button"],
html[data-theme="light"] body input[type="reset"] {
  border-color: rgba(47, 56, 75, 0.17);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.045));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), 0 7px 18px rgba(43, 51, 75, 0.08);
}

html[data-theme="light"] body .button:hover,
html[data-theme="light"] body .button-secondary:hover,
html[data-theme="light"] body button:hover:not(:disabled),
html[data-theme="light"] body input[type="submit"]:hover,
html[data-theme="light"] body input[type="button"]:hover,
html[data-theme="light"] body input[type="reset"]:hover {
  border-color: rgba(70, 81, 195, 0.28);
  background-image: linear-gradient(135deg, rgba(226, 230, 255, 0.38), rgba(255, 255, 255, 0.12));
}

html[data-theme="light"] body input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="light"] body textarea,
html[data-theme="light"] body select {
  border-color: rgba(47, 56, 75, 0.17);
  background-color: rgba(255, 255, 255, 0.68);
  color: #1a1d21;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), 0 7px 18px rgba(43, 51, 75, 0.06);
}

@media (prefers-reduced-transparency: reduce) {
  html body .site-header,
  html body .card,
  html body .related-card,
  html body .site-footer .footer-simple-wrapper,
  html body .privacy-consent-panel {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Platform logo cards: downloaded vector/raster brand marks are blurred as ambient art. */
html .post-list .card-htb,
html .post-list .card-thm,
html .post-list .card-hacksmarter {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 16px;
  background-color: rgba(17, 21, 26, 0.72);
  -webkit-backdrop-filter: blur(15px) saturate(135%);
  backdrop-filter: blur(15px) saturate(135%);
}

html .post-list .card-htb::before,
html .post-list .card-thm::before,
html .post-list .card-hacksmarter::before {
  position: absolute;
  z-index: 0;
  inset: -20px;
  content: "";
  background-image: var(--writeup-logo);
  background-repeat: no-repeat;
  background-size: auto 150%;
  background-position: 86% 52%;
  filter: blur(9px) brightness(1.15) saturate(0.9);
  opacity: 0.32;
  transform: scale(1.06);
  animation: platform-logo-drift 42s ease-in-out infinite alternate;
  pointer-events: none;
}

html .post-list .card-htb::after,
html .post-list .card-thm::after,
html .post-list .card-hacksmarter::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(108deg, rgba(17, 21, 26, 0.72), rgba(17, 21, 26, 0.48) 68%, rgba(17, 21, 26, 0.65));
  content: "";
  pointer-events: none;
}

html .post-list .card-htb { --writeup-logo: url("/assets/images/platforms/htb-logo.svg"); }
html .post-list .card-thm { --writeup-logo: url("/assets/images/platforms/tryhackme-logo.svg"); }
html .post-list .card-hacksmarter { --writeup-logo: url("/assets/images/platforms/hacksmarter-logo.png"); }

html .post-list .card-hacksmarter::before {
  background-size: auto 175%;
  opacity: 0.23;
}

html .post-list .card-thm::before {
  filter: brightness(0) invert(1) blur(9px);
}

html .post-list .card-htb > *,
html .post-list .card-thm > *,
html .post-list .card-hacksmarter > * {
  position: relative;
  z-index: 1;
}

@keyframes platform-logo-drift {
  from { transform: scale(1.06) translate3d(-0.4%, -0.3%, 0); }
  to { transform: scale(1.14) translate3d(0.6%, 0.5%, 0); }
}

html[data-theme="light"] .post-list .card-htb,
html[data-theme="light"] .post-list .card-thm,
html[data-theme="light"] .post-list .card-hacksmarter {
  background-color: rgba(255, 253, 248, 0.82);
}

html[data-theme="light"] .post-list .card-htb::before,
html[data-theme="light"] .post-list .card-thm::before,
html[data-theme="light"] .post-list .card-hacksmarter::before {
  filter: blur(10px) brightness(0.88) saturate(0.82);
  opacity: 0.17;
}

html[data-theme="light"] .post-list .card-thm::before {
  filter: brightness(0) invert(0.38) blur(10px);
}

html[data-theme="light"] .post-list .card-hacksmarter::before {
  filter: brightness(0) invert(0.22) blur(10px);
}

html[data-theme="light"] .post-list .card-htb::after,
html[data-theme="light"] .post-list .card-thm::after,
html[data-theme="light"] .post-list .card-hacksmarter::after {
  background: linear-gradient(108deg, rgba(255, 253, 248, 0.79), rgba(255, 253, 248, 0.62) 68%, rgba(255, 253, 248, 0.76));
}

@media (prefers-reduced-motion: reduce) {
  html .post-list .card-htb::before,
  html .post-list .card-thm::before,
  html .post-list .card-hacksmarter::before { animation: none; }
}
