/* ============================================================
   page-common.css
   Shared page layout styles for all refactored tool pages
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Skip to content ── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: #667eea;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    text-decoration: none;
    border-radius: 0 0 6px 0;
}
.skip-link:focus { top: 0; }

body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    color: #1a202c;
    line-height: 1.6;
}

/* ── Page wrapper ── */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px 60px; }

/* ── Breadcrumb ── */
.breadcrumb { font-size: 13px; color: #888; margin-bottom: 20px; padding-top: 24px; }
.breadcrumb a { color: #888; text-decoration: none; }
.breadcrumb a:hover { color: #667eea; }
.breadcrumb span { margin: 0 6px; }

/* ── Hero grid — single centered column ── */
.hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 0 40px;
    gap: 32px;
}
.page-header {
    text-align: center;
    max-width: 860px;
    width: 100%;
}
.hero-badges { justify-content: center; }
.tool-section {
    max-width: 860px;
    width: 100%;
}
@media (max-width: 768px) {
    .hero-grid { padding: 28px 0 24px; gap: 24px; }
}

.page-header h1 {
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 800;
    color: #1a202c;
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: -0.4px;
}
.page-header .subtitle {
    font-size: 16px;
    color: #64748b;
    line-height: 1.65;
    margin-bottom: 20px;
}
.page-header .meta-row { display: none; }

/* ── Feature badges ── */
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.hero-badge .badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge-dot-green  { background: #22c55e; }
.badge-dot-purple { background: #667eea; }
.badge-dot-pink   { background: #667eea; }
.badge-dot-blue   { background: #3b82f6; }

/* ── Tool card ── */
.tool-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.tool-card label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tool-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #1a202c;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 14px;
}
/* Accessible focus — visible ring instead of outline:none */
.tool-input:focus {
    outline: 2px solid transparent;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(225, 48, 108, 0.2);
}
.tool-input::placeholder { color: #aaa; }

.btn-convert {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}
.btn-convert:hover { opacity: 0.92; }
.btn-convert:active { transform: scale(0.99); }
.btn-convert:focus-visible {
    outline: 2px solid #764ba2;
    outline-offset: 2px;
}

/* ── Result panel ── */
.result-panel {
    display: none;
    margin-top: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.result-panel.visible { display: block; }
.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}
.result-row:last-child { border-bottom: none; }
.result-row .r-label { font-size: 12px; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.5px; min-width: 110px; }
.result-row .r-value { font-size: 15px; font-weight: 600; color: #1a202c; word-break: break-all; }
.result-row .r-value.highlight { color: #667eea; font-size: 17px; }
.copy-btn {
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    color: #555;
    white-space: nowrap;
    transition: background 0.2s;
}
.copy-btn:hover { background: #e2e8f0; }
.copy-btn:focus-visible { outline: 2px solid #667eea; outline-offset: 2px; }

/* ── Quick examples ── */
.examples-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.example-pill {
    background: #fff0f5;
    border: 1px solid #ffc0d0;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    color: #667eea;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: background 0.2s;
}
.example-pill:hover { background: #ffe0eb; }
.example-pill:focus-visible { outline: 2px solid #667eea; outline-offset: 2px; }

/* ── Content article ── */
.content-article {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 36px 32px;
    margin-bottom: 32px;
    max-width: 860px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.content-article h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin: 32px 0 12px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}
.content-article h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.content-article h3 { font-size: 16px; font-weight: 600; color: #333; margin: 20px 0 8px; }
.content-article p { color: #444; line-height: 1.85; margin-bottom: 14px; font-size: 15px; }
.content-article ul, .content-article ol { margin: 0 0 16px 22px; }
.content-article li { color: #444; line-height: 1.8; margin-bottom: 6px; font-size: 15px; }
.content-article code {
    background: #f4f4f8;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #c7254e;
}
.content-article a { color: #667eea; text-decoration: none; }
.content-article a:hover { text-decoration: underline; }

/* ── Code blocks ── */
.code-block { background: #1e1e2e; border-radius: 10px; overflow: hidden; margin: 18px 0; }
.code-block-header {
    background: #2a2a3e;
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3a3a50;
}
.code-block-header .lang { color: #89b4fa; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.code-block-header .copy-code-btn {
    background: #313244;
    color: #cdd6f4;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.code-block-header .copy-code-btn:hover { background: #45475a; }
.code-block-header .copy-code-btn:focus-visible { outline: 2px solid #89b4fa; outline-offset: 2px; }
.code-block pre { margin: 0; padding: 20px 18px; overflow-x: auto; }
.code-block code {
    background: transparent;
    padding: 0;
    color: #cdd6f4;
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.7;
}

/* ── Callouts ── */
.callout {
    border-radius: 8px;
    padding: 16px 20px;
    margin: 18px 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.callout.info { background: #eff6ff; border-left: 4px solid #3b82f6; }
.callout.tip  { background: #f0fdf4; border-left: 4px solid #22c55e; }
.callout.warn { background: #fffbeb; border-left: 4px solid #f59e0b; }
.callout .icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.callout p { margin: 0; font-size: 14px; color: #374151; line-height: 1.7; }

/* ── Data table ── */
.data-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.data-table thead tr { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
.data-table th { padding: 12px 16px; text-align: left; font-weight: 600; }
.data-table td { padding: 11px 16px; border-bottom: 1px solid #f0f0f0; color: #444; }
.data-table tbody tr:hover { background: #fafafa; }
.data-table code { font-size: 12px; }

/* ── FAQ ── */
.faq-section { margin-bottom: 32px; max-width: 860px; width: 100%; margin-left: auto; margin-right: auto; }
.faq-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 18px 22px;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.faq-question:hover { background: #fafafa; }
.faq-question:focus-visible { outline: 2px solid #667eea; outline-offset: -2px; }
.faq-question .faq-icon { font-size: 18px; color: #667eea; flex-shrink: 0; transition: transform 0.2s; }
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 22px 18px; font-size: 14px; color: #555; line-height: 1.8; }
.faq-answer.open { display: block; }

/* ── Related tools ── */
.related-tools { margin-bottom: 32px; max-width: 860px; width: 100%; margin-left: auto; margin-right: auto; }
.related-tools h2 { font-size: 18px; font-weight: 700; color: #1a202c; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.related-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    color: #1a202c;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    display: block;
}
.related-card:hover { border-color: #667eea; box-shadow: 0 4px 12px rgba(225,48,108,0.12); transform: translateY(-2px); }
.related-card:focus-visible { outline: 2px solid #667eea; outline-offset: 2px; }
.related-card .rc-icon { font-size: 22px; margin-bottom: 8px; }
.related-card .rc-name { font-size: 14px; font-weight: 600; color: #1a202c; margin-bottom: 4px; }
.related-card .rc-desc { font-size: 12px; color: #888; line-height: 1.5; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .content-article { padding: 24px 18px; }
    .tool-card { padding: 20px 16px; }
    .result-row { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════════════════════
   TOOL CARD INNER CONTENT — styles for generated tool pages
   (textarea, buttons, input-group, output-area, etc.)
   ══════════════════════════════════════════════════════════ */

/* Widen tool card for these pages — they need more space */
.hero-grid .tool-card,
.hero-grid section.tool-card {
    max-width: 860px;
    width: 100%;
}

/* Hide the duplicate breadcrumb and page-intro that appear inside the tool card */
.tool-card .breadcrumb,
.tool-card .page-intro { display: none; }

/* Inner tool-section div (inside the card) */
.tool-card .tool-section {
    max-width: 100%;
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
}
.tool-card .tool-section h2 {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 12px;
}
.tool-card .tool-section > p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
}

/* Input group */
.input-group { margin-bottom: 14px; }
.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Textarea */
.tool-card textarea,
.tool-card .input-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
    color: #1a202c;
    background: #fafafa;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 120px;
    box-sizing: border-box;
}
.tool-card textarea:focus {
    outline: 2px solid #4a90e2;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: white;
}
.tool-card textarea::placeholder { color: #aaa; }

/* Generic input inside tool card */
.tool-card input[type="text"],
.tool-card input[type="number"],
.tool-card input[type="email"],
.tool-card input[type="url"],
.tool-card select {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1a202c;
    background: white;
    transition: border-color 0.2s;
    box-sizing: border-box;
    margin-bottom: 12px;
}
.tool-card input[type="text"]:focus,
.tool-card input[type="number"]:focus,
.tool-card select:focus {
    outline: 2px solid #4a90e2;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Primary action button (.btn) */
.tool-card .btn,
.tool-card button.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 4px;
    margin-bottom: 4px;
}
.tool-card .btn:hover { opacity: 0.9; }
.tool-card .btn:active { transform: scale(0.99); }
.tool-card .btn:focus-visible { outline: 2px solid #764ba2; outline-offset: 2px; }

/* Full-width variant */
.tool-card .btn-full,
.tool-card button.btn-full { width: 100%; text-align: center; }

/* Secondary / example buttons */
.tool-card .example-buttons { margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tool-card .example-buttons button,
.tool-card .example-btn {
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #4f46e5;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.tool-card .example-buttons button:hover,
.tool-card .example-btn:hover { background: #e0e7ff; }

/* Raw <button> elements without a class (tool action buttons like Format, Minify, Copy, etc.) */
.tool-card button:not([class]),
.tool-card .tool-section button:not(.btn):not(.example-btn):not(.faq-question) {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin: 4px 4px 4px 0;
    font-family: inherit;
}
.tool-card button:not([class]):hover,
.tool-card .tool-section button:not(.btn):not(.example-btn):not(.faq-question):hover { opacity: 0.88; }
.tool-card button:not([class]):active { transform: scale(0.99); }

/* Output area — hidden until .show or .visible is added by JS */
/* Exception: if it has direct text content (some tools use it as always-visible) */
.tool-card .output-area {
    display: none;
    margin-top: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}
.tool-card .output-area.show,
.tool-card .output-area.visible { display: block; }
/* Generator-section output is always visible (shows placeholder text) */
/* !important needed to override tool-specific CSS files that set display:none */
.generator-section .output-area {
    display: block !important;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafafa;
    font-size: 13px;
    color: #888;
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
    min-height: 60px;
}

/* Result inside output */
.tool-card #result,
.tool-card .result-value {
    padding: 16px 18px;
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
    font-size: 13px;
    color: #1a202c;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.7;
}

/* Comparison table inside tool card */
.tool-card .comparison-table,
.comparison-table {
    margin: 24px 0;
}
.tool-card .comparison-table h2,
.comparison-table h2 {
    font-size: 17px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
}
.tool-card .comparison-table table,
.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.tool-card .comparison-table thead tr,
.comparison-table thead tr {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}
.tool-card .comparison-table th,
.comparison-table th { padding: 10px 14px; text-align: left; font-weight: 600; }
.tool-card .comparison-table td,
.comparison-table td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; color: #444; }
.tool-card .comparison-table tbody tr:hover,
.comparison-table tbody tr:hover { background: #fafafa; }

/* Use cases grid */
.use-cases { margin: 24px 0; }
.use-cases h2 { font-size: 17px; font-weight: 700; color: #1a202c; margin-bottom: 14px; }
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.use-case-card {
    background: #f8f9ff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.use-case-card .icon { font-size: 24px; margin-bottom: 8px; }
.use-case-card h4 { font-size: 13px; font-weight: 700; color: #1a202c; margin: 0 0 6px; }
.use-case-card p { font-size: 12px; color: #64748b; margin: 0; line-height: 1.5; }

/* ══════════════════════════════════════════════════════════
   EXTENDED TOOL PATTERNS — classes found across 884 pages
   ══════════════════════════════════════════════════════════ */

/* ── Result items (decoder-style output) ── */
.result-item {
    background: #f8f9ff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.result-label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}
.result-value {
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
    word-break: break-all;
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
}

/* ── Decoder box (discord/twitter style tools) ── */
.decoder-box {
    background: white;
    border-radius: 10px;
    padding: 0;
}
.decoder-box h2 {
    font-size: 17px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 14px;
}
.decoder-box input[type="text"],
.decoder-box input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1a202c;
    margin-bottom: 12px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.decoder-box input:focus {
    outline: 2px solid #4a90e2;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}
.decoder-box .btn,
.decoder-box button.btn {
    padding: 11px 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 14px;
    transition: opacity 0.2s;
}
.decoder-box .btn:hover { opacity: 0.88; }
.decoder-box .examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 14px;
}
.decoder-box .example-btn {
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    color: #4f46e5;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.decoder-box .example-btn:hover { background: #e0e7ff; }
.decoder-box #result,
.decoder-box .result {
    margin-top: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    display: none;
}
.decoder-box #result.show,
.decoder-box .result.show,
.decoder-box #result.visible,
.decoder-box .result.visible { display: block; }

/* ── Button variants ── */
.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: inherit;
}
.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}
.btn-secondary:hover { background: #667eea; color: white; }

/* ── Form group ── */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1a202c;
    background: white;
    box-sizing: border-box;
    transition: border-color 0.2s;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid #4a90e2;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

/* ── Textarea wrapper ── */
.textarea-wrapper { position: relative; margin-bottom: 14px; }
.textarea-wrapper textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
    color: #1a202c;
    background: #fafafa;
    resize: vertical;
    min-height: 120px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.textarea-wrapper textarea:focus {
    outline: 2px solid #4a90e2;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
    background: white;
}

/* ── Converter box ── */
.converter-box {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

/* ── Feature items ── */
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.feature-item:last-child { border-bottom: none; }
.feature-item .icon { font-size: 20px; flex-shrink: 0; }
.feature-item h4 { font-size: 14px; font-weight: 600; color: #1a202c; margin: 0 0 4px; }
.feature-item p { font-size: 13px; color: #64748b; margin: 0; line-height: 1.5; }

/* ── Steps ── */
.step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}
.step-number {
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.step h3 {
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
    margin: 0 0 4px;
}
.step p, .step div { font-size: 13px; color: #64748b; line-height: 1.5; margin: 0; }

/* ── Idea items (social media idea pages) ── */
.idea-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 10px;
}
.idea-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 6px;
}
.idea-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 6px;
}
.idea-category {
    display: inline-block;
    background: #f0f4ff;
    color: #4f46e5;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ── Content section ── */
.content-section {
    margin-bottom: 28px;
}
.content-section h2,
.content-section h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
}

/* ── How to use ── */
.how-to-use {
    background: #f8f9ff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.how-to-use h3 {
    font-size: 15px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 12px;
}

/* ══════════════════════════════════════════════════════════
   ADDITIONAL TOOL PATTERNS — from scan of 884 pages
   ══════════════════════════════════════════════════════════ */

/* ── Generator / stats section ── */
.generator-section { margin-bottom: 20px; }

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.stat-box {
    background: #f8f9ff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #667eea;
    line-height: 1.2;
    display: block;
}
.stat-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    display: block;
}

/* ── Controls / control group ── */
.controls { margin-bottom: 16px; }
.control-group {
    margin-bottom: 14px;
}
.control-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.control-group input,
.control-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1a202c;
    background: white;
    box-sizing: border-box;
    transition: border-color 0.2s;
    font-family: inherit;
}
.control-group input:focus,
.control-group select:focus {
    outline: 2px solid #4a90e2;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

/* ── Button group ── */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

/* ── Convert button ── */
.convert-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    font-family: inherit;
}
.convert-btn:hover { opacity: 0.88; }
.convert-btn:active { transform: scale(0.99); }

/* ── Step box ── */
.step-box {
    background: #f8f9ff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.step-content h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 4px;
}
.step-content p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* ── Detail label/value (result display) ── */
.detail-label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
}
.detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
    word-break: break-all;
}

/* ── Status badge ── */
.status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* ── Example boxes / cards ── */
.example-box,
.example-card {
    background: #f8f9ff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #374151;
}
.example-id,
.example-date {
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
    font-size: 13px;
    color: #667eea;
    font-weight: 600;
}

/* ── Features grid ── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.feature {
    background: #f8f9ff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    font-size: 13px;
    color: #374151;
}

/* ── Keyword / tag ── */
.keyword {
    display: inline-block;
    background: #f0f4ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    margin: 2px;
}

/* ── Section wrapper ── */
.section {
    margin-bottom: 24px;
}

/* ── Channel / text-channel (Discord pages) ── */
.channel,
.text-channel {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background: #f8f9ff;
    margin-bottom: 6px;
}

/* ── Idea list ── */
.idea-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.idea-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}
.idea-list li:last-child { border-bottom: none; }

/* ── Number display ── */
.number {
    font-size: 28px;
    font-weight: 800;
    color: #667eea;
    line-height: 1;
}

/* ── Textarea container ── */
.textarea-container {
    position: relative;
    margin-bottom: 14px;
}
.textarea-container textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
    color: #1a202c;
    background: #fafafa;
    resize: vertical;
    min-height: 120px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.textarea-container textarea:focus {
    outline: 2px solid #4a90e2;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
    background: white;
}


/* ══════════════════════════════════════════════════════════
   EXTENDED TOOL PATTERNS — from CSS audit of all pages
   ══════════════════════════════════════════════════════════ */

/* ── Textarea container ── */
.textarea-container { position: relative; margin-bottom: 14px; }
.textarea-container textarea {
    width: 100%; padding: 13px 16px; border: 2px solid #e2e8f0; border-radius: 8px;
    font-size: 14px; font-family: 'Fira Code','Cascadia Code','Courier New',monospace;
    color: #1a202c; background: #fafafa; resize: vertical; min-height: 120px;
    box-sizing: border-box; transition: border-color 0.2s;
}
.textarea-container textarea:focus {
    outline: 2px solid #4a90e2; border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15); background: white;
}

/* ── Upload area ── */
.upload-area {
    border: 2px dashed #c7d2fe; border-radius: 10px; padding: 32px 20px;
    text-align: center; cursor: pointer; background: #f8f9ff;
    transition: border-color 0.2s, background 0.2s; margin-bottom: 14px;
}
.upload-area:hover { border-color: #667eea; background: #f0f4ff; }
.upload-icon { font-size: 32px; margin-bottom: 8px; }
.upload-area p { font-size: 14px; color: #64748b; margin: 0; }

/* ── Format / Minify buttons (formatter pages) ── */
.format-btn, .minify-btn {
    display: inline-block; padding: 10px 20px;
    border: 2px solid #667eea; border-radius: 8px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background 0.2s, color 0.2s; margin: 4px 4px 4px 0;
    font-family: inherit;
}
.format-btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-color: transparent; }
.format-btn:hover { opacity: 0.88; }
.minify-btn { background: white; color: #667eea; }
.minify-btn:hover { background: #667eea; color: white; }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 2px solid #e2e8f0; }
.tab {
    padding: 8px 18px; font-size: 14px; font-weight: 600; color: #64748b;
    background: none; border: none; border-bottom: 2px solid transparent;
    cursor: pointer; margin-bottom: -2px; transition: color 0.2s, border-color 0.2s;
    font-family: inherit;
}
.tab:hover { color: #667eea; }
.tab.active { color: #667eea; border-bottom-color: #667eea; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Editor layout (SQL, GraphQL, TOML formatters) ── */
.editor-container { display: flex; gap: 16px; margin-bottom: 14px; }
.editor-panel, .editor-area, .editor-section {
    flex: 1; display: flex; flex-direction: column; min-width: 0;
}
.panel-header, .editor-panel h3 {
    font-size: 12px; font-weight: 700; color: #888; text-transform: uppercase;
    letter-spacing: 0.5px; margin-bottom: 6px;
}
.code-editor, .code-panel {
    width: 100%; min-height: 200px; padding: 13px 16px;
    border: 2px solid #e2e8f0; border-radius: 8px;
    font-size: 13px; font-family: 'Fira Code','Cascadia Code','Courier New',monospace;
    color: #1a202c; background: #fafafa; resize: vertical;
    box-sizing: border-box; transition: border-color 0.2s;
}
.code-editor:focus, .code-panel:focus {
    outline: 2px solid #4a90e2; border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15); background: white;
}
.converter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .converter-grid { grid-template-columns: 1fr; } .editor-container { flex-direction: column; } }

/* ── Status message ── */
.status-message {
    padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
    margin-top: 10px; display: none;
}
.status-message.show { display: block; }
.status-message.success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.status-message.error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* ── Warning / info boxes ── */
.warning-box {
    background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px;
    padding: 12px 16px; font-size: 13px; color: #92400e; margin-bottom: 14px;
}
.info-box {
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px;
    padding: 12px 16px; font-size: 13px; color: #1e40af; margin-bottom: 14px;
}

/* ── Result / output boxes ── */
.result, .result-box {
    background: #f8f9ff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 16px; margin-top: 14px; font-family: 'Fira Code','Cascadia Code','Courier New',monospace;
    font-size: 13px; color: #1a202c; white-space: pre-wrap; word-break: break-all;
}
.json-display {
    background: #1e1e2e; color: #cdd6f4; border-radius: 8px; padding: 16px;
    font-family: 'Fira Code','Cascadia Code','Courier New',monospace;
    font-size: 13px; line-height: 1.7; overflow-x: auto; white-space: pre;
}
.warning { color: #d97706; font-size: 13px; font-weight: 600; margin-top: 8px; }

/* ── Format selector / swap (unit converters) ── */
.format-selector { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.format-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.swap-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; background: #f0f4ff; border: 1px solid #c7d2fe;
    border-radius: 50%; font-size: 16px; cursor: pointer; transition: background 0.2s;
    flex-shrink: 0; align-self: center;
}
.swap-btn:hover { background: #e0e7ff; }

/* ── Options grid ── */
.options-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px; margin-bottom: 14px;
}
.option-item, .option-card {
    background: #f8f9ff; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 12px; font-size: 13px; color: #374151; cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.option-item:hover, .option-card:hover { border-color: #667eea; background: #f0f4ff; }
.option-item.active, .option-card.active { border-color: #667eea; background: #f0f4ff; }

/* ── Input / output sections ── */
.input-section, .output-section {
    margin-bottom: 16px;
}
.input-section h3, .output-section h3 {
    font-size: 13px; font-weight: 700; color: #555; text-transform: uppercase;
    letter-spacing: 0.5px; margin-bottom: 8px;
}

/* ── Preview elements ── */
.preview-box, .preview-grid {
    border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px;
    background: #fafafa; margin-top: 14px;
}
.preview-image { max-width: 100%; border-radius: 6px; display: block; margin: 0 auto; }
.preview { margin-top: 14px; text-align: center; }
.converter-section { margin-bottom: 20px; }
.code-section { margin-top: 16px; }
.code-output {
    background: #1e1e2e; color: #cdd6f4; border-radius: 8px; padding: 16px;
    font-family: 'Fira Code','Cascadia Code','Courier New',monospace;
    font-size: 13px; line-height: 1.7; overflow-x: auto; white-space: pre;
    margin-top: 12px;
}

/* ── Gradient generator ── */
.gradient-preview {
    width: 100%; height: 120px; border-radius: 10px; margin-bottom: 14px;
    border: 1px solid #e2e8f0;
}
.color-stops { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.preset-card {
    width: 48px; height: 48px; border-radius: 8px; cursor: pointer;
    border: 2px solid transparent; transition: border-color 0.2s; flex-shrink: 0;
}
.preset-card:hover { border-color: #667eea; }
.preset-name { font-size: 11px; color: #888; text-align: center; margin-top: 4px; }

/* ── Password generator ── */
.password-display {
    font-family: 'Fira Code','Cascadia Code','Courier New',monospace;
    font-size: 18px; font-weight: 700; color: #1a202c; word-break: break-all;
    padding: 14px; background: #f8f9ff; border: 1px solid #e2e8f0;
    border-radius: 8px; margin-bottom: 12px; min-height: 52px;
}
.password { font-family: 'Fira Code','Cascadia Code','Courier New',monospace; font-size: 15px; }
.strength-meter { height: 6px; background: #e2e8f0; border-radius: 3px; margin: 8px 0; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 3px; transition: width 0.3s, background 0.3s; }
.strength-bar { display: flex; gap: 4px; margin: 8px 0; }
.strength-label { font-size: 12px; font-weight: 600; color: #64748b; }
.range-value { font-size: 13px; font-weight: 700; color: #667eea; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.checkbox-group label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; cursor: pointer; }

/* ── Random number / word counter ── */
.quick-picks { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.quick-pick-btn {
    background: #f0f4ff; border: 1px solid #c7d2fe; border-radius: 20px;
    padding: 5px 14px; font-size: 12px; color: #4f46e5; cursor: pointer;
    transition: background 0.2s; font-family: inherit;
}
.quick-pick-btn:hover { background: #e0e7ff; }
.results-list { list-style: none; padding: 0; margin: 0; }
.results-list li {
    padding: 8px 12px; border-bottom: 1px solid #f0f0f0;
    font-family: 'Fira Code','Cascadia Code','Courier New',monospace; font-size: 14px;
}
.results-list li:last-child { border-bottom: none; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.form-row .form-group { flex: 1; min-width: 120px; }
.label { font-size: 12px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.value { font-size: 15px; font-weight: 600; color: #1a202c; }

/* ── Stats grid (word counter) ── */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px; margin-bottom: 16px;
}
.stat-card {
    background: #f8f9ff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 14px; text-align: center;
}
.stat-card .stat-value { font-size: 22px; font-weight: 800; color: #667eea; display: block; }
.stat-card .stat-label { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; display: block; }

/* ── Steps / features sections ── */
.steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.features-section { margin-bottom: 20px; }
.features-section h3 { font-size: 15px; font-weight: 700; color: #1a202c; margin-bottom: 10px; }

/* ── Results grid ── */
.results-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px; margin-top: 14px;
}

/* ── MongoDB / form builder ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.builder-section { margin-bottom: 20px; }
.builder-section h3 { font-size: 14px; font-weight: 700; color: #667eea; margin-bottom: 10px; }

/* ── Font select (ASCII banner) ── */
.font-select, .text-input {
    width: 100%; padding: 10px 14px; border: 2px solid #e2e8f0; border-radius: 8px;
    font-size: 14px; color: #1a202c; background: white; box-sizing: border-box;
    transition: border-color 0.2s; margin-bottom: 12px; font-family: inherit;
}
.font-select:focus, .text-input:focus {
    outline: 2px solid #4a90e2; border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

/* ── Sitemap output ── */
.output {
    background: #1e1e2e; color: #cdd6f4; border-radius: 8px; padding: 16px;
    font-family: 'Fira Code','Cascadia Code','Courier New',monospace;
    font-size: 13px; line-height: 1.7; overflow-x: auto; white-space: pre;
    margin-top: 12px;
}
.output.show { display: block; }

/* ── Examples section ── */
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }


/* ── Examples section (before FAQ) ── */
.examples-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 32px;
}
.examples-section > h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.example-block {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}
.example-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.example-block h3 {
    font-size: 15px;
    font-weight: 700;
    color: #667eea;
    margin: 0 0 10px;
}
.example-block p {
    font-size: 14px;
    color: #444;
    line-height: 1.7;
    margin-bottom: 10px;
}
.example-block pre {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 8px;
    padding: 16px 18px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.65;
    margin: 10px 0;
}
.example-block code {
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
    font-size: 13px;
    background: transparent;
    color: inherit;
    padding: 0;
}
@media (max-width: 600px) {
    .examples-section { padding: 20px 16px; }
}
