/* =========================================================
   6319登录中心 · 共享样式
   深墨蓝基底 / 夜班面板 / 纸层档案 / 信号橙 + 电子青
   ========================================================= */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, figure, blockquote, dl, dd {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

img, svg, picture, video { max-width: 100%; }

button { font: inherit; color: inherit; background: none; border: 0; }

a { color: inherit; }

[hidden] { display: none !important; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #0B1626;
  --panel: #132338;
  --paper: #F4EEE3;
  --orange: #FF7A3D;
  --cyan: #38D6C4;
  --amber: #FFC14D;
  --line: #35506B;
  --text: #E8F0F7;
  --muted: #A9BACB;
  --ink-text: #0B1626;
  --dim: #7C93A8;

  --font-display: "Noto Sans SC", "PingFang SC", system-ui, -apple-system, "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 1180px;
  --gap: clamp(16px, 2.6vw, 32px);
  --radius: 5px;
}

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(53, 80, 107, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 80, 107, 0.075) 1px, transparent 1px);
  background-size: 96px 96px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: clamp(22px, 2.8vw, 30px); }
h3 { font-size: clamp(18px, 2vw, 21px); }

p { line-height: 1.8; }

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

strong { font-weight: 700; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 3px;
}

[id] { scroll-margin-top: 24px; }

::selection {
  background: rgba(56, 214, 196, 0.28);
  color: var(--text);
}

/* ---------- 4. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: -72px;
  left: 16px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--paper);
  color: var(--ink-text);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.16s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ---------- 5. 阅读进度条 ---------- */
.scroll-meter {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  z-index: 250;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--amber) 55%, var(--orange) 100%);
  pointer-events: none;
  transition: transform 0.12s linear;
}

/* ---------- 6. 头部 ---------- */
.site-header {
  position: relative;
  z-index: 120;
  background:
    radial-gradient(120% 180% at 8% -40%, rgba(56, 214, 196, 0.12) 0%, transparent 58%),
    radial-gradient(90% 160% at 96% -60%, rgba(255, 122, 61, 0.1) 0%, transparent 60%),
    var(--ink);
  border-bottom: 1px solid var(--line);
}

.masthead {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 14px var(--gap);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.masthead__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 0 1 auto;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

.brand-mark::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 -5px 0 var(--line), 0 5px 0 var(--line);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--text);
  transition: color 0.16s ease;
}
.brand:hover .brand__name,
.brand:focus-visible .brand__name { color: var(--cyan); }

.brand__batch {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.2;
  color: var(--dim);
}

.status-lamp {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 214, 196, 0.16);
}

/* 移动端导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(19, 35, 56, 0.7);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
}
.nav-toggle[aria-expanded="true"] {
  border-color: var(--orange);
  color: var(--orange);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.nav-toggle__text { line-height: 1; }

/* 主导航 */
.site-nav { margin-left: auto; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.site-nav__item { display: block; }

.site-nav a {
  display: inline-block;
  padding: 8px 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  border-radius: 3px 3px 0 0;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  border-bottom-color: var(--line);
  background: rgba(19, 35, 56, 0.65);
}
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--orange);
}

/* 状态窄条 */
.status-strip {
  border-top: 1px solid rgba(53, 80, 107, 0.75);
  background: linear-gradient(90deg, rgba(19, 35, 56, 0.92) 0%, rgba(11, 22, 38, 0.92) 100%);
}

.status-strip__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 9px var(--gap);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  justify-content: space-between;
}

.checkin {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.checkin__lamp {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 214, 196, 0.14);
}

.checkin__text { white-space: nowrap; }

.checkin__code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--cyan);
  border: 1px solid rgba(56, 214, 196, 0.35);
  border-radius: 3px;
  padding: 1px 6px;
  white-space: nowrap;
}

.status-strip__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.status-strip__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- 7. 通用元素 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gap);
}

.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: minmax(0, 1fr);
}
.grid--2 { grid-template-columns: minmax(0, 1fr); }
.grid--3 { grid-template-columns: minmax(0, 1fr); }
.grid--split { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* 面板 */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 28px);
}

.panel--paper {
  background: var(--paper);
  color: var(--ink-text);
  border-color: rgba(11, 22, 38, 0.16);
  box-shadow:
    0 2px 0 rgba(11, 22, 38, 0.35),
    0 14px 28px -22px rgba(0, 0, 0, 0.95);
}
.panel--paper h2,
.panel--paper h3,
.panel--paper h4 { color: var(--ink-text); }
.panel--paper a { color: #0F5C57; }
.panel--paper a:hover { color: #0B1626; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(19, 35, 56, 0.6);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}
.btn:hover,
.btn:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(56, 214, 196, 0.08);
}

.btn--signal {
  border-color: rgba(255, 122, 61, 0.5);
  color: var(--orange);
}
.btn--signal:hover,
.btn--signal:focus-visible {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(255, 122, 61, 0.1);
}

.btn--paper {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink-text);
}
.btn--paper:hover,
.btn--paper:focus-visible {
  background: #FFFFFF;
  border-color: var(--cyan);
  color: var(--ink-text);
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(11, 22, 38, 0.5);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--muted);
  white-space: nowrap;
}

.tag--cyan {
  color: var(--cyan);
  border-color: rgba(56, 214, 196, 0.45);
  background: rgba(56, 214, 196, 0.08);
}

.tag--orange {
  color: var(--orange);
  border-color: rgba(255, 122, 61, 0.45);
  background: rgba(255, 122, 61, 0.08);
}

.tag--amber {
  color: var(--amber);
  border-color: rgba(255, 193, 77, 0.45);
  background: rgba(255, 193, 77, 0.08);
}

