@import url('https://fonts.googleapis.com/css2?family=Lora:wght@500;600;700&display=swap');
/* ============================================================
   Palma Permit — design system
   Institutional light theme: architectural off-white canvas,
   slate text, authoritative navy accents, flat industrial parts.
   ============================================================ */

:root {
  /* Surfaces */
  --bg:        #FFFFFF;
  --bg-2:      #FFFFFF;
  --bg-3:      #F1F5F9;
  --raised:    #F1F5F9;
  --border:    #E2E8F0;
  --border-2:  #CBD5E1;

  /* Text */
  --text:      #0F172A;
  --muted:     #475569;
  --faint:     #64748B;

  /* Brand + status */
  --accent:    #1E3A8A;   /* authoritative navy — primary action */
  --accent-2:  #1E40AF;
  --accent-ink:#FFFFFF;
  --teal:      #2E7D32;   /* secondary / positive accent (slate green) */
  --success:   #2E7D32;
  --danger:    #B91C1C;
  --warn:      #D97706;   /* construction orange */

  --ring: 0 0 0 3px rgba(30,58,138,.25);
  --shadow: none;
  --radius: 4px;
  --radius-sm: 3px;
  --maxw: 1180px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* flat institutional canvas — no ambient glow */
body::before { content: none; }
main, header, footer, section { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section.tight { padding: 56px 0; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--font-serif); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.lead { font-size: 1.18rem; color: #4B5563; max-width: 640px; font-style: normal; }
.eyebrow {
  display: inline-block; padding: 4px 12px; font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #1E40AF; background: #EFF6FF; border-radius: 9999px; margin-bottom: 18px;
}
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  padding: 13px 22px; border-radius: var(--radius-sm);
  border: 1px solid transparent; transition: .18s ease; white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { background: rgba(30,58,138,.06); }
.btn-lg { padding: 16px 28px; font-size: 1.06rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.18rem; letter-spacing: -.01em; }
.brand .logo { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: .96rem; transition: .15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 92px 0 64px; }
.hero h1 { max-width: 14ch; }
.hero .lead { margin-top: 6px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-note { margin-top: 16px; color: var(--faint); font-size: .92rem; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }

/* trust strip */
.trust { display: flex; gap: 30px; flex-wrap: wrap; align-items: center; color: var(--faint); font-size: .9rem; margin-top: 34px; }
.trust b { color: var(--text); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px;
}
.card.pad-lg { padding: 32px; }
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.feature h3 { display: flex; align-items: center; gap: 10px; }
.icon-badge {
  width: 42px; height: 42px; border-radius: 4px; flex: none;
  display: grid; place-items: center;
  background: rgba(30,58,138,.08); color: var(--accent);
  border: 1px solid rgba(30,58,138,.2);
}
.icon-badge.teal { background: rgba(46,125,50,.1); color: var(--teal); border-color: rgba(46,125,50,.25); }

/* steps */
.step-num {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: var(--accent-ink); background: var(--accent); margin-bottom: 14px;
}

/* comparison */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.compare .card .row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.compare .card .row:last-child { border-bottom: 0; }
.compare .old h3 { color: var(--muted); }
.compare .new { border-color: var(--accent); border-width: 2px; }
.tag { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 3px; }
.tag.amber { background: rgba(30,58,138,.1); color: var(--accent); }
.tag.green { background: rgba(46,125,50,.12); color: var(--success); }
.tag.teal { background: rgba(46,125,50,.12); color: var(--teal); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; text-align: center; }
.stat .num { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; color: var(--accent); }
.stat .num .accent { color: var(--accent); }
.stat .lbl { color: var(--muted); font-size: .92rem; }

/* testimonials */
.quote { font-size: 1.02rem; border-radius: 8px; box-shadow: 0 4px 6px -1px rgba(0,0,0,.05); }
.quote .who { margin-top: 16px; display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: .9rem; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-weight: 800; color: #fff; border: 0; }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; align-items: stretch; }
.price { display: flex; flex-direction: column; }
.price.popular { border-color: var(--accent); box-shadow: var(--shadow); position: relative; }
.price .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); }
.price .amt { font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 2px; }
.price .amt span { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; }
.price li { display: flex; gap: 10px; color: var(--muted); }
.price li svg { flex: none; color: var(--success); margin-top: 3px; }
.price .btn { margin-top: auto; }

/* ---------- Analyzer ---------- */
.analyzer { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; align-items: start; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 7px; font-size: .94rem; }
.field .hint { color: var(--faint); font-weight: 500; font-size: .82rem; }
select, input[type=text], input[type=email] {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); border: 1px solid var(--border-2);
  font: inherit; font-size: 1rem;
}
select:focus, input:focus { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.checklist { display: grid; gap: 8px; max-height: 360px; overflow: auto; padding-right: 6px; }
.check {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
}
.check:hover { border-color: var(--border-2); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.check .lab { font-size: .94rem; }
.check .crit { font-size: .72rem; font-weight: 700; color: var(--danger); letter-spacing: .05em; }
.check .ok { color: var(--faint); font-size: .72rem; letter-spacing: .05em; }
.check .tip { color: var(--faint); font-size: .82rem; margin-top: 3px; }

/* report */
.report { position: sticky; top: 90px; }
.score-ring { display: flex; align-items: center; gap: 20px; }
.ring { --p: 0; width: 104px; height: 104px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--accent) calc(var(--p)*1%), var(--border) 0);
  display: grid; place-items: center; }
.ring .inner { width: 80px; height: 80px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; }
.report .verdict { font-weight: 700; }
.report ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 9px; }
.report li { display: flex; gap: 9px; align-items: flex-start; font-size: .92rem; }
.report li.miss { color: var(--text); }
.report li .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; }
.dot.red { background: var(--danger); } .dot.amber { background: var(--warn); } .dot.green { background: var(--success); }
.gotcha-box { margin-top: 18px; padding: 16px; border-radius: var(--radius-sm); background: rgba(243,177,60,.07); border: 1px solid rgba(243,177,60,.25); }
.gotcha-box h4 { margin: 0 0 8px; font-size: .9rem; color: var(--warn); letter-spacing: .03em; text-transform: uppercase; }
.gotcha-box ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .9rem; }
.gotcha-box li { margin-bottom: 6px; }

