
:root{
  --bg:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --brand:#1d4ed8;          /* blue */
  --brand-2:#60a5fa;        /* light blue */
  --card:#f8fafc;
  --border:#e2e8f0;
  --shadow:0 10px 25px rgba(2,6,23,.06);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;line-height:1.6
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img{max-width:100%;display:block}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
.container{max-width:1160px;margin:0 auto;padding:24px}
/* Header */
.site-header{
  position:sticky;top:0;z-index:50;
  background: linear-gradient(180deg, #0b4aa8 0%, #0a2f73 100%);
  border-bottom: 1px solid rgba(255,255,255,.18);
  backdrop-filter: saturate(1.1) blur(6px);
}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand{display:flex;align-items:center;gap:.75rem}
.brand-logo{width:36px;height:36px}
.brand-title{font-weight:900;letter-spacing:.2px;font-size:1.2rem;color:rgba(255,255,255,.96)}
.brand-title span{color:rgba(255,255,255,.96)}
.site-nav{display:flex;gap:10px;flex-wrap:wrap}
.site-nav a{padding:8px 12px;border-radius:10px;color:rgba(255,255,255,.92);font-weight:650}
.site-nav a:hover{background:rgba(255,255,255,.14);color:rgba(255,255,255,1)}
/* Hero */
.hero{padding:44px 0 18px 0}
.hero h1{margin:0 0 10px;font-size:2rem;font-weight:900;letter-spacing:.3px}
.hero p{margin:0;color:var(--muted);max-width:820px}
/* Grid */
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-top:22px}
@media (max-width:1020px){.grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:640px){.grid{grid-template-columns:1fr}.container{padding:18px}}
.card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:18px;box-shadow:var(--shadow);transition:transform .12s ease, box-shadow .12s ease}
.card:hover{transform:translateY(-2px);box-shadow:0 16px 30px rgba(2,6,23,.10)}
.card h3{margin:0 0 6px 0;font-size:1.1rem}
.card p{margin:0 0 12px 0;color:var(--muted)}
.card .cta{display:inline-flex;align-items:center;gap:8px;background:var(--brand);color:#fff;padding:10px 14px;border-radius:12px;border:1px solid #134ac7;font-weight:800}
.card .cta:hover{background:#134ac7;text-decoration:none}
.icon{width:28px;height:28px;opacity:.9}
/* Panels & forms */
.panel{background:#fff;border:1px solid var(--border);border-radius:16px;padding:18px;box-shadow:var(--shadow);margin:14px 0}
.input-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
input[type="file"]{padding:8px;background:#fff;border:1px solid var(--border);border-radius:10px}
input[type="number"], select{padding:9px 10px;border:1px solid var(--border);border-radius:10px}
label.inline{display:inline-flex;align-items:center;gap:8px}
.btn{background:var(--brand);color:#fff;border:none;border-radius:12px;padding:10px 14px;font-weight:800;cursor:pointer;border:1px solid #134ac7}
.btn:hover{background:#134ac7}
.btn.secondary{background:#fff;color:var(--brand);border:1px solid var(--brand)}
.help{color:var(--muted);display:block;margin-top:6px;font-size:.95rem}
.success{padding:12px;border-radius:12px;background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46;margin-top:12px}
.alert{padding:12px;border-radius:12px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;margin-top:12px}
/* Footer */
footer{border-top:1px solid var(--border);margin-top:28px;padding:20px 0;color:var(--muted);font-size:.975rem}
/* Canvas view */
#canvasPreview{max-width:100%;border:1px dashed var(--border);border-radius:14px;background:#fff}

/* CTA row layout (prevents overlap) */
.cta-row{display:flex;flex-wrap:wrap;gap:12px;margin-top:14px;margin-bottom:10px}
.cta-row .btn{padding:10px 14px;border-radius:12px}
.hero{padding:44px 0 18px 0}
.tools-grid h2,.popular h2,.seo h2{margin-top:18px}
.links-row a{display:inline-block;margin:4px 6px}

.panel details{margin:8px 0;padding:8px 10px;border:1px solid var(--border);border-radius:10px;background:#fff}
.panel ul{margin:8px 0 0 18px}
.panel li{margin:4px 0}

/* Content cards: consistent typography & panels */
main.container > section:not(.panel) {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin: 14px 0;
}

main.container > section:not(.panel) > h1,
main.container > section:not(.panel) > h2,
main.container > section:not(.panel) > h3 {
  margin-top: 0;
}

main.container p {
  line-height: 1.75;
}

main.container ul,
main.container ol {
  padding-left: 1.2rem;
}

main.container table {
  width: 100%;
  border-collapse: collapse;
}

main.container table th,
main.container table td {
  border: 1px solid var(--border);
  padding: 10px;
  vertical-align: top;
}

main.container .value-content {
  margin-bottom: 14px;
}

/* Centering: panels and content sections */
/* Keep the main container centered (should already be), but ensure content blocks don't span edge-to-edge */
main.container > section.panel,
main.container > section:not(.panel),
main.container > details.panel {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

/* Preserve vertical spacing while centering */
main.container > section.panel {
  margin-top: 14px;
  margin-bottom: 14px;
}

main.container > section:not(.panel) {
  margin-top: 14px;
  margin-bottom: 14px;
}

/* Ensure long text content reads like a centered card */
main.container > section.panel p,
main.container > section:not(.panel) p,
main.container > details.panel p {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* Lists inside cards should align with the centered text block */
main.container > section.panel ul,
main.container > section.panel ol,
main.container > section:not(.panel) ul,
main.container > section:not(.panel) ol {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* Side padding fix: sections outside main container (e.g., injected content above footer) */
/* Some pages place footer outside <main>. Anything inserted right above the footer may also live outside <main>.
   Force consistent side-gutters by using a responsive width calculation. */
section.value-content {
  width: min(980px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

section.value-content.panel {
  width: min(980px, calc(100% - 48px));
  margin: 14px auto;
}

/* On very small screens, keep a comfortable gutter */
@media (max-width: 420px) {
  section.value-content,
  section.value-content.panel {
    width: calc(100% - 32px);
  }
}


/* Improved Footer (AdSense/quality-friendly) */
.site-footer{
  margin-top: auto;
  border-top: none;
  background: linear-gradient(180deg, #0b4aa8 0%, #0a2f73 100%);
  color: rgba(255,255,255,.92);
}
.site-footer .container{
  padding-top: 30px;
  padding-bottom: 18px;
}
.site-footer .footer-grid{
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 22px;
  align-items: start;
}
.site-footer .footer-brand-name{
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 1.15rem;
  margin-bottom: 10px;
}
.site-footer .footer-brand-text{
  color: rgba(255,255,255,.82);
  line-height: 1.6;
  margin: 0;
  max-width: 44ch;
}
.site-footer .footer-col h4{
  font-size: .95rem;
  letter-spacing: .2px;
  margin: 0 0 10px 0;
  color: rgba(255,255,255,.95);
}
.site-footer ul{
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li{
  margin: 8px 0;
}
.site-footer a{
  color: rgba(255,255,255,.90);
  text-decoration: none;
}
.site-footer a:hover{
  color: rgba(255,255,255,1);
  text-decoration: underline;
}
.site-footer .footer-bottom{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.18);
  padding-top: 14px;
  margin-top: 18px;
  color: rgba(255,255,255,.80);
}
.site-footer .footer-note{
  color: rgba(255,255,255,.80);
}
@media (max-width: 980px){
  .site-footer .footer-grid{
    grid-template-columns: 1fr 1fr;
  }
  .site-footer .footer-brand{
    grid-column: 1 / -1;
  }
  .site-footer .footer-brand-text{max-width: 60ch;}
}
@media (max-width: 560px){
  .site-footer .footer-grid{
    grid-template-columns: 1fr;
  }
}


/* Header separation */
.site-header{box-shadow: 0 10px 24px rgba(2, 10, 30, .14);}

/* Page title (added for SEO + clarity) */
.page-title{
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: .2px;
  margin: 0 0 10px 0;
  color: inherit;
}
