@charset "utf-8";
/* ==========================================================================
   大方学习空间 · 全站样式表
   完全本地化的设计系统，不依赖任何外部 CDN
   ========================================================================== */

:root {
  --brand: #c80a14;
  --brand-dark: #a8080f;
  --brand-soft: rgba(200, 10, 20, .08);
  --it: #2563eb;
  --it-soft: rgba(37, 99, 235, .08);

  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #475569;
  --muted: #64748b;
  --faint: #94a3b8;

  --line: #e2e8f0;
  --line-2: #f1f5f9;
  --soft: #f8fafc;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .07);
  --shadow-lg: 0 18px 44px rgba(15, 23, 42, .10);

  --wrap: 1120px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink-2);
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
b, strong { font-weight: 600; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   顶部导航
   ========================================================================== */

.hd {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-2);
}

.hd-in {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}

.brand-txt {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  font-size: 14px;
  color: var(--ink-3);
}

.nav a {
  position: relative;
  padding: 4px 0;
  transition: color .18s;
}

.nav a:hover { color: var(--brand); }
.nav a.on { color: var(--brand); font-weight: 600; }
.nav a.on::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

.nav a.is-it:hover,
.nav a.is-it.on { color: var(--it); }
.nav a.is-it.on::after { background: var(--it); }

.user-slot {
  display: flex;
  align-items: center;
  margin-left: 4px;
  font-size: 13px;
  color: var(--faint);
  white-space: nowrap;
}

@media (min-width: 861px) {
  .user-slot {
    padding-left: 18px;
    border-left: 1px solid var(--line);
  }
}

.user-slot .u-meta { color: var(--faint); margin-right: 8px; }
.user-slot .u-name { color: var(--ink); font-weight: 600; }
.user-slot .u-out {
  color: var(--faint);
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  transition: color .18s;
}
.user-slot .u-out:hover { color: var(--brand); }
.user-slot .u-login { color: var(--it); }

/* 移动端菜单 */
.nav-tog { display: none; }
.nav-btn {
  display: none;
  margin-left: auto;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-btn { display: flex; }
  .nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px 20px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav a {
    padding: 12px 2px;
    border-bottom: 1px solid var(--line-2);
    font-size: 15px;
  }
  .nav a:last-child { border-bottom: 0; }
  .nav a.on::after { display: none; }
  .nav-tog:checked ~ .nav { display: flex; }
  .user-slot { margin-left: 0; font-size: 12.5px; }
  .user-slot .u-sep { margin: 0 4px; }
  .brand-txt { display: none; }
}

/* ==========================================================================
   按钮
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(200, 10, 20, .22);
}
.btn-primary:hover { background: var(--brand-dark); }

.btn-it {
  background: var(--it);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .22);
}
.btn-it:hover { background: #1d4ed8; }

.btn-ghost {
  border-color: var(--line);
  color: var(--ink-3);
  background: #fff;
}
.btn-ghost:hover { border-color: #cbd5e1; background: var(--soft); }

.btn-mini {
  padding: 8px 18px;
  font-size: 13px;
}

/* ==========================================================================
   首页 · 首屏
   ========================================================================== */

.home-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-2);
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 100%);
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.blob-a {
  top: -128px; right: -96px;
  width: 420px; height: 420px;
  background: rgba(200, 10, 20, .06);
}
.blob-b {
  bottom: -160px; left: -128px;
  width: 380px; height: 380px;
  background: rgba(37, 99, 235, .06);
}

