/* Academic blue + warm paper glass. Foreground-only: background images are
   still owned exclusively by source/_data/body-end.njk. */

:root {
  --site-accent: #2457c5;
  --site-accent-strong: #173f97;
  --site-accent-soft: rgba(36, 87, 197, .10);
  --site-accent-line: rgba(36, 87, 197, .22);
  --site-ink: #202c3f;
  --site-muted: #687386;
  --site-line: rgba(84, 104, 138, .20);
  --site-line-strong: rgba(84, 104, 138, .32);
  --site-card-bg: linear-gradient(145deg, rgba(255,255,255,.32), rgba(255,248,236,.10)), rgba(255,252,246,var(--post-opacity,.72));
  --site-card-bg-strong: linear-gradient(145deg, rgba(255,255,255,.46), rgba(255,247,232,.14)), rgba(255,252,247,var(--post-opacity,.72));
  --site-subtle-bg: rgba(255, 253, 248, .46);
  --site-header-bg: rgba(255, 252, 246, .74);
  --site-input-bg: rgba(255, 255, 255, .68);
  --site-code-bg: #edf2fb;
  --table-row-odd-bg-color: rgba(84, 104, 138, .055);
  --table-row-hover-bg-color: rgba(36, 87, 197, .075);
  --site-shadow: 0 18px 48px rgba(25, 45, 82, .09);
  --site-shadow-hover: 0 22px 54px rgba(25, 45, 82, .14);
  --site-radius-sm: 10px;
  --site-radius: 16px;
  --site-radius-lg: 24px;
  --site-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --site-title-font: "Georgia", "Times New Roman", "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --border-color: var(--site-line);
  --text-color-secondary: var(--site-muted);
  --code-bg-color: var(--site-code-bg);
  --theme-link-color: var(--site-accent);
  --link-color: var(--site-accent);
}

html.dark,
body.darkmode {
  --site-accent: #8fb7ff;
  --site-accent-strong: #b9d1ff;
  --site-accent-soft: rgba(143, 183, 255, .12);
  --site-accent-line: rgba(143, 183, 255, .25);
  --site-ink: #e7edf7;
  --site-muted: #a9b5c8;
  --site-line: rgba(181, 198, 224, .16);
  --site-line-strong: rgba(181, 198, 224, .28);
  --site-card-bg: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,236,205,.018)), rgba(24,30,41,var(--post-opacity,.72));
  --site-card-bg-strong: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,236,205,.026)), rgba(26,33,45,var(--post-opacity,.72));
  --site-subtle-bg: rgba(18, 24, 34, .52);
  --site-header-bg: rgba(18, 24, 34, .78);
  --site-input-bg: rgba(12, 18, 28, .58);
  --site-code-bg: #111a29;
  --table-row-odd-bg-color: rgba(255, 255, 255, .045);
  --table-row-hover-bg-color: rgba(143, 183, 255, .11);
  --site-shadow: 0 20px 54px rgba(0, 0, 0, .26);
  --site-shadow-hover: 0 24px 60px rgba(0, 0, 0, .34);
}

html { scroll-behavior: smooth; }
html body {
  color: var(--site-ink);
  font-family: var(--site-font);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(36, 87, 197, .20); }
