/* =========================================================
   晨羽智脑 ChenYu Brain — Official Site
   Aesthetic: "晨白 · Ink Blue" — pure-white canvas, graphite
   ink for structure, one chromatic voice: refined ink blue
   (#3358E0, echoes the app 冷白 skin). Two ink-charcoal anchors
   (private-deployment band + footer) carry a cool blue undertone.
   Colors as hex/rgba for broad compatibility (incl. UOS Chrome 93).
   ========================================================= */

:root {
  /* paper / ink — pure-white canvas, cool-neutral graphite ink */
  --paper:    #FFFFFF;
  --paper-2:  #F6F8FA;
  --paper-3:  #EEF1F4;
  --ink:      #1A1C20;
  --ink-2:    #51555E;
  --ink-3:    #8A8F99;
  --line:     rgba(20, 22, 26, .085);
  --line-2:   rgba(20, 22, 26, .15);

  /* graphite brand — structural ink (text, neutral marks) */
  --brand:        #383C44;
  --brand-ink:    #2A2D34;
  --brand-bright: #4C515B;
  --brand-soft:   #DBDEE3;
  --brand-line:   rgba(56, 60, 68, .40);

  /* accent — refined ink blue, the site's single chromatic voice */
  --accent:        #3358E0;
  --accent-ink:    #2546C8;   /* deeper, button gradient end */
  --accent-bright: #4F72EC;   /* lighter, gradient start */
  --accent-on-dark:#8AA2F0;   /* legible blue on dark surfaces */
  --accent-soft:   #ECF0FD;   /* pale blue fill */
  --accent-line:   rgba(51, 88, 224, .38);

  /* deep / dark sections — cool ink-charcoal (faint blue undertone) */
  --night:    #141726;
  --night-2:  #1B1E2E;
  --night-3:  #262A3B;
  --cream:    #F4F5F7;
  --cream-2:  rgba(244, 245, 247, .66);
  --cream-3:  rgba(244, 245, 247, .42);
  --on-dark-soft: #A8AEBA;

  --shell: 1180px;
  --pad: clamp(20px, 5vw, 56px);

  --font-display: "Fraunces", "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.12; font-weight: 600; letter-spacing: -.01em; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--pad); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 8px;
  font-size: .9rem; transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- film grain (whisper-faint on white) ---------- */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-body); font-weight: 500; font-size: .95rem;
  padding: .72em 1.35em; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .25s var(--ease), background .25s var(--ease),
              color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn-lg { font-size: 1.02rem; padding: .92em 1.7em; }
