/* ============================================================
   SYL科技的宝盒 — Corporate Website Stylesheet
   Design Language: Dark Cinematic Minimalist (ECHOID-inspired)
   ============================================================ */

/* ===== DESIGN TOKENS ===== */
:root {
  --bg: #000000;
  --bg-elevated: #0a0a0c;
  --bg-card: rgba(255, 255, 255, 0.03);
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.62);
  --text-dimmer: rgba(255, 255, 255, 0.42);
  --text-faint: rgba(255, 255, 255, 0.28);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.26);
  --fill-ghost: rgba(255, 255, 255, 0.05);
  --fill-solid: rgba(255, 255, 255, 0.10);
  --fill-hover: rgba(255, 255, 255, 0.09);

  --accent: #4a9eff;
  --accent-dim: rgba(74, 158, 255, 0.5);

  --gutter: clamp(20px, 5vw, 100px);
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "Sora", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --nav-height: 72px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  color: inherit;
}

::selection {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ===== FOCUS STYLES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}

/* ===== UTILITIES ===== */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.mono { font-family: var(--font-mono); }
.display { font-family: var(--font-display); }

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(11px, 0.78vw, 14px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.section-label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(11px, 0.72vw, 14px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
  padding: 9px 18px;
  display: inline-block;
  line-height: 1;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 200;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.h-display {
  font-size: clamp(54px, 7vw, 120px);
  font-weight: 200;
  line-height: 0.95;
  letter-spacing: 0.03em;
}

.h-section {
  font-size: clamp(32px, 4.5vw, 72px);
  font-weight: 200;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.h-sub {
  font-size: clamp(24px, 2.8vw, 44px);
  font-weight: 300;
  line-height: 1.15;
}

.text-dim { color: var(--text-dim); }
.text-dimmer { color: var(--text-dimmer); }

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(16px, 2vw, 26px) var(--gutter);
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav--scrolled {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: var(--line);
}

/* Homepage: the nav lives inside the hero (absolute, scrolls away with it),
   so it never needs a deepening background on scroll. */
.page-home .nav--scrolled {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(18px, 1.5vw, 24px);
  letter-spacing: 0.14em;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

.nav__logo:hover {
  opacity: 0.7;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.8vw, 48px);
}

.nav__link {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(11px, 0.78vw, 14px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--text-dim);
}

/* Search button — pure icon, no background / box, styled like the nav links */
.nav__search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  opacity: 0.85;
  transition: color 0.25s ease, opacity 0.25s ease;
}
.nav__search:hover {
  color: var(--text-dim);
  opacity: 1;
}

.nav__cta {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(11px, 0.78vw, 14px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  padding: clamp(10px, 0.9vw, 14px) clamp(18px, 1.6vw, 28px);
  border: 1px solid var(--line-strong);
  transition: background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.nav__cta:hover {
  background: var(--fill-ghost);
  border-color: rgba(255, 255, 255, 0.5);
}

.nav__right {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.8vw, 48px);
}

/* Hamburger */
.nav__toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav__toggle-bar {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 1px;
  background: #fff;
  transform: translateX(-50%);
  transition: transform 0.45s var(--ease-premium), opacity 0.25s ease, top 0.45s var(--ease-premium);
}

.nav__toggle-bar:nth-child(1) { top: 16px; }
.nav__toggle-bar:nth-child(2) { top: 22px; }
.nav__toggle-bar:nth-child(3) { top: 28px; }

.nav__toggle.is-active .nav__toggle-bar:nth-child(1) {
  top: 22px;
  transform: translateX(-50%) rotate(45deg);
}
.nav__toggle.is-active .nav__toggle-bar:nth-child(2) {
  opacity: 0;
  transform: translateX(-50%) scaleX(0);
}
.nav__toggle.is-active .nav__toggle-bar:nth-child(3) {
  top: 22px;
  transform: translateX(-50%) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav__links,
  .nav__cta {
    display: none;
  }
  .nav__search {
    margin-right: 10px;
  }
  .nav__toggle {
    display: block;
  }
  .nav__right {
    gap: 0;
  }
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(4, 4, 6, 0.94);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  clip-path: circle(3% at calc(100% - 42px) 42px);
  opacity: 0;
  pointer-events: none;
  transition: clip-path 0.7s var(--ease-premium), opacity 0.45s ease;
}

.mobile-menu.is-open {
  clip-path: circle(150% at calc(100% - 42px) 42px);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu__link {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(20px, 5.5vw, 28px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.5s var(--ease-premium);
  transition-delay: calc(180ms + var(--i) * 70ms);
}

.mobile-menu__cta {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(20px, 5.5vw, 28px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  padding: 16px 40px;
  border: 1px solid var(--line-strong);
  margin-top: 16px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.5s var(--ease-premium);
  transition-delay: calc(180ms + 4 * 70ms);
}

.mobile-menu.is-open .mobile-menu__link,
.mobile-menu.is-open .mobile-menu__cta {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu__link:hover {
  color: var(--text-dim);
}

@media (min-width: 901px) {
  .mobile-menu {
    display: none !important;
  }
}

/* ===== HERO (Home Page) ===== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
}

@media (max-height: 640px) {
  .hero {
    min-height: 100svh;
  }
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #000;
}

/* static image shown first; the video crossfades in once fully downloaded */
.hero__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.7s ease;
}
.hero__poster.is-hidden {
  opacity: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.hero__video.is-ready {
  opacity: 1;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@media (min-width: 721px) {
  .hero__scrim {
    background:
      linear-gradient(to right,
        transparent 0%,
        transparent 45%,
        rgba(0, 0, 0, 0.45) 72%,
        rgba(0, 0, 0, 0.72) 100%),
      linear-gradient(to bottom,
        rgba(0, 0, 0, 0.55) 0%,
        transparent 22%,
        transparent 78%,
        rgba(0, 0, 0, 0.65) 100%);
  }
}

@media (max-width: 720px) {
  .hero__scrim {
    background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.6) 0%,
      rgba(0, 0, 0, 0.25) 30%,
      rgba(0, 0, 0, 0.75) 100%);
  }
}

/* Nav row in hero */
.hero__nav {
  grid-row: 1;
}

/* Nav inside the hero stays absolute (instead of viewport-fixed) */
.hero__nav .nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

/* Body row */
.hero__body {
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  min-height: 0;
  overflow-y: auto;
}

@media (max-width: 720px) {
  .hero__body {
    justify-content: center;
    text-align: center;
  }
}

.hero__panel {
  width: min(34vw, 620px);
  min-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(20px, 3vw, 40px) 0;
}

@media (max-width: 1100px) {
  .hero__panel {
    width: min(70vw, 520px);
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .hero__panel {
    width: 100%;
    align-items: stretch;
  }
}

.hero__chip {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(11px, 0.72vw, 14px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.09);
  padding: clamp(9px, 0.8vw, 14px) clamp(14px, 1.1vw, 20px);
  line-height: 1;
}

@media (max-width: 720px) {
  .hero__chip {
    align-self: flex-start;
  }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(54px, 6.2vw, 118px);
  letter-spacing: 0.03em;
  line-height: 0.95;
  margin-top: clamp(28px, 3vw, 52px);
}

@media (max-width: 380px) {
  .hero__title {
    font-size: clamp(44px, 15vw, 64px);
  }
}

.hero__tagline {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: clamp(11px, 0.94vw, 17px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: clamp(14px, 1.4vw, 24px);
  line-height: 1.4;
  max-width: 520px;
}

.hero__form {
  margin-top: clamp(38px, 4.6vw, 82px);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.3vw, 22px);
  width: 100%;
}

.hero__form-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hero__input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 2px clamp(12px, 1.1vw, 18px);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(16px, 0.95vw, 18px);
  color: #fff;
  outline: none;
  transition: border-color 0.25s ease;
}

.hero__input::placeholder {
  color: var(--text-dim);
  transition: color 0.25s ease;
}

.hero__input:focus {
  border-bottom-color: rgba(255, 255, 255, 0.85);
}

.hero__input:focus::placeholder {
  color: var(--text-dimmer);
}

.btn--ghost {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: none;
  border-radius: 0;
  padding: clamp(17px, 1.6vw, 27px) 20px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(11px, 0.78vw, 14px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.btn--solid {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: none;
  border-radius: 0;
  padding: clamp(17px, 1.6vw, 27px) 20px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(11px, 0.78vw, 14px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: var(--fill-solid);
  color: #fff;
  transition: background 0.25s ease;
}

.btn--solid:hover {
  background: rgba(255, 255, 255, 0.17);
}

/* cursor-following highlight on the two hero buttons */
.btn--ghost::before,
.btn--solid::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle 150px at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.26), transparent 72%);
}
.btn--ghost:hover::before,
.btn--solid:hover::before {
  opacity: 1;
}

.hero__referral {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(11px, 0.74vw, 14px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: clamp(26px, 2.6vw, 46px);
  align-self: center;
  transition: color 0.25s ease;
}

.hero__referral:hover {
  color: var(--text-dim);
  text-decoration: underline;
  underline-offset: 4px;
}

/* Legal footer in hero */
.hero__legal {
  grid-row: 3;
  border-top: 1px solid var(--line);
  padding: clamp(18px, 1.7vw, 30px) max(var(--gutter), env(safe-area-inset-right));
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-bottom: max(clamp(18px, 1.7vw, 30px), env(safe-area-inset-bottom));
  text-align: center;
}

.hero__legal-text {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(12px, 0.82vw, 16px);
  color: var(--text-dim);
  line-height: 1.5;
}

.hero__legal-text a {
  color: #fff;
  text-decoration: underline;
  underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.25s ease;
}

.hero__legal-text a:hover {
  color: var(--text-dim);
}

/* ===== PAGE HEADER (sub-pages) ===== */
.page-header {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--nav-height) + clamp(60px, 8vw, 120px)) 0 clamp(40px, 5vw, 80px);
  overflow: hidden;
}

.page-header__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(74, 158, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 30% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    #000;
}

.page-header__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    transparent 40%,
    rgba(0, 0, 0, 0.5) 100%);
}

/* blue blurred glow on the right side of subpage headers,
   fading out toward the left; left side keeps the original background */
.page-header::after {
  content: '';
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: 20%;
  right: -12%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 90% at 100% 45%,
    rgba(58, 132, 255, 0.38) 0%,
    rgba(58, 132, 255, 0.16) 38%,
    rgba(58, 132, 255, 0.05) 62%,
    transparent 78%);
  filter: blur(36px);
}

.page-header__content {
  width: 100%;
}

.page-header__label {
  margin-bottom: clamp(20px, 2vw, 32px);
}

.page-header__title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 0.98;
  letter-spacing: 0.02em;
}

.page-header__subtitle {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: clamp(14px, 1.2vw, 20px);
  color: var(--text-dim);
  margin-top: clamp(16px, 1.8vw, 28px);
  max-width: 640px;
  line-height: 1.5;
}

/* ===== SECTIONS ===== */
.section {
  padding: clamp(60px, 8vw, 140px) 0;
  position: relative;
}

.section--bordered {
  border-top: 1px solid var(--line);
}

.section__header {
  margin-bottom: clamp(40px, 5vw, 72px);
}

.section__label {
  margin-bottom: clamp(16px, 2vw, 24px);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(28px, 3.5vw, 56px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  max-width: 800px;
}

.section__desc {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(15px, 1.1vw, 18px);
  color: var(--text-dim);
  margin-top: clamp(16px, 1.8vw, 28px);
  max-width: 600px;
  line-height: 1.6;
}

/* ===== ARTICLE CARDS ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px; /* grid background shows through gaps = complete separator lines */
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
/* placeholder for empty trailing cells (added by JS) — same background as
   real cells (var(--bg)) so it is invisible; only keeps the grid square so
   the 1px separator lines drawn by the grid background stay complete */
.grid-filler {
  background: var(--bg);
  min-height: 120px;
}

/* loading state inside grids — spans every column with the dark page
   background so it never shows the bright separator-cell color */
.grid-loading {
  grid-column: 1 / -1;
  margin: 0;
  background: var(--bg);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  text-align: center;
  padding: clamp(48px, 6vw, 96px) 0;
}

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

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

.article-card {
  background: var(--bg);
  padding: clamp(24px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
  transition: background 0.3s ease;
  cursor: pointer;
  min-height: 320px;
}

.article-card:hover {
  background: var(--bg-elevated);
}

.article-card__tag {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.article-card__date {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 12px;
  color: var(--text-dimmer);
  letter-spacing: 0.05em;
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.article-card__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(18px, 1.4vw, 24px);
  line-height: 1.3;
  color: #fff;
  flex: 1;
}

.article-card__excerpt {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(14px, 1vw, 16px);
  color: var(--text-dim);
  line-height: 1.6;
  flex: 1;
}

.article-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: clamp(16px, 1.5vw, 24px);
  border-top: 1px solid var(--line);
}

.article-card__author {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  color: var(--text-dimmer);
  letter-spacing: 0.05em;
}

.article-card__arrow {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dimmer);
  transition: color 0.25s ease, transform 0.25s ease;
}

.article-card:hover .article-card__arrow {
  color: #fff;
  transform: translateX(4px);
}

/* ===== SOFTWARE CARDS ===== */
.software-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}

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

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

.software-card {
  background: var(--bg);
  padding: clamp(28px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 1.5vw, 24px);
  transition: background 0.3s ease;
}

.software-card:hover {
  background: var(--bg-elevated);
}

.software-card__icon {
  width: 56px;
  height: 56px;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 22px;
  color: var(--accent);
}

.software-card__name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(20px, 1.5vw, 26px);
  color: #fff;
  line-height: 1.2;
}

