/* Visual direction inspired by hexo-theme-simplest; implemented in the local theme. */
:root {
  color-scheme: light;
  --font-ui: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #191919;
  --muted: #5b626b;
  --accent: #2868b3;
  --accent-soft: #edf4fc;
  --line: #cbd0d5;
  --line-strong: #7c848c;
  --date-bg: #f9b940;
  --date-ink: #332511;
  --date-edge: #e75a30;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191919;
  --surface: #222222;
  --text: #eeeeee;
  --muted: #b3b7bd;
  --accent: #8fc1ff;
  --accent-soft: #263547;
  --line: #45494e;
  --line-strong: #858b93;
  --date-bg: #d8a247;
  --date-ink: #211b13;
  --date-edge: #c86d49;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
body { min-height: 100svh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-decoration: none; text-underline-offset: 5px; }
a, button { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
img, svg { display: block; max-width: 100%; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 3px; }
main:focus { outline: none; }
::selection { background: var(--accent); color: var(--bg); }
h1, h2, h3, p { margin: 0; }
.container { width: min(1040px, calc(100% - 80px)); margin-inline: auto; }
.reading-container { width: min(800px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 50; padding: 12px 20px; background: var(--text); color: var(--bg); border-radius: 4px; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* A spacious text header and a plain horizontal menu. */
.site-header { background: var(--bg); }
.header-inner { display: flex; align-items: flex-end; justify-content: space-between; min-height: 155px; padding-block: 35px 28px; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 12px; padding-block: 5px; color: var(--text); font-size: 32px; font-weight: 500; line-height: 1.2; letter-spacing: -.7px; }
.brand img { width: 29px; height: 29px; border-radius: 6px; object-fit: cover; }
.brand-period { color: var(--text); }
.site-tagline { margin-top: 9px; color: var(--muted); font-size: 14px; }
.main-nav { display: flex; align-items: center; gap: 40px; padding-bottom: 1px; }
.main-nav a { padding-block: 10px; font-size: 14px; color: var(--muted); transition: color .2s; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--accent); }
.main-nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 1px; }
.eyebrow { margin-bottom: 12px; font-size: 12px; line-height: 1.5; letter-spacing: 1.5px; color: var(--muted); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 14px; }
.text-link:hover { color: var(--text); text-decoration: underline; }

/* Homepage: useful links rather than decorated cards. */
.navigation-home { padding-block: 32px 58px; }
.navigation-heading { margin-bottom: 35px; }
.navigation-heading h1 { font-size: 28px; font-weight: 400; line-height: 1.5; letter-spacing: 0; }
.navigation-heading > p:last-child { margin-top: 10px; color: var(--muted); font-size: 16px; }
.navigation-paper { max-width: 100%; }
.navigation-label { margin-bottom: 16px; color: var(--muted); font-size: 14px; font-weight: 400; }
.navigation-grid { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.navigation-card { display: flex; align-items: center; gap: 22px; min-height: 94px; padding: 20px 12px; border-bottom: 1px solid var(--line); transition: background .2s; }
.navigation-card:hover { background: var(--accent-soft); }
.navigation-icon { flex: 0 0 32px; width: 32px; display: grid; place-items: center; color: var(--muted); }
.navigation-icon svg { width: 23px; height: 23px; }
.navigation-card-copy { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: baseline; gap: 24px; flex: 1; min-width: 0; }
.navigation-card-copy strong { display: block; color: var(--accent); font-size: 18px; font-weight: 400; line-height: 1.5; }
.navigation-card:hover strong { color: var(--text); }
.navigation-description { display: block; color: var(--muted); font-size: 15px; line-height: 1.8; }
.friends-section { margin-top: 36px; }
.friend-links { display: flex; flex-wrap: wrap; gap: 12px 30px; }
.friend-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 16px; }
.friend-links a:hover { color: var(--text); text-decoration: underline; }

/* Article lists and existing permalinks. */
.blog-page { padding-block: 32px 70px; }
.page-heading { padding-bottom: 35px; }
.page-heading h1 { font-size: clamp(28px, 3.2vw, 36px); line-height: 1.4; font-weight: 400; letter-spacing: 0; overflow-wrap: anywhere; }
.page-heading > p:last-child { margin-top: 14px; color: var(--muted); }
.blog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 8px 13px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.post-preview { padding: 36px 0 30px; border-bottom: 1px solid var(--line); }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 14px; color: var(--muted); }
.post-meta time { padding: 3px 10px; border-left: 8px solid var(--date-edge); background: var(--date-bg); color: var(--date-ink); font-variant-numeric: tabular-nums; }
.post-meta a:hover { color: var(--accent); text-decoration: underline; }
.meta-separator { color: var(--muted); opacity: .6; }
.post-preview h2 { margin-block: 12px 14px; font-size: 28px; line-height: 1.4; font-weight: 400; letter-spacing: 0; }
.post-preview h2 a:hover { color: var(--accent); }
.post-summary { padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.95; overflow-wrap: anywhere; }
.post-read-link { margin-top: 15px; }
.pagination { margin-top: 35px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pagination a, .pagination span { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border-radius: 2px; padding: 6px 12px; }
.pagination a:hover, .pagination .current { color: var(--accent); background: var(--accent-soft); }
.post-page { padding-block: 24px 70px; }
.tarkov-subnav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tarkov-subnav a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border: 1px solid transparent; border-radius: 4px; font-size: 14px; color: var(--muted); white-space: nowrap; transition: color .2s, background .2s, border-color .2s; }
.tarkov-subnav a:hover { color: var(--accent); background: var(--accent-soft); }
.tarkov-subnav a[aria-current="page"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); font-weight: 500; }
.back-to-blog { margin-bottom: 28px; }
.article-heading { margin-bottom: 38px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.article-heading h1 { margin-top: 12px; font-size: clamp(30px, 4vw, 40px); line-height: 1.4; font-weight: 400; letter-spacing: 0; overflow-wrap: anywhere; }
.prose { font-size: 17px; line-height: 1.95; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { margin: 1.8em 0 .7em; line-height: 1.5; font-weight: 600; }
.prose h1 { font-size: 1.65em; }
.prose h2 { font-size: 1.45em; }
.prose h3 { font-size: 1.2em; }
.prose p { margin-block: 1em; }
.prose ul, .prose ol { padding-left: 1.6em; margin-block: 1em; }
.prose li { margin-block: .5em; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose .headerlink { display: none; }
.prose blockquote { margin: 1.5em 0; border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 8px 24px; color: var(--muted); }
.prose code { padding: .18em .4em; border-radius: 4px; background: var(--accent-soft); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .85em; }
.prose pre, .prose figure.highlight { margin: 1.5em 0; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow-x: auto; font-size: 14px; line-height: 1.75; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose figure.highlight pre { border: 0; padding: 0; margin: 0; border-radius: 0; overflow: visible; }
.prose figure.highlight table { margin: 0; width: auto; }
.prose figure.highlight td { border: 0; padding: 0; }
.prose figure.highlight .gutter { color: var(--muted); padding-right: 20px; user-select: none; }
.prose figure.highlight figcaption { color: var(--muted); margin-bottom: 12px; }
.prose img { border-radius: 8px; margin-block: 20px; height: auto; }
.prose iframe, .prose video { max-width: 100%; }
.prose table { border-collapse: collapse; width: 100%; margin-block: 1.5em; }
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--accent-soft); font-weight: 600; }
.prose hr { margin-block: 2em; border: 0; border-top: 1px solid var(--line); }

/* Discreet collapsible support card, matching theme hairlines and dark mode. */
.reward-card { margin: 28px 0; padding: 20px 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.prose .reward-lead { margin: 0 0 14px; font-size: 15px; line-height: 1.85; color: var(--muted); }
.reward-details { margin: 0; }
.reward-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.4; cursor: pointer; list-style: none; user-select: none; transition: color .2s, border-color .2s, background .2s; }
.reward-trigger::-webkit-details-marker { display: none; }
.reward-trigger::after { content: ""; width: 6px; height: 6px; margin-left: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-1px); transition: transform .2s; opacity: .75; }
.reward-details[open] .reward-trigger::after { transform: rotate(-135deg) translateY(-1px); }
.reward-trigger:hover, .reward-details[open] .reward-trigger { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.reward-trigger:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.reward-panel { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); animation: reward-reveal .2s ease-out; }
.reward-qr-frame { display: inline-block; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #1e1e1e; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
.prose .reward-qr-frame img { display: block; width: 100%; max-width: 220px; height: auto; margin: 0; border-radius: 0; }
:root[data-theme="dark"] .reward-qr-frame { border-color: var(--line); box-shadow: 0 4px 16px rgba(0, 0, 0, .35); }
:root[data-theme="dark"] .prose .reward-qr-frame img { filter: brightness(0.95); }
.prose .reward-note { margin: 12px 0 0; max-width: 38ch; font-size: 13px; line-height: 1.75; color: var(--muted); }
@keyframes reward-reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.post-tags { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 35px; }
.post-tags a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 4px; font-size: 14px; color: var(--accent); }
.post-tags a:hover { background: var(--accent-soft); }
.post-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 48px; border-top: 1px solid var(--line); padding-top: 25px; }
.post-navigation a { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; }
.post-navigation span { color: var(--muted); font-size: 14px; }
.post-navigation strong { font-size: 18px; font-weight: 500; }
.post-navigation a:hover strong { color: var(--accent); }