html.dark ::selection, body.darkmode ::selection { background: rgba(143, 183, 255, .28); }
html body a { text-underline-offset: .18em; text-decoration-thickness: .08em; }
html body :is(h1,h2,h3,h4) { letter-spacing: -.012em; }
html body :is(.post-body,#artContent,.review-rendered) :is(h1,h2,h3,h4) { scroll-margin-top: 6rem; }

/* Header and navigation */
html body .site-brand-container {
  border-bottom: 1px solid var(--site-line);
  background: var(--site-header-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  backdrop-filter: blur(16px) saturate(1.08);
}
html body .brand { transition: transform .22s ease; }
html body .brand:hover { transform: translateY(-1px); }
html body .site-title {
  color: var(--site-ink);
  font-family: var(--site-title-font);
  font-weight: 700;
  letter-spacing: .09em;
  text-shadow: 0 1px 0 rgba(255,255,255,.22);
}
html body .site-nav { background: transparent; }
html body .site-nav .main-menu .menu-item a {
  border-radius: 999px;
  color: var(--site-ink);
  font-size: .92rem;
  font-weight: 550;
  letter-spacing: .015em;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}
html body .site-nav .main-menu .menu-item a:hover,
html body .site-nav .main-menu .menu-item a:focus-visible {
  color: var(--site-accent);
  background: var(--site-accent-soft);
}
html body .site-nav .main-menu .menu-item a.is-current {
  color: var(--site-accent-strong);
  background: var(--site-accent-soft);
  box-shadow: inset 0 0 0 1px var(--site-accent-line);
}
html body .site-nav .main-menu .menu-item a .fa { opacity: .78; }
html body .site-nav .main-menu .menu-item.menu-auth-hidden { display: none !important; }
html body .site-nav-toggle,
html body .site-nav-search { color: var(--site-ink); }

html body .lang-switch { top: 13px; right: 16px; }
html body .lang-switch .lang-select {
  min-height: 36px;
  padding: 5px 30px 5px 11px;
  border: 1px solid var(--site-line);
  border-radius: 999px;
  background-color: var(--site-header-bg);
  color: var(--site-ink);
  font: inherit;
  font-size: .78rem;
  box-shadow: 0 7px 20px rgba(25,45,82,.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  cursor: pointer;
}
html.dark .lang-switch .lang-select, body.darkmode .lang-switch .lang-select {
  color: var(--site-ink);
  background-color: var(--site-header-bg);
}

html body .footer {
  border-top: 1px solid var(--site-line);
  background: linear-gradient(180deg, transparent, rgba(255,252,246,.26));
  color: var(--site-muted);
}
html.dark .footer, body.darkmode .footer {
  background: linear-gradient(180deg, transparent, rgba(10,16,26,.24));
}
html body .footer a { color: var(--site-accent); }

/* Main content cards and prose */
html body .main-inner .post-block {
  overflow: hidden;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius-lg);
  background: var(--site-card-bg);
  box-shadow: var(--site-shadow);
  -webkit-backdrop-filter: blur(12px) saturate(1.04);
  backdrop-filter: blur(12px) saturate(1.04);
}
html body .post-block { margin-bottom: 2rem; }
html body .post-header {
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--site-line);
}
html body .post-title {
  color: var(--site-ink);
  font-family: var(--site-title-font);
  font-weight: 700;
  letter-spacing: .015em;
}
html body .post-header .post-title::after {
  content: "";
  display: block;
  width: 2.6rem;
  height: 3px;
  margin-top: .7rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--site-accent), transparent);
}
html body .post-description, html body .post-meta,
html body .post-meta-container { color: var(--site-muted); }
html body .post-description {
  margin-top: .8rem;
  font-size: .94rem;
  line-height: 1.72;
}
html body .post-body {
  color: var(--site-ink);
  font-size: 1.015rem;
  line-height: 1.86;
}
html body .post-body > :first-child { margin-top: .6rem; }
html body .post-body :is(h2,h3,h4) { color: var(--site-ink); font-weight: 700; }
html body .post-body h2 {
  padding-left: .8rem;
  border-left: 4px solid var(--site-accent);
  border-bottom: 0;
}
html body .post-body a, html body #artContent a {
  color: var(--site-accent);
  font-weight: 550;
}
html body .post-body a:hover, html body #artContent a:hover { color: var(--site-accent-strong); }
html body .post-body blockquote, html body #artContent blockquote,
html body .review-rendered blockquote {
  margin: 1.35em 0;
  padding: .85rem 1rem .85rem 1.15rem;
  border: 1px solid var(--site-line);
  border-left: 4px solid var(--site-accent);
  border-radius: 0 var(--site-radius-sm) var(--site-radius-sm) 0;
  background: var(--site-subtle-bg);
  color: var(--site-muted);
}
html body .post-body code, html body #artContent code,
html body .review-rendered code {
  border: 1px solid var(--site-line);
  border-radius: 6px;
  background: var(--site-code-bg);
  color: var(--site-ink);
}
html body .post-body pre, html body #artContent pre,
html body .review-rendered pre {
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  background: var(--site-code-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
html body .post-body pre code, html body #artContent pre code,
html body .review-rendered pre code { border: 0; background: transparent; }
html body .post-body :is(table,#artContent table,.review-rendered table) { border-radius: var(--site-radius-sm); }
html body .post-body :is(th,td), html body #artContent :is(th,td),
html body .review-rendered :is(th,td) { border-color: var(--site-line-strong); }
html body .post-body thead, html body #artContent thead,
html body .review-rendered thead { background: var(--site-accent-soft); }
html body .post-body tbody tr:nth-of-type(odd),
html body #artContent tbody tr:nth-of-type(odd),
html body .review-rendered tbody tr:nth-of-type(odd) {
  background: var(--table-row-odd-bg-color);
  color: inherit;
}
html body .post-body tbody tr:nth-of-type(even),
html body #artContent tbody tr:nth-of-type(even),
html body .review-rendered tbody tr:nth-of-type(even) { background: transparent; }
html body .post-body tbody tr:hover,
html body #artContent tbody tr:hover,
html body .review-rendered tbody tr:hover { background: var(--table-row-hover-bg-color); }
html body .post-body th, html body #artContent th,
html body .review-rendered th { color: var(--site-ink); font-weight: 700; }
html body .post-body td, html body #artContent td,
html body .review-rendered td { color: inherit; }
html body .post-body img, html body #artContent img,
html body .review-rendered img { border-radius: var(--site-radius-sm); }
html body .post-body hr { border: 0; border-top: 1px solid var(--site-line); }
html body .post-nav, html body .post-footer { border-color: var(--site-line); }
html body .post-eof { background: linear-gradient(90deg, transparent, var(--site-line-strong), transparent); }

/* Sidebar */
html body .sidebar .sidebar-inner {
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius-lg);
  box-shadow: var(--site-shadow);
  -webkit-backdrop-filter: blur(12px) saturate(1.04);
  backdrop-filter: blur(12px) saturate(1.04);
}
html body .site-author-image {
  border: 3px solid rgba(255,255,255,.55);
  box-shadow: 0 10px 26px rgba(25,45,82,.14);
}
html body .site-author-name {
  color: var(--site-ink);
  font-family: var(--site-title-font);
  font-weight: 700;
  letter-spacing: .045em;
}
html body .site-description { color: var(--site-muted); }
html body .sidebar-nav { border-color: var(--site-line); }
html body .site-state-item-count { color: var(--site-accent); font-weight: 700; }
html body .site-state-item-name { color: var(--site-muted); }

/* Forms and buttons */
html body .post-body input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
html body .post-body textarea, html body .post-body select {
  border: 1px solid var(--site-line-strong);
  border-radius: var(--site-radius-sm);
  background-color: var(--site-input-bg);
  color: var(--site-ink);
  box-shadow: inset 0 1px 2px rgba(25,45,82,.04);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
html body .post-body input:not([type="range"]):focus,
html body .post-body textarea:focus, html body .post-body select:focus {
  border-color: var(--site-accent);
  outline: none;
  box-shadow: 0 0 0 4px var(--site-accent-soft);
}
html body .post-body input::placeholder,
html body .post-body textarea::placeholder { color: var(--site-muted); opacity: .82; }
html body .post-body :where(button:not(.link-button):not(.btn)) {
  min-height: 40px;
  padding: .56rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--site-radius-sm);
  background: var(--site-accent);
  color: #fff;
  font: inherit;
  font-size: .94rem;
  font-weight: 650;
  line-height: 1.3;
  box-shadow: 0 8px 18px rgba(36,87,197,.16);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, opacity .18s ease;
}
html body .post-body :where(button:not(.link-button):not(.btn)):hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--site-accent-strong);
  box-shadow: 0 11px 24px rgba(36,87,197,.22);
}
html body .post-body :where(button:not(.link-button):not(.btn)):disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
html body .post-body .danger, html body .post-body .btn-danger {
  border-color: rgba(185,28,28,.22);
  background: #b42318;
  color: #fff;
  box-shadow: 0 8px 18px rgba(180,35,24,.14);
}
html body .post-body .danger:hover, html body .post-body .btn-danger:hover { background: #8f1d14; }

/* Home portal */
html body #home-portal {
  box-sizing: border-box;
  position: relative;
  width: min(1080px, calc(100% - 2rem));
  max-width: 1080px;
  margin: clamp(1.5rem,5vw,4.5rem) auto;
  padding: clamp(1.75rem,4.5vw,3.5rem);
  overflow: hidden;
  border: 1px solid var(--site-line);
  border-radius: 32px;
  background: var(--site-card-bg-strong);
  box-shadow: 0 28px 72px rgba(25,45,82,.13);
  text-align: left;
  -webkit-backdrop-filter: blur(14px) saturate(1.06);
  backdrop-filter: blur(14px) saturate(1.06);
}
html body #home-portal::before {
  content: "";
  position: absolute;
  top: -15rem;
  right: -11rem;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--site-accent-soft), transparent 68%);
  pointer-events: none;
}
html body .home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(300px, .84fr);
  gap: clamp(1.5rem,4vw,3.2rem);
  align-items: center;
}
html body .home-intro { min-width: 0; }
html body .home-eyebrow {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .95rem;
  color: var(--site-accent);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .15em;
  line-height: 1.6;
  text-transform: uppercase;
}
html body .home-eyebrow-dot {
  flex: none;
  width: .48rem;
  height: .48rem;
  border-radius: 50%;
  background: var(--site-accent);
  box-shadow: 0 0 0 4px var(--site-accent-soft);
}
html body #home-portal .home-title {
  margin: 0 0 1rem;
  color: var(--site-ink);
  font-family: var(--site-title-font);
  font-size: clamp(2.55rem,5.4vw,4.35rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: .08em;
}
html body #home-portal .home-title::after {
  content: "";
  display: block;
  width: 4.4rem;
  height: 4px;
  margin: 1.1rem 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--site-accent), transparent);
}
html body .home-summary {
  max-width: 35rem;
  margin: 0;
  color: var(--site-muted);
  font-size: 1.02rem;
  line-height: 1.9;
}
html body .home-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1.55rem 0 .8rem;
}
html body .home-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 46px;
  padding: .7rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: none;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