.software-card__version {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  color: var(--text-dimmer);
  letter-spacing: 0.1em;
}

.software-card__desc {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(14px, 1vw, 16px);
  color: var(--text-dim);
  line-height: 1.6;
  flex: 1;
}

.software-card__meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.software-card__meta-item {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 12px;
  color: var(--text-dimmer);
  letter-spacing: 0.05em;
}

.software-card__meta-item span {
  color: var(--text-dim);
}

.software-card__download {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: clamp(16px, 1.5vw, 24px);
  border-top: 1px solid var(--line);
}

.software-card__platform {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}

.software-card__btn {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  padding: 10px 24px;
  border: 1px solid var(--line-strong);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.software-card__btn:hover {
  background: var(--fill-ghost);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ===== FEATURE BLOCK ===== */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}

@media (max-width: 800px) {
  .feature-row {
    grid-template-columns: 1fr;
  }
}

.feature-row__label {
  margin-bottom: clamp(16px, 2vw, 24px);
}

.feature-row__title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(28px, 3.2vw, 52px);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.feature-row__text {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(15px, 1.1vw, 18px);
  color: var(--text-dim);
  line-height: 1.7;
  margin-top: clamp(20px, 2vw, 32px);
}

.feature-row__list {
  margin-top: clamp(20px, 2vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-row__list li {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  padding-left: 24px;
  position: relative;
}

.feature-row__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 12px;
  height: 1px;
  background: var(--line-strong);
}

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}

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

.stat {
  background: var(--bg);
  padding: clamp(60px, 6.5vw, 100px) clamp(8px, 1.2vw, 20px);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  min-width: 0;
  overflow: hidden;
}

.stat__value {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(32px, 3.4vw, 56px);
  line-height: 1;
  color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.stat__label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: clamp(12px, 1vw, 18px);
  white-space: nowrap;
}

/* ===== TIMELINE ===== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline__item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: clamp(24px, 3vw, 48px);
  padding: clamp(28px, 3vw, 48px) 0;
  border-top: 1px solid var(--line);
}

.timeline__item:last-child {
  border-bottom: 1px solid var(--line);
}

@media (max-width: 640px) {
  .timeline__item {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.timeline__date {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.timeline__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(18px, 1.3vw, 22px);
  color: #fff;
  line-height: 1.3;
}

.timeline__desc {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(14px, 1vw, 16px);
  color: var(--text-dim);
  line-height: 1.6;
  margin-top: 12px;
}

/* ===== VALUES GRID ===== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}

@media (max-width: 800px) {
  .values-grid {
    grid-template-columns: 1fr;
  }
}

.value-card {
  background: var(--bg);
  padding: clamp(28px, 3vw, 48px);
}

.value-card__num {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-faint);
}

.value-card__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(20px, 1.5vw, 26px);
  color: #fff;
  margin-top: clamp(16px, 1.5vw, 24px);
  line-height: 1.3;
}

.value-card__desc {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(14px, 1vw, 16px);
  color: var(--text-dim);
  line-height: 1.6;
  margin-top: 12px;
}

/* ===== JOB LIST ===== */
.jobs-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.job-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: clamp(20px, 2vw, 40px);
  align-items: center;
  padding: clamp(24px, 2.5vw, 40px) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease;
  cursor: pointer;
}

