/* StudySafeLink website — single stylesheet, mobile-first, no JS frameworks */
:root {
  color-scheme: light;
  --blue: #2563eb;
  --blue-dark: #1e40af;
  --navy: #0f172a;
  --text: #1e293b;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-alt: #f1f5f9;
  --border: #e2e8f0;
  --red: #e74c3c;
  --amber: #f39c12;
  --gray: #95a5a6;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
/* 防止大尺寸 img 的 min-content 撑爆 grid 轨道（移动端横向溢出） */
.hero-grid > *, .shots-row > *, .feature-grid > *, .trust-wrap > *,
.explore-grid > *, .footer-grid > *, .cta-inline > * { min-width: 0; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; gap: 18px; min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.06rem; color: var(--navy); }
.logo img { border-radius: 7px; }
.nav-links { display: flex; gap: 16px; margin-left: auto; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: .93rem; }
.nav-links a:hover { color: var(--navy); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  color: var(--blue); font-size: .93rem; border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 13px;
}
.lang-switch:hover { text-decoration: none; background: var(--bg-alt); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border-radius: 999px; font-weight: 600;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff !important; box-shadow: var(--shadow); }
.btn-ghost { border: 1.5px solid var(--border); color: var(--navy) !important; }
.btn-sm { padding: 6px 16px; font-size: .88rem; }
.btn-lg { padding: 13px 28px; font-size: 1.02rem; }

/* ---------- hero ---------- */
.hero { padding: 52px 0 30px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--blue); font-weight: 600; font-size: .9rem; letter-spacing: .01em; overflow-wrap: anywhere; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.22; color: var(--navy); margin: 10px 0 16px; }
.lede { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--muted); }
.hero-cta { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.hero-shot { text-align: center; }
.hero-shot img { width: min(300px, 80%); border-radius: 24px; box-shadow: 0 24px 48px rgba(15,23,42,.18); }

/* ---------- sections ---------- */
.section { padding: 46px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { color: var(--navy); font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 0 0 18px; }
.subhead { margin-top: 30px; color: var(--navy); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.feature-card h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--navy); }
.feature-card p { margin: 0; font-size: .95rem; color: var(--muted); }

.trust-wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: start; }
.source-badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.source-badges li {
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 15px; font-size: .86rem; color: var(--text);
}

.explore-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 720px; }
.explore-card { display: flex; flex-direction: column; gap: 6px; color: inherit; }
.explore-card strong { color: var(--navy); }
.explore-card span { color: var(--muted); font-size: .88rem; }
.explore-card:hover { border-color: var(--blue); text-decoration: none; }

.chip-row { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; }
.chip {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 16px; font-size: .92rem; color: var(--navy) !important;
}
.chip:hover { background: #fff; border-color: var(--blue); text-decoration: none; }

.shots-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.shots-row img { width: 100%; border-radius: 16px; border: 1px solid var(--border); }

.cta-band { background: linear-gradient(135deg, #eff6ff, #eef2ff); }
.cta-band h2 { margin-bottom: 8px; }
.cta-inline { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta-inline h2 { margin: 0 0 6px; font-size: 1.25rem; }
.cta-inline p { margin: 0; color: var(--muted); }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { border-collapse: collapse; width: 100%; font-size: .94rem; }
.data-table th, .data-table td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.data-table thead th { color: var(--muted); font-weight: 600; font-size: .84rem; text-transform: uppercase; letter-spacing: .04em; }
.data-table tbody tr:hover { background: var(--bg-alt); }
.row-latest { background: #eff6ff; }
.ranking-table td:nth-child(n+4), .ranking-table th:nth-child(n+4) { text-align: right; }
.mini-score { color: var(--blue); font-weight: 600; font-size: .85rem; margin-left: 8px; }
.muted-link { color: var(--muted) !important; }

.grade {
  display: inline-block; min-width: 26px; text-align: center; border-radius: 7px;
  font-weight: 700; font-size: .85rem; padding: 2px 8px; color: #fff;
}
.grade-A { background: #16a34a; } .grade-B { background: #65a30d; }
.grade-C { background: var(--amber); } .grade-D { background: var(--red); }

.sev-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.sev-3 { background: var(--red); } .sev-2 { background: var(--amber); } .sev-1 { background: var(--gray); }

/* ---------- university page ---------- */
.breadcrumb { font-size: .87rem; color: var(--muted); padding-top: 18px; }
.page-head h1 { font-size: clamp(1.5rem, 3.4vw, 2.15rem); line-height: 1.28; color: var(--navy); margin: 14px 0 10px; }
.status-pill {
  display: inline-block; background: #fef3c7; color: #92400e; border-radius: 999px;
  font-size: .85rem; font-weight: 600; padding: 4px 14px; margin: 0;
}
.score-band { margin-top: 18px; }
.tldr { font-size: 1.06rem; line-height: 1.6; color: var(--navy); max-width: 760px; margin: 4px 0 0; }
.score-main { max-width: 460px; }
.score-number { font-size: 3.2rem; font-weight: 800; color: var(--navy); margin: 0; line-height: 1.1; }
.score-number span { font-size: 1.2rem; color: var(--muted); font-weight: 600; }
.score-na { color: var(--gray); }
.grade-line { color: var(--muted); margin: 6px 0 16px; }
.score-meta { display: flex; flex-wrap: wrap; gap: 22px; margin: 0; }
.score-meta dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.score-meta dd { margin: 2px 0 0; font-weight: 700; color: var(--navy); }
.insufficient-note { color: var(--muted); max-width: 720px; }
.latest-note { background: #eff6ff; border-left: 4px solid var(--blue); padding: 12px 16px; border-radius: 8px; }
.top-types { color: var(--muted); font-size: .93rem; }
.peer-list { list-style: none; padding: 0; columns: 2; column-gap: 32px; }
.peer-list li { break-inside: avoid; margin-bottom: 8px; }
.disclaimer { color: var(--muted); font-size: .84rem; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 40px; }
.notice-card { background: #fffbeb; border-color: #fde68a; margin: 20px 0; }

/* ---------- prose (legal/support/data pages) ---------- */
.prose { max-width: 780px; padding-bottom: 56px; }
.prose h2 { margin-top: 34px; font-size: 1.3rem; }
.prose h3 { margin-top: 26px; font-size: 1.08rem; color: var(--navy); }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin-bottom: 7px; }
.note { background: #eff6ff; border-left: 4px solid var(--blue); padding: 12px 16px; border-radius: 8px; margin: 18px 0; }
.faq-item { margin-bottom: 22px; }
.faq-item h3 { margin-bottom: 6px; }
.muted { color: var(--muted); }
.text-link { font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); margin-top: 30px; padding: 38px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 26px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--navy); margin: 0 0 8px; }
.site-footer a { display: block; color: var(--muted); font-size: .9rem; margin-bottom: 7px; }
.site-footer h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--navy); margin: 0 0 10px; }
.footer-note { margin-top: 26px; color: var(--muted); font-size: .82rem; }
.footer-note p { margin: 4px 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-shot { order: -1; }
  .hero-shot img { width: min(240px, 70%); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .trust-wrap { grid-template-columns: 1fr; }
  .shots-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .nav-links { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .explore-grid { grid-template-columns: 1fr; }
  .shots-row { gap: 10px; }
  .peer-list { columns: 1; }
  .score-meta { gap: 16px; }
  .cta-inline { flex-direction: column; align-items: flex-start; }
}
@media print {
  .site-header, .site-footer, .cta-band, .cta-inline { display: none; }
}