html body .home-cta:hover { transform: translateY(-2px); }
html body .home-cta.primary {
  background: var(--site-accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(36,87,197,.22);
}
html body .home-cta.primary:hover { background: var(--site-accent-strong); }
html body .home-cta.secondary {
  border: 1px solid var(--site-accent-line);
  background: var(--site-accent-soft);
  color: var(--site-accent-strong);
}
html body .home-cta.secondary:hover { border-color: var(--site-accent); }
html body .home-session {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: 1.4em;
  margin: 0 0 1.35rem;
  color: var(--site-muted);
  font-size: .83rem;
  line-height: 1.6;
}
html body .home-session::before {
  content: "";
  flex: none;
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: #2f9e6f;
  box-shadow: 0 0 0 3px rgba(47,158,111,.13);
}
html body .home-trust {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--site-line);
  color: var(--site-muted);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.6;
}
html body .home-trust span { display: inline-flex; align-items: center; gap: .4rem; }
html body .home-trust i { color: var(--site-accent); }
html body .home-sidecard {
  position: relative;
  min-width: 0;
  padding: 1.3rem;
  overflow: hidden;
  border: 1px solid var(--site-accent-line);
  border-radius: 24px;
  background: linear-gradient(155deg, var(--site-accent-soft), var(--site-subtle-bg) 62%);
  box-shadow: 0 16px 38px rgba(25,45,82,.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
html body .home-sidecard::after {
  content: "";
  position: absolute;
  top: -4.5rem;
  right: -4.5rem;
  width: 10rem;
  height: 10rem;
  border: 1px solid var(--site-accent-line);
  border-radius: 50%;
  pointer-events: none;
}
html body .home-side-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}
html body .home-side-kicker {
  color: var(--site-accent);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}
html body .home-access-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: .15rem .7rem;
  border: 1px solid var(--site-accent-line);
  border-radius: 999px;
  background: var(--site-input-bg);
  color: var(--site-muted);
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
html body .home-access-pill.is-user {
  background: var(--site-accent);
  color: #fff;
}
html body .home-sidecard h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 1rem;
  color: var(--site-ink);
  font-family: var(--site-title-font);
  font-size: 1.35rem;
  letter-spacing: .04em;
}
html body .home-shortcuts {
  position: relative;
  z-index: 1;
  display: grid;
  gap: .42rem;
}
html body .home-shortcut {
  display: grid;
  grid-template-columns: 2.35rem minmax(0,1fr) auto;
  align-items: center;
  gap: .72rem;
  min-height: 56px;
  padding: .58rem .62rem;
  border: 1px solid transparent;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}
