/* ==========================================================================
   SmartBuild project guides (/guides/). Uses tokens from brand.css and the
   shared marketing styles in site.css.
   ========================================================================== */
.site-nav a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-50); }
.guide { background: var(--surface); }
.guide-wrap { max-width: 820px; padding-top: 1.5rem; padding-bottom: 1rem; }
.guide-index { max-width: 1060px; }

.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; margin: 0 0 1.75rem; font-size: 0.88rem; color: var(--text-muted); }
.breadcrumb li { display: inline-flex; align-items: center; gap: 0.35rem; min-width: 0; }
.breadcrumb li + li::before { content: "/"; color: var(--text-subtle); }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-ink); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--text-muted); overflow-wrap: anywhere; }

.guide-head { margin-bottom: 2rem; }
.guide-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: var(--r-lg); background: var(--brand-50); color: var(--brand-ink); border: 1px solid var(--brand-100); margin-bottom: 1.1rem; }
.guide-icon .icon { width: 1.6rem; height: 1.6rem; }
.guide-head h1 { font-size: clamp(1.9rem, 4.6vw, 2.75rem); letter-spacing: -0.035em; line-height: 1.1; }
.guide-head .lead { font-size: 1.12rem; color: var(--text-2); line-height: 1.6; margin-top: 0.9rem; }
.guide-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 1rem; color: var(--text-muted); font-size: 0.88rem; }
.guide-meta .icon { width: 1rem; height: 1rem; }

.answer-box { padding: 1.5rem; border-radius: var(--r-xl); background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--brand); }
@media (min-width: 768px) { .answer-box { padding: 2rem 2.25rem; } }
.answer-box h2 { font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.answer-box > p { font-size: 1.06rem; line-height: 1.7; color: var(--text); }
.answer-grid { display: grid; gap: 1.5rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .answer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.answer-grid h3 { display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; margin-bottom: 0.65rem; }
.answer-grid h3 .icon { color: var(--brand-ink); width: 1.15rem; height: 1.15rem; }
.answer-grid p, .answer-grid li { font-size: 0.96rem; line-height: 1.6; color: var(--text-2); }
.answer-grid ul { padding-left: 1.15rem; display: grid; gap: 0.4rem; margin-top: 0.5rem; }
.formula { list-style: none; padding: 0 !important; }
.formula li { padding: 0.55rem 0.75rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-size: 0.93rem !important; }

.guide-section { margin-top: 3rem; }
.guide-section > h2 { font-size: var(--fs-2xl); letter-spacing: -0.025em; line-height: 1.2; margin-bottom: 1.1rem; }
.guide-text { color: var(--text-2); line-height: 1.7; }

/* Calculator */
.calc-card { border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-md); padding: 1.4rem; }
@media (min-width: 768px) { .calc-card { padding: 2rem; } }
.calc-head h2 { font-size: 1.4rem; letter-spacing: -0.02em; }
.calc-head p { color: var(--text-muted); margin-top: 0.3rem; font-size: 0.95rem; }
.calc-fields { display: grid; gap: 0.9rem; margin-top: 1.25rem; }
@media (min-width: 560px) { .calc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .calc-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.calc-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.calc-field label { font-size: 0.88rem; font-weight: 600; color: var(--text-2); }
.calc-field input, .calc-field select { width: 100%; min-height: var(--tap, 44px); padding: 0.6rem 0.75rem; font: inherit; font-size: 1rem; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); }
.calc-field input:focus, .calc-field select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.calc-hint { color: var(--text-muted); font-size: 0.8rem; }
.calc-out { margin-top: 1.4rem; padding: 1.15rem; border-radius: var(--r-lg); background: var(--bg); border: 1px solid var(--line); }
.calc-summary { display: grid; gap: 0.6rem; margin: 0; }
@media (min-width: 560px) { .calc-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.calc-summary div { padding: 0.7rem 0.85rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.calc-summary dt { font-size: 0.8rem; color: var(--text-muted); }
.calc-summary dd { margin: 0.15rem 0 0; font-weight: 650; color: var(--text); overflow-wrap: anywhere; }
.calc-list-title { font-size: 0.95rem; margin: 1.1rem 0 0.5rem; }
.calc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.calc-list li { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.45rem 0; border-bottom: 1px dashed var(--line); font-size: 0.94rem; color: var(--text-2); }
.calc-list li:last-child { border-bottom: 0; }
.calc-list strong { min-width: 2.75rem; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.calc-warn { margin-top: 0.85rem; padding: 0.7rem 0.85rem; border-radius: var(--r-md); background: var(--warning-bg); border: 1px solid var(--warning-line); color: var(--text); font-size: 0.9rem; }
.calc-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; margin-top: 1.25rem; }
.calc-cta .btn { white-space: normal; text-align: left; }
@media (max-width: 559px) { .calc-cta .btn { width: 100%; justify-content: center; text-align: center; } }
.calc-note { color: var(--text-muted); font-size: 0.86rem; }

/* Checklists */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.checklist li { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.checklist .icon { flex-shrink: 0; color: var(--success); margin-top: 0.15rem; }
.checklist strong { display: block; color: var(--text); }
.checklist span { display: block; color: var(--text-muted); font-size: 0.93rem; margin-top: 0.1rem; line-height: 1.55; }
.also-title { font-size: 1.1rem; margin: 1.5rem 0 0.65rem; }
.also-list { padding-left: 1.2rem; display: grid; gap: 0.35rem; color: var(--text-2); }
.steps-list { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.steps-list li { counter-increment: step; position: relative; padding-left: 3rem; min-height: 2.2rem; }
.steps-list li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--brand-50); color: var(--brand-ink); border: 1px solid var(--brand-100); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.92rem; }
.steps-list strong { display: block; color: var(--text); }
.steps-list span { display: block; color: var(--text-2); line-height: 1.6; margin-top: 0.15rem; }
.note-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.note-list li { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.9rem 1rem; border-radius: var(--r-md); line-height: 1.6; color: var(--text-2); }
.note-list .icon { flex-shrink: 0; margin-top: 0.2rem; }
.note-tips li { background: var(--info-bg); border: 1px solid var(--info-line); }
.note-tips .icon { color: var(--info); }
.note-mistakes li { background: var(--warning-bg); border: 1px solid var(--warning-line); }
.note-mistakes .icon { color: var(--warning); }

.guide-sources ul { padding-left: 1.2rem; display: grid; gap: 0.45rem; }
.guide-sources a { color: var(--text-2); overflow-wrap: anywhere; }
.guide-sources a .icon { width: 0.9rem; height: 0.9rem; vertical-align: -0.1em; color: var(--text-subtle); }
.guide-disclaimer { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 1.25rem; padding: 0.9rem 1rem; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--line); color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }
.guide-disclaimer .icon { flex-shrink: 0; margin-top: 0.15rem; }

.guide-cards { display: grid; gap: 0.75rem; }
@media (min-width: 700px) { .guide-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.guide-index .guide-cards { gap: 1rem; }
@media (min-width: 1000px) { .guide-index .guide-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.guide-card { min-height: 0 !important; }
.guide .cta-band { margin-top: 2rem; }
