:root {
  --brand: #116149;
  --brand-dark: #0b4434;
  --brand-soft: #e6f2ee;
  --accent: #f2a541;
  --ink: #17221f;
  --muted: #5d6b67;
  --line: #dfe5e3;
  --bg: #f7f9f8;
  --card: #ffffff;
  --red: #c0392b;   --red-soft: #fdecea;
  --amber: #b26a00; --amber-soft: #fff4e0;
  --blue: #1f5f9e;  --blue-soft: #e8f0fa;
  --green: #1e7a4f; --green-soft: #e5f4ec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 32, .06), 0 6px 20px rgba(16, 40, 32, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; min-width: 0; width: 100%; }
img, input, select { max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
p { margin: 0 0 .75rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.page { padding-top: 28px; padding-bottom: 56px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.inline { display: inline; }

/* top bar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .5rem; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .95rem; }
.nav { display: flex; align-items: center; gap: 1.1rem; }
.nav a:not(.btn), .linklike { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--brand); }
.linklike { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--brand); }
.linklike.danger, .danger { color: var(--red); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: 10px;
  padding: .62rem 1.1rem; font: 600 .95rem/1.2 inherit; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #3a2400; }
.btn-accent:hover { background: #e3932a; }
.btn-danger { background: var(--red); border-color: var(--red); }
.btn-danger:hover { background: #a32f23; }
.btn-small { padding: .4rem .75rem; font-size: .85rem; }
.btn-large { padding: .85rem 1.4rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* flashes */
.flashes { margin: 16px auto 0; }
.flash { padding: .75rem 1rem; border-radius: 10px; margin-bottom: .6rem; border: 1px solid; }
.flash-success { background: var(--green-soft); border-color: #bfe3cf; color: #134d32; }
.flash-error { background: var(--red-soft); border-color: #f5c6c0; color: #7d2118; }
.flash-info { background: var(--blue-soft); border-color: #c7daf0; color: #17446f; }

/* hero */
.hero { background: linear-gradient(160deg, #0f5a44 0%, #116149 55%, #1b7a5d 100%); color: #fff; padding: 64px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 1rem; }
.hero .lead { color: #d9efe7; }
.hero .muted { color: #b8dccf; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.1); }
.hero .btn { background: #fff; color: var(--brand); border-color: #fff; }
.hero .btn:hover { background: var(--brand-soft); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); }
.cta-row { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.5rem 0 .8rem; }
.hero-card { background: #fff; color: var(--ink); border-radius: 18px; padding: 26px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.hero-card-title { font-weight: 700; font-size: 1.1rem; margin: .8rem 0; }
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.mini-list li { display: flex; align-items: center; gap: .6rem; font-size: .95rem; }

.section { padding: 56px 20px; }
.section-title { text-align: center; font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 2rem; }
.band { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat-card, .feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.band .feature { background: var(--bg); }
.stat { font-size: 2.2rem; font-weight: 800; color: var(--red); margin-bottom: .3rem; }
.feature h3 { font-size: 1.05rem; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--accent); color: #3a2400; padding: .1rem .4rem; border-radius: 5px; vertical-align: middle; }

/* pills */
.pill { display: inline-block; padding: .18rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.pill-overdue { background: var(--red-soft); color: var(--red); }
.pill-missing { background: #f3e8fd; color: #6b2fa3; }
.pill-due_soon { background: var(--amber-soft); color: var(--amber); }
.pill-upcoming { background: var(--blue-soft); color: var(--blue); }
.pill-ok { background: var(--green-soft); color: var(--green); }
.pill-row { display: flex; flex-wrap: wrap; gap: .4rem; }

/* score ring */
.score-ring {
  --size: 84px; --score: 0; --col: var(--green);
  width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  background: conic-gradient(var(--col) calc(var(--score) * 1%), #e7ecea 0);
  display: grid; place-items: center;
}
.score-ring span { width: calc(var(--size) - 16px); height: calc(var(--size) - 16px); border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; }
.score-ring-sm { --size: 54px; }
.score-ring-sm span { font-size: .9rem; width: calc(var(--size) - 12px); height: calc(var(--size) - 12px); }
.score-mid { --col: var(--accent); }
.score-bad { --col: var(--red); }

/* pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 32px 0 48px; align-items: stretch; }
.price-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.price-card form, .price-card > .btn, .price-card .current-plan { margin-top: auto; }
.price-card-featured { border: 2px solid var(--brand); }
.ribbon { position: absolute; top: -12px; left: 24px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: .2rem .6rem; border-radius: 6px; }
.price { font-size: 2.4rem; font-weight: 800; margin: .5rem 0 1rem; }
.price span { font-size: 1rem; color: var(--muted); font-weight: 500; }
.checks { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .5rem; }
.checks li::before { content: "✓"; color: var(--brand); font-weight: 800; margin-right: .5rem; }
.current-plan { text-align: center; font-weight: 700; color: var(--brand); padding: .6rem; background: var(--brand-soft); border-radius: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: .6rem; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: .6rem 0 0; color: var(--muted); }

/* forms */
.auth-card, .form-card { max-width: 440px; margin: 24px auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 32px; box-shadow: var(--shadow); }
.form-card { max-width: 620px; }
.form-card-wide { max-width: 760px; }
.form { display: grid; gap: .9rem; }
.form label { display: grid; gap: .3rem; font-weight: 600; font-size: .92rem; }
.form label .muted { font-weight: 400; }
input, select, textarea {
  font: inherit; padding: .6rem .7rem; border: 1px solid #c9d3d0; border-radius: 9px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus { outline: 2px solid rgba(17, 97, 73, .35); border-color: var(--brand); }
.form label.check { display: flex; align-items: flex-start; gap: .55rem; font-weight: 400; }
.check input { width: auto; margin-top: .25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.form-actions { display: flex; gap: .6rem; margin-top: .4rem; }
.form-inline { display: flex; gap: .6rem; flex-wrap: wrap; }
.form-inline input { flex: 1; min-width: 200px; }
.hint { font-size: .85rem; color: var(--muted); margin: -.4rem 0 0; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem 1.2rem; display: grid; gap: .9rem; margin: 0; }
legend { font-weight: 700; padding: 0 .4rem; color: var(--brand); }
.check-row { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.copy-field { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; margin-bottom: .6rem; background: var(--bg); }

/* app pages */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.head-with-score { display: flex; align-items: center; gap: 1rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.crumbs { margin: 0 0 .6rem; font-size: .9rem; }
.crumbs a { text-decoration: none; }
.h2 { font-size: 1.2rem; margin: 1.8rem 0 .8rem; }
.panel .h2 { margin-top: 0; }
.empty { text-align: center; background: #fff; border: 1px dashed #c3cfcb; border-radius: 18px; padding: 56px 24px; }
.summary-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: stretch; }
.summary-score { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.summary-label { font-weight: 700; margin: 0; }
.upsell { flex: 1; min-width: 260px; background: var(--amber-soft); border: 1px solid #f3d9ab; border-radius: var(--radius); padding: 18px 22px; display: flex; flex-direction: column; justify-content: center; gap: .3rem; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #fafcfb; }
.table tr:last-child td { border-bottom: 0; }
.prop-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.prop-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.prop-card-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.prop-card h3 { font-size: 1.05rem; margin: 0; }

.obligations { display: grid; gap: .6rem; }
.ob { display: flex; justify-content: space-between; gap: 1rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.ob-overdue { border-left-color: var(--red); }
.ob-missing { border-left-color: #8e44ad; }
.ob-due_soon { border-left-color: var(--accent); }
.ob-upcoming { border-left-color: var(--blue); }
.ob-ok { border-left-color: var(--green); }
.ob-main { display: flex; gap: .8rem; align-items: flex-start; min-width: 0; }
.ob-main > div { min-width: 0; }
.ob-main .pill { margin-top: .1rem; min-width: 74px; text-align: center; }
.ob-title { font-weight: 700; margin: 0 0 .2rem; }
.ob-detail { color: var(--muted); font-size: .9rem; margin: 0; }
.ob-penalty { color: var(--red); font-size: .85rem; font-weight: 600; margin: .3rem 0 0; }
.ob-side { text-align: right; white-space: nowrap; }
.ob-due { font-weight: 700; margin: 0 0 .2rem; font-size: .92rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 28px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.tenancy { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.tenancy:first-of-type { border-top: 0; }
.tenancy-ended { opacity: .6; }
.rent-plan { background: var(--brand-soft); border-radius: 10px; padding: .7rem .9rem; font-size: .9rem; margin: .5rem 0; }
.danger-zone { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.danger-panel { border-color: #f1c9c4; }

/* evidence pack */
.evidence { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
.evidence h2 { font-size: 1.1rem; margin: 1.8rem 0 .6rem; }
.evidence h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.evidence-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--brand); padding-bottom: 1rem; }
.evidence-score { font-size: 2.2rem; font-weight: 800; color: var(--brand); text-align: right; line-height: 1; }
.evidence-score span { display: block; font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; margin-top: .3rem; }
.table-compact th { width: 34%; text-transform: none; font-size: .88rem; letter-spacing: 0; color: var(--ink); }

.footer { border-top: 1px solid var(--line); background: #fff; padding: 22px 0; font-size: .875rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero-grid, .grid-3, .pricing-grid, .two-col { grid-template-columns: minmax(0, 1fr); }
  .ob-main { flex-direction: column; gap: .4rem; }
  .brand { font-size: 1.05rem; }
  .form-row { grid-template-columns: 1fr; }
  .nav { gap: .7rem; font-size: .92rem; }
  .ob { flex-direction: column; }
  .ob-side { text-align: left; }
}
@media print {
  .topbar, .footer, .no-print, .flashes { display: none !important; }
  body { background: #fff; }
  .evidence { border: 0; padding: 0; }
  .page { padding: 0; }
}

.demo-banner { background: var(--accent); color: #3a2400; text-align: center; font-size: .85rem; font-weight: 600; padding: .35rem 1rem; }
