/* Socnivo resident guide — brand tokens mirror app/lib/core/theme/tokens.dart */
:root {
  --ink: #191b2a;
  --muted: #6b7085;
  --faint: #9aa0b5;
  --canvas: #f5f6fb;
  --card: #ffffff;
  --hairline: #e8eaf2;
  --indigo: #4f46e5;
  --violet: #6d28d9;
  --red: #e0384b;
  --amber: #b45309;
  --amber-bg: #fdf0d7;
  --green: #047857;
  --green-bg: #d9f3e6;
  --violet-bg: #ece7fd;
  --blue: #1d4ed8;
  --blue-bg: #dcebfd;
  --hero: linear-gradient(135deg, #4338ca 0%, #5b21b6 55%, #7c3aed 100%);
  --brand: linear-gradient(135deg, #4f46e5, #6d28d9);
  --shadow-card: 0 2px 6px rgba(25, 27, 42, 0.05), 0 14px 34px rgba(25, 27, 42, 0.08);
  --shadow-btn: 0 8px 18px rgba(79, 70, 229, 0.35);
  --r-card: 22px;
  --r-btn: 13px;
  --r-pill: 999px;
  --sidebar-w: 288px;
  --nav-h: 68px;
  --shadow-soft: 0 1px 2px rgba(25, 27, 42, 0.04), 0 8px 24px rgba(25, 27, 42, 0.06);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Site header (matches the landing page) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 800; font-size: 14.5px;
  padding: 11px 18px; border-radius: var(--r-btn); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .18s cubic-bezier(.3, 1.35, .45, 1), box-shadow .2s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(79, 70, 229, .42); }

.site-header {
  position: sticky; top: 0; z-index: 60; height: var(--nav-h);
  background: rgba(245, 246, 251, 0.9); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.site-header-inner { height: var(--nav-h); display: flex; align-items: center; gap: 22px; padding: 0 22px; }
.site-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); }
.site-brand:hover { text-decoration: none; }
.site-brand img { width: 34px; height: 34px; flex: 0 0 34px; object-fit: contain; display: block; }
.site-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-links a { color: var(--muted); font-weight: 700; font-size: 14.5px; padding: 9px 12px; border-radius: 9px; }
.site-links a:hover { color: var(--ink); background: rgba(25, 27, 42, .05); text-decoration: none; }
.site-links a[aria-current="page"] { color: var(--indigo); }
.site-cta { display: flex; align-items: center; gap: 10px; }
.site-toggle { display: none; }
.drawer-site-nav { display: none; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  position: sticky;
  top: var(--nav-h);
  align-self: flex-start;
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  background: var(--card);
  border-right: 1px solid var(--hairline);
  padding: 22px 16px 40px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 18px;
}
.brand-mark {
  width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; display: block;
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.3px; }
.brand-sub { font-size: 11.5px; color: var(--faint); font-weight: 600; margin-top: -2px; }

.search-wrap { position: relative; margin: 4px 4px 16px; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
#nav-search {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-btn);
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  color: var(--ink); background: var(--canvas);
  outline: none;
}
#nav-search:focus { border-color: var(--indigo); background: var(--card); }

.nav-group { margin-bottom: 14px; }
.nav-group-title {
  font-size: 11px; font-weight: 800; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--faint);
  padding: 6px 10px;
}
.nav-link {
  display: block;
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 600; font-size: 13.5px;
  border-left: 2px solid transparent;
}
.nav-link:hover { background: var(--canvas); color: var(--ink); text-decoration: none; }
.nav-link.active {
  color: var(--indigo);
  background: var(--violet-bg);
  border-left-color: var(--indigo);
}
.nav-link.hidden { display: none; }
.nav-group.hidden { display: none; }

/* ---------- Content ---------- */
.content { flex: 1 1 auto; min-width: 0; padding: 0 40px 120px; max-width: 900px; margin: 0 auto; }
.hero {
  background: var(--hero);
  color: #fff;
  border-radius: var(--r-card);
  padding: 40px 36px;
  margin: 32px 0 28px;
  box-shadow: var(--shadow-card);
}
.hero h1 { margin: 0 0 8px; font-size: 34px; font-weight: 800; letter-spacing: -0.8px; }
.hero p { margin: 0; font-size: 16px; font-weight: 500; opacity: 0.92; max-width: 60ch; }
.hero .pills { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero .pill {
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--r-pill);
  padding: 6px 14px; font-size: 12.5px; font-weight: 700;
  backdrop-filter: blur(4px);
}

