/*
 * GitHub 中文 · 采集工作台 — 布局（顶栏 / 内容 / 步骤条 / 栅格 / 响应式）
 * @file public/css/layout.css
 * @version 1.12.1
 */
/* 应用外壳：侧栏 + 主区（横向排布） */
.app-shell {
  flex: 1;
  min-width: 0;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.topbar {
  height: 5rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 5;
}

.topbar h1 {
  font-size: 1.35rem;
}

.topbar-sub {
  margin: .15rem 0 0;
  font-size: .85rem;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .75rem;
  background: var(--brand-soft);
  border: 1px solid rgba(46, 164, 79, .25);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--brand-strong);
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.content-inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.steps {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: var(--muted);
}

.step-node {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.step-num {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-node.done .step-num {
  background: var(--brand);
}

.step-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  min-width: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* 移动端导航条：默认隐藏，窄屏时替代侧栏 */
.mobile-nav {
  display: none;
  flex-shrink: 0;
  gap: .25rem;
  padding: .5rem 1rem;
  overflow-x: auto;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.mobile-nav .rail-link {
  white-space: nowrap;
  padding: .5rem .75rem;
  color: var(--muted);
}

.mobile-nav .rail-link:hover {
  background: var(--canvas);
  color: var(--ink);
}

.mobile-nav .rail-link.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  box-shadow: inset 0 0 0 1px rgba(46, 164, 79, .25);
}

@media (max-width: 880px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .rail {
    display: none;
  }

  .mobile-nav {
    display: flex;
  }
}

@media (max-width: 640px) {
  .topbar {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: .6rem;
    padding: 1rem;
  }

  .content {
    padding: 1rem;
  }
}

/* 页脚（对齐原型 proto-footer） */
.footer {
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--border-soft);
}

.footer-inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 2rem;
}

.footer .fnote {
  color: var(--faint);
  font-size: .8rem;
}

.footer .flinks {
  display: flex;
  gap: 1.25rem;
}

.footer .flinks a {
  color: var(--muted);
  font-size: .8rem;
}

.footer .flinks a:hover {
  color: var(--ink);
}
