/* ==========================================================================
   freecreditdisputeletters.com — global styles
   Plain CSS, no framework. Mobile-first, fast, AdSense-friendly.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-soft: #eef2f7;
  --text: #1a2433;
  --text-soft: #4a5568;
  --border: #dfe5ec;
  --brand: #1f6feb;
  --brand-dark: #1657c0;
  --brand-soft: #e7f0ff;
  --accent: #0f9d58;
  --warn-bg: #fff8e6;
  --warn-border: #f0d488;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, 0.10);
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}

img { max-width: 100%; height: auto; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--text); }
h1 { font-size: 2.1rem; margin: 0 0 0.5em; }
h2 { font-size: 1.5rem; margin: 1.8em 0 0.6em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 0.4em; }

p { margin: 0 0 1em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--brand); color: #fff; padding: 10px 16px; z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 20px; max-width: var(--maxw); margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 1.12rem; color: var(--text); letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #4f9cff);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 16px; flex: none;
}
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text-soft); font-weight: 600; font-size: 0.96rem; }
.nav-links a:hover { color: var(--brand); text-decoration: none; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 10px; cursor: pointer; font-size: 1.1rem;
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border); padding: 8px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 20px; width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 400px at 50% -50px, var(--brand-soft), transparent),
              var(--bg);
  padding: 64px 0 48px; text-align: center; border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 2.6rem; letter-spacing: -0.02em; margin-bottom: 0.3em; }
.hero p.lead { font-size: 1.2rem; color: var(--text-soft); max-width: 640px; margin: 0 auto 1.6em; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 640px) {
  .hero { padding: 44px 0 34px; }
  .hero h1 { font-size: 2rem; }
  h1 { font-size: 1.7rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 1rem;
  padding: 12px 22px; border-radius: var(--radius); border: none; cursor: pointer;
  transition: background .15s ease, transform .05s ease;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.secondary:hover { background: var(--brand-soft); }
.btn.ghost { background: var(--bg-soft); color: var(--text); }
.btn.ghost:hover { background: #e2e8f2; }
.btn.small { padding: 8px 14px; font-size: 0.9rem; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

.card {
  display: block; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  color: var(--text);
}
a.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #c9d6e8; }
.card h3 { margin-top: 0; }
.card p { color: var(--text-soft); margin-bottom: 0; font-size: 0.97rem; }
.card .tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--brand); background: var(--brand-soft);
  padding: 3px 9px; border-radius: 20px; margin-bottom: 10px;
}

/* ---------- Sections ---------- */
section { padding: 48px 0; }
section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 { margin: 0 0 0.3em; }
.section-head p { color: var(--text-soft); margin: 0 auto; max-width: 560px; }

/* ---------- Article / prose ---------- */
.prose { max-width: 760px; margin: 0 auto; padding: 40px 20px 56px; }
.prose h1 { margin-bottom: 0.2em; }
.prose .meta { color: var(--text-soft); font-size: 0.92rem; margin-bottom: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
  margin: 1.4em 0; padding: 12px 18px; border-left: 4px solid var(--brand);
  background: var(--brand-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text);
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.prose th { background: var(--bg-soft); }

.breadcrumbs { font-size: 0.86rem; color: var(--text-soft); margin-bottom: 1.2em; }
.breadcrumbs a { color: var(--text-soft); }
.breadcrumbs span { margin: 0 6px; opacity: 0.6; }

/* ---------- Callouts ---------- */
.callout {
  background: var(--warn-bg); border: 1px solid var(--warn-border);
  border-radius: var(--radius); padding: 14px 18px; margin: 1.4em 0; font-size: 0.95rem;
}
.callout strong { color: #7a5b00; }
.callout.info { background: var(--brand-soft); border-color: #bcd4ff; }
.callout.info strong { color: var(--brand-dark); }

/* ---------- Letter generator ---------- */
.generator { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 900px) { .generator { grid-template-columns: 1fr; } }

.gen-form { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.gen-form h3 { margin-top: 0; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 5px; color: var(--text); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: var(--font); background: #fff; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.field .hint { font-size: 0.78rem; color: var(--text-soft); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.gen-preview { position: sticky; top: 80px; }
.letter-output {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; font-family: var(--mono); font-size: 0.86rem; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; min-height: 300px; box-shadow: var(--shadow);
  color: var(--text);
}
.output-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 11px 20px; border-radius: var(--radius);
  font-size: 0.9rem; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Ad slots ---------- */
.ad-slot {
  display: block; margin: 28px auto; text-align: center; min-height: 90px;
  background: repeating-linear-gradient(45deg, #f7f9fc, #f7f9fc 10px, #f2f5fa 10px, #f2f5fa 20px);
  border: 1px dashed #d6deea; border-radius: var(--radius); color: #9aa7b8;
  font-size: 0.75rem; display: flex; align-items: center; justify-content: center;
  max-width: 100%; overflow: hidden;
}
.ad-slot::before { content: "Advertisement"; }
.ad-slot.filled::before { content: ""; }

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 18px; margin-bottom: 10px; background: #fff;
}
.faq summary { font-weight: 650; cursor: pointer; padding: 12px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--brand); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq details p { padding: 12px 0; margin: 0; color: var(--text-soft); }

/* ---------- Footer ---------- */
.site-footer { background: #12203a; color: #c4d0e2; padding: 44px 0 28px; margin-top: 40px; }
.site-footer a { color: #c4d0e2; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: 0.95rem; margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.9rem; }
.footer-brand p { font-size: 0.9rem; color: #93a3bd; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid #26374f; margin-top: 30px; padding-top: 18px;
  font-size: 0.82rem; color: #93a3bd; text-align: center;
}
.footer-disclaimer { font-size: 0.8rem; color: #7f90ab; max-width: 780px; margin: 10px auto 0; text-align: center; }

/* ---------- Utility ---------- */
.text-center { text-center: center; text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--text-soft); }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0; }
.pill-list a {
  display: inline-block; padding: 7px 14px; background: var(--bg-soft); border-radius: 20px;
  font-size: 0.88rem; font-weight: 600; color: var(--text);
}
.pill-list a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }

@media print {
  .site-header, .site-footer, .gen-form, .output-actions, .ad-slot, .breadcrumbs, .no-print { display: none !important; }
  .generator { grid-template-columns: 1fr; }
  .letter-output { border: none; box-shadow: none; font-family: var(--font); font-size: 12pt; padding: 0; }
  body { font-size: 12pt; }
}