/* ---------- Cities ---------- */
.city-filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 6px; }
.chip { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--bg-2); color: var(--muted); cursor: pointer; font-weight: 600; font-size: .9rem; }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.city-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.city-card { display: block; padding: 18px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); transition: .15s; }
.city-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.city-card .nm { font-weight: 700; }
.city-card .meta { color: var(--faint); font-size: .84rem; margin-top: 4px; }
.city-card .badges { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.minibadge { font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--bg-3); color: var(--muted); border: 1px solid var(--border); }
.minibadge.hvhz { color: var(--warn); border-color: rgba(243,177,60,.35); }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--bg-2); overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 18px 20px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { color: var(--accent); transition: .2s; }
.faq-item[open] summary .plus { transform: rotate(45deg); }
.faq-item .body { padding: 0 20px 18px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--border); border-radius: 20px; padding: 48px; text-align: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 36px; margin-top: 40px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin: 0 0 14px; }
.footer-grid a { display: block; color: var(--muted); padding: 5px 0; font-size: .92rem; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .86rem; color: var(--faint); }

.disclaimer { font-size: .82rem; color: var(--faint); max-width: 760px; margin: 28px auto 0; text-align: center; }

/* ---------- Enterprise dashboard (hero) ---------- */
.dashboard .dash-rows { display: grid; gap: 11px; margin: 2px 0 16px; }
.dash-row { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 12px; font-size: .9rem; }
.dash-region { color: var(--muted); font-weight: 600; }
.dash-bar { height: 8px; border-radius: 99px; background: var(--bg-3); overflow: hidden; }
.dash-bar i { display: block; height: 100%; border-radius: 99px; }
.dash-pct { text-align: right; font-weight: 700; color: var(--text); }
.dash-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; border-top: 1px solid var(--border); padding-top: 15px; }
.dash-foot > div { display: flex; flex-direction: column; gap: 3px; font-size: .8rem; }
.dash-foot b { color: var(--text); font-size: 1.1rem; }

/* ---------- Integration logos ---------- */
.logos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.logo-chip { font-size: .82rem; font-weight: 700; color: var(--muted); background: var(--bg); border: 1px solid var(--border-2); border-radius: 3px; padding: 8px 13px; }

/* ---------- Hot-drop & ledger visuals ---------- */
.hotdrop { margin-top: 18px; }
.hotdrop-zone { border: 1.5px dashed var(--border-2); border-radius: 4px; background: var(--bg-3); text-align: center; padding: 22px 16px; color: var(--accent); }
.hotdrop-title { font-weight: 700; color: var(--text); margin-top: 8px; }
.hotdrop-sub { color: var(--faint); font-size: .82rem; margin-top: 2px; }
.hotdrop-files { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.hotdrop-files li { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; padding: 9px 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 3px; }
.hd-ok { color: var(--success); font-weight: 700; font-size: .76rem; }
.hd-run { color: var(--warn); font-weight: 700; font-size: .76rem; }
.ledger { margin-top: 18px; }
.ledger-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 3px; padding: 10px 12px; }
.lk-url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; color: var(--accent); }
.lk-tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--border-2); border-radius: 3px; padding: 3px 7px; }
.ledger-rows { list-style: none; padding: 0; margin: 10px 0 0; }
.ledger-rows li { display: flex; justify-content: space-between; font-size: .88rem; padding: 10px 2px; border-bottom: 1px solid var(--border); color: var(--muted); }
.ledger-rows li:last-child { border-bottom: 0; }
.ledger-rows b { color: var(--text); }

/* ---------- Members-only (revealed by auth.js for subscribers) ---------- */
.pp-members-only { display: none; }

/* ---------- Section bands ---------- */
.band { background: #F8F9FA; }

/* ---------- Integration logos row ---------- */
.intlogos-wrap { text-align: center; }
.intlogos-label { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 22px; }
.intlogos { display: flex; justify-content: center; align-items: center; gap: 56px; flex-wrap: wrap; }
.intlogo { font-family: var(--font-serif); font-weight: 700; font-size: 1.6rem; color: #0F172A; filter: grayscale(100%); opacity: .5; transition: all .3s ease; }
.intlogo:hover { filter: none; opacity: 1; color: var(--accent); }

/* ---------- Responsive overrides (added) ---------- */
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .analyzer, .compare, .footer-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .price-grid, .city-grid, .stats { grid-template-columns: 1fr 1fr; }
  .report { position: static; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 16px 24px; gap: 16px; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4, .price-grid, .city-grid, .stats { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .cta-band { padding: 32px 20px; }
}

/* ---- member area additions ---- */
.stack { display: flex; flex-direction: column; gap: 10px; }
.row-item { display: flex; justify-content: space-between; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
a.row-item:hover { border-color: var(--accent); }
input, textarea, select { background: #0f1626; border: 1px solid #243049; border-radius: 8px; color: var(--text); padding: 10px 12px; font: inherit; }
textarea:focus { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #243049; white-space: nowrap; }
.admin-table th { color: var(--muted); text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; }