.job-item:hover {
  background: var(--bg-elevated);
  padding-left: clamp(16px, 1.5vw, 24px);
  padding-right: clamp(16px, 1.5vw, 24px);
}

@media (max-width: 640px) {
  .job-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.job-item__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(18px, 1.4vw, 24px);
  color: #fff;
  line-height: 1.3;
}

.job-item__dept {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 6px;
}

.job-item__location {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-dimmer);
}

.job-item__type {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ===== FORM (Contact/Apply) ===== */
.form {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2vw, 32px);
  max-width: 640px;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form__label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 2px clamp(12px, 1vw, 16px);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(15px, 1vw, 18px);
  color: #fff;
  outline: none;
  transition: border-color 0.25s ease;
}

.form__textarea {
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  padding: clamp(12px, 1vw, 16px);
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  border-color: rgba(255, 255, 255, 0.85);
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--text-dimmer);
}

.form__select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.form__select option {
  background: var(--bg);
  color: #fff;
}

.form__submit {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  padding: clamp(14px, 1.3vw, 20px) clamp(28px, 2.5vw, 40px);
  border: 1px solid var(--line-strong);
  background: var(--fill-solid);
  transition: background 0.25s ease, border-color 0.25s ease;
  margin-top: clamp(8px, 1vw, 16px);
}

.form__submit:hover {
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ===== ARTICLE PAGE ===== */
.article-page {
  padding-top: calc(var(--nav-height) + clamp(40px, 5vw, 80px));
}

.article-header {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.article-header__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(74, 158, 255, 0.1);
  padding: 8px 16px;
  margin-bottom: clamp(20px, 2vw, 32px);
}

.article-header__title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(28px, 3.5vw, 52px);
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: #fff;
}

.article-header__meta {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
  margin-top: clamp(24px, 2.5vw, 36px);
  padding-bottom: clamp(24px, 2.5vw, 36px);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.article-header__author {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 13px;
  color: var(--text-dim);
}

.article-header__date {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 13px;
  color: var(--text-dimmer);
}

.article-header__read {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 13px;
  color: var(--text-dimmer);
}

/* ===== ARTICLE LAYOUT + TOC (left nav rail when content has h1/h2/h3) ===== */
.article-layout {
  display: grid;
  grid-template-columns: minmax(200px, 232px) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.article-toc {
  position: sticky;
  top: calc(var(--nav-height) + clamp(24px, 3vw, 40px));
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: clamp(16px, 2vw, 22px);
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  max-height: calc(100vh - var(--nav-height) - clamp(56px, 6vw, 96px));
  overflow-y: auto;
}
.article-toc__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  padding: 0 8px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.article-toc__item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.55;
  color: var(--text-dim);
  padding: 7px 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.article-toc__item:hover { color: #fff; background: var(--fill-ghost); }
.article-toc__item.is-active { color: var(--accent); background: rgba(74, 158, 255, 0.08); }
.article-toc__item--l1 { font-weight: 500; font-size: 13px; color: #fff; }
.article-toc__item--l2 { font-weight: 500; padding-left: 26px; }
.article-toc__item--l3 { font-weight: 500; padding-left: 42px; }
.article-toc__item--l2::before,
.article-toc__item--l3::before {
  color: var(--accent);
  margin-right: 8px;
}
.article-toc__item--l2::before { content: "-"; }
.article-toc__item--l3::before { content: "--"; }

/* headings used as jump targets keep clear of the fixed nav */
.article-body h1,
.article-body h2,
.article-body h3 {
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

@media (max-width: 1023px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-toc { display: none; }
}


.article-body {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(40px, 5vw, 72px) var(--gutter);
}

.article-body h1 {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(28px, 2.8vw, 42px);
  color: #fff;
  margin-top: clamp(40px, 4.5vw, 64px);
  margin-bottom: clamp(18px, 1.8vw, 28px);
  line-height: 1.25;
}

.article-body h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(22px, 2vw, 32px);
  color: #fff;
  margin-top: clamp(36px, 4vw, 56px);
  margin-bottom: clamp(16px, 1.5vw, 24px);
  line-height: 1.3;
}

.article-body h1:first-child,
.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(18px, 1.5vw, 24px);
  color: #fff;
  margin-top: clamp(28px, 3vw, 40px);
  margin-bottom: clamp(12px, 1vw, 20px);
  line-height: 1.3;
}

.article-body h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(16px, 1.25vw, 20px);
  color: #fff;
  margin-top: clamp(24px, 2.5vw, 36px);
  margin-bottom: clamp(10px, 1vw, 16px);
  line-height: 1.35;
}

.article-body p {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(15px, 1.1vw, 18px);
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: clamp(16px, 1.5vw, 24px);
}

.article-body p strong {
  color: #fff;
  font-weight: 400;
}

.article-body p a {
  color: var(--accent);
  text-decoration: underline;
  underline-offset: 3px;
}

/* hyperlinks anywhere in the article body (not only inside <p>) */
.article-body a {
  color: var(--accent);
  text-decoration: underline;
  underline-offset: 3px;
  word-break: break-all;
}
.article-body a:hover {
  color: #fff;
}

/* text alignment produced by the editor (justify* may emit align= or inline style) */
.article-body [align="left"] { text-align: left; }
.article-body [align="center"] { text-align: center; }
.article-body [align="right"] { text-align: right; }
.article-body .text-align-left { text-align: left; }
.article-body .text-align-center { text-align: center; }
.article-body .text-align-right { text-align: right; }
/* Quill alignment classes (kept as-is in saved content) */
.article-body .ql-align-center { text-align: center; }
.article-body .ql-align-right { text-align: right; }
.article-body .ql-align-justify { text-align: justify; }

.article-body ul,
.article-body ol {
  margin: clamp(16px, 1.5vw, 24px) 0;
  padding-left: clamp(20px, 2vw, 32px);
}

.article-body ul li,
.article-body ol li {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(15px, 1.1vw, 18px);
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 8px;
}

.article-body ul li {
  list-style: none;
  position: relative;
  padding-left: 20px;
}

.article-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 10px;
  height: 1px;
  background: var(--line-strong);
}

.article-body ol li {
  list-style: none;
  position: relative;
  padding-left: 28px;
}

/* Number labels are supplied from the semantic <ol start> value by
   frontend.js, so a saved list can begin at any approved number. */
.article-body ol li::before {
  content: attr(data-list-number);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 13px;
  color: var(--accent);
}

.article-body pre {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: clamp(20px, 2vw, 28px);
  margin: clamp(20px, 2vw, 32px) 0;
  overflow-x: auto;
}

.article-body code {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(13px, 0.95vw, 15px);
  color: var(--text);
  line-height: 1.7;
}

.article-body pre code {
  color: #e0e0e0;
}

.article-body :not(pre) > code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  font-size: 0.9em;
}

