/* ============================================================
   osftp 子站样式
   与 sub/oszip、sub/osmcs 保持同一套朴素设计语言：
   浅灰白底、深色正文、1px 实线边框、方角、系统字体。
   不使用渐变、发光、投影动画与大面积品牌色。
   ============================================================ */

:root {
  --text: #202020;
  --text-soft: #4e4e4e;
  --text-mute: #777;
  --bg: #f4f4f4;
  --bg-header: #e8e8e8;
  --bg-panel: #ededed;
  --bg-gray: #e6e6e6;
  --bg-foot: #dedede;
  --line: #9a9a9a;
  --line-soft: #c2c2c2;
  --accent: #1f5f91;
  --accent-dark: #17486f;
  --accent-ink: #123d63;
  font-family: "Microsoft YaHei UI", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  font-size: 15px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
  font-weight: 400;
  color: #1c1c1c;
}

p {
  margin: 0 0 14px;
}

a {
  color: var(--accent-dark);
}

.shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 12px;
  top: 8px;
  background: #fff;
  border: 1px solid #777;
  padding: 5px 10px;
  z-index: 10;
}

/* ---------- 页头 ---------- */

.site-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 #fff;
}

.header-inner {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  display: block;
  object-fit: contain;
}

.header-inner nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-inner nav a {
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.header-inner nav a:hover {
  text-decoration: underline;
}

.lang-switch {
  border: 1px solid #8a8a8a;
  background: #e5e5e5;
  box-shadow: inset 0 1px #fff;
  color: #333;
  font: inherit;
  font-size: 13px;
  padding: 3px 10px;
  cursor: pointer;
}

.lang-switch:hover {
  background: #f7f7f7;
}

/* ---------- 首屏 ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 54px;
  align-items: center;
  padding: 70px 0 62px;
}

/* grid 子项默认 min-width:auto，长路径或长命令会撑破两栏布局。 */
.hero-copy {
  min-width: 0;
}

.kicker {
  margin: 0 0 14px;
  color: #315b7e;
  font: 700 12px/1.2 "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(32px, 4.4vw, 50px);
  margin-bottom: 18px;
}

.hero h1 strong {
  font-weight: 700;
  color: var(--accent-ink);
}

.lead {
  font-size: 16px;
  max-width: 540px;
  color: var(--text-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button {
  display: inline-block;
  border: 1px solid #777;
  background: #e5e5e5;
  box-shadow: inset 0 1px #fff, 0 1px 2px #bbb;
  color: var(--text);
  text-decoration: none;
  padding: 8px 17px;
  font-size: 14px;
}

.button:hover {
  background: #f7f7f7;
}

.button-primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent-dark);
  box-shadow: inset 0 1px #6394b9, 0 1px 2px #aaa;
}

.button-primary:hover {
  background: #2b6e9f;
}

.microcopy {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-mute);
}

/* ---------- 界面示意图 ---------- */

.app-window {
  border: 1px solid #7d7d7d;
  background: #fff;
  box-shadow: 2px 2px 0 #c1c1c1;
  min-width: 0;
  font-size: 12px;
}

.window-titlebar {
  height: 30px;
  background: #e9e9e9;
  border-bottom: 1px solid #aaa;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  font-size: 13px;
  color: #222;
}

.window-icon {
  color: #164f7b;
}

.window-controls {
  margin-left: auto;
  color: #555;
  letter-spacing: 5px;
}

.window-toolbar {
  display: flex;
  padding: 6px;
  border-bottom: 1px solid #bbb;
  background: #ededed;
  overflow: auto;
}

.tool {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 12px;
  border-right: 1px solid #c7c7c7;
  white-space: nowrap;
}

.tool b {
  font-size: 16px;
  line-height: 1;
  color: #195b8e;
  font-weight: 400;
}

.window-path {
  margin: 7px;
  border: 1px solid #a5a5a5;
  padding: 4px 6px;
  font-size: 11px;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pane-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 0 7px;
}

.file-pane {
  border: 1px solid #b5b5b5;
  min-width: 0;
}

.pane-label {
  background: #e8e8e8;
  border-bottom: 1px solid #aaa;
  padding: 3px 6px;
  font-size: 11px;
  color: #444;
}