section.doc { scroll-margin-top: 20px; padding-top: 26px; }
section.doc > h2 {
  font-size: 24px; font-weight: 800; letter-spacing: -0.4px;
  margin: 0 0 4px; display: flex; align-items: center; gap: 10px;
}
section.doc > h2 .num {
  font-size: 13px; font-weight: 800; color: #fff;
  background: var(--brand); border-radius: 9px;
  width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px;
}
.whatfor { color: var(--muted); font-weight: 600; margin: 2px 0 18px; font-size: 15px; }

.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 24px 26px;
  margin-bottom: 22px;
}
.card h3 { margin: 0 0 12px; font-size: 16px; font-weight: 800; }
.card h3:not(:first-child) { margin-top: 22px; }

ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
ol.steps > li {
  position: relative; padding: 0 0 14px 40px; counter-increment: step;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--violet-bg); color: var(--violet);
  font-size: 13px; font-weight: 800; display: grid; place-items: center;
}
ol.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 12px; top: 28px; bottom: 4px;
  width: 2px; background: var(--hairline);
}
ol.steps b { font-weight: 800; }
ul.plain { margin: 8px 0; padding-left: 20px; }
ul.plain li { margin-bottom: 6px; }

.tip {
  display: flex; gap: 12px;
  background: var(--amber-bg);
  border-radius: var(--r-btn);
  padding: 12px 16px; margin: 16px 0 4px;
  font-size: 13.5px; color: #7a4f12; font-weight: 600;
}
.tip.note { background: var(--blue-bg); color: #1a3a8f; }
.tip.warn { background: #fce3e7; color: #9a2233; }
.tip svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; }
.tip b { font-weight: 800; }

/* ---------- Phone-framed screenshots ---------- */
.shots { display: flex; gap: 22px; flex-wrap: wrap; margin: 18px 0 4px; }
/* A section with a single screenshot centers it (multi-shot rows stay left in their row). */
.shots:has(> .shot:only-child) { justify-content: center; }
.shot { width: 232px; max-width: 100%; }
.phone {
  border-radius: 34px;
  background: #0e0f17;
  padding: 9px;
  box-shadow: 0 18px 44px rgba(25, 27, 42, 0.22);
  border: 1px solid #2a2d3f;
}
.phone img {
  display: block; width: 100%; border-radius: 26px; background: var(--canvas);
}
.shot .cap { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 10px; text-align: center; }
.shot.wide { width: 300px; }
/* `.tall` crops the bottom of a screenshot (used to hide the debug-only
   server toggle on the welcome screen) — keeps the top of the frame. */
.shot.tall .phone img { aspect-ratio: 0.79; object-fit: cover; object-position: top center; }

.no-results { color: var(--faint); font-size: 13px; font-weight: 600; padding: 8px 12px; margin: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .site-links { display: none; }
  .site-cta { margin-left: auto; }
  .site-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px;
    border: 1px solid var(--hairline); background: var(--card); cursor: pointer; color: var(--ink);
  }
  /* Site nav shows inside the opened drawer on mobile (it's in the header on desktop). */
  .drawer-site-nav {
    display: block; margin: 2px 4px 12px; padding-bottom: 12px;
    border-bottom: 1px solid var(--hairline);
  }
  .drawer-site-nav a {
    display: block; padding: 9px 10px; border-radius: 9px;
    color: var(--ink); font-weight: 700; font-size: 14px;
  }
  .drawer-site-nav a:hover { background: var(--canvas); text-decoration: none; }
  .sidebar {
    position: fixed; z-index: 50; top: var(--nav-h); left: 0;
    height: calc(100vh - var(--nav-h));
    transform: translateX(-100%); transition: transform 0.25s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .scrim {
    display: none; position: fixed; inset: var(--nav-h) 0 0; z-index: 45;
    background: rgba(15, 16, 23, 0.4);
  }
  body.nav-open .scrim { display: block; }
  .content { padding: 0 18px 100px; }
  .hero { padding: 28px 22px; margin-top: 18px; }
  .hero h1 { font-size: 26px; }
}
@media (min-width: 901px) { .scrim { display: none; } }

.footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--hairline); color: var(--faint); font-size: 13px; }
.footer-links { margin-top: 8px; }
.footer-links a { color: var(--muted); font-weight: 700; }
.footer-links a:hover { color: var(--indigo); }