/* ===== CODE BLOCK (language header + reader copy button) ===== */
.article-body .code-block,
.editor-content .code-block {
  margin: clamp(20px, 2vw, 32px) 0;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  overflow: hidden;
}
.article-body .code-block__head,
.editor-content .code-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.article-body .code-block__lang,
.editor-content .code-block__lang {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  user-select: none;
}
.article-body .code-block pre,
.editor-content .code-block pre {
  margin: 0;
  border: none;
  padding: clamp(14px, 1.8vw, 22px);
  overflow-x: auto;
}
.article-body .code-block__copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--line);
  padding: 3px 12px;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.article-body .code-block__copy:hover {
  color: #fff;
  border-color: var(--line-strong);
}
/* editor: the code-type label behaves like a clickable chip */
.editor-content .code-block__lang {
  cursor: pointer;
  border: 1px solid var(--line);
  padding: 2px 10px;
}
.editor-content .code-block__lang::after {
  content: "▾";
  margin-left: 6px;
  font-size: 9px;
  opacity: 0.7;
}

.article-body blockquote {
  border-left: 2px solid var(--line-strong);
  padding-left: clamp(20px, 2vw, 32px);
  margin: clamp(24px, 2.5vw, 36px) 0;
}

.article-body blockquote p {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(18px, 1.4vw, 24px);
  color: #fff;
  font-style: italic;
}

.article-body img {
  width: 100%;
  margin: clamp(24px, 2.5vw, 36px) 0;
  border: 1px solid var(--line);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: clamp(20px, 2vw, 32px) 0;
}

.article-body th,
.article-body td {
  text-align: left;
  padding: clamp(12px, 1vw, 16px);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(13px, 1vw, 15px);
  color: var(--text-dim);
}