.file-row {
  display: grid;
  grid-template-columns: 1.5fr 0.75fr 0.9fr;
  gap: 6px;
  padding: 3px 6px;
  border-bottom: 1px solid #eee;
  font-size: 11px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
}

.file-row:last-child {
  border-bottom: 0;
}

.file-row.file-head {
  background: #f0f0f0;
  border-bottom: 1px solid #ccc;
  color: #555;
}

.file-row.selected {
  background: #dbe7f1;
  color: #143d5e;
}

.transfer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 7px;
  padding: 5px 7px;
  border: 1px solid #b5b5b5;
  background: #f5f5f5;
  font-size: 11px;
  color: #333;
}

.transfer-bar i {
  flex: 1;
  height: 10px;
  border: 1px solid #999;
  background: #e2e2e2;
  display: block;
  min-width: 40px;
}

.transfer-bar i b {
  display: block;
  height: 100%;
  background: var(--accent);
}

.transfer-bar strong {
  color: var(--accent-ink);
}

.window-status {
  border-top: 1px solid #aaa;
  background: #e7e7e7;
  padding: 4px 8px;
  color: #444;
  font-size: 11px;
}

/* ---------- 属性条 ---------- */

.ruler {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid #aaa;
  border-bottom: 1px solid #aaa;
  background: #e7e7e7;
  padding: 10px 16px;
  color: #444;
  font-size: 13px;
}

/* ---------- 通用区块 ---------- */

.section {
  padding: 74px 0;
}

.section-gray {
  background: var(--bg-gray);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.section-heading {
  max-width: 700px;
}

.section-heading h2,
.section h2 {
  font-size: 32px;
  margin-bottom: 14px;
}

.section-heading > p:last-child {
  color: var(--text-soft);
  max-width: 680px;
}

/* ---------- 功能卡片 ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 34px;
}

.feature-grid article {
  background: var(--bg-panel);
  border: 1px solid #aaa;
  box-shadow: inset 0 1px #fff;
  padding: 20px;
  min-height: 176px;
}

.feature-number {
  color: #315b7e;
  font: 700 12px "Segoe UI", Arial, sans-serif;
}

.feature-grid h3 {
  font-size: 18px;
  margin: 22px 0 9px;
}

.feature-grid p {
  font-size: 14px;
  color: var(--text-soft);
  margin: 0;
}

/* ---------- 协议对照表 ---------- */

.proto-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: start;
}

.proto-table {
  border-top: 1px solid #999;
}

.proto-table div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #aaa;
  font-size: 14px;
}

.proto-table strong {
  color: var(--accent-dark);
}

.proto-table span {
  color: #555;
  text-align: right;
}

/* ---------- 正文链接 ---------- */

.text-link {
  display: inline-block;
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px solid #9bb4c8;
  padding-bottom: 1px;
  font-size: 14px;
}

.text-link:hover {
  border-bottom-color: var(--accent-dark);
}

/* ---------- 终端示意 ---------- */

.workflow-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 54px;
  align-items: center;
}

.terminal-card {
  border: 1px solid #7d7d7d;
  background: #222;
  color: #e8e8e8;
  box-shadow: 2px 2px 0 #c1c1c1;
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #333;
  border-bottom: 1px solid #555;
  padding: 5px 9px;
  font-size: 12px;
  color: #bbb;
}

.terminal-head small {
  margin-left: auto;
  color: #9a9a9a;
}

.terminal-body {
  padding: 12px 14px;
  font: 13px/1.7 "Consolas", "Courier New", monospace;
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-body .prompt {
  color: #7da7c7;
}

.terminal-body .dim {
  color: #8f8f8f;
}

.terminal-body .ok {
  color: #9fbf8a;
}

/* ---------- 下载 ---------- */

.download-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 70px;
  align-items: start;
}

.platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.platform-tags span {
  border: 1px solid #999;
  background: #ebebeb;
  padding: 4px 9px;
  color: #3c3c3c;
  font-size: 12px;
}

.download-card {
  border: 1px solid #898989;
  background: #e9e9e9;
  box-shadow: inset 0 1px #fff;
  padding: 20px;
}

.card-title {
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 10px;
}

.card-title.mac-title {
  border-top: 1px solid #bbb;
  margin-top: 14px;
  padding-top: 14px;
}

.download-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #bbb;
  color: #0066cc;
  text-decoration: underline;
  font-size: 14px;
}