.btn-solid {
  background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 60%, var(--accent-ink) 130%);
  color: #fff; box-shadow: 0 10px 26px -12px rgba(51, 88, 224, .55);
}
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(51, 88, 224, .68); }
.btn-line { border-color: var(--line-2); color: var(--ink); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { color: var(--accent); }

/* on dark surfaces */
.on-dark .btn-line { border-color: var(--cream-3); color: var(--cream); }
.on-dark .btn-line:hover { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.site-header.scrolled {
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 40px -30px rgba(20, 22, 26, .45);
}

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { display: inline-flex; }
.brand-mark img { height: 34px; width: auto; display: block; }
.footer-brand .brand-mark img { height: 30px; }
.brand-name {
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem;
  letter-spacing: .02em; color: var(--ink); line-height: 1; display: flex; align-items: baseline; gap: 9px;
  transition: color .3s var(--ease);
}
.brand-sub {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); font-weight: 500;
}

.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a {
  font-size: .94rem; color: var(--ink-2); position: relative; padding: 4px 0;
  transition: color .25s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1.5px;
  background: var(--accent); transition: width .3s var(--ease);
}
.nav a:hover { color: var(--accent); }
.nav a:hover::after { width: 100%; }

.header-cta { display: flex; align-items: center; gap: 12px; }
.site-header .header-cta .btn-ghost { color: var(--ink-2); }
.site-header .header-cta .btn-ghost:hover { color: var(--accent); }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; background: none; border: 0;
  cursor: pointer; flex-direction: column; gap: 5px; align-items: center; justify-content: center;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column; gap: 4px;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  padding: 14px var(--pad) 26px; border-top: 1px solid var(--line);
  box-shadow: 0 24px 40px -28px rgba(20, 22, 26, .4);
}
.mobile-nav a { color: var(--ink); padding: 13px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
.mobile-nav .btn { margin-top: 14px; justify-content: center; border: 0; }
.mobile-nav.open { display: flex; }

/* ---------- hero (light) ---------- */
.hero { position: relative; isolation: isolate; padding-bottom: 60px; overflow: hidden; }
.hero-sky {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 80% at 50% 116%, rgba(51, 88, 224, .07), rgba(51, 88, 224, 0) 60%),
    radial-gradient(86% 64% at 82% -12%, rgba(51, 88, 224, .045), transparent 56%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfe 56%, #f3f6fc 100%);
}
.sun {
  position: absolute; left: 50%; bottom: -300px; width: 640px; height: 640px;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(51, 88, 224, .07), rgba(51, 88, 224, .025) 40%, rgba(51, 88, 224, 0) 70%);
  filter: blur(3px); animation: breathe 9s var(--ease) infinite;
}
@keyframes breathe { 0%, 100% { opacity: .85; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.04); } }
.constellation { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 1; }
.constellation .nodes circle { animation: twinkle 6s ease-in-out infinite; }
.constellation .nodes circle:nth-child(2n) { animation-delay: 1.4s; }
.constellation .nodes circle:nth-child(3n) { animation-delay: 2.8s; }
.constellation .nodes circle:nth-child(5n) { animation-delay: 4.1s; }
@keyframes twinkle { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

.hero-inner { padding-top: clamp(130px, 20vh, 200px); text-align: center; }
.eyebrow {
  font-family: var(--font-mono); font-size: .76rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); display: inline-block;
}
.eyebrow-on-dark { color: var(--accent); }
.hero-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.95rem, 6.5vw, 5.4rem); line-height: 1.08; letter-spacing: -.022em;
  color: var(--ink); margin: 22px auto 0; max-width: 16ch;
  font-optical-sizing: auto; overflow-wrap: break-word;
}
.accent-line {
  font-family: "Noto Serif SC", var(--font-display); font-weight: 700;
  background: linear-gradient(100deg, var(--accent-bright) 0%, var(--accent-ink) 55%, var(--accent-bright) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--accent);
}
.hero-lede {
  max-width: 64ch; margin: 26px auto 0; font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  line-height: 1.75; color: var(--ink-2);
}
.hero-lede strong { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-top: clamp(56px, 9vw, 96px);
  background: var(--line); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden;
}
.stat { background: var(--paper); padding: 30px 24px; text-align: center; }
.stat-num {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 3vw, 2.5rem);
  color: var(--accent); line-height: 1; letter-spacing: -.01em;
}
.stat-num span { color: var(--accent-bright); }
.stat-label { font-size: .86rem; color: var(--ink-2); margin-top: 10px; line-height: 1.5; }

.dawn-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: -1;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--paper)); }

/* ---------- generic section ---------- */
.section { position: relative; padding: clamp(78px, 10vw, 138px) 0; }
.section-sand { background: var(--paper-2); }
.section-head { max-width: 760px; margin-bottom: clamp(44px, 6vw, 72px); }
.sec-no {
  font-family: var(--font-mono); font-size: .76rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); display: inline-block; margin-bottom: 18px;
  padding-bottom: 7px; border-bottom: 1px solid var(--accent-line);
}
.sec-no-dark { color: var(--accent-on-dark); border-bottom-color: rgba(138, 162, 240, .32); }
.section-title {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.015em;
  font-size: clamp(1.85rem, 3.6vw, 3rem); color: var(--ink);
}
.section-title-light { color: var(--cream); }
.section-lede { margin-top: 18px; font-size: clamp(1rem, 1.3vw, 1.14rem); color: var(--ink-2); max-width: 56ch; }
.section-lede-light { color: var(--cream-2); }
.br-d { display: none; }
@media (min-width: 720px) { .br-d { display: inline; } }

