/* =============================================================
   tikr2xl — shared tool-page scaffold
   Place at:  static/tools/_common.css
   Link from each tool page with:
     <link rel="stylesheet" href="/static/tools/_common.css">
   ============================================================= */

/* --- reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* --- design tokens --- */
:root {
    --bg-deep:        #051010;
    --bg-primary:     rgba(255,255,255,0.05);
    --bg-card:        rgba(255,255,255,0.03);
    --green:          #00ff88;
    --green-mid:      #00cc6a;
    --green-bright:   #00ffaa;
    --green-dim:      rgba(0,255,136,0.08);
    --green-border:   rgba(0,255,136,0.25);
    --amber:          #ffcc44;
    --amber-dim:      rgba(255,204,68,0.08);
    --amber-border:   rgba(255,204,68,0.25);
    --red:            #ff4466;
    --red-dim:        rgba(255,68,102,0.08);
    --red-border:     rgba(255,68,102,0.25);
    --text-primary:   #ffffff;
    --text-secondary: rgba(255,255,255,0.6);
    --text-muted:     rgba(255,255,255,0.3);
    --border:         rgba(255,255,255,0.1);
    --mono:           'Space Mono', monospace;
    --body:           'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- base --- */
html { scroll-behavior: smooth; }
body {
    font-family: var(--body);
    background: linear-gradient(180deg, #0a1a1a 0%, #051010 100%);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* --- sticky site header --- */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    position: sticky;
    top: 0;
    background: rgba(5,16,16,0.92);
    backdrop-filter: blur(16px);
    z-index: 100;
}
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.03em;
}
.header-nav { display: flex; gap: 20px; align-items: center; }
.header-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}
.header-nav a:hover,
.header-nav a.active { color: var(--green); }
.nav-cta {
    color: var(--green) !important;
    padding: 6px 16px;
    border: 1px solid var(--green-border);
    border-radius: 6px;
    background: var(--green-dim);
    font-weight: 600 !important;
}

/* --- hero --- */
.hero {
    text-align: center;
    padding: 56px 24px 32px;
    max-width: 680px;
    margin: 0 auto;
}
.hero-pretitle {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.hero-badge {
    display: inline-block;
    padding: 6px 18px;
    background: var(--green-dim);
    border: 1px solid var(--green-border);
    border-radius: 20px;
    margin-bottom: 20px;
}
.hero-badge span {
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.hero h1 {
    font-family: var(--mono);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 14px;
}
.hero p {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0 auto;
    line-height: 1.6;
    max-width: 540px;
}

/* --- breadcrumb (optional, used by some pages) --- */
.breadcrumb {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 24px 0;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb .sep { margin: 0 6px; opacity: 0.5; }

/* --- FAQ ---
   Markup convention:
     <section class="faq-section">
       <h2>Frequently Asked Questions</h2>
       <div class="faq-list">
         <div class="faq-item">
           <div class="faq-q" onclick="toggleFaq(this)">
             <span>Question text</span>
             <span class="arrow">⌄</span>
           </div>
           <div class="faq-a"><div class="faq-a-inner">Answer text</div></div>
         </div>
       </div>
     </section>

   Toggle handler (one-liner JS, identical across pages):
     function toggleFaq(el) { el.parentElement.classList.toggle('open'); }
*/
.faq-section {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px 60px;
}
.faq-section h2,
.faq-title {
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.faq-item:hover { border-color: var(--green-border); }
.faq-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
    transition: color 0.2s;
}
.faq-q:hover { color: var(--green); }
.faq-q span:first-child { flex: 1; }
.faq-q .arrow {
    transition: transform 0.2s;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 12px;
    font-size: 14px;
}
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-item.open .faq-a { max-height: 500px; }
.faq-a-inner {
    padding: 0 20px 18px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.faq-a-inner p { margin: 0; }

/* --- bottom CTA --- */
.bottom-cta {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px 80px;
}
.cta-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--green-border);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
}
.cta-card h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}
.cta-card p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 auto 24px;
    max-width: 460px;
    line-height: 1.6;
}
.cta-main-btn {
    display: inline-block;
    background: var(--green);
    color: var(--bg-deep);
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.2s;
}
.cta-main-btn:hover {
    background: var(--green-bright);
    transform: translateY(-1px);
    box-shadow: 0 4px 24px rgba(0,255,136,0.25);
}

/* --- footer --- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}
.site-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}
.site-footer a:hover { color: var(--green); }

/* --- shared utilities --- */
.hidden { display: none !important; }

.disclaimer {
    text-align: center;
    margin: 32px auto 0;
    max-width: 680px;
    padding: 0 24px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- mobile --- */
@media (max-width: 640px) {
    .hero h1 { font-size: 26px; }
    .hero { padding: 40px 16px 24px; }
    .faq-section, .bottom-cta { padding-left: 16px; padding-right: 16px; }
    .cta-card { padding: 36px 20px; }
    .cta-card h2 { font-size: 22px; }
}