.download-link:hover {
  text-decoration: underline;
}

.download-link.secondary {
  color: #0066cc;
}

.download-link.disabled {
  color: #8a8a8a;
  cursor: not-allowed;
}

.download-card p {
  font-size: 12px;
  color: #666;
  margin: 13px 0;
}

.checksum {
  font-size: 12px;
  color: #315b7e;
  text-decoration: underline;
}

/* ---------- 命令行安装 ---------- */

.cli-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 54px;
  align-items: start;
}

.cli-notes {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--text-soft);
}

.cli-notes li {
  padding: 6px 0 6px 16px;
  border-bottom: 1px solid #c9c9c9;
  position: relative;
}

.cli-notes li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: 700;
}

.cli-card {
  border: 1px solid #898989;
  background: #e9e9e9;
  box-shadow: inset 0 1px #fff;
  padding: 16px;
}

.cli-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #aaa;
  margin-bottom: 12px;
}

.cli-tab {
  border: 1px solid #aaa;
  border-bottom: 0;
  background: #e0e0e0;
  color: #333;
  font: inherit;
  font-size: 13px;
  padding: 5px 14px;
  margin-right: -1px;
  cursor: pointer;
  position: relative;
  top: 1px;
}

.cli-tab.active {
  background: #f7f7f7;
  color: var(--accent-ink);
  font-weight: 700;
}

.command-card {
  border: 1px solid #777;
  background: #222;
  color: #f0f0f0;
  padding: 11px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.command-card .prompt {
  color: #7da7c7;
  font-family: "Consolas", "Courier New", monospace;
}

.command-card code {
  flex: 1;
  font-size: 12px;
  overflow: auto;
  white-space: nowrap;
  font-family: "Consolas", "Courier New", monospace;
}

.command-card button {
  border: 1px solid #aaa;
  background: #e6e6e6;
  color: #222;
  font: inherit;
  font-size: 13px;
  padding: 4px 12px;
  cursor: pointer;
  flex: none;
}

.command-card button:hover {
  background: #f7f7f7;
}

.cli-footnote {
  font-size: 12px;
  color: #666;
  margin: 12px 0 0;
}

/* ---------- 系统要求 ---------- */

.req-table {
  border-top: 1px solid #999;
  margin-top: 30px;
}

.req-table div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #c9c9c9;
  font-size: 14px;
}

.req-table strong {
  color: var(--accent-dark);
}

.req-table span {
  color: #555;
}

/* ---------- 常见问题 ---------- */

.faq-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 70px;
  align-items: start;
}

.faq-list {
  border-top: 1px solid #999;
}

.faq-list details {
  border-bottom: 1px solid #aaa;
  padding: 0;
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 28px 14px 0;
  position: relative;
  color: var(--accent-ink);
  font-weight: 700;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  color: var(--accent);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  margin: -2px 28px 15px 0;
  color: var(--text-soft);
  font-size: 14px;
}

/* ---------- 页脚 ---------- */

.site-footer {
  border-top: 1px solid #999;
  background: var(--bg-foot);
  padding: 20px 0;
  margin-top: 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12px;
  color: #555;
}

.footer-inner .brand {
  font-size: 16px;
}

.footer-inner nav {
  margin-left: auto;
  display: flex;
  gap: 16px;
}

.footer-inner nav a {
  color: #333;
  text-decoration: none;
}

.footer-inner nav a:hover {
  text-decoration: underline;
}

/* ---------- 提示条 ---------- */

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #303030;
  color: #fff;
  padding: 7px 12px;
  font-size: 13px;
  display: none;
}

.toast.show {
  display: block;
}

/* ---------- 响应式 ---------- */

@media (max-width: 980px) {
  .hero,
  .proto-layout,
  .workflow-layout,
  .download-layout,
  .cli-layout,
  .faq-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero {
    padding-top: 48px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .download-card {
    max-width: 480px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1160px);
  }

  .header-inner {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .header-inner nav {
    gap: 12px;
    flex-wrap: wrap;
  }

  .feature-grid,
  .pane-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 32px;
  }

  .ruler {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .req-table div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .footer-inner {
    flex-wrap: wrap;
  }

  .footer-inner nav {
    margin-left: 0;
    width: 100%;
  }
}
