/* Landlord free tools — shared styles.
   Tokens copied verbatim from index.html so the tool pages read as the same site. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #1D5D9B;
  --primary-btn:  #174E85;
  --primary-dark: #143F66;
  --accent:       #F4A62A;
  --accent-dim:   rgba(244,166,42,0.13);
  --bg:           #F6FAFD;
  --bg-card:      #FFFFFF;
  --bg-muted:     #EAF3FA;
  --border:       #DCE7EF;
  --border-input: #CEDBE5;
  --text:         #143F66;
  --text-sub:     #7B8FA1;
  --text-dim:     #A7B5C1;
  --due-bg:       #FFE9C2;
  --due-text:     #7A4700;
  --paid-bg:      #DFF2E8;
  --paid-text:    #0E5B3E;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

/* ── NAV (matches index.html) ── */
.nav { position: sticky; top: 0; z-index: 100; height: 60px; background: rgba(246,250,253,0.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1140px; margin: 0 auto; padding: 0 40px; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { width: 30px; height: 30px; border-radius: 7px; overflow: hidden; flex-shrink: 0; }
.logo-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-name { font-size: 16px; font-weight: 700; color: var(--primary-dark); letter-spacing: -0.3px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link { font-size: 13.5px; font-weight: 400; color: var(--text-sub); text-decoration: none; padding: 6px 12px; border-radius: 6px; transition: color 0.15s, background 0.15s; }
.nav-link:hover { color: var(--primary-dark); background: var(--bg-muted); }
.nav-cta { font-size: 13px; font-weight: 600; color: #fff; background: var(--primary); text-decoration: none; padding: 8px 18px; border-radius: 7px; margin-left: 8px; transition: background 0.15s; }
.nav-cta:hover { background: var(--primary-btn); }

/* ── LAYOUT ── */
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 40px; }
.wrap--narrow { max-width: 860px; }
.crumbs { font-size: 13px; color: var(--text-dim); padding: 22px 0 0; }
.crumbs a { color: var(--text-sub); text-decoration: none; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }

.page-head { padding: 26px 0 30px; }
.page-head h1 { font-size: 38px; line-height: 1.14; font-weight: 700; letter-spacing: -1px; color: var(--primary-dark); }
.page-head h1 em { font-style: normal; color: var(--primary); }
.lede { margin-top: 14px; font-size: 16.5px; line-height: 1.65; color: var(--text-sub); max-width: 68ch; }
.lede strong { color: var(--text); font-weight: 600; }

/* ── PRIVACY BADGE ── */
.privacy-note {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 22px; padding: 14px 18px;
  background: var(--paid-bg); border-radius: 10px;
  font-size: 14px; line-height: 1.55; color: var(--paid-text);
}
.privacy-note svg { flex-shrink: 0; margin-top: 2px; }
.privacy-note strong { font-weight: 700; }

/* ── FORM ── */
.tool-grid { display: grid; grid-template-columns: 1fr 320px; gap: 34px; align-items: start; padding-bottom: 60px; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: 1fr; } }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 26px 28px; }
.card + .card { margin-top: 20px; }
.card-title { font-size: 12px; font-weight: 700; letter-spacing: 0.9px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 18px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row--3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 620px) { .row, .row--3 { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.field .hint { display: block; font-size: 12px; font-weight: 400; color: var(--text-dim); margin-top: 5px; line-height: 1.45; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font); font-size: 14.5px; color: var(--text);
  background: #fff; border: 1.5px solid var(--border-input); border-radius: 8px;
  padding: 10px 12px; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,93,155,0.11);
}
.field textarea { resize: vertical; min-height: 78px; line-height: 1.55; }
.field input[aria-invalid="true"] { border-color: #C2463B; }
.opt { font-weight: 400; color: var(--text-dim); }

.seg { display: flex; gap: 0; border: 1.5px solid var(--border-input); border-radius: 8px; overflow: hidden; }
.seg label { flex: 1; margin: 0; position: relative; }
/* Visually hidden, but must stay 1px: `.field input` sets width:100%, and an
   absolutely positioned 100%-wide radio resolves against the viewport and hangs
   off the right edge, scrolling the whole page sideways. */
.seg input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.seg span {
  display: block; text-align: center; font-size: 14px; font-weight: 600; color: var(--text-sub);
  padding: 10px 8px; cursor: pointer; background: #fff; transition: background 0.15s, color 0.15s;
}
.seg input:checked + span { background: var(--primary); color: #fff; }
.seg label + label span { border-left: 1.5px solid var(--border-input); }

/* ── ACTIONS ── */
.actions { position: sticky; top: 82px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; font-family: var(--font); font-size: 15px; font-weight: 600;
  text-decoration: none; padding: 13px 22px; border: none; border-radius: 9px;
  cursor: pointer; transition: background 0.15s, transform 0.15s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--accent { color: #fff; background: var(--accent); }
.btn--accent:hover:not(:disabled) { background: #e09520; }
.btn--ghost { color: var(--primary-dark); background: transparent; border: 1.5px solid var(--border); }
.btn--ghost:hover:not(:disabled) { border-color: var(--primary); background: var(--bg-muted); }
.btn + .btn { margin-top: 10px; }
.status { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--text-sub); min-height: 1.2em; }
.status--err { color: #C2463B; font-weight: 600; }

/* ── LIVE PDF PREVIEW ──
   Rendered from the same build() as the download, so it cannot drift. */
.preview { margin-bottom: 18px; border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.preview-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 13px; border-bottom: 1px solid var(--border); background: var(--bg-muted);
}
.preview-title { font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--primary-dark); }
.preview-expand {
  font-family: var(--font); font-size: 12.5px; font-weight: 600; color: var(--primary);
  background: none; border: none; cursor: pointer; padding: 4px 6px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 5px;
}
.preview-expand:hover { background: #fff; }
.preview-stage {
  position: relative; margin: 13px; cursor: zoom-in; background: #fff;
  border: 1px solid var(--border); border-radius: 4px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(20,63,102,0.07);
  min-height: 180px;
}
.preview-stage canvas { display: block; width: 100%; height: auto; }
/* Placeholder sheet keeps the panel from collapsing before the first render. */
.preview-stage::after {
  content: ''; position: absolute; inset: 0; background: var(--bg-muted);
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.preview.is-busy .preview-stage::after { opacity: 0.55; }
.preview-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 13px 12px; }
.preview-pager { display: flex; align-items: center; gap: 6px; }
.pg-btn {
  font-family: var(--font); font-size: 15px; line-height: 1; color: var(--primary-dark);
  background: #fff; border: 1px solid var(--border); border-radius: 7px;
  width: 30px; height: 30px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.pg-btn:disabled { opacity: 0.35; cursor: default; }
.pg-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.preview-page { font-size: 12px; color: var(--text-sub); }
.preview-note { padding: 0 13px 13px; font-size: 12px; line-height: 1.55; color: var(--text-dim); }
.preview.is-error .preview-note { color: #C2463B; }

/* full-screen reader */
.preview-modal {
  position: fixed; inset: 0; z-index: 200; background: rgba(8,25,39,0.82);
  display: none; flex-direction: column; padding: 14px;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.preview-modal.is-open { display: flex; }
.modal-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0; padding-bottom: 12px; }
.modal-bar .preview-page { color: rgba(255,255,255,0.72); }
.modal-close {
  font-family: var(--font); font-size: 14px; font-weight: 600; color: #fff;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22);
  border-radius: 8px; padding: 9px 15px; cursor: pointer; min-height: 40px;
}
.modal-close:hover { background: rgba(255,255,255,0.2); }
.modal-bar .pg-btn { width: 40px; height: 40px; background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.22); color: #fff; }
.modal-bar .pg-btn:hover:not(:disabled) { background: rgba(255,255,255,0.2); color: #fff; }
.modal-stage { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; display: flex; justify-content: center; align-items: flex-start; }
.modal-stage canvas { display: block; width: 100%; max-width: 780px; height: auto; background: #fff; border-radius: 3px; box-shadow: 0 10px 40px rgba(0,0,0,0.4); }

.app-plug { margin-top: 20px; padding: 20px; background: var(--bg-muted); border-radius: 12px; }
.app-plug h3 { font-size: 15px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.app-plug p { font-size: 13.5px; line-height: 1.6; color: var(--text-sub); margin-bottom: 14px; }

/* ── PROSE / FAQ ── */
.prose { padding: 10px 0 70px; max-width: 72ch; }
.prose h2 { font-size: 25px; font-weight: 700; letter-spacing: -0.5px; color: var(--primary-dark); margin: 40px 0 14px; }
.prose h3 { font-size: 17.5px; font-weight: 700; color: var(--primary-dark); margin: 28px 0 10px; }
.prose p { font-size: 15.5px; line-height: 1.75; color: var(--text-sub); margin-bottom: 14px; }
.prose ul, .prose ol { margin: 0 0 16px 22px; }
.prose li { font-size: 15.5px; line-height: 1.7; color: var(--text-sub); margin-bottom: 8px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--primary); }

.callout {
  margin: 26px 0; padding: 18px 20px; border-radius: 11px;
  background: var(--due-bg); color: var(--due-text);
  font-size: 14.5px; line-height: 1.65;
}
.callout strong { font-weight: 700; }

/* ── TOOL CARDS (hub) ── */
/* min() so a 290px track cannot exceed a 320px-wide phone and force sideways scroll. */
.tool-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 20px; padding-bottom: 60px; }
.tool-card {
  display: block; text-decoration: none; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 14px; padding: 26px;
  transition: border-color 0.15s, transform 0.15s;
}
.tool-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.tool-card h2 { font-size: 19px; font-weight: 700; color: var(--primary-dark); margin-bottom: 9px; }
.tool-card p { font-size: 14px; line-height: 1.62; color: var(--text-sub); }
.tool-card .go { display: inline-block; margin-top: 15px; font-size: 13.5px; font-weight: 600; color: var(--primary); }

/* ── FOOTER (matches index.html) ── */
.footer { background: #081927; padding: 48px 0 28px; }
.footer-inner { max-width: 1140px; margin: 0 auto; padding: 0 40px; }
.footer-main { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 32px; }
@media (max-width: 760px) { .footer-main { grid-template-columns: 1fr 1fr; } }
.f-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 12px; }
.f-logo .logo-name { color: #fff; }
.f-tagline { font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,0.45); max-width: 30ch; }
.f-col-title { font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: rgba(255,255,255,0.38); margin-bottom: 13px; }
.f-links { list-style: none; }
.f-links li { margin-bottom: 9px; }
.f-links a { font-size: 13.5px; color: rgba(255,255,255,0.66); text-decoration: none; }
.f-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.09); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.f-copy, .f-wipl { font-size: 12.5px; color: rgba(255,255,255,0.36); }
.f-wipl a { color: rgba(255,255,255,0.55); }

@media (max-width: 700px) {
  .nav-inner, .wrap, .footer-inner { padding: 0 22px; }
  .nav-links .nav-link { display: none; }
  .page-head h1 { font-size: 29px; }
}