html body .home-shortcut:hover {
  border-color: var(--site-accent-line);
  background: var(--site-card-bg);
  transform: translateX(2px);
}
html body .home-shortcut-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--site-accent-line);
  border-radius: 11px;
  background: var(--site-input-bg);
  color: var(--site-accent);
  font-size: .92rem;
}
html body .home-shortcut-copy { min-width: 0; }
html body .home-shortcut-copy strong {
  display: block;
  color: var(--site-ink);
  font-size: .88rem;
  line-height: 1.4;
}
html body .home-shortcut-copy small {
  display: block;
  overflow: hidden;
  color: var(--site-muted);
  font-size: .72rem;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html body .home-shortcut-arrow {
  color: var(--site-accent);
  font-size: .68rem;
  opacity: .65;
  transition: transform .18s ease, opacity .18s ease;
}
html body .home-shortcut:hover .home-shortcut-arrow { opacity: 1; transform: translateX(3px); }
html body .home-latest,
html body .home-workflow {
  margin-top: clamp(2.4rem,5vw,3.8rem);
  padding-top: clamp(1.8rem,4vw,2.6rem);
  border-top: 1px solid var(--site-line);
}
html body .home-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
  text-align: left;
}
html body .home-section-kicker {
  margin: 0 0 .35rem;
  color: var(--site-accent);
  font-size: .69rem;
  font-weight: 750;
  letter-spacing: .15em;
  text-transform: uppercase;
}
html body .home-section-kicker span {
  margin-left: .35rem;
  color: var(--site-muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
}
html body .home-section-head h2 {
  margin: 0;
  color: var(--site-ink);
  font-family: var(--site-title-font);
  font-size: clamp(1.4rem,2.2vw,1.72rem);
  letter-spacing: .04em;
}
html body .home-section-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 40px;
  color: var(--site-accent);
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
html body .home-section-link i { font-size: .7rem; transition: transform .18s ease; }
html body .home-section-link:hover i { transform: translateX(3px); }
html body .home-section-note {
  margin: 0 0 .2rem;
  color: var(--site-muted);
  font-size: .8rem;
  line-height: 1.6;
}
html body .home-latest-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1rem;
}
html body .home-latest-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 210px;
  padding: 1.15rem;
  border: 1px solid var(--site-line);
  border-radius: 18px;
  background: var(--site-subtle-bg);
  box-shadow: 0 10px 28px rgba(25,45,82,.045);
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
html body .home-latest-card:hover {
  border-color: var(--site-accent-line);
  box-shadow: var(--site-shadow-hover);
  transform: translateY(-3px);
}
html body .home-latest-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin: 0 0 .75rem;
  color: var(--site-muted);
  font-size: .72rem;
  line-height: 1.5;
}
html body .home-latest-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body .home-latest-meta time { flex: none; }
html body .home-latest-card h3 {
  display: -webkit-box;
  margin: 0 0 .65rem;
  overflow: hidden;
  color: var(--site-ink);
  font-size: 1.02rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
html body .home-latest-card h3 a { color: inherit; text-decoration: none; }
html body .home-latest-card h3 a:hover { color: var(--site-accent); }
html body .home-latest-excerpt {
  display: -webkit-box;
  margin: 0 0 1rem;
  overflow: hidden;
  color: var(--site-muted);
  font-size: .82rem;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
html body .home-latest-read {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  margin-top: auto;
  color: var(--site-accent);
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
}
html body .home-latest-read i { font-size: .66rem; transition: transform .18s ease; }
html body .home-latest-read:hover i { transform: translateX(3px); }
html body .home-latest-skeleton { gap: .8rem; justify-content: flex-start; pointer-events: none; }
html body .home-latest-skeleton span {
  display: block;
  height: .78rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--site-accent-soft), var(--site-line), var(--site-accent-soft));
  background-size: 200% 100%;
  animation: homeShimmer 1.3s ease-in-out infinite;
}
html body .home-latest-skeleton span:nth-child(1) { width: 52%; }
html body .home-latest-skeleton span:nth-child(2) { width: 88%; height: 1.15rem; }
html body .home-latest-skeleton span:nth-child(3) { width: 68%; }
@keyframes homeShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
html body .home-latest-state {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: .9rem;
  min-height: 110px;
  padding: 1.2rem;
  border: 1px dashed var(--site-line-strong);
  border-radius: 18px;
  background: var(--site-subtle-bg);
  text-align: left;
}
html body .home-latest-state > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 13px;
  background: var(--site-accent-soft);
  color: var(--site-accent);
}
html body .home-latest-state.is-error > i { color: #b42318; background: rgba(180,35,24,.09); }
html body .home-latest-state > div { display: flex; flex: 1; flex-direction: column; gap: .2rem; }
html body .home-latest-state strong { color: var(--site-ink); }
html body .home-latest-state span { color: var(--site-muted); font-size: .82rem; }
html body .home-latest-state a,
html body .home-latest-retry {
  flex: none;
  min-height: 38px;
  padding: .45rem .85rem;
  border: 1px solid var(--site-accent-line);
  border-radius: 999px;
  background: var(--site-accent-soft);
  color: var(--site-accent-strong);
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
html body .home-workflow-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
html body .home-workflow-step {
  position: relative;
  padding: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--site-line);
  border-radius: 18px;
  background: var(--site-subtle-bg);
}
html body .home-step-index {
  display: block;
  margin-bottom: .7rem;
  color: var(--site-accent);
  font-family: var(--site-title-font);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  opacity: .82;
}
html body .home-workflow-step h3 {
  margin: 0 0 .4rem;
  color: var(--site-ink);
  font-size: 1rem;
}
html body .home-workflow-step p {
  margin: 0;
  color: var(--site-muted);
  font-size: .84rem;
  line-height: 1.72;
}
html body .home-announcement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2rem,4vw,2.8rem);
  padding: 1rem 1.1rem;
  border: 1px solid var(--site-accent-line);
  border-radius: 18px;
  background: var(--site-accent-soft);
}
html body .home-announcement-copy { display: flex; align-items: center; gap: .8rem; min-width: 0; }
html body .home-announcement-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 12px;
  background: var(--site-input-bg);
  color: var(--site-accent);
}
html body .home-announcement-copy div { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
html body .home-announcement-copy strong { color: var(--site-ink); font-size: .86rem; }
html body .home-announcement-copy span { color: var(--site-muted); font-size: .8rem; line-height: 1.6; }
html body .home-announcement > a {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  flex: none;
  min-height: 38px;
  color: var(--site-accent);
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
}
html body .home-announcement > a i { font-size: .68rem; transition: transform .18s ease; }
html body .home-announcement > a:hover i { transform: translateX(3px); }
html body .home-footnote {
  margin: 1.4rem 0 0;
  color: var(--site-muted);
  font-size: .78rem;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 980px) {
  html body .home-hero { grid-template-columns: 1fr; }
  html body .home-shortcuts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  html body .home-sidecard { padding: 1.2rem; }
}
@media (max-width: 700px) {
  html body #home-portal {
    width: calc(100% - 1.25rem);
    margin: 1rem auto 1.75rem;
    padding: 1.4rem .95rem;
    border-radius: 24px;
  }
  html body #home-portal .home-title { font-size: clamp(2.25rem,12vw,3rem); }
  html body .home-eyebrow { font-size: .68rem; letter-spacing: .09em; }
  html body .home-summary { font-size: .95rem; line-height: 1.78; }
  html body .home-cta-row { gap: .6rem; margin-top: 1.25rem; }
  html body .home-cta { flex: 1 1 100%; min-height: 48px; }
  html body .home-session { margin-bottom: 1.1rem; font-size: .8rem; }
  html body .home-trust { gap: .45rem .8rem; font-size: .76rem; }
  html body .home-shortcuts { grid-template-columns: 1fr; }
  html body .home-shortcut { min-height: 58px; }
  html body .home-latest,
  html body .home-workflow {
    margin-top: 2.2rem;
    padding-top: 1.7rem;
  }
  html body .home-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: .45rem;
    margin-bottom: 1rem;
  }
  html body .home-section-head .home-section-link { min-height: 34px; }
  html body .home-section-note { display: none; }
  html body .home-latest-grid,
  html body .home-workflow-grid { grid-template-columns: 1fr; }
  html body .home-latest-card { min-height: 0; padding: 1rem; }
  html body .home-latest-excerpt { -webkit-line-clamp: 2; }
  html body .home-workflow-step { padding: 1.05rem; }
  html body .home-step-index { font-size: 1.7rem; margin-bottom: .55rem; }
  html body .home-announcement {
    align-items: flex-start;
    flex-direction: column;
    gap: .55rem;
    padding: .95rem;
  }
  html body .home-announcement > a { min-height: 34px; }
  html body .home-latest-state { align-items: flex-start; flex-wrap: wrap; }
  html body .home-latest-state a,
  html body .home-latest-retry { min-height: 42px; }
}

