/* campusly.app 的公开页面共用一份样式。只用系统字体，不引第三方资源（CSP 是 style-src 'self'） */
:root {
  --red: #E62429;
  --red-dark: #C81E23;
  --text: #484848;
  --strong: #1F1F1F;
  --muted: #6B7280;
  --line: #EEEEEE;
  --soft: #FAFAFA;
  --bg: #FFFFFF;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
a { color: var(--red); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
.top {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.logo { display: block; line-height: 0; flex: none; }
.logo img { height: 26px; width: auto; }
.lang { display: none; gap: 6px; flex: none; }
html[data-lang] .lang { display: flex; }
.lang button {
  font: inherit;
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { color: var(--red); border-color: var(--red); }

main { padding: 32px 0 48px; }
h1 { font-size: 28px; line-height: 1.3; color: var(--strong); margin: 0 0 8px; }
h2 { font-size: 20px; line-height: 1.4; color: var(--strong); margin: 36px 0 10px; scroll-margin-top: 72px; }
h3 { font-size: 16px; line-height: 1.5; color: var(--strong); margin: 22px 0 6px; scroll-margin-top: 72px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 1.3em; }
li { margin: 4px 0; }
li::marker { color: var(--red); }
strong, b { color: var(--strong); }
.lead { font-size: 17px; margin-bottom: 24px; }
.meta { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.toc { margin: 0 0 8px; padding: 14px 16px 14px 2.2em; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; font-size: 15px; }
.toc li { margin: 2px 0; }
.note { margin: 16px 0; padding: 12px 16px; background: var(--soft); border-left: 3px solid var(--red); border-radius: 0 8px 8px 0; }
.mail { font-weight: 600; }
.path { font-weight: 600; color: var(--strong); }
.small { font-size: 14px; color: var(--muted); }

.hero { padding: 8px 0 8px; }
.hero h1 { font-size: 32px; }
.store { display: inline-block; margin: 4px 0 8px; padding: 10px 16px; border-radius: 12px; background: var(--strong); color: #fff; font-weight: 600; font-size: 15px; }
.store:hover, .store:focus-visible { text-decoration: none; background: #000; }

.features { list-style: none; padding: 0; margin: 16px 0 8px; display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 600px) { .features { grid-template-columns: 1fr 1fr; } }
.features li { margin: 0; padding: 16px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.features b { display: block; margin-bottom: 2px; }

.links { list-style: none; padding: 0; margin: 12px 0; border-top: 1px solid var(--line); }
.links li { margin: 0; border-bottom: 1px solid var(--line); }
.links a { display: block; padding: 12px 0; color: var(--strong); }
.links a::after { content: "›"; float: right; color: var(--muted); }

.table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 15px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.table th { color: var(--strong); font-weight: 600; }
@media (max-width: 599px) {
  .table, .table tbody, .table tr, .table td, .table th { display: block; width: 100%; }
  .table thead { display: none; }
  .table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 0; }
  .table td:first-child { font-weight: 600; color: var(--strong); }
}

footer { border-top: 1px solid var(--line); padding: 24px 0 calc(32px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
footer a { color: var(--muted); }
footer p { margin: 0 0 4px; }

/* 三种语言放在同一页，按 <html data-lang> 只显示一种 */
html[data-lang="zh"] [data-l]:not([data-l="zh"]),
html[data-lang="en"] [data-l]:not([data-l="en"]),
html[data-lang="fr"] [data-l]:not([data-l="fr"]) { display: none !important; }
/* 没有脚本时三种语言依次显示 */
html:not([data-lang]) div[data-l] + div[data-l] { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
html:not([data-lang]) span[data-l] + span[data-l]::before { content: " / "; }

code { font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; background: var(--soft); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }

/* 关于：老站 About Us 的排法（品牌名、三行标语、三行寄语） */
.legacy { padding: 8px 0 16px; }
.legacy .brand { font-size: 32px; font-weight: 700; color: var(--red); margin: 8px 0 4px; }
.legacy .tagline { font-size: 22px; line-height: 1.4; font-weight: 600; color: var(--strong); margin: 0 0 24px; }
.legacy .verse { color: var(--muted); }

/* 联系：老站的六项，标签一行、邮箱一行 */
.contacts { margin: 16px 0; border-top: 1px solid var(--line); }
.contacts > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.contacts dt { color: var(--strong); font-weight: 600; }
.contacts dd { margin: 2px 0 0; }
