/* 教师工作台 · 版式令牌
   实测参照 apple.com.cn：44px 极简导航、全宽交替大区块、12px 白缝、
   居中大标题 + 副标题 + 双胶囊按钮 + 大幅视觉、浅灰多栏折叠页脚。
   纯 CSS、零 CDN、零外部字体；不用 backdrop-filter / 渐变 / 阴影堆砌。 */

:root {
  --w: #ffffff;
  --gray: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-light: #2997ff;
  --black: #000000;
  --on-dark: #ffffff;   /* 深色区块上的文字色，不随明暗主题翻转 */
  --gap: 12px;
  --max: 1000px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--w); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.035em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input { font-family: inherit; }

/* 全局导航：左 logo、右三个图标，中间全留白 */
.gnav { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(0,0,0,.08); padding-top: var(--safe-top, 0px); }
.gnav-inner { max-width: var(--max); margin: 0 auto; height: 44px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; }
.gnav-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.gnav-logo:hover { color: var(--ink); }
.logo-mark { width: 13px; height: 13px; border-radius: 4px; background: var(--ink); display: inline-block; }
.gnav-actions { display: flex; align-items: center; gap: 22px; }
.gnav-cta { background: var(--blue); color: #fff; border-radius: 980px; font-size: 12px; padding: 5px 14px; transition: background .18s ease; }
.gnav-cta:hover { background: var(--blue-hover); color: #fff; }
.hero-apk-note { margin-top: 14px; font-size: 12px; color: rgba(255,255,255,.55); letter-spacing: .02em; }
.icon-btn { border: 0; background: transparent; color: var(--ink); opacity: .82; cursor: pointer; padding: 4px; line-height: 0; }
.icon-btn:hover { opacity: 1; }
.gnav-panel { background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line); padding: 18px 22px 24px; }
.gnav-panel a { display: block; max-width: var(--max); margin: 0 auto; padding: 9px 0; font-size: 17px; color: var(--ink); border-bottom: 1px solid rgba(0,0,0,.06); }
.gnav-panel a:hover { color: var(--blue); }
.panel-status { max-width: var(--max); margin: 0 auto 8px; font-size: 12px; color: var(--muted); }
.panel-status.is-ok { color: #1d7d5a; }
.panel-status.is-warn { color: #a05a00; }
.gnav-search input { display: block; max-width: var(--max); width: 100%; margin: 0 auto; border: 0; border-bottom: 1px solid var(--line); padding: 12px 2px; font-size: 21px; color: var(--ink); background: transparent; outline: none; }

/* 全宽大区块，区块之间 12px 白缝 */
.tile { margin-bottom: var(--gap); padding: 92px 22px 0; text-align: center; overflow: hidden; }
.tile-black { background: var(--black); color: var(--on-dark); }
.tile-gray { background: var(--gray); }
.tile-white { background: var(--w); }
.tile-head { max-width: 820px; margin: 0 auto; }
.tile-head h2 { font-size: clamp(38px, 5.2vw, 60px); line-height: 1.08; }
.tile-black .tile-head h2 { color: var(--on-dark); }
.eyebrow { font-size: 13px; color: var(--muted); margin-bottom: 20px; letter-spacing: .02em; }
.tile-black .eyebrow { color: #a1a1a6; }
.tile-hero h1 { font-size: clamp(48px, 7.4vw, 84px); line-height: 1.05; letter-spacing: -.045em; color: var(--on-dark); max-width: 9em; margin-left: auto; margin-right: auto; }
.tile-hero .lede { max-width: 30em; margin-left: auto; margin-right: auto; }
.lede { font-size: 21px; line-height: 1.45; color: var(--muted); margin: 20px auto 0; }
.tile-black .lede, .lede-light { color: #a1a1a6; }
.cta-row { margin-top: 28px; display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 980px; font-size: 15px; padding: 11px 21px; border: 1px solid transparent; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: var(--on-dark); }
.btn-primary:hover { background: var(--blue-hover); color: var(--on-dark); }
.btn-outline-light { background: transparent; border-color: var(--blue); color: var(--blue-light); }
.btn-outline-light:hover { background: rgba(0,113,227,.1); color: var(--blue-light); }
.btn-sm { font-size: 13px; padding: 8px 17px; }
.btn-block { width: 100%; }
.link-arrow { font-size: 17px; }
.link-arrow span { margin-left: 3px; }

/* Hero 视觉 */
.hero-visual { max-width: 760px; margin: 54px auto 0; height: 300px; }
.hero-visual svg { display: block; }

/* 工作台：超大数字 + 细线分栏，不做后台卡片 */
.metrics { max-width: var(--max); margin: 64px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric { padding: 30px 18px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric strong { font-size: clamp(30px, 3.4vw, 48px); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; }
.metric span { font-size: 12px; color: var(--muted); }
.work-cols { max-width: var(--max); margin: 0 auto; padding: 56px 0 92px; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; text-align: left; }
.work-col h3 { font-size: 21px; letter-spacing: -.02em; margin-bottom: 18px; }
.count { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.plain-list li { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; display: flex; flex-direction: column; gap: 3px; }
.plain-list li:last-child { border-bottom: 0; }
.plain-list li strong { font-weight: 600; }
.plain-list li span { font-size: 13px; color: var(--muted); }
.plain-list li.quiet { color: var(--muted); }
.plain-list input[type="checkbox"] { margin-right: 8px; }
.inline-form { display: flex; gap: 10px; margin-top: 18px; }
.inline-form input { flex: 1; border: 1px solid var(--line); border-radius: 980px; padding: 9px 16px; font-size: 14px; background: var(--w); }

/* 业务域：2 列大卡 */
.domain-grid { max-width: var(--max); margin: 58px auto 0; padding-bottom: 92px; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.domain-card { background: var(--gray); border-radius: 18px; padding: 44px 36px; min-height: 228px; display: flex; flex-direction: column; text-align: center; color: var(--ink); transition: transform .18s ease; }
.domain-card:hover { transform: translateY(-2px); color: var(--ink); }
.domain-card h3 { color: var(--ink); }
.domain-no { font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.domain-card h3 { font-size: 34px; margin-top: 14px; }
.domain-card p { font-size: 15px; color: var(--muted); margin-top: 10px; }
.domain-count { margin-top: auto; padding-top: 22px; font-size: 14px; color: var(--blue); }

/* 应用门牌：简洁行列表，无卡片边框 */
.app-list { max-width: var(--max); margin: 58px auto 0; padding-bottom: 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; text-align: left; }
.app-row { padding: 18px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; color: var(--ink); }
.app-row:hover { color: var(--blue); }
.app-row-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.app-row h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.app-host { font-size: 11px; color: var(--muted); white-space: nowrap; }
.app-row p { font-size: 13px; color: var(--muted); line-height: 1.45; }
.app-go { font-size: 13px; color: var(--blue); }
.app-row.is-planned { opacity: .55; }

/* 技能工作台骨架：简洁行列表 */
.skill-list { max-width: var(--max); margin: 58px auto 0; padding-bottom: 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; text-align: left; }
.skill-row { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.skill-row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.skill-row h3 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.skill-group { font-size: 11px; color: var(--muted); white-space: nowrap; }
.skill-row p { font-size: 13px; color: var(--muted); line-height: 1.45; }
.skill-state { font-size: 12px; color: var(--blue); }

.footnote { max-width: var(--max); margin: 0 auto; padding: 0 0 92px; font-size: 12px; color: var(--muted); }

/* 瘦壳视觉 */
.shell-visual { max-width: 420px; margin: 56px auto 0; height: 320px; display: flex; align-items: flex-start; justify-content: center; }
.phone { width: 178px; height: 340px; border: 7px solid #1d1d1f; border-radius: 34px; background: var(--w); padding: 12px; box-shadow: 0 0 0 1px #3a3a3c; }
.phone-screen { height: 100%; border-radius: 22px; background: var(--gray); padding: 26px 16px; display: flex; flex-direction: column; gap: 12px; }
.ph-line { height: 7px; border-radius: 4px; background: var(--line); }
.ph-line.short { width: 62%; }
.ph-block { height: 74px; border-radius: 10px; background: var(--blue); }

/* 六层架构：行列表 */
.layer-list { max-width: 860px; margin: 58px auto 0; padding-bottom: 92px; text-align: left; border-top: 1px solid var(--line); }
.layer-row { display: flex; align-items: center; gap: 20px; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.layer-id { font-size: 13px; font-weight: 600; color: var(--blue); width: 30px; flex: none; }
.layer-row div { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.layer-row strong { font-size: 16px; font-weight: 600; }
.layer-row div span { font-size: 13px; color: var(--muted); }
.state { font-size: 11px; border-radius: 980px; padding: 4px 11px; white-space: nowrap; }
.state-done { background: #e1f5ee; color: #0f6e56; }
.state-part { background: #faeeda; color: #854f0b; }
.state-todo { background: #e8e8ed; color: #5f5e5a; }

/* 页脚：浅灰、细字、折叠栏目 */
.footer { background: var(--gray); color: var(--muted); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 40px 22px 44px; font-size: 12px; }
.footer-note { line-height: 1.7; }
.footer-line { height: 1px; background: var(--line); margin: 22px 0; }
.foot-group { border-bottom: 1px solid var(--line); }
.foot-group summary { padding: 11px 0; font-size: 12px; color: var(--ink); cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.foot-group summary::-webkit-details-marker { display: none; }
.foot-group summary::after { content: "⌄"; color: var(--muted); }
.foot-group[open] summary::after { content: "⌃"; }
.foot-group a, .foot-group span { display: block; padding: 7px 0; font-size: 12px; color: var(--muted); }
.foot-group a:hover { color: var(--blue); }
.footer-more { margin-top: 22px; }
.footer-legal { margin-top: 8px; line-height: 1.6; }

/* 登录弹层 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; padding: 22px; z-index: 60; }
.modal-card { background: var(--w); border-radius: 18px; width: 100%; max-width: 380px; padding: 28px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h3 { font-size: 21px; }
.modal-x { border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-hint { font-size: 13px; color: var(--muted); margin-bottom: 20px; line-height: 1.5; }
.modal label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.modal input { display: block; width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; font-size: 15px; color: var(--ink); background: var(--w); }
.err { font-size: 13px; color: #b3261e; margin-bottom: 12px; }

@media (max-width: 768px) {
  .tile { padding: 64px 20px 0; }
  .lede { font-size: 17px; }
  .tile-head h2 { font-size: clamp(32px, 8vw, 44px); }
  .hero-visual { height: 210px; margin-top: 40px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .work-cols, .domain-grid { grid-template-columns: 1fr; gap: 32px; }
  .app-list, .skill-list { grid-template-columns: 1fr; }
  .shell-visual { height: 260px; }
  .phone { transform: scale(.8); transform-origin: top center; }
  .layer-row { gap: 12px; }
}
@media (max-width: 420px) {
  .cta-row { flex-direction: column; }
  .gnav-actions { gap: 14px; }
}

@media print {
  .gnav, .gnav-panel, .modal, .hero-visual, .shell-visual { display: none; }
  .tile { padding: 24px 0; break-inside: avoid; }
}

/* =====================================================================
   主题皮肤（v0.8.0）：后台可选，bootstrap 下发，localStorage 记住本地偏好
   约定：只调令牌 + 少量必须硬改的底色，不碰布局，保证四种皮肤版面一致
   ===================================================================== */

/* 石墨 · 单色极简：黑即重点色，去掉品牌蓝 */
:root[data-theme="graphite"] {
  --w: #fdfdfc; --gray: #f2f2f0; --ink: #17181a; --muted: #6b6d70;
  --line: #dcdcd9; --blue: #1d1d1f; --blue-hover: #3a3a3c; --blue-light: #4a4a4f;
  --black: #101012;
}
:root[data-theme="graphite"] .gnav { background: rgba(253,253,252,.94); }
:root[data-theme="graphite"] .gnav-panel { background: rgba(253,253,252,.98); }
:root[data-theme="graphite"] .btn-outline-light { border-color: #8e8e93; color: #c7c7cc; }
:root[data-theme="graphite"] .btn-outline-light:hover { background: rgba(255,255,255,.1); color: #fff; }

/* 墨 · 宣纸底色 + 朱砂重点色 */
:root[data-theme="ink"] {
  --w: #fbf9f4; --gray: #f3efe6; --ink: #14110d; --muted: #6f665a;
  --line: #ded7c9; --blue: #b3261e; --blue-hover: #8c1c16; --blue-light: #e0655c;
  --black: #17130e;
}
:root[data-theme="ink"] .gnav { background: rgba(251,249,244,.94); }
:root[data-theme="ink"] .gnav-panel { background: rgba(251,249,244,.98); }
:root[data-theme="ink"] .tile-black { background: var(--black); }
:root[data-theme="ink"] .eyebrow { letter-spacing: .12em; }
:root[data-theme="ink"] .tile-head h2, :root[data-theme="ink"] .tile-hero h1 { letter-spacing: -.02em; }

/* 深空 · 暗底浅字（Apple 深色） */
:root[data-theme="dark"] {
  --w: #000000; --gray: #1c1c1e; --ink: #f5f5f7; --muted: #a1a1a6;
  --line: #38383a; --blue: #0a84ff; --blue-hover: #409cff; --blue-light: #64b5ff;
  --black: #0b0b0d;
}
:root[data-theme="dark"] body { background: #000; color: var(--ink); }
:root[data-theme="dark"] .gnav { background: rgba(0,0,0,.86); border-bottom-color: rgba(255,255,255,.14); }
:root[data-theme="dark"] .gnav-panel { background: rgba(28,28,30,.98); }
:root[data-theme="dark"] .gnav-panel a { border-bottom-color: rgba(255,255,255,.1); }
:root[data-theme="dark"] .gnav-search input { color: var(--ink); }
:root[data-theme="dark"] .modal { background: rgba(0,0,0,.72); }
:root[data-theme="dark"] .modal-card { background: #1c1c1e; }
:root[data-theme="dark"] .phone { border-color: #3a3a3c; box-shadow: 0 0 0 1px #48484a; }
:root[data-theme="dark"] .state-done { background: rgba(48,209,88,.18); color: #6ee7a0; }
:root[data-theme="dark"] .state-part { background: rgba(255,159,10,.18); color: #ffcc80; }
:root[data-theme="dark"] .state-todo { background: rgba(255,255,255,.12); color: #c7c7cc; }
:root[data-theme="dark"] .domain-card, :root[data-theme="dark"] .app-card { background: #1c1c1e; }
:root[data-theme="dark"] .err { color: #ff6b60; }
:root[data-theme="dark"] .msg.ok, :root[data-theme="dark"] .panel-status.is-ok { color: #6ee7a0; }

/* =====================================================================
   手机端登录弹窗适配（2026-11-10）
   1) 输入框字号 16px —— iOS 遇到小于 16px 的输入框会在聚焦时强行放大页面
   2) 弹窗顶部对齐 + 自身可滚动 —— 软键盘弹出时把输入框滚进可视区，不再被遮住
   3) 高度跟随 visualViewport（--sd-vvh 由 platform.js 写入），键盘弹出即缩矮
   ===================================================================== */
@media (max-width: 640px) {
  .modal {
    align-items: flex-start !important;
    height: var(--sd-vvh, 100%) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .modal-card {
    margin: 4vh auto 0 !important;
    max-width: 100% !important;
    padding: 22px 18px !important;
    border-radius: 16px !important;
  }
  .modal input { font-size: 16px !important; }
  .modal label { font-size: 13.5px !important; }
  .modal-head h3 { font-size: 19px !important; }
}
