/* ============================================================
   just-did portal — design tokens & base
   Subject: plain-text daily log. 纸面质感 + 文件世界的等宽方言.
   ============================================================ */

:root {
  /* light */
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --code-bg: #EFEDE6;
  --fg: #2F2E2B;
  --muted: #6B675F;
  --line: #E4E1D8;
  --brand: #166AF5;
  --on-brand: #FFFFFF;
  --focus: #166AF5;

  --font-body: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: Consolas, "SF Mono", "JetBrains Mono", Menlo, monospace;

  --radius: 12px;
  --container: 1000px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1B19;
    --surface: #26241F;
    --code-bg: #211F1C;
    --fg: #E8E6E1;
    --muted: #A8A49B;
    --line: #38352E;
    --brand: #5B93FF;
    --on-brand: #14233F;
    --focus: #5B93FF;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.mono { font-family: var(--font-mono); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--fg);
}
.nav-logo:hover { text-decoration: none; }
.nav-logo img { width: 24px; height: 24px; border-radius: 6px; }

.nav-links { display: flex; gap: 4px; margin-left: auto; }

.nav-links a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
}
.nav-links a:hover { color: var(--fg); text-decoration: none; background: var(--surface); }
.nav-links a[aria-current="page"] { color: var(--fg); font-weight: 600; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-left: 8px;
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 4px 12px;
  cursor: pointer;
}
.lang-switch button.active { background: var(--fg); color: var(--bg); }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  font-size: 18px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
  margin-left: auto;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
    margin: 0;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .lang-switch { margin-left: auto; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 120ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand); filter: brightness(1.06); }

.btn-ghost { border: 1px solid var(--line); color: var(--fg); background: var(--surface); }

/* ---------- sections ---------- */

.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.section-title { font-size: 26px; font-weight: 700; letter-spacing: 0.01em; margin-bottom: 8px; }
.section-lead { color: var(--muted); max-width: 620px; margin-bottom: 36px; }

/* ---------- hero ---------- */

.hero { padding: 80px 0 64px; }

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-logo { width: 88px; height: 88px; border-radius: 22px; margin-bottom: 28px; }

.hero-title { font-size: 42px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.2; }
.hero-tagline { color: var(--muted); font-size: 18px; margin-top: 12px; max-width: 420px; }
.hero-cta { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

/* txt 日报签名卡片 */
.txt-card {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.9;
  overflow: hidden;
}
.txt-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}
.txt-card-body { padding: 14px 16px 18px; }
.txt-card-body .time { color: var(--muted); padding-right: 10px; }
.txt-card-body .prompt { color: var(--brand); }
.txt-card-body .cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--brand);
  vertical-align: text-bottom;
  margin-left: 2px;
}

/* ---------- cards / grids ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 120ms ease;
}
.card:hover { transform: translateY(-2px); }

.card-icon {
  width: 34px;
  height: 34px;
  color: var(--brand);
  margin-bottom: 14px;
}
.card-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.card-text { color: var(--muted); font-size: 14.5px; }

@media (max-width: 900px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { text-align: center; }
  .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
}

/* ---------- reliability ---------- */

.rel-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 32px;
}
.rel-teaser .section-lead { margin-bottom: 0; max-width: 540px; }
@media (max-width: 768px) { .rel-teaser { flex-direction: column; align-items: flex-start; } }

.reliability { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.mech-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin-bottom: 48px;
}
.mech { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; }
.mech-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
  margin-top: 3px;
}
.mech-name { font-weight: 600; font-size: 15px; }
.mech-desc { color: var(--muted); font-size: 13.5px; margin-top: 2px; }

@media (max-width: 768px) { .mech-list { grid-template-columns: 1fr; } }

.flow-wrap {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.flow-wrap svg { display: block; width: 100%; height: auto; }
.flow-caption { text-align: center; color: var(--muted); font-size: 13px; margin-top: 12px; }

/* ---------- download ---------- */

.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; }
.dl-card { padding: 32px; }
.dl-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.dl-card-head img { width: 52px; height: 52px; border-radius: 14px; }
.dl-title { font-size: 20px; font-weight: 700; }
.dl-sub { color: var(--muted); font-size: 14px; }

.dl-meta { border-top: 1px solid var(--line); margin: 20px 0; }
.dl-meta div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.dl-meta dt, .dl-meta dd { margin: 0; }
.dl-meta dt { color: var(--muted); }
.dl-meta .mono { font-size: 12.5px; word-break: break-all; }

.dl-steps { margin: 0 0 24px; padding-left: 0; list-style: none; }
.dl-steps li { display: flex; gap: 10px; margin-bottom: 8px; font-size: 14.5px; color: var(--muted); }
.dl-steps b { color: var(--fg); font-family: var(--font-mono); font-weight: 600; min-width: 18px; }

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

/* ---------- guide ---------- */

.step { display: flex; gap: 20px; margin-bottom: 32px; }
.step-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-title { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.step-text { color: var(--muted); font-size: 15px; }

.guide-sub { margin: 44px 0 20px; font-size: 19px; font-weight: 700; }
.note-box {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--muted);
  margin-top: 16px;
}
.note-box .mono { color: var(--brand); }

/* ---------- faq ---------- */

.faq-item { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq-q { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.faq-a { color: var(--muted); font-size: 15px; max-width: 720px; }
.faq-a .mono { font-size: 13px; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 72px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; gap: 16px; }
.footer-copy { margin-left: auto; font-family: var(--font-mono); font-size: 12.5px; }

@media (max-width: 768px) { .footer-copy { margin-left: 0; } }

/* ---------- page head ---------- */

.page-head { padding: 56px 0 8px; }
.page-title { font-size: 34px; font-weight: 700; letter-spacing: 0.01em; }
.page-lead { color: var(--muted); font-size: 16px; margin-top: 8px; }
