/* CampusVPN website. No external resources: system fonts, inline SVG icons. Colors from the app icon:
   night blue #0E225C / #2B55C9, green #23B26A, warm light #FFF6C9. */

:root {
  --bg: #ffffff;
  --surface: #f4f6fb;
  --field: #ffffff;
  --text: #1b2340;
  --heading: #0e225c;
  --muted: #5b6480;
  --link: #2b55c9;
  --border: #dfe3ee;
  --border-strong: #9aa3ba;
  --button-bg: #0e225c;
  --button-text: #ffffff;
  --button-hover: #2b55c9;
  --icon: #23b26a;
  --green-text: #12703f;
  --error: #b3261e;
  --focus: #2b55c9;
  --glow: rgba(255, 246, 201, 1);
  --shot-shadow: 0 18px 50px rgba(14, 34, 92, 0.16), 0 0 0 1px rgba(14, 34, 92, 0.08);
  --star-off: #ffffff;
  --star-off-stroke: #8a93ab;
  --star-on: #f5b800;
  --star-on-stroke: #a87a00;
  --tag-tested-bg: rgba(35, 178, 106, 0.14);
  --tag-tested-text: #12703f;
  --tag-beta-bg: rgba(43, 85, 201, 0.11);
  --tag-beta-text: #2349ad;
  --tag-later-bg: rgba(91, 100, 128, 0.12);
  --tag-later-text: #4f5772;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1330;
    --surface: #111c40;
    --field: #0e1838;
    --text: #e4e9f5;
    --heading: #ffffff;
    --muted: #a3acc7;
    --link: #9bb6ff;
    --border: #233061;
    --border-strong: #5a6894;
    --button-bg: #fff6c9;
    --button-text: #0e225c;
    --button-hover: #ffffff;
    --icon: #3fcf86;
    --green-text: #5fd99a;
    --error: #ff9b91;
    --focus: #fff6c9;
    --glow: rgba(64, 105, 230, 0.26);
    --shot-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --star-off: transparent;
    --star-off-stroke: #7d89ad;
    --star-on: #ffc933;
    --star-on-stroke: #ffc933;
    --tag-tested-bg: rgba(63, 207, 134, 0.16);
    --tag-tested-text: #6fe0a6;
    --tag-beta-bg: rgba(155, 182, 255, 0.14);
    --tag-beta-text: #b3c7ff;
    --tag-later-bg: rgba(163, 172, 199, 0.14);
    --tag-later-text: #b9c1d8;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main, .footer, .topbar { max-width: 720px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { color: var(--heading); line-height: 1.2; }
h2 { font-size: 1.6rem; letter-spacing: -0.01em; margin: 0 0 1rem; }
h3 { font-size: 1.1rem; margin: 0 0 0.35rem; }
p { margin: 0 0 1rem; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

.muted { color: var(--muted); }

.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip { position: absolute; left: 12px; top: -60px; background: var(--button-bg); color: var(--button-text);
  padding: 0.5rem 0.9rem; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

section { margin: 0 0 84px; }

/* ---- Hero ---- */
.hero { text-align: center; padding: 72px 0 24px; margin-bottom: 64px;
  background: radial-gradient(circle 250px at 50% 136px, var(--glow), transparent); }
.hero-icon { display: block; width: 128px; height: 128px; margin: 0 auto 20px;
  filter: drop-shadow(0 10px 22px rgba(14, 34, 92, 0.25)); }
.hero h1 { font-size: clamp(2.5rem, 7vw, 3.4rem); letter-spacing: -0.025em; margin: 0 0 0.6rem; }
.tagline { font-size: clamp(1.3rem, 3.6vw, 1.6rem); font-weight: 600; color: var(--heading); margin-bottom: 0.4rem; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 30em; margin: 0 auto 2rem; text-wrap: balance; }

.cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.9rem 1.4rem; }
.soon { color: var(--muted); font-size: 0.95rem; }
.fine { color: var(--muted); font-size: 0.875rem; margin: 0.85rem 0 0; }
.counter { font-size: 0.875rem; color: var(--green-text); margin: 0.35rem 0 0; font-variant-numeric: tabular-nums; }
.counter strong { font-weight: 700; }

.button {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--button-bg); color: var(--button-text);
  font: inherit; font-weight: 600; font-size: 1.0625rem; line-height: 1.2;
  padding: 0.9rem 1.5rem; border: 0; border-radius: 12px; cursor: pointer; text-decoration: none;
  box-shadow: 0 1px 2px rgba(14, 34, 92, 0.2), 0 6px 18px rgba(14, 34, 92, 0.16);
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.button:hover { background: var(--button-hover); text-decoration: none; }
.button:active { transform: translateY(1px); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.button-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; }

/* ---- Why ---- */
.why p { font-size: 1.0625rem; }
.signature { color: var(--muted); font-style: italic; margin-top: 1.4rem; }

/* ---- Three points ---- */
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.point p { color: var(--muted); font-size: 0.975rem; margin: 0; }
.point-icon { width: 34px; height: 34px; margin-bottom: 0.6rem; fill: none; stroke: var(--icon); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }

/* ---- Screenshot ---- */
.shot { margin: 0 0 84px; text-align: center; }
.shot img { display: block; width: 100%; max-width: 340px; height: auto; margin: 0 auto; border-radius: 12px;
  box-shadow: var(--shot-shadow); }
.shot figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 1.1rem; text-wrap: balance; }

/* ---- Works with + search ---- */
.works h3 { margin-top: 2.2rem; font-size: 1.25rem; }
.search label { display: block; font-weight: 600; margin: 0.4rem 0 0.4rem; font-size: 0.95rem; }
input[type="search"], input[type="email"], input[type="text"], textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--field);
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 0.7rem 0.9rem;
}
input[type="search"] { font-size: 1.0625rem; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 1px; border-color: var(--focus); }

