/* ===================================================================
   NeighCheck — Shared Site Styles
   Ports the home-page warm paper aesthetic to every inner page.
   Used by: about, changelog, support, privacy, terms, delete-account,
   /for/* profession pages, /guides/* blog posts.
   The home page (index.html) keeps its own inline styles.
   =================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }

:root {
  /* Brand — locked to the home page */
  --nc-green: #34d399;
  --nc-green-deep: #059669;
  --nc-green-dark: #064e3b;
  --nc-green-tint: #d1fae5;
  --nc-gold: #fbbf24;
  --nc-red: #ef4444;

  --bg: #fbf9f4;
  --bg-2: #f5f1e8;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #94a3b8;
  --rule: #e7e2d4;
  --rule-strong: #d6d0bd;

  --display: "Fraunces", ui-serif, Georgia, serif;
  --body: "Manrope", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 28px;
  --shadow-card: 0 1px 0 rgba(15,23,42,.04), 0 10px 30px -12px rgba(15,23,42,.12);
  --shadow-hover: 0 1px 0 rgba(15,23,42,.06), 0 22px 50px -16px rgba(15,23,42,.22);

  --max: 1180px;
  --max-prose: 720px;
  --gutter: clamp(20px, 4vw, 40px);
}

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
  font-variation-settings: "opsz" 144;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 700; }

p { margin: 0 0 1em; }
.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--nc-green-deep);
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-prose { max-width: var(--max-prose); margin: 0 auto; padding: 0 var(--gutter); }

/* ─────────── Header ─────────── */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 249, 244, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex; align-items: center; gap: 32px;
  padding: 14px 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px -2px rgba(5,150,105,.5), 0 0 0 1px rgba(15,23,42,.05);
  background: linear-gradient(140deg, var(--nc-green) 0%, var(--nc-green-deep) 100%);
}
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.nav ul {
  display: flex; gap: 28px;
  margin-left: auto;
}
.nav ul a {
  font-size: 0.95rem; font-weight: 500;
  color: var(--ink-soft);
  transition: color .18s ease;
}
.nav ul a:hover, .nav ul a.active { color: var(--nc-green-deep); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink);
  color: var(--bg);
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform .18s ease, background .18s ease;
}
.nav-cta:hover { background: var(--nc-green-deep); transform: translateY(-1px); }
@media (max-width: 820px) {
  .nav ul { display: none; }
  .nav-cta { padding: 8px 14px; }
}

/* ─────────── Page Hero ─────────── */
.page-hero {
  position: relative;
  padding: 70px 0 40px;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 380px at 88% -20%, rgba(52,211,153,.14), transparent 70%),
    radial-gradient(500px 300px at -10% 30%, rgba(251,191,36,.08), transparent 70%);
  pointer-events: none;
}
.page-hero > .wrap, .page-hero > .wrap-prose { position: relative; }
.page-hero .eyebrow { display: inline-block; margin-bottom: 18px; }
.page-hero h1 em { font-style: italic; color: var(--nc-green-deep); font-weight: 800; }
.page-hero .lede {
  margin-top: 18px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 60ch;
}
.crumbs {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.crumbs a { color: var(--ink-soft); transition: color .15s ease; }
.crumbs a:hover { color: var(--nc-green-deep); }
.crumbs .sep { color: var(--ink-faint); }

/* ─────────── Body / Article ─────────── */
.section { padding: 60px 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section.alt { background: var(--bg-2); }

article.prose {
  padding: 50px 0 80px;
}
article.prose h2 {
  margin-top: 2.2em;
  margin-bottom: 0.5em;
  letter-spacing: -0.025em;
}
article.prose h2:first-child, article.prose > *:first-child { margin-top: 0; }
article.prose h3 {
  margin-top: 1.8em;
  margin-bottom: 0.4em;
}
article.prose p,
article.prose li {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}
article.prose ul,
article.prose ol {
  padding-left: 1.3em;
  margin: 0 0 1.2em;
  list-style: disc;
}
article.prose ol { list-style: decimal; }
article.prose li { margin-bottom: 0.4em; }
article.prose strong { color: var(--ink); font-weight: 700; }
article.prose a {
  color: var(--nc-green-deep);
  text-decoration: underline;
  text-decoration-color: rgba(5,150,105,.3);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease;
}
article.prose a:hover { text-decoration-color: var(--nc-green-deep); }
article.prose blockquote {
  margin: 1.6em 0;
  padding: 18px 22px;
  border-left: 3px solid var(--nc-green);
  background: var(--bg-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
}
article.prose hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.4em 0;
}
article.prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--nc-green-dark);
}

.date-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

