/* ========== Tools Redesign ========== */
.tool-hero { background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #7c2d12 100%); border-radius: 1rem; padding: 2rem; color: #fff; margin-bottom: 1.5rem; position: relative; overflow: hidden; }
.tool-hero::before { content: ""; position: absolute; top: -50%; right: -10%; width: 300px; height: 300px; background: radial-gradient(circle, rgba(249,115,22,.25), transparent 70%); border-radius: 50%; }
.tool-hero h1 { font-size: 1.6rem; margin-bottom: .5rem; position: relative; }
.tool-hero p { color: #cbd5e1; font-size: .95rem; max-width: 40rem; position: relative; }
.tool-hero .t-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .25rem .7rem; border-radius: 2rem; margin-bottom: .8rem; position: relative; }
.t-badge.free { background: #dcfce7; color: #166534; }
.t-badge.paid { background: #fef3c7; color: #92400e; }
.t-badge.pro { background: #dbeafe; color: #1e40af; }

.pool-meter { background: #fff; border: 1px solid var(--line); border-radius: .8rem; padding: 1rem 1.25rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; }
.pool-meter .pm-bar { flex: 1; height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.pool-meter .pm-fill { height: 100%; background: linear-gradient(90deg, #f97316, #fb923c); border-radius: 4px; transition: width .3s; }
.pool-meter .pm-text { font-size: .85rem; color: #64748b; white-space: nowrap; }
.pool-meter .pm-text strong { color: #0f172a; }

.tool-card-main { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.tool-card-main h2 { font-size: 1.1rem; margin-bottom: 1rem; }

.smart-textarea-wrap { position: relative; margin-bottom: 1rem; }
.smart-textarea-wrap textarea { width: 100%; border: 2px solid #e2e8f0; border-radius: .7rem; padding: .9rem; font-size: .9rem; font-family: monospace; resize: vertical; min-height: 140px; transition: border-color .2s; }
.smart-textarea-wrap textarea:focus { outline: none; border-color: #f97316; }
.ta-tools { position: absolute; top: .6rem; right: .6rem; display: flex; gap: .4rem; }
.ta-tools button { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: .4rem; padding: .3rem .6rem; font-size: .75rem; font-weight: 600; cursor: pointer; color: #475569; }
.ta-tools button:hover { background: #e2e8f0; }
.ta-count { font-size: .75rem; color: #94a3b8; margin-top: .4rem; }

.tool-submit { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; border: none; border-radius: .7rem; padding: .85rem 2rem; font-size: 1rem; font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.tool-submit:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(249,115,22,.35); }

.stat-chips { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.25rem 0; }
.stat-chip { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .7rem; padding: .7rem 1.1rem; text-align: center; min-width: 90px; }
.stat-chip .num { font-size: 1.4rem; font-weight: 800; display: block; }
.stat-chip .lbl { font-size: .72rem; color: #64748b; }
.stat-chip.live .num { color: #16a34a; }
.stat-chip.dead .num { color: #dc2626; }
.stat-chip.unknown .num { color: #d97706; }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.result-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .7rem; overflow: hidden; }
.result-box h3 { font-size: .85rem; padding: .7rem 1rem; margin: 0; display: flex; justify-content: space-between; align-items: center; }
.result-box h3 .copy-btn { background: #fff; border: 1px solid #e2e8f0; border-radius: .4rem; padding: .25rem .6rem; font-size: .72rem; cursor: pointer; font-weight: 600; }
.result-box h3 .copy-btn:hover { background: #f1f5f9; }
.result-box.live h3 { background: #dcfce7; color: #166534; }
.result-box.dead h3 { background: #fee2e2; color: #991b1b; }
.result-box textarea { width: 100%; border: none; background: transparent; padding: .8rem 1rem; font-family: monospace; font-size: .82rem; resize: vertical; min-height: 120px; }
.result-box textarea:focus { outline: none; }

.tool-input { width: 100%; border: 2px solid #e2e8f0; border-radius: .7rem; padding: .8rem 1rem; font-size: .95rem; margin-bottom: 1rem; transition: border-color .2s; }
.tool-input:focus { outline: none; border-color: #f97316; }
.tool-label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; color: #334155; }

.honest-note { background: #fffbeb; border: 1px solid #fde68a; border-radius: .7rem; padding: .9rem 1.1rem; font-size: .85rem; color: #92400e; margin-top: 1.25rem; }
.honest-note strong { color: #78350f; }

/* Directory page */
.tools-dir-hero { text-align: center; padding: 2.5rem 1rem; margin-bottom: 2rem; }
.tools-dir-hero h1 { font-size: 2rem; margin-bottom: .6rem; }
.tools-dir-hero p { color: #64748b; max-width: 44rem; margin: 0 auto; }
.tool-group { margin-bottom: 2.5rem; }
.tool-group h2 { font-size: 1.25rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem; }
.tool-group h2 .g-ico { width: 2.2rem; height: 2.2rem; background: linear-gradient(135deg, #f97316, #ea580c); border-radius: .6rem; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.tool-card { background: #fff; border: 1px solid var(--line); border-radius: .9rem; padding: 1.25rem; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; display: flex; flex-direction: column; gap: .5rem; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.08); border-color: #fed7aa; }
.tool-card .t-ico { width: 2.8rem; height: 2.8rem; background: #fff7ed; border-radius: .7rem; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.tool-card h3 { font-size: 1rem; margin: 0; }
.tool-card p { font-size: .85rem; color: #64748b; margin: 0; flex: 1; }
.tool-card .t-footer { display: flex; justify-content: space-between; align-items: center; margin-top: .5rem; }
.tool-card .t-arrow { color: #f97316; font-weight: 700; }

/* Package cards (paid tools) */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.pkg-card { border: 2px solid #e2e8f0; border-radius: .9rem; padding: 1.25rem; text-align: center; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.pkg-card:hover, .pkg-card.selected { border-color: #f97316; box-shadow: 0 4px 14px rgba(249,115,22,.15); }
.pkg-card .pkg-name { font-weight: 700; font-size: 1rem; margin-bottom: .3rem; }
.pkg-card .pkg-price { font-size: 1.5rem; font-weight: 800; color: #ea580c; }
.pkg-card .pkg-desc { font-size: .8rem; color: #64748b; margin-top: .4rem; }
.refund-badge { display: inline-flex; align-items: center; gap: .4rem; background: #dcfce7; color: #166534; font-size: .8rem; font-weight: 600; padding: .5rem 1rem; border-radius: 2rem; margin-top: 1rem; }

/* 2FA code display */
.totp-display { text-align: center; padding: 2rem; }
.totp-code { font-size: 3rem; font-weight: 800; letter-spacing: .5rem; font-family: monospace; color: #0f172a; margin: 1rem 0; }
.totp-timer { width: 60px; height: 60px; margin: 0 auto; position: relative; }
.totp-timer svg { transform: rotate(-90deg); }
.totp-timer .t-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; }

/* Risk gauge */
.risk-gauge { max-width: 300px; margin: 1.5rem auto; text-align: center; }
.risk-bar { height: 12px; background: linear-gradient(90deg, #16a34a, #eab308, #dc2626); border-radius: 6px; position: relative; margin: 1rem 0; }
.risk-marker { position: absolute; top: -4px; width: 4px; height: 20px; background: #0f172a; border-radius: 2px; transform: translateX(-50%); }
.risk-labels { display: flex; justify-content: space-between; font-size: .72rem; color: #64748b; }

/* Steps (SMTP etc) */
.step-list { margin: 1.25rem 0; }
.step-item { display: flex; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid #f1f5f9; }
.step-item:last-child { border-bottom: none; }
.step-num { width: 2rem; height: 2rem; border-radius: 50%; background: #f1f5f9; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.step-item.success .step-num { background: #dcfce7; color: #166534; }
.step-item.error .step-num { background: #fee2e2; color: #991b1b; }
.step-item .step-body { flex: 1; }
.step-item .step-title { font-weight: 600; font-size: .9rem; }
.step-item .step-detail { font-size: .82rem; color: #64748b; font-family: monospace; margin-top: .2rem; }

@media (max-width: 640px) {
  .tool-hero { padding: 1.5rem 1.25rem; }
  .tool-hero h1 { font-size: 1.3rem; }
  .result-grid { grid-template-columns: 1fr; }
  .totp-code { font-size: 2.2rem; letter-spacing: .3rem; }
}