.uni-count { color: var(--muted); font-size: 0.875rem; margin: 0.6rem 0 0.2rem; min-height: 1.4em; }
.uni-results { list-style: none; margin: 0 0 1rem; padding: 0; }
.uni-results li { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.uni-results li:first-child { border-top: 1px solid var(--border); }
.uni-name { font-weight: 600; display: block; line-height: 1.35; }
.uni-place { color: var(--muted); font-size: 0.875rem; display: block; line-height: 1.35; }

.tag { flex: none; font-size: 0.75rem; font-weight: 600; line-height: 1; padding: 0.35rem 0.6rem;
  border-radius: 999px; white-space: nowrap; }
.tag-tested { background: var(--tag-tested-bg); color: var(--tag-tested-text); }
.tag-beta { background: var(--tag-beta-bg); color: var(--tag-beta-text); }
.tag-later { background: var(--tag-later-bg); color: var(--tag-later-text); }

/* ---- Feedback ---- */
.feedback:focus { outline: none; }
.feedback form { margin-top: 0.5rem; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 0.3rem; }
.stars-row { display: flex; gap: 0.2rem; }
.stars label { display: inline-flex; padding: 4px; cursor: pointer; border-radius: 8px; }
.stars svg { width: 38px; height: 38px; fill: var(--star-off); stroke: var(--star-off-stroke); stroke-width: 1.4;
  stroke-linejoin: round; transition: fill 0.1s ease, transform 0.1s ease; }
.stars label.on svg, .stars input:checked + label svg { fill: var(--star-on); stroke: var(--star-on-stroke); }
.stars label:hover svg { transform: scale(1.08); }
.stars input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 0; }

.field { margin-top: 1.3rem; }
.field > label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.field > label .muted { font-weight: 400; }
select { appearance: none; -webkit-appearance: none; padding-right: 2.4rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
textarea { resize: vertical; min-height: 7.5rem; line-height: 1.5; }
.hint { color: var(--muted); font-size: 0.85rem; margin: 0.35rem 0 0; }

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-end { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem 1.2rem; margin-top: 1.5rem; }
.fb-version-note { font-size: 0.875rem; margin: 0; }
.fb-status { margin: 0.9rem 0 0; min-height: 1.6em; font-weight: 600; }
.fb-status.ok { color: var(--green-text); }
.fb-status.err { color: var(--error); }

/* ---- Footer ---- */
.footer { color: var(--muted); font-size: 0.85rem; text-align: center; padding-top: 28px; padding-bottom: 48px;
  border-top: 1px solid var(--border); }
.footer p { margin: 0 auto 0.6rem; max-width: 40em; text-wrap: balance; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--link); }

/* ---- Legal pages ---- */
.topbar { display: flex; align-items: center; gap: 0.6rem; padding-top: 28px; padding-bottom: 8px; }
.topbar a { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--heading); font-weight: 700;
  text-decoration: none; font-size: 1.05rem; }
.topbar img { width: 32px; height: 32px; }
.legal { padding-top: 24px; padding-bottom: 56px; }
.legal h1 { font-size: 2rem; letter-spacing: -0.015em; margin: 0.5rem 0 0.4rem; }
.legal h2 { font-size: 1.2rem; margin: 2.2rem 0 0.6rem; }
.legal .meta { color: var(--muted); margin-bottom: 2rem; }
.legal ul { padding-left: 1.3rem; margin: 0 0 1rem; }
.legal li { margin-bottom: 0.45rem; }
.legal address { font-style: normal; margin-bottom: 1rem; }

/* ---- Admin (server/app.py) ---- */
.admin main.wide { max-width: 1100px; padding-top: 24px; padding-bottom: 48px; }
.admin h2 { margin-top: 2.4rem; font-size: 1.3rem; }
.table-wrap { overflow-x: auto; margin-bottom: 1rem; }
.admin table { border-collapse: collapse; font-size: 0.9rem; width: 100%; }
.admin th, .admin td { text-align: left; padding: 0.4rem 0.7rem; border-bottom: 1px solid var(--border);
  vertical-align: top; }
.admin th { background: var(--surface); }
.admin td { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- Small screens ---- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 48px; margin-bottom: 52px;
    background: radial-gradient(circle 165px at 50% 100px, var(--glow), transparent); }
  .hero-icon { width: 104px; height: 104px; }
  section, .shot { margin-bottom: 64px; }
  .points { grid-template-columns: 1fr; gap: 1.6rem; }
  .point { display: grid; grid-template-columns: 34px 1fr; column-gap: 1rem; }
  .point-icon { grid-row: span 2; margin: 0.1rem 0 0; }
  .cta { flex-direction: column; }
  .uni-results li { align-items: flex-start; }
  .stars svg { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