.home-hero-in {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 64px 20px 56px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .22em;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.home-hero h1 {
  font-size: 30px;
  line-height: 1.28;
  letter-spacing: -.01em;
}

.home-hero .lead {
  margin: 20px auto 0;
  max-width: 620px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

@media (min-width: 768px) {
  .brand-txt { display: inline; }
  .home-hero-in { padding: 88px 20px 76px; }
  .home-hero h1 { font-size: 46px; line-height: 1.25; }
  .home-hero .lead { font-size: 17px; margin-top: 24px; }
  .hero-actions { margin-top: 40px; }
  .eyebrow { font-size: 12px; }
}

/* ==========================================================================
   首页 · 学科卡
   ========================================================================== */

.subj-wrap { padding-top: 40px; }

.subj-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-bottom: 64px;
}

@media (min-width: 768px) {
  .subj-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: 80px; }
}

.subj-card {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.subj-card:hover { transform: translateY(-3px); }
.subj-card.chem:hover { border-color: rgba(200, 10, 20, .32); box-shadow: var(--shadow-lg); }
.subj-card.it:hover { border-color: rgba(37, 99, 235, .32); box-shadow: var(--shadow-lg); }

.subj-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.subj-ic {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.subj-ic svg { width: 24px; height: 24px; }
.chem .subj-ic { background: var(--brand-soft); color: var(--brand); }
.it .subj-ic { background: var(--it-soft); color: var(--it); }

.subj-name { font-size: 20px; font-weight: 700; color: var(--ink); }
.subj-en {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--faint);
  text-transform: uppercase;
}

.subj-arrow {
  margin-left: auto;
  flex-shrink: 0;
  margin-top: 4px;
  width: 20px; height: 20px;
  color: #cbd5e1;
  transition: color .2s, transform .2s;
}
.subj-card:hover .subj-arrow { transform: translateX(2px); }
.chem:hover .subj-arrow { color: var(--brand); }
.it:hover .subj-arrow { color: var(--it); }

.subj-desc {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.75;
}

.subj-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-3);
}

.subj-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.subj-list .dot {
  margin-top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chem .subj-list .dot { background: var(--brand); }
.it .subj-list .dot { background: var(--it); }

.subj-list b { color: #1e293b; }
.subj-list .sp { color: #94a3b8; padding: 0 6px; }

.subj-foot {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
.chem .subj-foot { color: var(--brand); }
.it .subj-foot { color: var(--it); }
.subj-foot svg { width: 16px; height: 16px; transition: transform .2s; }
.subj-card:hover .subj-foot svg { transform: translateX(2px); }

.subj-note {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.subj-note a {
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #cbd5e1;
  text-underline-offset: 3px;
  transition: color .18s, text-decoration-color .18s;
}
.subj-note a:hover { color: var(--it); text-decoration-color: var(--it); }

/* ==========================================================================
   首页 · 能力条
   ========================================================================== */

.cap-bar {
  background: var(--soft);
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}

.cap-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 56px 20px;
}

@media (min-width: 640px) {
  .cap-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

.cap-ic {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  margin-bottom: 16px;
}
.cap-ic svg { width: 18px; height: 18px; }

.cap-item h3 { font-size: 15px; }
.cap-item p {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.75;
}

/* ==========================================================================
   内容页 · 页头
   ========================================================================== */

.phero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-2);
  background: var(--soft);
}

.phero .grid-bg { opacity: .9; }

.phero-in {
  position: relative;
  z-index: 1;
  padding: 52px 20px 48px;
  max-width: 780px;
}

.phero .eyebrow { margin-bottom: 14px; }
.phero h1 { font-size: 30px; }
.phero .lead {
  margin-top: 14px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 660px;
}
.phero .actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }

.phero-it .eyebrow { color: var(--it); }
.phero-it .blob-a { background: rgba(37, 99, 235, .07); }

@media (min-width: 768px) {
  .phero-in { padding: 76px 20px 68px; max-width: var(--wrap); }
  .phero h1 { font-size: 42px; }
  .phero .lead { font-size: 16.5px; margin-top: 18px; }
  .phero .actions { margin-top: 32px; }
}

/* ==========================================================================
   区块与标题
   ========================================================================== */

.sec { padding: 44px 0; }
.sec-soft { background: var(--soft); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }

@media (min-width: 768px) {
  .sec { padding: 68px 0; }
}

.sec-head { text-align: center; max-width: 680px; margin: 0 auto 32px; }
.sec-head h2 { font-size: 22px; }
.sec-head p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}

@media (min-width: 768px) {
  .sec-head { margin-bottom: 44px; }
  .sec-head h2 { font-size: 30px; }
  .sec-head p { font-size: 15.5px; }
}

/* 图文两栏 */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}
@media (min-width: 768px) {
  .split { grid-template-columns: 1fr 1fr; gap: 48px; }
}

