/* ============================================================================
   tools.css — shared styles for the standalone calculator pages (20 Sep)
   ============================================================================
   This exact 64-line block was duplicated BYTE-IDENTICALLY in 25 tool_*.html
   templates. Those pages do not extend base.html, so they never loaded the
   app stylesheet and each carried its own copy. Extracted here; the pages now
   link it. Editing a calculator's look is one file instead of 25.
   ========================================================================= */

        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: linear-gradient(135deg, #f8fafc 0%, #ecfeff 50%, #f8fafc 100%); min-height: 100vh; color: #083344; line-height: 1.6; }
        /* Header: fixed full-width bar matching the homepage exactly */
        .header { background:rgba(255, 255, 255, 0.95); backdrop-filter:blur(10px); padding:1rem 0; position:fixed; width:100%; top:0; z-index:1000; border-bottom:1px solid rgba(8, 51, 68, 0.1); box-shadow:0 4px 12px rgba(8, 51, 68, 0.08); }
        .nav-container { max-width:1200px; margin:0 auto; padding:0 2rem; display:flex; justify-content:space-between; align-items:center; }
        .logo { font-size:1.5rem; font-weight:800; display:flex; align-items:center; gap:0.5rem; text-decoration:none; color:#083344; }
        .logo-icon { font-size:1.75rem; }
        .logo-text { background:linear-gradient(135deg,#0891b2 0%,#2563eb 100%); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
        .nav-links { display:flex; gap:2rem; align-items:center; }
        .nav-links a { color:#334155; text-decoration:none; transition:color 0.3s; font-weight:500; }
        .nav-links a:hover { color:#0891b2; }
        .btn { padding:0.75rem 1.5rem; border-radius:8px; text-decoration:none; font-weight:600; transition:color, background-color, border-color, box-shadow, transform, opacity 0.3s; cursor:pointer; border:none; display:inline-block; white-space:nowrap; }
        .btn-primary { background:linear-gradient(135deg,#0891b2 0%,#2563eb 100%); color:white; box-shadow:0 4px 14px rgba(8, 145, 178, 0.4); }
        .btn-primary:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(8, 145, 178, 0.5); }
        .btn-outline { border:2px solid #0891b2; color:#0891b2; background:transparent; }
        .btn-outline:hover { background:rgba(8, 145, 178, 0.1); transform:translateY(-1px); }
        .nav-links .btn-outline { border:1px solid rgba(8, 51, 68, 0.2); color:#083344; }
        .nav-links .btn-outline:hover { background:rgba(8, 51, 68, 0.1); }
        .container { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }
        @media (max-width: 768px) {
            .nav-links { gap:0.5rem; }
            .nav-links a:not(.btn) { display:none; }
        }
        .hero { padding: 8rem 0 1rem; text-align: center; }
        h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); font-weight: 800; margin-bottom: 0.7rem; }
        .lead { color: #475569; max-width: 640px; margin: 0 auto 1.5rem; }
        .calc-card { background: rgba(8,51,68,0.05); border: 1px solid rgba(8,51,68,0.12); border-radius: 16px; padding: 1.75rem; margin: 1.5rem 0; }
        .calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem 1.25rem; }
        .field label { display: block; font-size: 0.85rem; color: #475569; margin-bottom: 0.3rem; font-weight: 600; }
        .field input, .field select, .field textarea { width: 100%; padding: 0.65rem 0.8rem; background: rgba(255,255,255,0.6); border: 1px solid rgba(8,51,68,0.15); border-radius: 8px; color: #083344; font-size: 1rem; }
        .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #0891b2; }
        .field textarea { min-height: 90px; font-family: inherit; }
        .results { margin-top: 1.4rem; border-top: 1px solid rgba(8,51,68,0.1); padding-top: 1.2rem; display: none; }
        .results.show { display: block; }
        .res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.9rem; }
        .res { background: rgba(8,145,178,0.08); border: 1px solid rgba(8,145,178,0.25); border-radius: 10px; padding: 0.8rem 1rem; }
        .res .k { font-size: 0.78rem; color: #475569; text-transform: uppercase; letter-spacing: 0.4px; }
        .res .v { font-size: 1.25rem; font-weight: 700; margin-top: 0.15rem; }
        .res .v.pos { color: #34d399; } .res .v.neg { color: #f87171; }
        .note { color: #64748b; font-size: 0.85rem; margin-top: 0.9rem; }
        .warn { color: #fbbf24; font-size: 0.9rem; margin-top: 0.6rem; display: none; }
        section.explain { padding: 1.5rem 0; }
        section.explain h2 { font-size: 1.4rem; margin: 1.4rem 0 0.6rem; }
        section.explain p, section.explain li { color: #334155; font-size: 0.97rem; }
        section.explain ul { padding-left: 1.3rem; margin: 0.4rem 0 0.8rem; }
        .formula { background: rgba(8,51,68,0.05); border-left: 3px solid #0891b2; border-radius: 8px; padding: 0.8rem 1.1rem; margin: 0.8rem 0; font-family: ui-monospace, monospace; font-size: 0.92rem; color: #0891b2; overflow-x: auto; }
        .faq-list { margin: 1rem 0 2rem; }
        .faq-list details { background: rgba(8,51,68,0.05); border: 1px solid rgba(8,51,68,0.1); border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 0.75rem; }
        .faq-list summary { cursor: pointer; font-weight: 600; }
        .faq-list p { color: #475569; margin-top: 0.6rem; font-size: 0.95rem; }
        .cta-box { text-align: center; background: linear-gradient(135deg, rgba(8,145,178,0.15) 0%, rgba(118,75,162,0.15) 100%); border-radius: 14px; padding: 2rem 1.5rem; margin: 2rem 0; }
        .cta-box p { color: #334155; margin-bottom: 1rem; }
        .cta-box a { display: inline-block; padding: 0.75rem 1.6rem; border-radius: 10px; text-decoration: none; color: white; background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%); font-weight: 600; }
        /* Footer: full multi-column footer matching the homepage exactly */
        .footer { background:rgba(255, 255, 255, 0.95); border-top:1px solid rgba(8, 51, 68, 0.1); padding:3rem 2rem 2rem; margin-top:4rem; }
        .footer-content { max-width:1200px; margin:0 auto; display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:2rem; margin-bottom:2rem; }
        .footer-section h3 { color:#0891b2; margin-bottom:1rem; font-size:1.1rem; font-weight:700; }
        .footer-section ul { list-style:none; }
        .footer-section ul li { margin-bottom:0.75rem; }
        .footer-section a { color:#475569; text-decoration:none; transition:color 0.3s; font-size:0.95rem; }
        .footer-section a:hover { color:#0891b2; }
        .footer-bottom { text-align:center; padding-top:2rem; border-top:1px solid rgba(8, 51, 68, 0.1); color:#64748b; }
    