/* ─────────── Callout / Note Cards ─────────── */
.callout {
  margin: 1.6em 0;
  padding: 22px 26px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  position: relative;
}
.callout h4 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--nc-green-deep);
  font-weight: 700;
}
.callout p { margin: 0; color: var(--ink-soft); }
.callout.warn { border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.04); }
.callout.warn h4 { color: var(--nc-red); }
.callout.gold { border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.07); }
.callout.gold h4 { color: #92400e; }

/* ─────────── Feature Cards ─────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.feature {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--rule-strong);
}
.feature-ico {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--nc-green-tint);
  color: var(--nc-green-deep);
  margin-bottom: 14px;
}
.feature-ico svg { width: 20px; height: 20px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 6px; }
.feature p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ─────────── Tag Pills ─────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--nc-green-tint);
  color: var(--nc-green-deep);
}
.pill.gold { background: rgba(251,191,36,.18); color: #92400e; }
.pill.ink  { background: var(--ink); color: var(--bg); }

/* ─────────── CTA Buttons ─────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform .18s ease, background .18s ease;
}
.btn:hover { background: var(--nc-green-deep); transform: translateY(-1px); }
.btn.outline {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--rule-strong);
}
.btn.outline:hover { background: var(--ink); color: var(--bg); box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 12px;
  transition: transform .2s ease, background .2s ease;
  min-width: 170px;
}
.store-btn:hover { background: var(--nc-green-deep); transform: translateY(-2px); }
.store-btn svg { width: 24px; height: 24px; flex-shrink: 0; }
.store-btn-text { display: flex; flex-direction: column; line-height: 1.1; }
.store-btn-text small { font-size: 0.7rem; opacity: 0.75; }
.store-btn-text strong { font-size: 1.05rem; font-weight: 700; }

/* ─────────── Inline app-store row used at end of pages ─────────── */
.store-row {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin: 28px 0 0;
}

/* ─────────── Article cards (blog / guides index) ─────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 32px;
}
.card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--rule-strong);
}
.card .pill { align-self: flex-start; margin-bottom: 14px; }
.card h3 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 10px;
}
.card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
  flex: 1;
}
.card .read-on {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--nc-green-deep);
  font-weight: 700;
}

/* ─────────── Forms ─────────── */
form .field { margin-bottom: 18px; }
form label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
form input[type="email"],
form input[type="password"],
form input[type="text"],
form textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
form input:focus, form textarea:focus {
  border-color: var(--nc-green-deep);
  box-shadow: 0 0 0 3px rgba(5,150,105,.12);
}
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  padding: 14px 22px;
  background: var(--nc-red);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}
.btn-danger:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-danger:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.error-msg { color: var(--nc-red); font-size: 0.9rem; margin: 6px 0 0; display: none; }
.success-msg {
  display: none;
  background: var(--nc-green-tint);
  border: 1px solid rgba(5,150,105,.25);
  color: var(--nc-green-dark);
  padding: 18px 22px;
  border-radius: var(--radius);
  margin-top: 20px;
}
.success-msg.show, .error-msg.show { display: block; }

/* ─────────── FAQ accordion ─────────── */
.faq-list { display: grid; gap: 12px; margin-top: 28px; }
.faq {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 4px 0;
  transition: border-color .15s ease;
}
.faq:hover { border-color: var(--rule-strong); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--nc-green-deep);
  transition: transform .2s ease;
}
.faq[open] summary::after { content: "−"; }
.faq-body {
  padding: 0 22px 18px;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* ─────────── Footer ─────────── */
footer.site {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 32px;
  margin-top: 60px;
}
footer.site .brand { color: #fff; margin-bottom: 12px; }
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}
.foot-brand p { color: rgba(255,255,255,0.55); font-size: 0.93rem; max-width: 32ch; }
.foot-col h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
  font-weight: 700;
}
.foot-col ul { display: grid; gap: 10px; }
.foot-col a {
  color: rgba(255,255,255,0.78);
  font-size: 0.95rem;
  transition: color .15s ease;
}
.foot-col a:hover { color: var(--nc-green); }
.foot-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}
@media (max-width: 880px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .foot-brand { grid-column: 1 / -1; }
}

/* ─────────── Profession-page bits ─────────── */
.pro-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
}
.pro-hero-icon {
  font-size: clamp(4rem, 8vw, 6rem);
  line-height: 1;
  filter: drop-shadow(0 8px 20px rgba(15,23,42,.12));
}
@media (max-width: 720px) {
  .pro-hero { grid-template-columns: 1fr; }
}
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 32px 0;
}
.kpi {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.kpi .lbl {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.kpi .num {
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--nc-green-deep);
  line-height: 1;
  margin-bottom: 4px;
}
.kpi .sub { font-size: 0.85rem; color: var(--ink-faint); }

/* ─────────── Final CTA strip on inner pages ─────────── */
.cta-strip {
  background: var(--ink);
  color: var(--bg);
  padding: 60px 0;
  text-align: center;
}
.cta-strip h2 { color: var(--bg); }
.cta-strip h2 em { color: var(--nc-green); font-style: italic; }
.cta-strip p { color: rgba(255,255,255,0.75); max-width: 52ch; margin: 16px auto 0; }
.cta-strip .store-row { justify-content: center; }

/* ─────────── Reveal-on-scroll ─────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ----- card-link (clickable cards in card-grid) ----- */
.card-link {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 14px; padding: 22px 22px 20px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card-link:hover {
  transform: translateY(-3px);
  border-color: var(--rule-strong);
  box-shadow: 0 18px 36px -28px rgba(15,23,42,0.18);
}
.card-link .pill { align-self: flex-start; margin-bottom: 14px; }
.card-link h3 {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 700;
  margin: 0 0 8px; line-height: 1.25; color: var(--ink);
}
.card-link p { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 14px; }
.card-arrow {
  margin-top: auto; color: var(--nc-green-deep);
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
}

/* ----- data-table (used in long-form guides) ----- */
.data-table {
  width: 100%; border-collapse: collapse;
  margin: 22px 0;
  font-size: 0.97rem;
  background: var(--surface);
  border: 1px solid var(--rule); border-radius: 10px; overflow: hidden;
}
.data-table th, .data-table td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--rule);
}
.data-table thead th {
  background: rgba(52,211,153,0.07);
  font-family: var(--font-display); font-weight: 700;
  color: var(--ink);
}
.data-table tbody tr:last-child td { border-bottom: 0; }

/* ----- callout-note (inline tax/legal disclaimer pill on page-hero) ----- */
.callout-note {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 16px;
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-style: italic;
  max-width: 60ch;
}