.split-txt p {
  font-size: 14.5px;
  color: var(--ink-3);
  line-height: 1.85;
}
.split-txt p + p { margin-top: 14px; }

/* 图文块的视觉替身（不依赖外部图片） */
.visual {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, var(--soft) 100%);
  border: 1px solid var(--line);
  padding: 28px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.visual > * { position: relative; }

.v-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.v-row .v-ic {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  flex-shrink: 0;
}
.visual-it .v-row .v-ic { background: var(--it-soft); color: var(--it); }
.v-row .v-ic svg { width: 15px; height: 15px; }
.v-row .v-t { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.v-row .v-d { font-size: 12px; color: var(--faint); margin-left: auto; }

/* 四宫格小卡 */
.mini-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 20px;
}
@media (min-width: 560px) {
  .mini-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
}

.mini {
  background: var(--soft);
  border-radius: var(--r-md);
  padding: 16px 18px;
  border: 1px solid transparent;
  transition: border-color .2s, background-color .2s;
}
.mini:hover { border-color: var(--line); background: #fff; }
.mini h3 { font-size: 14px; margin-bottom: 4px; }
.mini p { font-size: 12.5px; color: var(--muted); line-height: 1.7; }

/* 三栏卡 */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #dbe3ec; }
.card h3 { font-size: 15.5px; margin-bottom: 8px; }
.card p { font-size: 13.5px; color: var(--muted); line-height: 1.8; }

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.card-tag.it { color: var(--it); background: var(--it-soft); }

/* 步骤条 */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
}
.step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.step h3 { font-size: 15.5px; margin-bottom: 6px; }
.step p { font-size: 13.5px; color: var(--muted); line-height: 1.8; }

/* 带点的要点列表 */
.dots { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.dots li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--ink-3);
}
.dots li::before {
  content: "";
  margin-top: 8px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

/* 学科中心用的双卡 */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 768px) {
  .two-col { grid-template-columns: 1fr 1fr; gap: 24px; }
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
}
.panel h3 { font-size: 19px; margin-bottom: 10px; }
.panel p { font-size: 14px; color: var(--ink-3); line-height: 1.85; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink-3);
}
.chip-chem { background: var(--brand-soft); border-color: rgba(200, 10, 20, .16); color: var(--brand); }
.chip-it { background: var(--it-soft); border-color: rgba(37, 99, 235, .16); color: var(--it); }

.panel-foot { margin-top: 22px; }

/* ==========================================================================
   页脚
   ========================================================================== */

.ft {
  border-top: 1px solid var(--line-2);
}

.ft-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 36px 20px 40px;
  font-size: 13px;
  color: var(--faint);
  text-align: center;
}

.ft-brand { display: flex; align-items: center; gap: 10px; }
.ft-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--line-2);
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.ft-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.ft-links a { transition: color .18s; }
.ft-links a:hover { color: var(--ink-3); }

@media (min-width: 768px) {
  .ft-in { flex-direction: row; justify-content: space-between; text-align: left; padding: 40px 20px; }
}

/* ICP 备案号 */
.icp {
  margin: 0;
  padding: 0 20px 22px;
  text-align: center;
  font-size: 12px;
  color: var(--faint);
}
.icp a { color: inherit; text-decoration: none; transition: color .18s; }
.icp a:hover { color: var(--muted); }

/* 工具类 */
.center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