/* Article plaza */
html body .article-container { max-width: 820px; margin: 1.5rem auto 0; padding: 0; }
html body .search-bar {
  gap: .6rem;
  padding: .55rem;
  border: 1px solid var(--site-line);
  border-radius: 999px;
  background: var(--site-subtle-bg);
}
html body .article-container .search-bar input {
  min-height: 42px;
  padding: .58rem .95rem;
  border: 0;
  border-radius: 999px;
  background: var(--site-input-bg);
  color: var(--site-ink);
  box-shadow: inset 0 0 0 1px var(--site-line);
}
html body .article-container .search-bar input:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--site-accent), 0 0 0 4px var(--site-accent-soft);
}
html body .article-container .search-bar button {
  min-height: 42px;
  padding: .58rem 1.2rem;
  border-radius: 999px;
  background: var(--site-accent);
  box-shadow: 0 8px 18px rgba(36,87,197,.16);
}
html body .article-card {
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  background: var(--site-subtle-bg);
  box-shadow: 0 8px 24px rgba(25,45,82,.05);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
html body .article-card:hover {
  transform: translateY(-2px);
  border-color: var(--site-accent-line);
  box-shadow: var(--site-shadow-hover);
}
html body .article-title { font-size: 1.2rem; letter-spacing: -.005em; }
html body .article-title a { color: var(--site-ink); }
html body .article-title a:hover { color: var(--site-accent); text-decoration: none; }
html body .article-meta, html body .load-tip { color: var(--site-muted); }
html body .article-desc { color: var(--site-ink); opacity: .86; }
html body .pager button {
  border: 1px solid var(--site-line-strong);
  border-radius: 999px;
  background: var(--site-subtle-bg);
  color: var(--site-ink);
}

/* Login */
html body #auth-box {
  max-width: 460px;
  margin: 1.6rem auto 0;
  padding: clamp(1.4rem,4vw,2.2rem);
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius-lg);
  background: var(--site-subtle-bg);
  box-shadow: 0 14px 36px rgba(25,45,82,.065);
}
html body #auth-box h3 {
  margin: 0 0 1.15rem;
  color: var(--site-ink);
  font-family: var(--site-title-font);
  font-size: 1.35rem;
  letter-spacing: .03em;
}
html body #auth-box input {
  min-height: 46px;
  margin: .55rem 0;
  padding: .68rem .85rem;
  border: 1px solid var(--site-line-strong);
  border-radius: var(--site-radius-sm);
  background: var(--site-input-bg);
  color: var(--site-ink);
  box-shadow: inset 0 1px 2px rgba(25,45,82,.04);
}
html body #auth-box input:focus {
  border-color: var(--site-accent);
  outline: none;
  box-shadow: 0 0 0 4px var(--site-accent-soft);
}
html body #auth-box button {
  min-height: 46px;
  margin-top: .8rem;
  border: 0;
  border-radius: var(--site-radius-sm);
  background: var(--site-accent);
  color: #fff;
  font-size: .96rem;
  font-weight: 650;
  box-shadow: 0 10px 22px rgba(36,87,197,.18);
}
html body #auth-box button:hover:not(:disabled) { background: var(--site-accent-strong); }
html body #auth-box .link-button {
  width: auto;
  min-height: 0;
  margin: 0 0 0 .25em;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--site-accent);
  font: inherit;
  box-shadow: none;
  text-decoration: underline;
  vertical-align: baseline;
}
html body #auth-box p { color: var(--site-muted); }
html body #msg { min-height: 1.4em; color: #b42318; line-height: 1.6; }
html.dark #msg, body.darkmode #msg { color: #ff9c92; }

/* Profile and image host */
html body .user-box {
  max-width: 620px;
  margin: 1.6rem auto 1.25rem;
  padding: clamp(1.4rem,4vw,2.2rem);
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius-lg);
  background: var(--site-subtle-bg);
  box-shadow: 0 14px 36px rgba(25,45,82,.065);
}
html body .user-box > h2 { display: none; }
html body .user-box .info-line { margin: .75rem 0; color: var(--site-ink); }
html body .user-box .info-line span { color: var(--site-muted); }
html body .user-box button {
  margin: .45rem .45rem 0 0;
  border-radius: 999px;
  background: var(--site-accent);
}
html body .user-box button:last-child {
  border: 1px solid var(--site-line-strong);
  background: var(--site-subtle-bg);
  color: var(--site-ink);
  box-shadow: none;
}
html body .user-box button:last-child:hover {
  border-color: var(--site-accent-line);
  background: var(--site-accent-soft);
  color: var(--site-accent-strong);
}
html body #tip { color: #b42318; }
html body .image-host-box {
  max-width: 620px;
  margin: 0 auto 2.5rem;
  padding: 1.35rem;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius-lg);
  background: var(--site-subtle-bg);
  box-shadow: 0 12px 30px rgba(25,45,82,.055);
}
html body .image-host-box h3 {
  margin: 0 0 .8rem;
  color: var(--site-ink);
  font-family: var(--site-title-font);
  letter-spacing: .035em;
}
html body .image-quota-text, html body .image-empty,
html body #imageHostMsg { color: var(--site-muted); }
html body .image-quota-track { background: var(--site-line); }
html body .image-quota-bar { background: linear-gradient(90deg, var(--site-accent), #6a9cf5); }
html body .image-card {
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius-sm);
  background: var(--site-input-bg);
  box-shadow: 0 5px 16px rgba(25,45,82,.05);
  transition: transform .18s ease, box-shadow .18s ease;
}
html body .image-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(25,45,82,.10); }
html body .image-card-actions button {
  min-height: 32px;
  padding: .25rem .45rem;
  border-radius: 8px;
  font-size: .76rem;
  box-shadow: none;
}
html body .image-card-actions button:last-child {
  border-color: rgba(180,35,24,.2);
  background: rgba(180,35,24,.08);
  color: #b42318;
}
html body .image-card-actions button:last-child:hover {
  background: rgba(180,35,24,.14);
  color: #b42318;
}

/* Editor */
html body .editor-box { max-width: 760px; margin: 1.6rem auto 0; padding: 0; }
html body .editor-box > h2 {
  margin: 0 0 1rem;
  color: var(--site-ink);
  font-family: var(--site-title-font);
  font-size: 1.35rem;
  letter-spacing: .03em;
}
html body .editor-box label {
  margin-top: 1rem;
  color: var(--site-ink);
  font-size: .92rem;
  font-weight: 650;
}
html body .editor-box input#title,
html body .editor-box textarea#content,
html body .editor-box .image-alt-input {
  border: 1px solid var(--site-line-strong);
  border-radius: var(--site-radius-sm);
  background: var(--site-input-bg);
  color: var(--site-ink);
  box-shadow: inset 0 1px 2px rgba(25,45,82,.04);
}
html body .editor-box input#title { min-height: 46px; padding: .68rem .85rem; }
html body .editor-box textarea#content { min-height: 340px; padding: .9rem; line-height: 1.75; }
html body .editor-box input#title:focus,
html body .editor-box textarea#content:focus,
html body .editor-box .image-alt-input:focus {
  border-color: var(--site-accent);
  outline: none;
  box-shadow: 0 0 0 4px var(--site-accent-soft);
}
html body .image-tools {
  padding: .8rem;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  background: var(--site-subtle-bg);
}
html body .image-tools button {
  border: 1px solid var(--site-accent-line);
  border-radius: 999px;
  background: var(--site-accent-soft);
  color: var(--site-accent-strong);
  box-shadow: none;
}
html body .image-tools button:hover:not(:disabled) { background: var(--site-accent); color: #fff; }
html body #imageQuota { color: var(--site-muted); }
html body #imageMsg, html body #msg { line-height: 1.6; }
html body #imageMsg.is-error, html body #imageHostMsg.is-error { color: #b42318; }
html body #imageMsg.is-success, html body #imageHostMsg.is-success { color: #147a43; }
html body #imageMsg.is-info { color: var(--site-accent); }
html body #submitArticleBtn {
  min-height: 46px;
  margin-top: .75rem;
  padding-inline: 1.4rem;
  border-radius: 999px;
}