/* 眉标与索引号 */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.6;
}
.eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 22px;
  height: 1px;
  background: var(--line);
}

.index-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--orange);
  line-height: 1.6;
}

/* 面包屑 */
.breadcrumb { font-size: 13px; color: var(--muted); }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumb li + li::before {
  content: "/";
  color: var(--line);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s ease;
}
.breadcrumb a:hover,
.breadcrumb a:focus-visible { color: var(--cyan); }

.breadcrumb [aria-current="page"] { color: var(--text); }

/* 正文容器 */
.prose {
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.8;
  color: #D6E2EC;
}
.prose p + p { margin-top: 1.1em; }
.prose a {
  color: var(--cyan);
  text-decoration-color: rgba(56, 214, 196, 0.45);
}
.prose a:hover { text-decoration-color: var(--cyan); }

/* 图片容器基础 */
.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.media > img,
.media > svg,
.media > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--wide { aspect-ratio: 21 / 9; }

.media--paper {
  background: var(--paper);
  border-color: rgba(11, 22, 38, 0.18);
}

.media--grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(53, 80, 107, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 80, 107, 0.4) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.55;
  pointer-events: none;
}

.media__caption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--dim);
  line-height: 1.6;
}

/* 隐藏文本 */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 8. 页脚档案抽屉 ---------- */
.site-footer {
  margin-top: clamp(48px, 7vw, 96px);
  background:
    radial-gradient(100% 140% at 0% 0%, rgba(56, 214, 196, 0.07) 0%, transparent 55%),
    linear-gradient(180deg, #0B1626 0%, #0D1A2B 100%);
  border-top: 1px solid var(--line);
  color: var(--text);
}

.footer__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(26px, 4vw, 46px) var(--gap) clamp(22px, 3vw, 34px);
}

.footer__brandrow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: clamp(16px, 2.4vw, 24px);
}

.footer__mark {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 214, 196, 0.14);
}

.footer__name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.footer__batch {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

/* 抽屉主体 */
.drawer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(19, 35, 56, 0.7);
  overflow: hidden;
}

.drawer__handle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  width: 100%;
  padding: 14px 18px;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(90deg, rgba(19, 35, 56, 0.95) 0%, rgba(11, 22, 38, 0.55) 100%);
  border-bottom: 1px solid transparent;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}
.drawer__handle:hover,
.drawer__handle:focus-visible {
  background: rgba(19, 35, 56, 1);
  border-bottom-color: var(--line);
}
.drawer[data-open="true"] .drawer__handle {
  border-bottom-color: var(--line);
}

.drawer__title {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.drawer__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 22, 38, 0.55);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
  white-space: nowrap;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.drawer__handle:hover .chip { border-color: rgba(56, 214, 196, 0.4); color: var(--text); }

.drawer__arrow {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.24s ease, border-color 0.16s ease;
}
.drawer[data-open="true"] .drawer__arrow {
  transform: rotate(-135deg) translate(-2px, -2px);
  border-color: var(--orange);
}

.drawer__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.24s ease;
}
.drawer[data-open="true"] .drawer__body {
  grid-template-rows: 1fr;
}

.drawer__bodyinner {
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear 0.24s;
}
.drawer[data-open="true"] .drawer__bodyinner {
  visibility: visible;
  transition-delay: 0s;
}

.drawer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px, 3vw, 32px);
  padding: clamp(18px, 2.6vw, 28px);
}

@media (min-width: 640px) {
  .drawer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .drawer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.drawer__group { min-width: 0; }

.drawer__gtitle {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  line-height: 1.6;
}

.drawer__list {
  display: grid;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.drawer__list a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.drawer__list a:hover,
.drawer__list a:focus-visible {
  color: var(--cyan);
  border-bottom-color: rgba(56, 214, 196, 0.5);
}

.drawer__meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  line-height: 1.5;
}

/* 页脚底栏 */
.footer__base {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 15px var(--gap) 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  border-top: 1px solid rgba(53, 80, 107, 0.55);
  font-size: 12.5px;
  color: var(--dim);
}

.footer__copy { line-height: 1.6; }

.footer__legal {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  line-height: 1.6;
}

/* ---------- 9. 响应式 ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .masthead__brand { flex: 1 1 auto; }

  .site-nav {
    flex: 1 0 100%;
    display: none;
    margin-left: 0;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(53, 80, 107, 0.8);
  }

  .site-nav[data-open="true"] { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .site-nav__item { width: 100%; }

  .site-nav a {
    display: block;
    width: 100%;
    padding: 11px 12px;
    font-size: 15px;
    border-bottom: 0;
    border-left: 2px solid transparent;
    border-radius: 4px;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    background: rgba(19, 35, 56, 0.95);
    border-left-color: var(--line);
    border-bottom-color: transparent;
  }

  .site-nav a[aria-current="page"] {
    background: rgba(255, 122, 61, 0.09);
    border-left-color: var(--orange);
    border-bottom-color: transparent;
    color: var(--text);
  }

  .status-strip__inner { gap: 8px 12px; }

  .footer__base { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .masthead { padding-block: 12px; }

  .brand__name { font-size: 16.5px; }

  .status-strip__actions { width: 100%; }
  .status-strip__actions .btn { width: 100%; }

  .checkin { font-size: 12.5px; }

  .drawer__handle { padding: 13px 14px; }
  .drawer__arrow { margin-left: 0; }
}

/* ---------- 10. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }

  .scroll-meter { transition: none; }
  .drawer__body { transition: none; }
  .drawer__arrow { transition: none; }
}