/* ---------- capabilities ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cap-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 32px 28px 30px; position: relative; overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.cap-card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent-bright), var(--accent-ink)); transition: width .4s var(--ease);
}
.cap-card:hover { transform: translateY(-5px); border-color: var(--accent-line); box-shadow: 0 24px 50px -34px rgba(51, 88, 224, .32); }
.cap-card:hover::before { width: 100%; }
.cap-ico {
  display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px;
  border-radius: 14px; color: var(--accent);
  background: linear-gradient(150deg, rgba(51, 88, 224, .1), rgba(51, 88, 224, .035));
  border: 1px solid rgba(51, 88, 224, .2); margin-bottom: 20px;
}
.cap-card h3 { font-family: var(--font-display); font-size: 1.32rem; font-weight: 600; color: var(--ink); }
.cap-card p { margin-top: 11px; color: var(--ink-2); font-size: .97rem; line-height: 1.7; }

/* ---------- flow ---------- */
.flow {
  list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px;
  counter-reset: none;
}
.flow-step { position: relative; padding-top: 30px; border-top: 1px solid var(--line-2); }
.flow-step::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 46px; height: 3px; background: linear-gradient(90deg, var(--accent-bright), var(--accent-ink));
}
.flow-no { font-family: var(--font-mono); font-size: .92rem; color: var(--accent); letter-spacing: .1em; }
.flow-step h3 { font-family: var(--font-display); font-size: 1.4rem; margin-top: 12px; color: var(--ink); }
.flow-step p { margin-top: 10px; color: var(--ink-2); font-size: .96rem; line-height: 1.7; }

/* ---------- tech (dark) ---------- */
.section-dark { background: var(--night); color: var(--cream); overflow: hidden; }
.section-dark::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(70% 60% at 88% 6%, rgba(79, 114, 236, .18), transparent 60%),
              radial-gradient(80% 70% at 8% 100%, rgba(79, 114, 236, .1), transparent 58%);
}
.section-dark .shell { position: relative; z-index: 1; }
.feather-watermark { position: absolute; right: 2%; top: 50%; transform: translateY(-50%); z-index: 0; opacity: .9; pointer-events: none; }
.tech-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tech-card {
  border: 1px solid rgba(244, 245, 247, .12); border-radius: 16px; padding: 30px 28px;
  background: linear-gradient(160deg, rgba(244, 245, 247, .05), rgba(244, 245, 247, .015));
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}
.tech-card:hover { transform: translateY(-4px); border-color: rgba(138, 162, 240, .42); background: linear-gradient(160deg, rgba(79, 114, 236, .12), rgba(79, 114, 236, .03)); }
.tech-card h3 { font-family: var(--font-display); font-size: 1.3rem; color: var(--cream); display: flex; align-items: center; gap: 10px; }
.tech-card h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-on-dark); box-shadow: 0 0 12px rgba(138, 162, 240, .85); flex: none; }
.tech-card p { margin-top: 12px; color: var(--cream-2); font-size: .97rem; line-height: 1.72; }

/* ---------- cases ---------- */
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.case-card {
  border: 1px solid var(--line); border-radius: 18px; padding: 34px 32px; background: var(--paper);
  position: relative; transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.case-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: 0 24px 50px -34px rgba(51, 88, 224, .3); }
.case-card h3 { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); padding-left: 18px; position: relative; }
.case-card h3::before { content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: 4px; border-radius: 4px; background: linear-gradient(var(--accent-bright), var(--accent-ink)); }
.case-card p { margin-top: 14px; color: var(--ink-2); font-size: .98rem; line-height: 1.72; }