/* Submission archive */
html body .arch-container { max-width: 780px; margin: 1.5rem auto 0; padding: 0; }
html body .arch-container .item {
  margin: .85rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  background: var(--site-subtle-bg);
}
html body .arch-container .item-title { font-size: 1.08rem; }
html body .arch-container .item-title a { color: var(--site-ink); }
html body .arch-container .item-title a:hover { color: var(--site-accent); text-decoration: none; }
html body .arch-container .item-meta { color: var(--site-muted); }
html body .arch-container .item-actions :is(a,button) {
  min-height: 36px;
  border: 1px solid var(--site-line-strong);
  border-radius: 999px;
  background: var(--site-input-bg);
  color: var(--site-ink);
  box-shadow: none;
}
html body .arch-container .item-actions .danger {
  border-color: rgba(180,35,24,.22);
  background: rgba(180,35,24,.08);
  color: #b42318;
}
html body .arch-container .item-actions .danger:hover {
  background: rgba(180,35,24,.14);
  color: #b42318;
}

/* Review workbench */
html body .review-wrap { max-width: 1000px; margin: 1.5rem auto 0; padding: 0; }
html body .review-login, html body .review-card {
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius-lg);
  background: var(--site-subtle-bg);
  box-shadow: 0 12px 30px rgba(25,45,82,.055);
}
html body .review-login h1, html body .review-head h1 { display: none; }
html body .review-sub, html body .review-meta,
html body .review-msg, html body .review-empty { color: var(--site-muted); }
html body .review-login input {
  min-height: 44px;
  border: 1px solid var(--site-line-strong);
  border-radius: var(--site-radius-sm);
  background: var(--site-input-bg);
  color: var(--site-ink);
}
html body .review-login input:focus {
  border-color: var(--site-accent);
  outline: none;
  box-shadow: 0 0 0 4px var(--site-accent-soft);
}
html body .review-warning {
  border: 1px solid rgba(188,120,12,.28);
  border-radius: var(--site-radius-sm);
  background: rgba(245,158,11,.09);
  color: #8a5300;
}
html body .review-badge, html body .review-count {
  background: var(--site-accent-soft);
  color: var(--site-accent-strong);
}
html body .review-card h3 { color: var(--site-ink); }
html body .review-details summary { color: var(--site-accent); }
html body .review-details pre, html body .review-rendered pre {
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius-sm);
  background: var(--site-code-bg);
}
html body .review-actions .btn, html body .review-head-actions .btn {
  min-height: 40px;
  border-radius: 999px;
  font-size: .9rem;
}
html body .btn-primary {
  background: var(--site-accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(36,87,197,.16);
}
html body .btn-secondary {
  border: 1px solid var(--site-accent-line);
  background: var(--site-accent-soft);
  color: var(--site-accent-strong);
}
html body .btn-ghost {
  border: 1px solid var(--site-line-strong);
  background: transparent;
  color: var(--site-ink);
}

/* Member page */
html body .member-profile { max-width: 760px; margin: 1.5rem auto 2.5rem; text-align: center; }
html body .member-avatar {
  width: 136px;
  height: 136px;
  border: 4px solid rgba(255,255,255,.58);
  border-radius: 50%;
  box-shadow: 0 18px 40px rgba(25,45,82,.16);
}
html body .member-name {
  margin: .95rem 0 .25rem;
  color: var(--site-ink);
  font-family: var(--site-title-font);
  font-size: 2.15rem;
  letter-spacing: .045em;
}
html body .member-role {
  margin: 0;
  color: var(--site-accent);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .06em;
}
html body .member-panel {
  margin: 1rem 0;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  background: var(--site-subtle-bg);
  text-align: left;
}
html body .member-panel h3 {
  margin: 0 0 .8rem;
  color: var(--site-ink);
  font-family: var(--site-title-font);
  font-size: 1.08rem;
  letter-spacing: .025em;
}
html body .member-panel p { margin: .35rem 0; color: var(--site-muted); }
html body .member-list { padding: 0; margin: .25rem 0 0; list-style: none; }
html body .member-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .7rem;
  margin: .65rem 0;
}
html body .member-list a { color: var(--site-ink); font-weight: 600; }
html body .member-list time { color: var(--site-muted); font-size: .86rem; }
html body .member-list .member-empty { color: var(--site-muted); }
html body .member-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .7rem;
  margin-top: 1.8rem;
}
html body .member-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: .55rem 1.05rem;
  border: 1px solid var(--site-line-strong);
  border-radius: 999px;
  background: var(--site-subtle-bg);
  color: var(--site-ink);
  font-weight: 600;
  text-decoration: none;
}
html body .member-actions a:hover { border-color: var(--site-accent-line); color: var(--site-accent); }

/* Article detail, comments, tags and categories */
html body #titleEl {
  margin: .35rem 0 .65rem;
  color: var(--site-ink);
  font-family: var(--site-title-font);
  font-size: clamp(1.85rem,4vw,2.6rem);
  line-height: 1.3;
}
html body #artMeta { margin-bottom: 1.25rem; color: var(--site-muted); font-size: .9rem; }
html body #artContent { color: var(--site-ink); font-size: 1.015rem; line-height: 1.9; }
html body .article-notice {
  border: 1px solid rgba(188,120,12,.28);
  border-radius: var(--site-radius-sm);
  background: rgba(245,158,11,.09);
  color: #8a5300;
}
html body .comment-box { max-width: 780px; margin-top: 1rem; }
html body .citem { border-color: var(--site-line); }
html body .cform textarea {
  border: 1px solid var(--site-line-strong);
  border-radius: var(--site-radius-sm);
  background: var(--site-input-bg);
  color: var(--site-ink);
}
html body .cform button { border-radius: 999px; background: var(--site-accent); }
html body .tag-cloud a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: .22rem .7rem;
  border: 1px solid var(--site-line);
  border-radius: 999px;
  background: var(--site-subtle-bg);
  color: var(--site-ink);
  text-decoration: none;
}
html body .tag-cloud a:hover { border-color: var(--site-accent-line); color: var(--site-accent); }
html body .category-list a { color: var(--site-ink); }

