/* PG ZONE Blog styles (loaded after /styles.css) */
.blog-main { padding: 100px 0 60px; background: #f9fafb; }
.blog-wrap { max-width: 780px; margin: 0 auto; padding: 0 20px; }
.blog-wide { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.nav-logo a { text-decoration: none; }
.nav-menu a.active { color: #4F46E5; }

.breadcrumb { font-size: 0.875rem; color: #6b7280; margin-bottom: 20px; }
.breadcrumb a { color: #4F46E5; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Blog index */
.blog-hero { text-align: center; margin-bottom: 40px; }
.blog-hero h1 { font-size: 2.5rem; line-height: 1.2; color: #111827; margin-bottom: 12px; }
.blog-hero p { color: #4b5563; font-size: 1.125rem; max-width: 640px; margin: 0 auto; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.post-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 28px; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; text-decoration: none; color: inherit; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(79,70,229,.12); }
.post-tag { display: inline-block; font-size: .75rem; font-weight: 600; color: #4F46E5; background: #eef2ff; border-radius: 999px; padding: 4px 12px; margin-bottom: 14px; align-self: flex-start; }
.post-card h2 { font-size: 1.25rem; line-height: 1.35; color: #111827; margin-bottom: 10px; }
.post-card p { color: #4b5563; font-size: .975rem; flex: 1; }
.post-card .read-more { margin-top: 18px; color: #4F46E5; font-weight: 600; }

/* Article */
.article { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 48px; }
.article h1 { font-size: 2.25rem; line-height: 1.25; color: #111827; margin-bottom: 14px; }
.article-meta { color: #6b7280; font-size: .925rem; margin-bottom: 28px; }
.article .lead { font-size: 1.15rem; color: #374151; margin-bottom: 24px; }
.article h2 { font-size: 1.6rem; line-height: 1.3; color: #111827; margin: 40px 0 14px; scroll-margin-top: 90px; }
.article h3 { font-size: 1.2rem; color: #1f2937; margin: 26px 0 10px; }
.article p { color: #374151; font-size: 1.05rem; line-height: 1.8; margin-bottom: 16px; }
.article ul, .article ol { margin: 0 0 18px 24px; color: #374151; font-size: 1.05rem; line-height: 1.8; }
.article li { margin-bottom: 6px; }
.article a { color: #4F46E5; }
.article strong { color: #111827; }

.story { background: #fffbeb; border-left: 4px solid #f59e0b; border-radius: 8px; padding: 18px 22px; margin: 24px 0; }
.story p:last-child { margin-bottom: 0; }
.note { background: #eef2ff; border-left: 4px solid #4F46E5; border-radius: 8px; padding: 18px 22px; margin: 24px 0; }
.note p:last-child { margin-bottom: 0; }
.disclosure { font-size: .925rem; color: #6b7280; background: #f3f4f6; border-radius: 8px; padding: 12px 16px; margin-bottom: 24px; }

.toc { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px 24px; margin: 8px 0 28px; }
.toc strong { display: block; margin-bottom: 8px; }
.toc ol { margin: 0 0 0 20px; font-size: 1rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.table-wrap { overflow-x: auto; margin: 20px 0 24px; }
.article table { width: 100%; border-collapse: collapse; font-size: .975rem; min-width: 560px; }
.article th, .article td { border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; vertical-align: top; }
.article th { background: #f3f4f6; color: #111827; }

.cta-box { background: linear-gradient(135deg, #4F46E5 0%, #7c3aed 100%); color: #fff; border-radius: 14px; padding: 32px; margin: 40px 0 8px; text-align: center; }
.cta-box h2 { color: #fff; margin: 0 0 10px; font-size: 1.5rem; }
.cta-box p { color: #e0e7ff; margin-bottom: 20px; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-buttons a { display: inline-block; padding: 12px 22px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.cta-primary { background: #fff; color: #4F46E5 !important; }
.cta-secondary { border: 2px solid rgba(255,255,255,.7); color: #fff !important; }

.related { margin-top: 40px; }
.related h2 { font-size: 1.35rem; color: #111827; margin-bottom: 16px; }

@media (max-width: 768px) {
  .blog-main { padding-top: 90px; }
  .article { padding: 24px 18px; border-radius: 12px; }
  .article h1, .blog-hero h1 { font-size: 1.75rem; }
  .article h2 { font-size: 1.35rem; }
  .article p, .article ul, .article ol { font-size: 1rem; }
}

/* ---------- Rent receipt generator tool ---------- */
.tool-wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.tool-head { max-width: 780px; margin: 0 auto 28px; text-align: center; }
.tool-head h1 { font-size: 2.3rem; line-height: 1.2; color: #111827; margin-bottom: 12px; }
.tool-head p { color: #4b5563; font-size: 1.1rem; }
.tool-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.tool-badges span { font-size: .85rem; background: #eef2ff; color: #4338ca; border-radius: 999px; padding: 4px 12px; font-weight: 500; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; }
.tool-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 24px; }
.tool-card h2 { font-size: 1.15rem; color: #111827; margin-bottom: 14px; }
.tool-card fieldset { border: 0; margin: 0 0 14px; padding: 0; }
.tool-card legend { font-weight: 600; color: #4F46E5; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: .875rem; font-weight: 500; color: #374151; margin-bottom: 4px; }
.field label small { color: #9ca3af; font-weight: 400; }
.field input, .field select { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font: inherit; font-size: .95rem; color: #111827; background: #fff; }
.field input:focus, .field select:focus { outline: 2px solid #c7d2fe; border-color: #4F46E5; }
.hint { font-size: .8rem; color: #6b7280; margin-top: 4px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.tool-btn { border: 0; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.tool-btn.primary { background: #4F46E5; color: #fff; }
.tool-btn.primary:hover { background: #4338CA; }
.tool-btn.wa { background: #16a34a; color: #fff; }
.tool-btn.ghost { background: #f3f4f6; color: #374151; }
.preview-note { font-size: .85rem; color: #6b7280; margin-bottom: 12px; }
#receipts { display: flex; flex-direction: column; gap: 16px; }
.rcpt { border: 1.5px solid #111827; border-radius: 6px; padding: 18px 20px; background: #fff; color: #111827; font-size: .95rem; line-height: 1.55; page-break-inside: avoid; break-inside: avoid; }
.rcpt-top { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #d1d5db; padding-bottom: 10px; margin-bottom: 12px; }
.rcpt-top h3 { font-size: 1.1rem; margin: 0; }
.rcpt-top .addr { font-size: .8rem; color: #4b5563; }
.rcpt-title { text-align: right; font-weight: 700; letter-spacing: .06em; font-size: .85rem; white-space: nowrap; }
.rcpt-title div { font-weight: 400; letter-spacing: 0; color: #4b5563; }
.rcpt p { margin: 0 0 8px; }
.rcpt .amt { font-weight: 700; }
.rcpt-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; font-size: .875rem; margin: 10px 0; }
.rcpt-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 16px; }
.stamp { border: 1px dashed #9ca3af; width: 74px; height: 74px; font-size: .65rem; color: #6b7280; display: flex; align-items: center; justify-content: center; text-align: center; }
.sign { text-align: right; font-size: .85rem; }
.sign .line { border-top: 1px solid #111827; width: 170px; margin: 30px 0 4px auto; }
.rcpt-brand { font-size: .7rem; color: #9ca3af; text-align: center; margin-top: 10px; }
.privacy-line { font-size: .8rem; color: #6b7280; margin-top: 12px; }
.tool-content { max-width: 780px; margin: 40px auto 0; }

@media (max-width: 900px) {
  .tool-grid { grid-template-columns: 1fr; }
  .tool-head h1 { font-size: 1.8rem; }
}
@media (max-width: 480px) {
  .frow { grid-template-columns: 1fr; gap: 0; }
  .rcpt-meta { grid-template-columns: 1fr; }
  .tool-card { padding: 18px 14px; }
}

/* partial payment */
.field.check label { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.field.check input { width: auto; margin-top: 4px; }
.rcpt-part { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 8px 12px; font-size: .875rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; margin: 8px 0; }
.rcpt-part .bal { grid-column: 1 / -1; font-weight: 700; margin-top: 2px; }
@media (max-width: 480px) { .rcpt-part { grid-template-columns: 1fr; } }

.saved-note { font-size: .82rem; color: #15803d; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 6px 10px; margin-top: 8px; }
.saved-note button { background: none; border: 0; color: #4F46E5; text-decoration: underline; cursor: pointer; font: inherit; padding: 0 0 0 4px; }

.share-status { font-size: .85rem; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; border-radius: 8px; padding: 8px 12px; margin-top: 12px; }
.share-status a { color: #15803d; font-weight: 600; }

@media print {
  .navbar, footer, .breadcrumb, .tool-head, .tool-content, .form-card, .preview-card > :not(#receipts) { display: none !important; }
  .blog-main { padding: 0 !important; background: #fff !important; }
  .tool-wrap, .tool-grid { display: block !important; padding: 0 !important; max-width: none !important; }
  .preview-card { border: 0 !important; padding: 0 !important; }
  #receipts { gap: 8mm; }
  .rcpt { border-radius: 0; }
  @page { margin: 12mm; }
}


/* ---------- Rental agreement generator & profit calculator ---------- */
.field textarea { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font: inherit; font-size: .95rem; color: #111827; background: #fff; resize: vertical; }
.field textarea:focus { outline: 2px solid #c7d2fe; border-color: #4F46E5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chips label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d1d5db; border-radius: 999px; padding: 6px 12px; font-size: .9rem; cursor: pointer; background: #fff; }
.chips label:has(input:checked) { border-color: #4F46E5; background: #eef2ff; color: #3730a3; }
.field.check .inline-time { width: auto; padding: 2px 6px; margin-left: 4px; font-size: .9rem; }
.privacy-line { font-size: .8rem; color: #6b7280; margin-top: 12px; }

.agr { border: 1px solid #d1d5db; border-radius: 6px; padding: 24px 26px; background: #fff; color: #111827; font-family: Georgia, "Times New Roman", serif; font-size: .92rem; line-height: 1.6; max-height: 900px; overflow: auto; }
.agr p { margin: 0 0 10px; }
.agr-head { text-align: center; margin-bottom: 16px; }
.agr-head h3 { font-size: 1.15rem; letter-spacing: .06em; margin: 0; }
.agr-head div { font-size: .85rem; color: #4b5563; }
.agr-c { text-align: center; font-weight: 700; letter-spacing: .08em; }
.agr .blank { color: #9ca3af; }
.agr-list { padding-left: 22px; margin: 0 0 14px; }
.agr-list > li { margin-bottom: 8px; }
.agr-list ul { margin: 6px 0 0 18px; list-style: disc; }
.agr h4 { font-size: .95rem; margin: 16px 0 6px; }
.agr-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: .88rem; }
.agr-table th, .agr-table td { border: 1px solid #d1d5db; padding: 6px 8px; text-align: left; vertical-align: top; }
.agr-table th { width: 34%; background: #f9fafb; font-weight: 600; }
.agr-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; margin-top: 30px; font-size: .88rem; }
.agr-sign .line { border-top: 1px solid #111827; margin-bottom: 4px; height: 32px; border-top-width: 0; border-bottom: 1px solid #111827; }
.agr-brand { font-size: .7rem; color: #9ca3af; text-align: center; margin-top: 18px; font-family: Inter, sans-serif; }

.range { width: 100%; accent-color: #4F46E5; }
.kpi-main { border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
.kpi-main.pos { background: #f0fdf4; border: 1px solid #bbf7d0; }
.kpi-main.neg { background: #fef2f2; border: 1px solid #fecaca; }
.kpi-main .lbl, .kpis .lbl { font-size: .8rem; color: #4b5563; font-weight: 500; }
.kpi-main .big { font-size: 2.2rem; font-weight: 700; line-height: 1.2; }
.kpi-main.pos .big { color: #15803d; }
.kpi-main.neg .big { color: #b91c1c; }
.kpi-main .sub, .kpis .sub { font-size: .8rem; color: #6b7280; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpis > div { border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; }
.kpis .val { font-size: 1.15rem; font-weight: 700; color: #111827; }
.calc-tip { font-size: .9rem; background: #eef2ff; border-left: 4px solid #4F46E5; border-radius: 8px; padding: 10px 14px; margin: 14px 0; color: #1f2937; }
.calc-h { font-size: 1rem; color: #111827; margin: 18px 0 10px; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 88px; align-items: center; gap: 10px; font-size: .85rem; }
.bar-lbl { color: #374151; }
.bar-track { background: #f3f4f6; border-radius: 4px; height: 12px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: #4F46E5; border-radius: 4px; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; color: #111827; }
.calc-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.calc-table th, .calc-table td { padding: 8px 10px; border-bottom: 1px solid #e5e7eb; text-align: right; }
.calc-table th:first-child, .calc-table td:first-child { text-align: left; }
.calc-table tr.cur td { background: #eef2ff; font-weight: 600; }
.calc-table .pos { color: #15803d; }
.calc-table .neg { color: #b91c1c; }
@media (max-width: 480px) {
  .agr { padding: 16px 14px; }
  .agr-sign { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 80px 1fr 76px; }
}
@media print {
  .no-print, .preview-note { display: none !important; }
  .output-card { border: 0 !important; padding: 0 !important; }
  .agr { border: 0; padding: 0; max-height: none; overflow: visible; font-size: 11.5pt; }
  .agr-list > li, .agr-table, .agr-sign { break-inside: avoid; }
  .kpi-main, .kpis > div, .calc-tip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