/* Quiet footer, with the existing appearance controls. */
.site-footer { padding-block: 22px; color: var(--muted); }
.site-footer > .container { border-top: 1px solid var(--line); padding-top: 18px; }
.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: none; }
.footer-credit p { font-size: 12px; }
.footer-divider { margin-inline: 8px; }
.theme-switcher { display: flex; align-items: center; gap: 4px; }
.theme-switcher button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--muted); transition: color .2s, background .2s; }
.theme-switcher svg { width: 18px; height: 18px; }
.theme-switcher button[aria-pressed="true"], .theme-switcher button:hover { background: var(--accent-soft); color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.filing-links { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.filing-links a, .back-to-top { display: inline-flex; align-items: center; min-height: 36px; }
.footer-bottom a:hover { color: var(--accent); }
.back-to-top { white-space: nowrap; }

@media (max-width: 1050px) {
  .container { width: calc(100% - 60px); }
}

@media (max-width: 760px) {
  .container, .reading-container { width: calc(100% - 40px); }
  .header-inner { min-height: 135px; padding-block: 28px 22px; gap: 20px; }
  .brand { font-size: 28px; gap: 10px; }
  .brand img { width: 27px; height: 27px; }
  .main-nav { gap: 25px; }
  .navigation-home { padding-block: 25px 42px; }
  .navigation-card-copy { grid-template-columns: 140px minmax(0, 1fr); gap: 15px; }
  .navigation-card { gap: 16px; }
  .blog-page { padding-block: 25px 50px; }
  .page-heading { padding-bottom: 28px; }
  .post-preview h2 { font-size: 25px; }
  .post-page { padding-block: 22px 50px; }
  .article-heading { margin-bottom: 28px; }
  .prose { font-size: 16px; }
  .footer-main { gap: 12px; }
  .footer-bottom { align-items: flex-start; gap: 12px; }
  .filing-links { flex-direction: column; gap: 0; }
  .filing-links a { min-height: 30px; }
}

@media (max-width: 600px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 18px; padding-block: 26px 10px; }
  .main-nav { gap: 30px; }
  .navigation-heading { margin-bottom: 28px; }
  .navigation-heading h1 { font-size: 25px; }
  .navigation-card { gap: 16px; padding: 18px 5px; }
  .navigation-card-copy { grid-template-columns: 1fr; gap: 5px; }
  .navigation-description { font-size: 14px; }
  .theme-switcher { gap: 0; }
  .footer-credit p { max-width: 185px; }
  .post-navigation { grid-template-columns: 1fr; }
  .reward-card { padding: 16px 18px; }
  .reward-trigger { width: 100%; justify-content: center; }
}

@media (max-width: 360px) {
  .container, .reading-container { width: calc(100% - 32px); }
  .main-nav { gap: 26px; }
  .navigation-card { gap: 12px; }
  .footer-main { align-items: flex-start; }
  .footer-credit p, .footer-bottom { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .back-to-blog, .post-navigation, .post-tags, .reward-card, .tarkov-subnav { display: none; }
  :root { --bg: #fff; --text: #000; --muted: #444; --line: #ddd; }
  .reading-container { width: 100%; }
  .post-page { padding: 0; }
}