/* ---------- faq ---------- */
.faq-shell { max-width: 880px; }
.faq { border-top: 1px solid var(--line-2); }
.faq-item { border-bottom: 1px solid var(--line-2); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 24px 44px 24px 0; position: relative;
  font-family: var(--font-display); font-size: clamp(1.08rem, 1.7vw, 1.32rem); font-weight: 600; color: var(--ink);
  transition: color .25s var(--ease);
}
.faq-item summary:hover { color: var(--accent); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 13px; height: 13px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: translateY(-65%) rotate(45deg); transition: transform .3s var(--ease);
}
.faq-item[open] summary::after { transform: translateY(-35%) rotate(-135deg); }
.faq-body { padding: 0 44px 26px 0; }
.faq-body p { color: var(--ink-2); font-size: 1rem; line-height: 1.75; }
.faq-item[open] .faq-body { animation: faqIn .4s var(--ease); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- cta (light, bookends the hero) ---------- */
.cta { position: relative; isolation: isolate; padding: clamp(90px, 13vw, 160px) 0; overflow: hidden; text-align: center; }
.cta-sky {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(110% 90% at 50% 120%, rgba(51, 88, 224, .07), rgba(51, 88, 224, 0) 60%),
    linear-gradient(180deg, #f3f6fc 0%, #ffffff 62%);
}
.sun-sm { width: 540px; height: 480px; bottom: -260px; }
.cta-inner { position: relative; }
.cta-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.75rem, 4.6vw, 3.6rem); color: var(--ink); margin-top: 18px; letter-spacing: -.02em; overflow-wrap: break-word; }
.cta-lede { max-width: 52ch; margin: 20px auto 0; color: var(--ink-2); font-size: clamp(1rem, 1.4vw, 1.16rem); line-height: 1.75; }

/* ---------- footer (dark anchor) ---------- */
.site-footer { background: var(--night); color: var(--cream); padding-top: clamp(56px, 7vw, 84px); position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 52px; }
.footer-brand .brand-name { color: var(--cream); }
.footer-brand .brand-sub { color: var(--accent-on-dark); }
.footer-tag { margin-top: 18px; color: var(--cream-2); font-size: .94rem; line-height: 1.7; max-width: 34ch; }
.footer-col h4 { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-on-dark); margin-bottom: 16px; font-weight: 500; }
.footer-col a { display: block; color: var(--cream-2); font-size: .95rem; padding: 7px 0; transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 24px 0 30px; border-top: 1px solid rgba(244, 245, 247, .12);
  font-size: .84rem; color: var(--cream-3);
}
.footer-bottom a { color: var(--cream-2); }
.footer-bottom a:hover { color: var(--accent-on-dark); }
.footer-icp a { color: var(--cream-3); }

/* ---------- reveal animation ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(22px); }
html.js [data-reveal].is-visible {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--d, 0s);
}

/* ---------- focus ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .feather-watermark { display: none; }
}
@media (max-width: 640px) {
  .header-inner { height: 64px; }
  .cap-grid, .flow, .tech-grid, .case-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .hero-br { display: none; }
  .hero-inner { padding-top: clamp(108px, 18vh, 150px); }
}

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .sun, .constellation .nodes circle { animation: none !important; }
  .btn:hover, .cap-card:hover, .case-card:hover, .tech-card:hover { transform: none; }
}

@media print {
  .grain, .hero-sky, .cta-sky, .site-header, .nav-toggle { display: none !important; }
  body { color: #000; background: #fff; }
}

/* ============================================================
 *  运维管理：口令弹窗 / 下载页（Chrome 93 安全：仅 hex/rgba）
 * ============================================================ */
.mono { font-family: var(--font-mono); }