.article-body th {
  color: #fff;
  font-weight: 400;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.article-footer {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(32px, 4vw, 56px) var(--gutter);
  border-top: 1px solid var(--line);
}

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.article-nav__link {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.25s ease;
}

.article-nav__link:hover {
  color: #fff;
}

/* ===== CTA BANNER ===== */
.cta-banner {
  text-align: center;
  padding: clamp(60px, 8vw, 120px) var(--gutter);
  border-top: 1px solid var(--line);
}

.cta-banner__title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(28px, 3.5vw, 56px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: #fff;
}

.cta-banner__text {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(15px, 1.1vw, 18px);
  color: var(--text-dim);
  margin-top: clamp(16px, 1.8vw, 24px);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.cta-banner__btn {
  display: inline-block;
  margin-top: clamp(28px, 3vw, 44px);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  padding: clamp(16px, 1.5vw, 22px) clamp(32px, 3vw, 48px);
  border: 1px solid var(--line-strong);
  background: var(--fill-solid);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.cta-banner__btn:hover {
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ===== SITE FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(36px, 4vw, 64px) 0 clamp(10px, 1vw, 16px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  padding: 0 var(--gutter);
}

@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand__logo {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(20px, 1.5vw, 24px);
  letter-spacing: 0.14em;
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand__desc {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 320px;
}

.footer-col__title {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  margin-bottom: clamp(16px, 1.5vw, 24px);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.25s ease;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: clamp(16px, 1.6vw, 24px);
  padding: clamp(8px, 0.9vw, 12px) var(--gutter);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom__text {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 12px;
  color: var(--text-dimmer);
  letter-spacing: 0.05em;
}

.footer-bottom__left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 0;
}

.footer-bottom__maintain {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 12px;
  color: var(--text-dimmer);
  letter-spacing: 0.05em;
}

.footer-bottom__icp a {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 12px;
  color: var(--text-dimmer);
  letter-spacing: 0.05em;
  transition: color 0.25s ease;
}

.footer-bottom__icp-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.footer-bottom__icp--beian a {
  display: flex;
  align-items: center;
}

.footer-bottom__beian-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-right: 6px;
}

.footer-bottom__icp a:hover {
  color: #fff;
}

.footer-bottom__links {
  display: flex;
  gap: 24px;
  flex: 1 1 0;
  justify-content: flex-end;
}

.footer-bottom__links a {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 12px;
  color: var(--text-dimmer);
  letter-spacing: 0.05em;
  transition: color 0.25s ease;
}

.footer-bottom__links a:hover {
  color: #fff;
}

.footer-links-bar {
  margin-top: clamp(16px, 1.6vw, 24px);
  padding: clamp(6px, 0.7vw, 10px) var(--gutter);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
  flex-wrap: wrap;
}

.footer-links-bar__label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  flex-shrink: 0;
}

.footer-links-bar__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.footer-links-bar__links a {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  transition: color 0.25s ease;
}

.footer-links-bar__links a:hover {
  color: #fff;
}

@media (max-width: 720px) {
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

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

  .footer-bottom__links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer-links-bar {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .hero__video {
    display: none;
  }

  .hero__poster.is-hidden {
    opacity: 1;
  }

  .hero__media {
    background-image: url("images/main.png");
    background-size: cover;
    background-position: center;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== SHORT HEIGHT COMPRESS ===== */
@media (max-height: 640px) {
  .nav {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .hero__title {
    font-size: clamp(36px, 7vw, 64px);
  }

  .hero__form {
    margin-top: 24px;
    gap: 12px;
  }

  .btn--ghost,
  .btn--solid {
    padding: 12px 20px;
  }

  .hero__legal-text {
    font-size: 11px;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: var(--line-strong);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* ===== FADE IN ANIMATION ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.7s var(--ease-premium);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== CATEGORY FILTERS (resources) ===== */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-btn {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 22px;
  border: 1px solid var(--line);
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}

.filter-btn:hover {
  color: #fff;
  border-color: var(--line-strong);
}

.filter-btn.is-active {
  background: var(--fill-solid);
  color: #fff;
  border-color: var(--line-strong);
}

.syl-loadmore {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 34px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.syl-loadmore:hover:not(:disabled) {
  color: #fff;
  border-color: var(--line-strong);
  background: var(--fill-solid);
}

.syl-loadmore:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ===== ADMIN PANEL ===== */
.admin-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.admin-pager__info {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.admin-pager .admin-btn-sm:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.admin-wrap {
  min-height: 100vh;
  background: var(--bg);
  padding: clamp(20px, 4vw, 56px) var(--gutter);
  max-width: 1100px;
  margin: 0 auto;
}

.admin-auth {
  max-width: 380px;
  margin: 18vh auto;
  text-align: center;
}

/* pinned to the very bottom of the browser viewport, single line */
.admin-login-copyright {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  margin: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-dimmer);
  white-space: nowrap;
  padding: 0 16px;
}

.admin-auth input {
  width: 100%;
  margin-top: 18px;
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #fff;
}

.admin-auth button {
  margin-top: 18px;
  width: 100%;
  padding: 14px;
  background: var(--fill-solid);
  color: #fff;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.admin-head h1 {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(24px, 3vw, 40px);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}

.admin-tab {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 14px 20px;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
}

.admin-tab.is-active {
  color: #fff;
  border-bottom-color: #fff;
}

.admin-panel { display: none; }
.admin-panel.is-active { display: block; }

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.admin-list-item__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 16px;
  color: #fff;
}

.admin-list-item__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dimmer);
}

.admin-list-item__actions { display: flex; gap: 10px; }

.admin-btn-sm {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.admin-btn-sm:hover { background: var(--fill-ghost); }

.admin-btn-sm.danger { border-color: rgba(255, 90, 90, 0.5); color: #ff8a8a; }
.admin-btn-sm.danger:hover { background: rgba(255, 90, 90, 0.12); }

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 760px;
}

.admin-field { display: flex; flex-direction: column; gap: 8px; }

.admin-field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 12px 14px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 15px;
  color: #fff;
  outline: none;
}

.admin-field textarea { min-height: 90px; resize: vertical; }
.admin-field input:focus, .admin-field textarea:focus, .admin-field select:focus {
  border-color: rgba(255,255,255,0.6);
}

.admin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .admin-row { grid-template-columns: 1fr; } }

.admin-actions { display: flex; gap: 14px; margin-top: 12px; flex-wrap: wrap; }

.admin-submit {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 28px;
  background: var(--fill-solid);
  color: #fff;
  border: 1px solid var(--line-strong);
  cursor: pointer;
}
.admin-submit:hover { background: rgba(255,255,255,0.17); }

.admin-cancel {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 28px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line);
  cursor: pointer;
}

/* rich text editor */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-bottom: none;
  background: var(--bg-elevated);
}

.editor-toolbar button {
  font-family: var(--font-mono);
  font-size: 12px;
  min-width: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}
.editor-toolbar button:hover { color: #fff; border-color: var(--line-strong); }
.editor-toolbar button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  color: var(--text-dimmer);
  border-color: var(--line);
}
.editor-toolbar__drop::after {
  content: "▾";
  margin-left: 6px;
  font-size: 9px;
  opacity: 0.7;
}

/* toolbar dropdown menu (格式 / 对齐 / 代码语言) */
.syl-toolbar-drop {
  position: fixed;
  z-index: 99999;
  display: none;
  min-width: 150px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  padding: 6px;
}
.syl-toolbar-drop::-webkit-scrollbar {
  width: 8px;
}
.syl-toolbar-drop::-webkit-scrollbar-track {
  background: transparent;
}
.syl-toolbar-drop::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 2px solid var(--bg-elevated);
}
.syl-toolbar-drop__item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 9px 12px;
  transition: color 0.2s ease, background 0.2s ease;
}
.syl-toolbar-drop__item:hover {
  color: #fff;
  background: var(--fill-ghost);
}

/* ===== FULLSCREEN EDITOR (keeps the toolbar) ===== */
.fs-editor {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: none;
  flex-direction: column;
  padding: clamp(16px, 3vw, 32px) clamp(16px, 3vw, 40px) 40px;
  background: var(--bg);
}
.fs-editor__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.fs-editor__title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(20px, 2.4vw, 28px);
  color: #fff;
  letter-spacing: 0.02em;
}
.fs-editor__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.fs-editor__body .editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
}
.fs-editor__body .editor-content {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

/* ===== IMAGE CAPTION (figure / figcaption) in editor preview & site reader ===== */
.article-body figure,
.editor-content figure {
  margin: clamp(20px, 2.5vw, 36px) 0;
}
.article-body figure img,
.editor-content figure img {
  max-width: 100%;
  margin: 0;
}
.article-body figure figcaption,
.editor-content figure figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-dimmer);
}

/* Quill image caption (div.ql-figure-caption) — same look as figcaption.
   The image sits in its own <p>; images are block-level so there is no
   line-height gap below them, keeping the caption hugging the image. */
.ql-editor p img,
.article-body p img { display: block; max-width: 100%; margin: 0; }
.ql-editor-wrap .ql-snow .ql-editor .ql-figure-caption,
.article-body .ql-figure-caption {
  margin: 0 0 clamp(16px, 1.5vw, 24px);
  padding: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: var(--text-dim);
}
.ql-editor-wrap .ql-snow .ql-editor p:has(+ .ql-figure-caption),
.article-body p:has(+ .ql-figure-caption) {
  margin-bottom: 4px;
}

/* ===== COVER PICKER MODAL ===== */
.syl-cover-modal {
  width: min(820px, 100%);
}
.syl-cover {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 3vw, 36px) clamp(20px, 3vw, 40px);
  max-height: 58vh;
  overflow-y: auto;
}
.syl-cover__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.syl-cover__thumb {
  position: relative;
  display: block;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: #000;
  cursor: pointer;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.syl-cover__thumb:hover {
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.03);
}
.syl-cover__thumb.is-used {
  border-color: var(--accent);
}
.syl-cover__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.syl-cover__badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #fff;
  background: rgba(58, 132, 255, 0.85);
  padding: 3px 7px;
}
.syl-cover__paste {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line-strong);
  color: var(--text-dimmer);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.syl-cover__paste:hover,
.syl-cover__paste:focus {
  border-color: rgba(255, 255, 255, 0.55);
  background: var(--fill-ghost);
  color: #fff;
}

.editor-content {
  min-height: 320px;
  border: 1px solid var(--line-strong);
  padding: 20px;
  background: #000;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  outline: none;
  overflow-y: auto;
  max-height: 60vh;
}
.editor-content:focus { border-color: rgba(255,255,255,0.5); }
.editor-content h1 { font-size: 30px; font-weight: 200; margin: 18px 0 12px; }
.editor-content h2 { font-size: 24px; font-weight: 300; margin: 18px 0 10px; }
.editor-content h3 { font-size: 19px; font-weight: 300; margin: 14px 0 8px; }
.editor-content p { margin: 10px 0; color: var(--text-dim); }
.editor-content a { color: var(--accent); text-decoration: underline; }