/* Settings panel: foreground colors only; background behavior is untouched. */
html body .setting-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-height: 54px;
  padding: 0;
  border: 1px solid var(--site-accent-line);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  background: var(--site-accent);
  color: #fff;
  box-shadow: -8px 10px 24px rgba(25,45,82,.16);
}
html body .setting-trigger .fa { font-size: 1rem; transition: transform .22s ease; }
html body .setting-trigger[aria-expanded="true"] .fa { transform: rotate(90deg); }
html body .right-setting-panel {
  border-left: 1px solid var(--site-line);
  background: var(--site-header-bg) !important;
  box-shadow: -22px 0 56px rgba(25,45,82,.16);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}
html body .right-setting-panel h3 {
  color: var(--site-ink);
  font-family: var(--site-title-font);
  letter-spacing: .035em;
}
html body .right-setting-panel .setting-item label {
  color: var(--site-muted);
  font-size: .88rem;
}
html body .right-setting-panel input[type="range"] { accent-color: var(--site-accent); }
html body .right-setting-panel button, html body .right-setting-panel select {
  border: 1px solid var(--site-line-strong);
  border-radius: var(--site-radius-sm);
  background: var(--site-input-bg);
  color: var(--site-ink);
}

/* Reading enhancements */
html body .site-reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10002;
  height: 3px;
  overflow: hidden;
  background: rgba(84, 104, 138, .12);
  pointer-events: none;
}
html body .site-reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--site-accent), #6a9cf5);
  box-shadow: 0 0 14px rgba(36, 87, 197, .34);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .08s linear;
}
html body .site-back-to-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 9997;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--site-line-strong);
  border-radius: 50%;
  background: var(--site-header-bg);
  color: var(--site-accent);
  box-shadow: var(--site-shadow);
  font-size: .95rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background-color .18s ease;
}
html body .site-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
html body .site-back-to-top:hover {
  background: var(--site-accent);
  color: #fff;
  transform: translateY(-2px);
}
html body .site-code-block {
  position: relative;
}
html body .site-code-block .site-copy-code {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  width: auto;
  min-height: 30px;
  margin: 0;
  padding: .25rem .6rem;
  box-sizing: border-box;
  border: 1px solid var(--site-line-strong);
  border-radius: 999px;
  background: var(--site-header-bg);
  color: var(--site-ink);
  box-shadow: 0 5px 14px rgba(25, 45, 82, .10);
  font: inherit;
  font-size: .74rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-3px);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: opacity .16s ease, transform .16s ease, color .16s ease, background-color .16s ease;
}
html body .site-code-block:hover .site-copy-code,
html body .site-code-block .site-copy-code:focus-visible,
html body .site-code-block .site-copy-code.is-copied,
html body .site-code-block .site-copy-code.is-error {
  opacity: 1;
  transform: translateY(0);
}
html body .site-code-block .site-copy-code:hover {
  border-color: var(--site-accent-line);
  background: var(--site-accent-soft);
  color: var(--site-accent-strong);
}
html body .site-code-block .site-copy-code.is-copied {
  border-color: rgba(20, 122, 67, .28);
  background: rgba(20, 122, 67, .10);
  color: #147a43;
}
html body .site-code-block .site-copy-code.is-error {
  border-color: rgba(180, 35, 24, .28);
  background: rgba(180, 35, 24, .10);
  color: #b42318;
}

/* Responsive refinements */
@media (max-width: 991px) {
  html body .lang-switch {
    top: auto;
    right: auto;
    bottom: calc(14px + env(safe-area-inset-bottom,0px));
    left: 12px;
  }
  html body .lang-switch .lang-select {
    min-height: 38px;
    max-width: 118px;
    border-radius: 10px;
    font-size: .78rem;
  }
}
@media (max-width: 768px) {
  html body .main-inner .post-block { border-radius: 18px; }
  html body .post-body { font-size: 1rem; line-height: 1.82; }
  html body .article-container { margin-top: .75rem; }
  html body .search-bar { border-radius: 16px; }
  html body .article-container .search-bar input,
  html body .article-container .search-bar button { border-radius: 11px; }
  html body #auth-box, html body .user-box,
  html body .image-host-box, html body .editor-box {
    width: 100%;
    margin-top: .75rem;
    border-radius: 16px;
  }
  html body .image-host-box { padding: 1.1rem; }
  html body .image-tools { border-radius: 12px; }
  html body .image-tools button { width: 100%; }
  html body .post-body button:not(.link-button) { min-height: 44px; }
  html body .review-login, html body .review-card { border-radius: 16px; }
  html body .site-back-to-top {
    right: 14px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: 46px;
    height: 46px;
  }
  html body .site-code-block .site-copy-code {
    opacity: .88;
    transform: none;
  }
}
@media (max-width: 420px) {
  html body .article-container .search-bar { flex-direction: column; border-radius: 14px; }
  html body .article-container .search-bar input,
  html body .article-container .search-bar button { width: 100%; }
}

/* Keyboard-first navigation */
html body .site-skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 10000;
  padding: .65rem 1rem;
  border: 1px solid var(--site-accent-line);
  border-radius: 999px;
  background: var(--site-header-bg);
  color: var(--site-ink);
  box-shadow: var(--site-shadow);
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .18s ease;
}
html body .site-skip-link:focus {
  transform: translateY(0);
}

/* Taxonomy index: tags and categories */
html body .taxonomy-page { max-width: 980px; margin: 0 auto; }
html body .taxonomy-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.15rem, 3.6vw, 1.8rem);
  border: 1px solid var(--site-accent-line);
  border-radius: var(--site-radius-lg);
  background:
    radial-gradient(circle at 100% 0, var(--site-accent-soft), transparent 46%),
    var(--site-card-bg-strong);
  box-shadow: var(--site-shadow);
}
html body .taxonomy-hero::after {
  content: '';
  position: absolute;
  right: -3rem;
  bottom: -4rem;
  width: 12rem;
  height: 12rem;
  border: 1px solid var(--site-accent-line);
  border-radius: 50%;
  opacity: .55;
  pointer-events: none;
}
html body .taxonomy-kicker {
  margin: 0;
  color: var(--site-accent);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}
