/* === JusTheTool Shared Styles === */
/* Extracted from individual pages to reduce page weight and improve load speed */

/* Reset & Base */
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;line-height:1.6;color:#333;margin:0;padding:0;background-color:#f8fafc}
.container{max-width:900px;margin:0 auto;padding:20px}

/* Header */
.site-header{background-color:#1e3a8a;color:white;padding:15px 0;text-align:center;box-shadow:0 2px 4px rgba(0,0,0,0.1)}
.site-header a{color:white;text-decoration:none;display:inline-flex;align-items:center;gap:12px}

/* Cards */
.tool-card{background:white;border-radius:12px;box-shadow:0 4px 6px -1px rgba(0,0,0,0.1);padding:30px;margin-bottom:40px;border-top:5px solid #57534e}
.tool-card h1{color:#44403c;margin-top:0;font-size:1.8em}
.tool-card .subtitle{color:#64748b;margin-bottom:25px}

/* Inputs */
.input-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:20px}
.input-group{display:flex;flex-direction:column}
.input-group label{font-weight:600;margin-bottom:5px;color:#475569;font-size:0.9em}
.input-group input,.input-group select{padding:10px;border:1px solid #cbd5e1;border-radius:6px;font-size:1em}
.input-group input:focus,.input-group select:focus{outline:none;border-color:#57534e;box-shadow:0 0 0 3px rgba(87,83,78,0.1)}

/* Results */
.results-box{background:#f5f5f4;border:2px dashed #57534e;border-radius:8px;padding:20px;text-align:center;margin-top:20px}
.results-box h3,.results-box h2{margin:0 0 10px;color:#44403c;font-size:1.17em;font-weight:bold}
.result-value{font-size:1.8em;font-weight:bold;color:#57534e;margin:5px 0}
.result-sub{color:#64748b;font-size:0.95em;margin-top:10px;line-height:1.5}

/* Content Sections */
.content-section{background:white;border-radius:12px;padding:30px;margin-bottom:30px;box-shadow:0 1px 3px rgba(0,0,0,0.05)}
.content-section h2{color:#44403c;border-bottom:2px solid #e2e8f0;padding-bottom:10px}
.content-section h3{color:#57534e;margin-top:25px}

/* Pro Tips */
.pro-tip{background:#fef3c7;border-left:4px solid #f59e0b;padding:15px;margin:20px 0;border-radius:4px}
.pro-tip strong{color:#92400e;display:block;margin-bottom:5px}

/* Footer */
.site-footer{background:#1e293b;color:#94a3b8;text-align:center;padding:30px 20px;margin-top:50px;font-size:0.9em}
.site-footer a{color:#cbd5e1;text-decoration:none;margin:0 10px}
.site-footer a:hover{color:white}

/* AdSense Units — hidden until a real ad is successfully injected (avoids empty placeholder boxes pre-approval) */
.ad-unit{display:none;text-align:center;margin:25px auto;min-height:90px;overflow:hidden}
.ad-unit.in-content{background:#f1f5f9;border-radius:8px;padding:10px;max-width:728px}
.ad-unit.sidebar{min-width:300px;min-height:250px}
.ad-unit-label{font-size:0.7em;color:#94a3b8;text-transform:uppercase;letter-spacing:1px;margin-bottom:4px;text-align:center}

/* Related Tools */
.related-tools{background:white;border-radius:12px;padding:25px 30px;margin-bottom:30px;box-shadow:0 1px 3px rgba(0,0,0,0.05)}
.related-tools h2{color:#1e3a8a;margin-top:0;font-size:1.4em}
.related-tools-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-top:15px}
.related-tool-link{display:block;padding:12px 15px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;text-decoration:none;color:#1e3a8a;font-weight:600;font-size:0.95em;transition:all 0.15s}
.related-tool-link:hover{border-color:#2563eb;background:#eff6ff;transform:translateY(-2px)}
.related-tool-link .icon{margin-right:6px}

/* Share Buttons */
.share-section{text-align:center;margin:20px 0}
.share-section span{color:#64748b;font-size:0.9em;margin-right:8px}
.share-btn{display:inline-block;padding:8px 16px;margin:4px;border-radius:6px;text-decoration:none;color:white;font-size:0.85em;font-weight:600;transition:opacity 0.15s}
.share-btn:hover{opacity:0.85}
.share-btn.twitter{background:#1da1f2}
.share-btn.facebook{background:#1877f2}
.share-btn.pinterest{background:#e60023}
.share-btn.copy-link{background:#475569;cursor:pointer;border:none;font-family:inherit}

/* Breadcrumb */
.breadcrumb{max-width:900px;margin:12px auto 0;padding:0 20px;font-size:0.85em;color:#64748b}
.breadcrumb a{color:#475569;text-decoration:none}
.breadcrumb a:hover{text-decoration:underline}
.breadcrumb span{color:#64748b}
.breadcrumb .sep{margin:0 6px;color:#94a3b8}

/* Guide-specific */
.guide-card{background:white;border-radius:12px;box-shadow:0 4px 6px -1px rgba(0,0,0,0.1);padding:30px;margin-bottom:30px;border-top:5px solid #2563eb}
.guide-card h1{color:#1e3a8a;margin-top:0;font-size:2em}
.article-meta{color:#64748b;margin-bottom:20px;font-size:0.9em}

/* Misc */
.button-primary{display:inline-block;background:#2563eb;color:white;padding:10px 24px;border-radius:6px;text-decoration:none;font-weight:600;transition:background 0.2s}
.button-primary:hover{background:#1d4ed8}

/* Responsive */
@media (max-width:600px){
  .input-grid{grid-template-columns:1fr}
  .result-value{font-size:1.4em}
  .related-tools-grid{grid-template-columns:1fr}
}
/* =========================================================
   SEO/UX OVERHAUL — ADD-ON STYLES
   Append this entire block to the bottom of /shared/style.css
   Do not delete anything already in that file.
   ========================================================= */

/* ---------- PHASE 1: Formula / "How it works" blocks ---------- */
.formula-block{background:#f5f5f4;border:1px solid #d6d3d1;border-radius:8px;padding:18px 20px;margin:15px 0;overflow-x:auto}
.formula-block pre{margin:0;white-space:pre-wrap;font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;font-size:0.95em;color:#44403c}
.formula-block code{font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;background:#e7e5e4;padding:2px 6px;border-radius:4px;font-size:0.95em}
.formula-note{font-size:0.85em;color:#78716c;margin-top:8px}

/* Contractor Tips & Waste Factor callouts (USP section) */
.tips-grid{display:grid;gap:14px;margin-top:15px}
.waste-table{width:100%;border-collapse:collapse;margin:15px 0;font-size:0.92em}
.waste-table th,.waste-table td{border:1px solid #e2e8f0;padding:8px 10px;text-align:left}
.waste-table th{background:#f5f5f4;color:#44403c}

/* ---------- PHASE 3: E-E-A-T Author Bylines ---------- */
/* Compact byline — place near the top of tool & guide pages, under the H1/subtitle */
.author-byline{display:flex;align-items:center;gap:14px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:8px;padding:12px 16px;margin:0 0 20px}
.author-byline .avatar{width:48px;height:48px;border-radius:50%;background:#1e3a8a;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.05em;flex-shrink:0}
.author-byline .avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover}
.author-byline .meta{font-size:0.92em;color:#475569;line-height:1.4}
.author-byline .meta strong{color:#1e3a8a}
.author-byline .meta a{color:#2563eb;text-decoration:none}
.author-byline .meta a:hover{text-decoration:underline}

/* Full author box — place at the bottom of long-form guides, above Related Tools */
.author-box{display:flex;gap:20px;align-items:flex-start;background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:25px;margin:30px 0;box-shadow:0 1px 3px rgba(0,0,0,0.05)}
.author-box .avatar{width:72px;height:72px;border-radius:50%;background:#1e3a8a;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.5em;flex-shrink:0}
.author-box .avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover}
.author-box h4,.author-box h3{margin:0 0 4px;color:#1e3a8a;font-size:1.15em}
.author-box .credential{color:#64748b;font-weight:600;font-size:0.88em;margin-bottom:8px}
.author-box p{margin:0 0 10px;color:#475569;font-size:0.95em}
.author-box .social-links a{display:inline-flex;align-items:center;gap:5px;margin-right:14px;color:#2563eb;text-decoration:none;font-size:0.9em;font-weight:600}
.author-box .social-links a:hover{text-decoration:underline}
@media (max-width:600px){
  .author-box{flex-direction:column;align-items:center;text-align:center}
  .author-box .social-links{justify-content:center;display:flex;flex-wrap:wrap}
  .author-byline{flex-wrap:wrap}
}

/* ---------- PHASE 2: Related Guides widget (companion to .related-tools) ---------- */
.related-guides{background:#fff;border-radius:12px;padding:25px 30px;margin-bottom:30px;box-shadow:0 1px 3px rgba(0,0,0,0.05);border-left:4px solid #2563eb}
.related-guides h2{color:#1e3a8a;margin-top:0;font-size:1.4em}
.related-guides-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-top:15px}
.related-guide-link{display:block;padding:12px 15px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;text-decoration:none;color:#1e3a8a;font-weight:600;font-size:0.95em;transition:all 0.15s}
.related-guide-link:hover{border-color:#2563eb;background:#eff6ff;transform:translateY(-2px)}
.related-guide-link .icon{margin-right:6px}
.related-guide-link .tag{display:block;font-size:0.78em;color:#64748b;font-weight:500;margin-top:2px}

@media (max-width:600px){
  .related-guides-grid{grid-template-columns:1fr}
}

/* ---------- PHASE 5: Universal print pattern ----------
   Usage: wrap whatever the user should be able to print (shopping list,
   cut list, checklist) in a single element with class="print-area" and
   put a class="print-header" element as its FIRST child containing your
   logo + URL. Everything else on the page is hidden automatically. */
.print-header{display:none}

@media print{
  body *{visibility:hidden}
  .print-area, .print-area *{visibility:visible}
  .print-area{display:block !important;position:absolute;top:0;left:0;width:100%;padding:0;margin:0;border:none;box-shadow:none;background:#fff}
  .print-header{display:flex !important;align-items:center;gap:10px;border-bottom:2px solid #000;padding-bottom:10px;margin-bottom:16px}
  .print-header img{height:32px}
  .print-header .print-title{font-size:1.1em;font-weight:800}
  .print-header .print-url{font-size:0.85em;color:#444}
  .no-print{display:none !important}
  a{color:#000 !important;text-decoration:none !important}
}


/* ---------- Adsterra display block ----------
   Inserted once per page by shared/analytics.js, right after the
   breadcrumb/header, only after cookie consent is given. */
.jtt-adsterra-block{max-width:900px;margin:16px auto;padding:10px;text-align:center}
.jtt-adsterra-label{font-size:.72em;letter-spacing:.06em;text-transform:uppercase;color:#94a3b8;margin-bottom:6px}
.jtt-adsterra-row{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:14px}
.jtt-adsterra-native{flex:1 1 300px;max-width:500px;min-height:1px}
.jtt-adsterra-banner{flex:0 0 auto;width:160px;height:600px;overflow:hidden}

@media (max-width:640px){
  .jtt-adsterra-banner{display:none} /* 160x600 skyscraper doesn't fit small screens well */
}