/* ---------- 口令弹窗（首页页脚触发） ---------- */
.ops-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; transition: opacity .2s var(--ease);
}
.ops-modal[hidden] { display: none; }
.ops-modal.is-open { opacity: 1; }
.ops-modal-backdrop {
  position: absolute; inset: 0; background: rgba(20, 22, 26, .55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.ops-modal-card {
  position: relative; width: 100%; max-width: 420px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 20px; padding: 34px 30px 30px;
  box-shadow: 0 40px 90px -40px rgba(20, 22, 26, .55);
  transform: translateY(10px) scale(.985); transition: transform .22s var(--ease);
}
.ops-modal.is-open .ops-modal-card { transform: none; }
.ops-modal.shake .ops-modal-card { animation: ops-shake .4s var(--ease); }
@keyframes ops-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
.ops-modal-x {
  position: absolute; top: 14px; right: 16px; width: 32px; height: 32px;
  border: 0; background: transparent; color: var(--ink-3); cursor: pointer;
  font-size: 1.5rem; line-height: 1; border-radius: 8px; transition: color .2s var(--ease);
}
.ops-modal-x:hover { color: var(--ink); }
.ops-modal-title { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; color: var(--ink); margin-top: 12px; }
.ops-modal-lede { margin-top: 10px; color: var(--ink-2); font-size: .94rem; line-height: 1.7; }
.ops-modal-form { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.ops-modal-input {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 12px;
  padding: .8em 1em; transition: border-color .2s var(--ease), background .2s var(--ease);
}
.ops-modal-input::placeholder { color: var(--ink-3); }
.ops-modal-input:focus { outline: none; border-color: var(--accent); background: var(--paper); }
.ops-modal-err { color: #C0392B; font-size: .86rem; margin: -2px 0 0; }
.ops-modal-submit { justify-content: center; margin-top: 4px; }
body.ops-modal-open { overflow: hidden; }

/* ---------- 下载页骨架 ---------- */
.ops-section { padding-top: clamp(104px, 12vw, 150px); }
.ops-section .section-head { margin-bottom: clamp(32px, 5vw, 52px); }
.ops-section .section-lede code { color: var(--accent-ink); }

/* 闸门 / 内容 的显隐由 html.ops-ok 决定（无 JS 默认展示闸门） */
.ops-gate { display: block; }
.ops-content { display: none; }
html.ops-ok .ops-gate { display: none; }
html.ops-ok .ops-content { display: block; }

.ops-gate-card {
  max-width: 440px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 20px; padding: 38px 34px 32px;
  box-shadow: 0 30px 70px -46px rgba(20, 22, 26, .4);
}
.ops-gate-title { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; color: var(--ink); margin-top: 12px; }
.ops-gate-lede { margin-top: 10px; color: var(--ink-2); font-size: .96rem; line-height: 1.7; }
.ops-gate-back { margin-top: 18px; font-size: .9rem; }
.ops-gate-back a { color: var(--ink-3); }
.ops-gate-back a:hover { color: var(--accent); }

/* ---------- 下载卡片 ---------- */
.dl-status { color: var(--ink-2); font-size: .98rem; }
.dl-status-err {
  color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 12px; padding: 16px 18px; line-height: 1.7;
}
.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.dl-card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 28px 26px; transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.dl-card:hover { border-color: var(--accent-line); box-shadow: 0 24px 50px -34px rgba(51, 88, 224, .28); }
.dl-card-empty { opacity: .72; }
.dl-card-empty:hover { border-color: var(--line); box-shadow: none; }
.dl-card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dl-tag {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: 999px; padding: 4px 11px;
}
.dl-name { font-family: var(--font-display); font-weight: 600; font-size: 1.32rem; color: var(--ink); }
.dl-desc { margin-top: 12px; color: var(--ink-2); font-size: .95rem; line-height: 1.7; }
.dl-meta { margin-top: 20px; display: flex; flex-direction: column; gap: 9px; }
.dl-meta > div { display: flex; gap: 12px; font-size: .9rem; align-items: baseline; }
.dl-meta dt { flex: 0 0 44px; color: var(--ink-3); font-family: var(--font-mono); font-size: .76rem; letter-spacing: .04em; }
.dl-meta dd { color: var(--ink); }
.dl-meta-file dd { word-break: break-all; }
.dl-sha {
  margin-top: 18px; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px;
}
.dl-sha-label { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.dl-sha-val { flex: 1 1 100%; word-break: break-all; font-size: .76rem; line-height: 1.55; color: var(--ink-2); }
.dl-sha-copy {
  flex: 0 0 auto; font-family: var(--font-body); font-size: .8rem; cursor: pointer;
  color: var(--accent); background: transparent; border: 1px solid var(--accent-line);
  border-radius: 999px; padding: 4px 14px; transition: background .2s var(--ease), color .2s var(--ease);
}
.dl-sha-copy:hover { background: var(--accent-soft); }
.dl-sha-copy.is-ok { color: #1F8A53; border-color: rgba(31, 138, 83, .4); }
.dl-btn { align-self: flex-start; margin-top: 22px; }
.dl-empty-note { margin-top: 20px; color: var(--ink-3); font-size: .92rem; font-style: italic; }
.dl-foot { margin-top: 28px; color: var(--ink-3); font-size: .86rem; line-height: 1.7; }
.dl-foot code { color: var(--ink-2); }

@media (max-width: 760px) {
  .dl-grid { grid-template-columns: 1fr; }
  .ops-gate-card { padding: 30px 24px 26px; }
}