html body .taxonomy-title {
  margin: .35rem 0 .45rem;
  color: var(--site-ink);
  font-family: var(--site-title-font, serif);
  font-size: clamp(1.45rem, 4vw, 1.95rem);
  line-height: 1.25;
}
html body .taxonomy-lead {
  max-width: 58ch;
  margin: 0;
  color: var(--site-muted);
  font-size: .9rem;
  line-height: 1.72;
}
html body .taxonomy-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1rem;
}
html body .taxonomy-stat {
  display: inline-flex;
  align-items: baseline;
  gap: .38rem;
  min-height: 2.25rem;
  padding: .35rem .78rem;
  border: 1px solid var(--site-line);
  border-radius: 999px;
  background: var(--site-subtle-bg);
  color: var(--site-muted);
  font-size: .78rem;
}
html body .taxonomy-stat strong {
  color: var(--site-ink);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
html body .taxonomy-switch {
  display: inline-flex;
  gap: .25rem;
  margin-top: 1rem;
  padding: .25rem;
  border: 1px solid var(--site-line);
  border-radius: 999px;
  background: var(--site-subtle-bg);
}
html body .taxonomy-switch a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 2rem;
  padding: .25rem .78rem;
  border-radius: 999px;
  color: var(--site-muted);
  font-size: .8rem;
  font-weight: 650;
  text-decoration: none;
}
html body .taxonomy-switch a:hover { color: var(--site-accent); text-decoration: none; }
html body .taxonomy-switch a.is-active {
  background: var(--site-accent);
  color: #fff;
  box-shadow: 0 5px 14px rgba(36,87,197,.16);
}
html body .taxonomy-content { margin-top: 1.2rem; }
html body .taxonomy-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .45rem .9rem;
  margin: 0 0 .75rem;
}
html body .taxonomy-section-head h2 {
  margin: 0;
  color: var(--site-ink);
  font-size: 1.08rem;
}
html body .taxonomy-section-head p {
  margin: 0;
  color: var(--site-muted);
  font-size: .78rem;
  line-height: 1.55;
}
html body .taxonomy-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .72rem;
}
html body .taxonomy-category-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .72rem;
  min-height: 5.15rem;
  padding: .85rem .92rem;
  border: 1px solid var(--site-line);
  border-radius: 16px;
  background: var(--site-card-bg-strong);
  color: var(--site-ink);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(25,45,82,.045);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
html body .taxonomy-category-card:hover {
  border-color: var(--site-accent-line);
  color: var(--site-ink);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(25,45,82,.08);
}
html body .taxonomy-category-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 13px;
  background: var(--site-accent-soft);
  color: var(--site-accent);
  font-size: 1rem;
}
html body .taxonomy-category-copy { min-width: 0; }
html body .taxonomy-category-name {
  display: block;
  overflow-wrap: anywhere;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.4;
}
html body .taxonomy-category-count {
  display: block;
  margin-top: .15rem;
  color: var(--site-muted);
  font-size: .76rem;
}
html body .taxonomy-category-arrow { color: var(--site-muted); font-size: .72rem; }
html body .taxonomy-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  padding: clamp(.9rem, 2.8vw, 1.25rem);
  border: 1px solid var(--site-line);
  border-radius: 18px;
  background:
    linear-gradient(145deg, var(--site-accent-soft), transparent 42%),
    var(--site-card-bg-strong);
  box-shadow: 0 8px 24px rgba(25,45,82,.045);
}
html body .taxonomy-tag {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  min-height: 2.4rem;
  padding: .38rem .78rem;
  border: 1px solid var(--site-line);
  border-radius: 999px;
  background: var(--site-subtle-bg);
  color: var(--site-ink);
  font-size: var(--tag-size, .92rem);
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}
html body .taxonomy-tag:hover {
  border-color: var(--site-accent-line);
  background: var(--site-accent-soft);
  color: var(--site-accent);
  text-decoration: none;
  transform: translateY(-1px);
}
html body .taxonomy-tag-hash { color: var(--site-accent); }
html body .taxonomy-tag-count {
  min-width: 1.45em;
  padding: .04em .38em;
  border-radius: 999px;
  background: rgba(127,140,160,.15);
  color: var(--site-muted);
  font-size: .68em;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
html body .taxonomy-inline-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
html body .taxonomy-inline-actions a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 2.45rem;
  padding: .4rem .9rem;
  border: 1px solid var(--site-line-strong);
  border-radius: 999px;
  background: var(--site-subtle-bg);
  color: var(--site-ink);
  font-size: .82rem;
  font-weight: 650;
  text-decoration: none;
}
html body .taxonomy-inline-actions a:hover { border-color: var(--site-accent-line); color: var(--site-accent); }
html body .taxonomy-state {
  padding: 2.2rem 1.15rem;
  border: 1px dashed var(--site-line-strong);
  border-radius: 18px;
  background: var(--site-subtle-bg);
  text-align: center;
}
html body .taxonomy-state[hidden] { display: none !important; }
html body .taxonomy-state-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--site-accent-soft);
  color: var(--site-accent);
}
html body .taxonomy-state h2 { margin: .9rem 0 .3rem; color: var(--site-ink); font-size: 1.1rem; }
html body .taxonomy-state p { max-width: 34rem; margin: 0 auto; color: var(--site-muted); line-height: 1.7; }
html body .taxonomy-state.is-error .taxonomy-state-icon { background: rgba(180,35,24,.1); color: #b42318; }
html body .taxonomy-retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  margin-top: .9rem;
  padding: .4rem 1rem;
  border: 1px solid var(--site-accent);
  border-radius: 999px;
  background: var(--site-accent);
  color: #fff;
  font: inherit;
  font-size: .82rem;
  font-weight: 650;
  cursor: pointer;
}
html body .taxonomy-skeleton-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .72rem; }
html body .taxonomy-skeleton-card {
  height: 5.15rem;
  border: 1px solid var(--site-line);
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(127,140,160,.12) 25%, rgba(127,140,160,.22) 50%, rgba(127,140,160,.12) 75%);
  background-size: 200% 100%;
  animation: taxonomy-shimmer 1.35s ease-in-out infinite;
}
@keyframes taxonomy-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (max-width: 700px) {
  html body .taxonomy-page { padding: 0 .9rem; }
  html body .taxonomy-hero { border-radius: 18px; }
  html body .taxonomy-category-grid { grid-template-columns: 1fr; }
  html body .taxonomy-category-card { min-height: 4.6rem; }
  html body .taxonomy-switch { width: 100%; }
  html body .taxonomy-switch a { flex: 1 1 0; justify-content: center; }
  html body .taxonomy-tag-cloud { gap: .48rem; border-radius: 16px; }
  html body .taxonomy-tag { min-height: 2.55rem; padding: .42rem .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  html body .taxonomy-category-card,
  html body .taxonomy-tag { transition: none; }
  html body .taxonomy-skeleton-card { animation: none; }
}

html body .menu-friend-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.05rem;
  height: 1.05rem;
  margin-left: .28rem;
  padding: 0 .28rem;
  border-radius: 999px;
  background: #d92d20;
  color: #fff;
  font-size: .62rem;
  font-weight: 750;
  line-height: 1;
  vertical-align: .08em;
  box-shadow: 0 2px 6px rgba(217,45,32,.24);
}
html body .menu-friend-badge[hidden] { display: none !important; }
html body .user-actions a .menu-friend-badge { margin-left: .1rem; }
html body .article-author[href] { color: inherit; text-decoration: none; }
html body .article-author[href]:hover .article-author-name,
html body .article-author[href]:focus-visible .article-author-name { color: var(--site-accent, #2457c5); }
