/* Eviction Defender tenant app. Mobile first, large text, high contrast, system fonts (no downloads). */
:root {
  --brand: #0a6cf0; --brand-2: #0756c4; --brand-deep: #0b1f3a; --brand-soft: #eaf2ff; --brand-tint: #f4f8ff;
  --ink: #0f1b2d; --ink-2: #3c4a5d; --ink-3: #66748a; --line: #d9e1ec; --line-2: #e9eef5;
  --paper: #f6f8fb; --surface: #ffffff; --surface-2: #f9fbfd;
  --red: #c42b1c; --red-soft: #fdecea; --amber: #a15c00; --amber-soft: #fff4e0; --green: #127a3e; --green-soft: #e6f6ec;
  --radius: 16px; --radius-sm: 10px; --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 6px 20px rgba(15, 27, 45, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8eef7; --ink-2: #b8c4d4; --ink-3: #8f9db0; --line: #2a3a52; --line-2: #1e2c40; --paper: #0b1422; --surface: #111d2f; --surface-2: #15233a;
    --brand: #4b9bff; --brand-2: #79b4ff; --brand-soft: #142b4d; --brand-tint: #102038; --red: #ff7b6e; --red-soft: #3a1915; --amber: #ffb84d; --amber-soft: #33240c; --green: #5cd38d; --green-soft: #12301f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e8eef7; --ink-2: #b8c4d4; --ink-3: #8f9db0; --line: #2a3a52; --line-2: #1e2c40; --paper: #0b1422; --surface: #111d2f; --surface-2: #15233a;
  --brand: #4b9bff; --brand-2: #79b4ff; --brand-soft: #142b4d; --brand-tint: #102038; --red: #ff7b6e; --red-soft: #3a1915; --amber: #ffb84d; --amber-soft: #33240c; --green: #5cd38d; --green-soft: #12301f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.big { font-size: 118%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1.0625rem; line-height: 1.55; }
a { color: var(--brand-2); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.65rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--ink-3); } .small { font-size: .9rem; } .center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ---------- shell ---------- */
.t-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.t-top .logo { height: 34px; width: auto; }
.t-top .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .t-top .logo-light { display: none; } :root:not([data-theme="light"]) .t-top .logo-dark { display: block; } }
:root[data-theme="dark"] .t-top .logo-light { display: none; } :root[data-theme="dark"] .t-top .logo-dark { display: block; }
.t-top .grow { flex: 1; }
.lang-btn { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; min-height: 40px; }
.t-main { max-width: 760px; margin: 0 auto; padding: 18px 16px 110px; }
.t-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 25; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.t-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 9px; color: var(--ink-3); text-decoration: none; font-size: .78rem; font-weight: 600; min-height: 58px; }
.t-nav a .i { width: 26px; height: 26px; stroke: currentColor; }
.t-nav a.on { color: var(--brand); }
@media (min-width: 900px) {
  .t-nav { position: static; max-width: 760px; margin: 0 auto; border: 0; background: transparent; padding: 10px 16px 0; gap: 6px; }
  .t-nav a { flex-direction: row; justify-content: center; gap: 8px; font-size: .95rem; border-radius: 999px; min-height: 44px; padding: 8px 14px; background: var(--surface); border: 1px solid var(--line); }
  .t-nav a.on { background: var(--brand-soft); border-color: transparent; }
  .t-main { padding-bottom: 60px; }
}
.imp-bar { background: var(--amber-soft); color: var(--amber); padding: 10px 16px; font-size: .95rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.i { width: 22px; height: 22px; stroke: currentColor; fill: none; flex: none; }
.t-foot { max-width: 760px; margin: 0 auto; padding: 0 16px 120px; font-size: .82rem; color: var(--ink-3); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 20px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand-2); }
.btn.sm { min-height: 42px; padding: 8px 14px; font-size: .95rem; border-radius: 12px; }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stack > * + * { margin-top: 12px; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card, .card + .sect, .sect + .card { margin-top: 14px; }
.sect { margin-top: 26px; }
.sect > h2 { font-size: 1.15rem; margin-bottom: 10px; }
.hero-date { border-radius: 20px; padding: 20px; background: var(--brand-deep); color: #fff; box-shadow: var(--shadow); }
.hero-date .lbl { font-size: .9rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; opacity: .85; }
.hero-date .date { font-size: 1.7rem; font-weight: 800; margin: 4px 0 2px; }
.hero-date .left { font-size: 1.05rem; font-weight: 700; }
.hero-date .what { margin-top: 10px; font-size: 1.05rem; }
.hero-date.urgent { background: var(--red); }
.hero-date .src { margin-top: 10px; font-size: .88rem; opacity: .85; }
.hero-date .btn { margin-top: 14px; background: #fff; color: var(--brand-deep); border-color: #fff; }
.alert { border-radius: 14px; padding: 14px 16px; border: 1px solid transparent; }
.alert + .alert { margin-top: 10px; }
.alert.warn { background: var(--amber-soft); color: var(--ink); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.alert.danger { background: var(--red-soft); color: var(--ink); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.alert.info { background: var(--brand-soft); color: var(--ink); }
.alert.ok { background: var(--green-soft); color: var(--ink); }
.alert b { display: block; margin-bottom: 2px; }

/* steps */
.step { display: grid; grid-template-columns: 40px 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.step + .step { margin-top: 10px; }
.step .dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); font-weight: 800; }
.step.done .dot { background: var(--green-soft); color: var(--green); }
.step.missed .dot, .step.urgent .dot { background: var(--red-soft); color: var(--red); }
.step h3 { margin: 4px 0 4px; }
.step.done h3 { text-decoration: line-through; color: var(--ink-3); }
.step .why { color: var(--ink-2); }
.step .due { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .95rem; margin: 4px 0 8px; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-2); }
.step .due.red { background: var(--red-soft); color: var(--red); }
.step .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: var(--line-2); color: var(--ink-2); }
.chip.green { background: var(--green-soft); color: var(--green); } .chip.red { background: var(--red-soft); color: var(--red); } .chip.amber { background: var(--amber-soft); color: var(--amber); } .chip.blue { background: var(--brand-soft); color: var(--brand-2); }

/* ---------- one question per screen ---------- */
.q { max-width: 620px; margin: 0 auto; }
.q .prog { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin-bottom: 18px; }
.q .prog i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .25s; }
.q h1 { font-size: 1.5rem; }
.q .help { color: var(--ink-2); margin-bottom: 14px; }
.choices { display: grid; gap: 10px; margin: 14px 0; }
.choice { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; padding: 16px; min-height: 64px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.choice:hover { border-color: var(--brand); }
.choice.on { border-color: var(--brand); background: var(--brand-tint); }
.choice .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); flex: none; font-size: 1.3rem; }
.choice b { display: block; }
.choice span.d { display: block; color: var(--ink-3); font-size: .93rem; }
.choice input { width: 24px; height: 24px; accent-color: var(--brand); flex: none; }
.q-nav { display: flex; gap: 10px; margin-top: 18px; }
.q-nav .btn { flex: 1; }
.q-nav .btn.back { flex: 0 0 auto; }
.field { margin: 12px 0; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .help { font-size: .92rem; color: var(--ink-3); margin-top: 4px; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=time], input[type=password], select, textarea {
  width: 100%; min-height: 54px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 1.05rem;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.code-input { font-size: 1.8rem !important; letter-spacing: .4em; text-align: center; font-weight: 800; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 24px; height: 24px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.err { color: var(--red); font-weight: 600; min-height: 1.2em; margin-top: 8px; }

/* ---------- lists ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list > a, .list > div.li { display: flex; gap: 12px; align-items: center; padding: 14px 16px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line-2); min-height: 60px; }
.list > :first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .sub { color: var(--ink-3); font-size: .9rem; }
.empty { text-align: center; color: var(--ink-3); padding: 30px 10px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.tabs button { flex: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 8px 14px; border-radius: 999px; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; min-height: 42px; }
.tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.grid2 { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 96px; font-weight: 700; cursor: pointer; font: inherit; text-align: left; }
.tile .i { color: var(--brand); width: 28px; height: 28px; }
.tile span { font-weight: 500; color: var(--ink-3); font-size: .9rem; }

/* ---------- document paper ---------- */
.paper { background: #fff; color: #111; border-radius: 6px; border: 1px solid var(--line); padding: 28px 24px; font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.5; box-shadow: var(--shadow); overflow-x: auto; }
.paper h1 { font-size: 17px; text-align: center; margin: 14px 0; letter-spacing: .02em; }
.paper h2 { font-size: 15px; margin: 16px 0 6px; }
.paper .center { text-align: center; }
.paper .small { font-size: 12px; color: #555; }
.paper table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.paper td, .paper th { border: 1px solid #bbb; padding: 6px 8px; vertical-align: top; text-align: left; }
.paper table.caption td { border: 0; border-right: 1px solid #333; }
.paper table.caption td + td { border-right: 0; padding-left: 14px; }
.paper .field-missing { background: #fff1c2; color: #8a4b00; font-weight: 700; padding: 0 3px; border-radius: 3px; }
.paper .sig-block { margin-top: 24px; }
.paper .sig-line { border-bottom: 1px solid #333; width: 260px; height: 54px; display: flex; align-items: flex-end; }
.paper .sig-line img { max-height: 50px; }
.paper[contenteditable="true"] { outline: 3px dashed var(--brand); }
.sigpad { width: 100%; height: 180px; border: 2px dashed var(--line); border-radius: 14px; background: #fff; touch-action: none; display: block; }

/* ---------- modals / toasts ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5, 12, 24, .55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .modal-bg { align-items: center; } }
.modal { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 20px; }
@media (min-width: 640px) { .modal { border-radius: 20px; } }
.modal-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal-h h2 { margin: 0; } .modal-h p { margin: 4px 0 0; color: var(--ink-3); }
.modal-x { border: 0; background: var(--line-2); color: var(--ink); width: 40px; height: 40px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; flex: none; }
.modal-b { margin-top: 14px; }
.modal-f { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.modal-f .btn { flex: 1; }
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 60; display: grid; gap: 8px; width: min(92vw, 460px); }
.toast { background: var(--brand-deep); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; }
.toast.ok { background: var(--green); } .toast.err { background: var(--red); }

/* ---------- welcome / landing ---------- */
.welcome { text-align: center; padding-top: 10px; }
.welcome .mark { width: 92px; height: 92px; }
.welcome h1 { font-size: 1.9rem; margin-top: 10px; }
.welcome .lead { font-size: 1.15rem; color: var(--ink-2); }
.welcome .btn { width: 100%; max-width: 420px; }
.welcome .stack { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 18px; }
.promise { display: grid; gap: 10px; text-align: left; margin-top: 26px; }
.promise div { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.promise .i { color: var(--brand); margin-top: 2px; }
.sos { background: var(--red-soft); border: 1.5px solid color-mix(in srgb, var(--red) 35%, transparent); color: var(--ink); border-radius: 14px; padding: 14px; text-decoration: none; display: flex; gap: 12px; align-items: center; text-align: left; margin-top: 18px; }
.sos .i { color: var(--red); width: 30px; height: 30px; }
.listen { border: 0; background: var(--brand-soft); color: var(--brand-2); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.guide h3 { margin-top: 18px; }
.chat .msg { padding: 12px 14px; border-radius: 14px; margin: 8px 0; max-width: 92%; white-space: pre-wrap; }
.chat .msg.user { background: var(--brand); color: #fff; margin-left: auto; }
.chat .msg.ai { background: var(--surface); border: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-weight: 600; }
.price { font-size: 2rem; font-weight: 800; }
.plan-opt { border: 2px solid var(--line); border-radius: 16px; padding: 16px; background: var(--surface); }
.plan-opt.best { border-color: var(--brand); }
.boot { display: grid; place-items: center; min-height: 70vh; }
.boot img { width: 240px; }
@media print { .t-top, .t-nav, .t-foot, .no-print { display: none !important; } .paper { box-shadow: none; border: 0; padding: 0; } body { background: #fff; } }
.mt { margin-top: 12px; }