/* ===== QUILL EDITOR (admin, replaces .editor-content) ===== */
.ql-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.ql-label-row label { margin: 0; }
:is(.ql-editor-wrap, .ql-fs-body) .ql-toolbar.ql-snow { border: 1px solid var(--line-strong); border-bottom: none; border-radius: 0; background: var(--bg-elevated); }
:is(.ql-editor-wrap, .ql-fs-body) .ql-toolbar.ql-snow + .ql-container.ql-snow { border-top: 1px solid var(--line-strong); }
:is(.ql-editor-wrap, .ql-fs-body) .ql-container.ql-snow { border: 1px solid var(--line-strong); border-radius: 0; font-family: var(--font-display); font-size: clamp(15px, 1.1vw, 18px); }
/* editor typography mirrors the public reader (.article-body) so WYSIWYG */
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor { min-height: 320px; max-height: 60vh; overflow-y: auto; background: #000; color: var(--text-dim); font-family: var(--font-display); font-weight: 300; font-size: clamp(15px, 1.1vw, 18px); line-height: 1.8; padding: 20px; }
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor.ql-blank::before { color: var(--text-dimmer); font-style: normal; }
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor p { color: var(--text-dim); font-family: var(--font-display); font-weight: 300; font-size: clamp(15px, 1.1vw, 18px); line-height: 1.8; margin-bottom: clamp(16px, 1.5vw, 24px); }
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor p strong { color: #fff; font-weight: 400; }
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor h1 { font-family: var(--font-display); font-weight: 200; font-size: clamp(28px, 2.8vw, 42px); color: #fff; line-height: 1.25; margin-top: clamp(40px, 4.5vw, 64px); margin-bottom: clamp(18px, 1.8vw, 28px); }
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor h2 { font-family: var(--font-display); font-weight: 300; font-size: clamp(22px, 2vw, 32px); color: #fff; line-height: 1.3; margin-top: clamp(36px, 4vw, 56px); margin-bottom: clamp(16px, 1.5vw, 24px); }
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor h3 { font-family: var(--font-display); font-weight: 300; font-size: clamp(18px, 1.5vw, 24px); color: #fff; line-height: 1.3; margin-top: clamp(28px, 3vw, 40px); margin-bottom: clamp(12px, 1vw, 20px); }
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor h1:first-child, :is(.ql-editor-wrap, .ql-fs-body) .ql-editor h2:first-child { margin-top: 0; }
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor ul, :is(.ql-editor-wrap, .ql-fs-body) .ql-editor ol { margin: clamp(16px, 1.5vw, 24px) 0; padding-left: clamp(20px, 2vw, 32px); }
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor li { color: var(--text-dim); font-weight: 300; font-size: clamp(15px, 1.1vw, 18px); line-height: 1.8; margin-bottom: 8px; }
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor a { color: var(--accent); text-decoration: underline; }
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor blockquote { border-left: 2px solid var(--line-strong); padding-left: 18px; color: var(--text-dim); margin: clamp(20px, 2vw, 32px) 0; }
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor .ql-align-center { text-align: center; }
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor .ql-align-right { text-align: right; }
:is(.ql-editor-wrap, .ql-fs-body) .ql-editor .ql-align-justify { text-align: justify; }
/* inline code must stay dark (Quill's snow default is a light #f0f0f0 bg —
   with white editor text that becomes invisible). Extra .ql-snow keeps the
   specificity above Quill's own .ql-snow .ql-editor code rule. */
:is(.ql-editor-wrap, .ql-fs-body) .ql-snow .ql-editor code { background: rgba(255, 255, 255, 0.1); color: #fff; padding: 2px 5px; border-radius: 2px; font-size: 85%; font-family: var(--font-mono); }
/* code blocks: dark panel with a language header bar (rendered via ::before
   so it survives Quill's own DOM management; click the bar to change language) */
:is(.ql-editor-wrap, .ql-fs-body) .ql-snow .ql-editor .ql-code-block-container { background: var(--bg-elevated); color: var(--text); border: 1px solid var(--line); border-radius: 0; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; padding-top: 30px; position: relative; }
:is(.ql-editor-wrap, .ql-fs-body) .ql-snow .ql-editor .ql-code-block-container::before { content: attr(data-language) "  ▾"; position: absolute; top: 0; left: 0; right: 0; height: 26px; line-height: 26px; padding: 0 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); background: var(--fill-solid); border-bottom: 1px solid var(--line); cursor: pointer; }
:is(.ql-editor-wrap, .ql-fs-body) .ql-snow .ql-editor .ql-code-block-container:hover::before { color: #fff; }
:is(.ql-editor-wrap, .ql-fs-body) .ql-snow .ql-editor .ql-code-block { background: transparent; color: var(--text); font-family: var(--font-mono); font-size: 13px; line-height: 1.6; }
/* The custom list-start handler opens a numeric dialog for the active list.
   Quill renders one element with both classes: <div class="ql-toolbar ql-snow">.
   Use a real text label so the control is visible even before custom CSS loads. */
.ql-toolbar.ql-snow button.ql-list-start {
  width: 46px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.ql-toolbar.ql-snow button.ql-list-start:hover,
.ql-toolbar.ql-snow button.ql-list-start.ql-active { color: #fff; }

/* Override Quill's generated CSS counter with the marker calculated from
   <ol start>. This is presentation-only and is removed before HTML is saved. */
:is(.ql-editor-wrap, .ql-fs-body) .ql-snow .ql-editor ol li[data-list="ordered"] > .ql-ui[data-list-number]::before {
  content: attr(data-list-number) ". ";
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
}
.ql-snow .ql-toolbar button .ql-stroke { stroke: var(--text-dim); }
.ql-snow .ql-toolbar button:hover .ql-stroke, .ql-snow .ql-toolbar button.ql-active .ql-stroke { stroke: #fff; }
.ql-snow .ql-toolbar button .ql-fill { fill: var(--text-dim); }
.ql-snow .ql-toolbar button:hover .ql-fill, .ql-snow .ql-toolbar button.ql-active .ql-fill { fill: #fff; }
.ql-snow .ql-toolbar .ql-picker { color: var(--text-dim); }
.ql-snow .ql-toolbar .ql-picker:hover .ql-picker-label, .ql-snow .ql-toolbar .ql-picker.ql-expanded .ql-picker-label { color: #fff; }
.ql-snow .ql-toolbar .ql-picker.ql-expanded .ql-picker-options { background: var(--bg-elevated); border-color: var(--line-strong); }
/* hide Quill's built-in link tooltip — all link editing goes through our modal */
.ql-container .ql-tooltip { display: none !important; }
/* fullscreen editing: dedicated overlay (elements are moved into it) —
   matches the old editor: toolbar is its OWN box (no bottom border) and the
   editor is its OWN box, with a small gap between them */
.ql-fs-overlay { position: fixed; inset: 0; z-index: 99990; background: var(--bg); display: flex; flex-direction: column; padding: clamp(16px, 3vw, 32px) clamp(16px, 3vw, 40px) 40px; }
.ql-fs-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.ql-fs-title { font-family: var(--font-display); font-weight: 200; font-size: clamp(20px, 2.4vw, 28px); color: #fff; letter-spacing: 0.02em; }
.ql-fs-exit { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--text-dim); background: transparent; border: 1px solid var(--line-strong); padding: 8px 18px; cursor: pointer; }
.ql-fs-exit:hover { color: #fff; border-color: #fff; }
.ql-fs-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* toolbar: its own frame, no bottom border */
.ql-fs-body .ql-toolbar.ql-snow { flex: 0 0 auto; border: 1px solid var(--line-strong); border-bottom: none; border-radius: 0; background: var(--bg-elevated); }
/* editor: its own frame below, with a small gap */
.ql-fs-body .ql-container.ql-snow { flex: 1; min-height: 0; margin-top: 14px; border: 1px solid var(--line-strong); border-radius: 0; display: flex; flex-direction: column; font-family: var(--font-display); font-size: 16px; }
.ql-fs-body .ql-toolbar.ql-snow + .ql-container.ql-snow { border-top: 1px solid var(--line-strong); }
.ql-fs-body .ql-editor { flex: 1; min-height: 0; max-height: none; overflow-y: auto; background: #000; color: #fff; font-weight: 300; line-height: 1.7; padding: 20px; }
.editor-content [align="left"] { text-align: left; }
.editor-content [align="center"] { text-align: center; }
.editor-content [align="right"] { text-align: right; }
.editor-content img { max-width: 100%; margin: 12px 0; border: 1px solid var(--line); }
.editor-content pre { background: var(--bg-elevated); border: 1px solid var(--line); padding: 16px; overflow-x: auto; margin: 12px 0; }
.editor-content code { font-family: var(--font-mono); font-size: 14px; }
.editor-content blockquote { border-left: 2px solid var(--line-strong); padding-left: 18px; margin: 12px 0; color: #fff; }
.editor-content ul, .editor-content ol { padding-left: 24px; margin: 10px 0; }
.editor-content li { margin: 6px 0; color: var(--text-dim); }
/* mirror the front-end .article-body list markers inside the editor */
.editor-content ul li {
  list-style: none;
  position: relative;
  padding-left: 20px;
}
.editor-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 10px;
  height: 1px;
  background: var(--line-strong);
}
.editor-content ol { counter-reset: item; }
.editor-content ol li {
  list-style: none;
  counter-increment: item;
  position: relative;
  padding-left: 28px;
}
.editor-content ol li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.05em;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 13px;
  color: var(--accent);
}

.admin-help {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dimmer);
  margin-top: 8px;
  line-height: 1.6;
}

/* shared toast — used by admin & frontend (square, dark, site-wide style) */
.syl-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translate(-50%, 14px);
  background: #111;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 13px 28px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5);
  z-index: 99999;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.syl-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ===== field error tip — inline bubble anchored to the offending input =====
   Replaces both the native "请填写此字段" bubble and the centered toast for
   form validation. Position (left/top/arrow) is set by JS; the arrow is a
   rotated square so the tip "points" at its input. */
.field-tip {
  position: fixed;
  background: #111;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55);
  z-index: 99998;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.field-tip.show {
  opacity: 1;
  transform: translateY(0);
}
.field-tip::before {
  content: '';
  position: absolute;
  left: var(--tip-x, 18px);
  width: 8px;
  height: 8px;
  background: #111;
  border-left: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
}
.field-tip--below::before {
  top: -5px;
  transform: rotate(45deg);
}
.field-tip--above::before {
  bottom: -5px;
  transform: rotate(225deg);
}

/* offending input gets a subtle red border while its tip is visible */
.field-invalid,
.field-invalid:focus {
  border-color: rgba(255, 106, 106, 0.72) !important;
}

/* ===== kill browser autofill white/yellow background on the dark theme ===== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
input:autofill,
input:autofill:hover,
input:autofill:focus,
textarea:autofill,
select:autofill {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #000000 inset;
  box-shadow: 0 0 0 1000px #000000 inset;
  transition: background-color 999999s ease-in-out 0s;
}

.admin-back {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 10px 18px;
  cursor: pointer;
}
.admin-back:hover { color: #fff; border-color: var(--line-strong); }

/* ===== NAV & FOOTER LOGOS ===== */
.nav__logo-img {
  height: clamp(26px, 2.2vw, 36px);
  width: auto;
  display: block;
}

.footer-brand__logo-img {
  height: clamp(26px, 2.2vw, 36px);
  width: auto;
  display: block;
  margin-bottom: 16px;
}

/* ===== LEGAL / SITEMAP PAGES ===== */
.legal-section { padding: clamp(80px, 12vw, 160px) 0; }
.legal-content {
  max-width: 820px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.8;
}
.legal-content h2 {
  color: #fff;
  font-size: clamp(20px, 2.2vw, 30px);
  margin: clamp(36px, 4vw, 56px) 0 clamp(14px, 1.6vw, 22px);
}
.legal-content p { margin: 16px 0; }
.legal-content ul { padding-left: 24px; list-style: disc; }
.legal-content li { margin: 8px 0; }

/* Sitemap */
.sitemap-actions {
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--line);
  text-align: center;
}
.sitemap-download {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #fff;
  border: 1px solid var(--line-strong);
  padding: 14px 28px;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.sitemap-download:hover {
  background: var(--bg-elevated);
  border-color: #fff;
}
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
@media (max-width: 900px) { .sitemap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .sitemap-grid { grid-template-columns: 1fr; } }
.sitemap-col {
  background: var(--bg);
  padding: clamp(24px, 3vw, 40px);
  min-height: 280px;
}
.sitemap-col h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(16px, 1.4vw, 22px);
  margin-bottom: 20px;
  color: #fff;
}
.sitemap-col ul { display: flex; flex-direction: column; gap: 10px; }
.sitemap-col a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.2s ease;
}
.sitemap-col a:hover { color: #fff; }

/* ===== CATEGORY LISTING PAGE ===== */
.category-hero {
  padding: calc(var(--nav-height) + clamp(60px, 8vw, 120px)) 0 clamp(40px, 5vw, 80px);
}
.category-hero__title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.05;
}
.category-hero__meta {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 18px;
}

/* ===== ADMIN FORM FIXES ===== */
.admin-field select,
.admin-field input[type="month"] {
  background: var(--bg-elevated);
  color: #fff;
}
.admin-field select option,
.admin-field select optgroup {
  background: #0a0a0c;
  color: #fff;
}
.admin-field select:focus,
.admin-field input[type="month"]:focus {
  background: var(--bg-elevated);
}

/* file picker follows the site-wide CTA design language (see .cta-banner__btn) */
.admin-field input[type="file"] {
  cursor: pointer;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.admin-field input[type="file"]::file-selector-button,
.admin-field input[type="file"]::-webkit-file-upload-button {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  background: var(--fill-solid);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 8px 20px;
  margin-right: 14px;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.admin-field input[type="file"]::file-selector-button:hover,
.admin-field input[type="file"]::-webkit-file-upload-button:hover {
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.5);
}


/* ===== SITE ANNOUNCEMENT MODAL ===== */
.ann-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99995;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  animation: annFadeIn 0.35s var(--ease-premium) both;
}
@keyframes annFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ann-modal {
  width: min(720px, 100%);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: annRiseIn 0.45s var(--ease-premium) both;
}
@keyframes annRiseIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.ann-modal__head {
  padding: clamp(18px, 3vw, 28px) clamp(20px, 3vw, 36px);
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.ann-modal__title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(20px, 2.4vw, 28px);
  color: #fff;
  letter-spacing: 0.01em;
}
.ann-modal__ver {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dimmer);
  white-space: nowrap;
}
.ann-modal__body { overflow-y: auto; }
.ann-modal__body .article-body {
  max-width: none;
  margin: 0;
  padding: clamp(20px, 3vw, 36px) clamp(20px, 3vw, 40px);
}
.ann-modal__foot {
  padding: clamp(14px, 2vw, 20px) clamp(20px, 3vw, 36px);
  border-top: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ann-modal__check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.02em;
  position: relative;
}
/* generic custom checkbox, matches site design language (square, hairline border) */
.syl-check {
  position: relative;
}
.syl-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.syl-check .syl-check__box {
  width: 16px;
  height: 16px;
  flex: none;
  border: 1px solid var(--line-strong);
  background: var(--fill-ghost);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.syl-check .syl-check__box::after {
  content: "";
  width: 7px;
  height: 3.5px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg) translate(0.5px, -0.5px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.syl-check:hover .syl-check__box {
  border-color: rgba(255, 255, 255, 0.5);
}
.syl-check input:checked + .syl-check__box {
  background: var(--fill-solid);
  border-color: rgba(255, 255, 255, 0.5);
}
.syl-check input:checked + .syl-check__box::after {
  opacity: 1;
}
.syl-check input:focus-visible + .syl-check__box {
  outline: 1px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}
/* button follows the site-wide CTA design language (see .cta-banner__btn) */
.ann-modal__btn {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  padding: clamp(14px, 1.3vw, 18px) clamp(32px, 3vw, 48px);
  border: 1px solid var(--line-strong);
  background: var(--fill-solid);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.ann-modal__btn:hover {
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.5);
}
@media (max-width: 640px) {
  .ann-modal__foot { flex-direction: column-reverse; align-items: stretch; }
  .ann-modal__btn { width: 100%; }
}

/* ===== SITE SEARCH (modal + results page, dark site design language) ===== */
.search-overlay {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}
.search-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1;
  color: var(--text-dim);
  transition: color 0.25s ease;
}
.search-modal__close:hover { color: #fff; }
.search-modal__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 3vw, 36px) clamp(20px, 3vw, 40px);
}
.search-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.search-form__row {
  display: flex;
  align-items: stretch;
  gap: 12px;
}
.search-form__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: #fff;
  outline: none;
  caret-color: #fff;
}
.search-form__input:focus { border-color: rgba(255, 255, 255, 0.6); }
.search-form__btn { margin-top: 0; text-align: center; }
.search-empty {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  text-align: center;
  padding: clamp(48px, 6vw, 96px) 0;
}

/* ===== IMAGE ZOOM VIEWER (dark site language, mirrors the announcement modal) ===== */
.image-zoom-overlay {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
}
.image-zoom-modal {
  width: min(1080px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: annRiseIn 0.45s var(--ease-premium) both;
}
.image-zoom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(14px, 2vw, 20px) clamp(20px, 3vw, 32px);
  border-bottom: 1px solid var(--line-strong);
}
.image-zoom-title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(18px, 2vw, 24px);
  color: #fff;
  letter-spacing: 0.02em;
}
.image-zoom-scale {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  white-space: nowrap;
}
.image-zoom-close {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 24px;
  line-height: 1;
  color: var(--text-dim);
  transition: color 0.25s ease;
}
.image-zoom-close:hover { color: #fff; }
.image-zoom-body {
  flex: 1;
  min-height: 0;
  padding: clamp(12px, 2vw, 24px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-zoom-stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.image-zoom-img {
  max-width: 100%;
  max-height: 100%;
  transform-origin: center center;
  will-change: transform;
  display: block;
  transition: transform 0.12s ease-out;
}
.image-zoom-foot {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: clamp(12px, 2vw, 18px) clamp(20px, 3vw, 32px);
  border-top: 1px solid var(--line-strong);
  flex-wrap: wrap;
}
.image-zoom-btn {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  padding: 10px 22px;
  border: 1px solid var(--line-strong);
  background: var(--fill-solid);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.image-zoom-btn:hover {
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.5);
}
@media (max-width: 640px) {
  .image-zoom-modal { max-height: 94vh; }
  .image-zoom-btn { flex: 1; }
}
@media (max-width: 560px) {
  .search-form__row { flex-direction: column; }
  .search-form__btn { width: 100%; }
}

/* ===== SUBSCRIBE VERIFICATION MODAL (dark site design language) ===== */
.syl-sub {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 3vw, 36px) clamp(20px, 3vw, 40px);
}
.syl-sub__desc {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  line-height: 1.8;
}
.syl-sub__email {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-dimmer);
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--fill-ghost);
  word-break: break-all;
}
.syl-sub__row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.syl-sub__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.4em;
  text-align: center;
  color: #fff;
  outline: none;
  caret-color: #fff;
}
.syl-sub__input:focus { border-color: rgba(255, 255, 255, 0.6); }
.syl-sub__input.is-error { border-color: rgba(255, 106, 106, 0.72); }
/* URL field in the hyperlink modal — no letter-spacing, left aligned */
.syl-sub__input--url {
  letter-spacing: 0;
  text-align: left;
  font-size: 13px;
}
.syl-sub__btn {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  padding: 12px 22px;
  border: 1px solid var(--line-strong);
  background: var(--fill-solid);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}
.syl-sub__btn:hover { background: rgba(255, 255, 255, 0.17); border-color: rgba(255, 255, 255, 0.5); }
.syl-sub__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.syl-sub__btn--resend { background: transparent; color: var(--text-dim); }
.syl-sub__btn--resend:hover { background: var(--fill-ghost); }
.syl-sub__error {
  min-height: 16px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #ff8a8a;
}
.syl-sub__foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: clamp(14px, 2vw, 20px) clamp(20px, 3vw, 36px);
  border-top: 1px solid var(--line-strong);
}
@media (max-width: 640px) {
  .syl-sub__foot { flex-direction: column-reverse; align-items: stretch; }
  .syl-sub__foot .ann-modal__btn { width: 100%; }
  .syl-sub__row { flex-direction: column; }
  .syl-sub__btn--resend { width: 100%; }
}

/* ===== TEXT COLOR PALETTE (editor toolbar popover) ===== */
.syl-color-palette {
  position: fixed;
  z-index: 99999;
  display: none;
  width: 228px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  padding: 14px;
}
.syl-color-palette__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.syl-color-palette__swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.syl-color-palette__swatches button {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.syl-color-palette__swatches button:hover {
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.1);
}
.syl-color-palette__custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}
.syl-color-palette__custom input[type="color"] {
  width: 34px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
}

/* ===== ADMIN: login form + security center ===== */
.admin-auth form {
  display: flex;
  flex-direction: column;
  text-align: center;
}

/* login log table (security center) */
.admin-logtable-wrap {
  border: 1px solid var(--line-strong);
  background: var(--fill-ghost);
  overflow-x: auto;
  max-height: 480px;
  overflow-y: auto;
}
.admin-logtable {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12.5px;
  min-width: 720px;
}
.admin-logtable th {
  position: sticky;
  top: 0;
  background: var(--fill-solid);
  backdrop-filter: blur(6px);
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.admin-logtable td {
  padding: 11px 16px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.admin-logtable tr:last-child td { border-bottom: none; }
.admin-logtable td.mono { color: var(--text); white-space: nowrap; }
.admin-logtable td.dim { color: var(--text-dimmer); }
.admin-logtable__empty {
  text-align: center;
  color: var(--text-dimmer);
  padding: 28px 0 !important;
}
.admin-logtable .log-ok,
.admin-logtable .log-fail {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-strong);
  white-space: nowrap;
}
.admin-logtable .log-ok { color: #9fe8b8; border-color: rgba(159, 232, 184, 0.35); background: rgba(159, 232, 184, 0.08); }
.admin-logtable .log-fail { color: #ff8a8a; border-color: rgba(255, 138, 138, 0.35); background: rgba(255, 138, 138, 0.08); }
