@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Home brand (see /brand.css) ── */

.tool-title {
    color: #0f172a;
    font-size: 22px;
    font-weight: 700;
    margin: 20px 0 8px;
    letter-spacing: -0.3px;
}

.tool-subtitle {
    color: #64748b;
    font-size: 15px;
    margin: 0 0 25px;
    font-weight: 500;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding-top: 56px;
    color: #334155;
}

.container {
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 40px -4px rgba(15, 23, 42, 0.08);
    text-align: center;
    width: 640px;
    max-width: 90%;
    margin-bottom: 30px;
    border: 1px solid #f1f5f9;
}

h1 {
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 25px;
    font-weight: 500;
}

.converter-form {
    text-align: left;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.form-row { margin-bottom: 16px; }

.form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.form-row input,
.form-row select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-size: 15px;
    font-family: inherit;
    background: white;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.unit-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: end;
}

.swap-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: white;
    cursor: pointer;
    font-size: 18px;
    color: #6366f1;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.swap-btn:hover {
    background: #f5f8ff;
    border-color: #6366f1;
    transform: rotate(180deg);
}

.result-box {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border-radius: 16px;
    padding: 20px 24px;
    color: white;
    margin-bottom: 24px;
}

.result-box .result-label {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
    margin-bottom: 8px;
}

.result-box .result-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    word-break: break-all;
}

.result-box .result-value.invalid { color: #fca5a5; }

.recent-section {
    text-align: left;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
}

.recent-section h2 {
    font-size: 16px;
    color: #1e293b;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 13px;
}

.recent-label { color: #475569; font-weight: 500; }
.recent-result { color: #0f172a; font-weight: 700; white-space: nowrap; }
.recent-empty { color: #94a3b8; font-size: 13px; font-style: italic; }

.hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 10px;
}

@media (max-width: 520px) {
    .hub-grid { grid-template-columns: 1fr; }
    .unit-row { grid-template-columns: 1fr; }
    .swap-btn { width: 100%; margin: 0; }
}

.hub-card {
    display: block;
    padding: 24px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    text-decoration: none;
    color: #0f172a;
    transition: all 0.2s ease;
    text-align: left;
}

.hub-card:hover {
    transform: translateY(-2px);
    border-color: #6366f1;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.15);
}

.hub-card .hub-emoji { font-size: 28px; margin-bottom: 10px; display: block; }
.hub-card .hub-title { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.hub-card .hub-desc { font-size: 13px; color: #64748b; line-height: 1.5; }

.seo-blurb {
    text-align: left;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

.seo-blurb h2 { font-size: 16px; color: #1e293b; margin: 0 0 10px 0; }

/* ── Converter hub SEO guide (/converter/) ── */
.converter-seo-guide {
    width: 720px;
    max-width: 92%;
    margin: 0 auto 28px;
    padding: 36px 40px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.08);
    text-align: left;
    color: #334155;
    line-height: 1.72;
    font-size: 15px;
}

.converter-seo-guide__header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.converter-seo-guide h2 {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: #0f172a;
    line-height: 1.25;
}

.converter-seo-guide__lede {
    margin: 0;
    font-size: 16px;
    color: #475569;
}

.converter-seo-guide__section {
    margin-bottom: 28px;
}

.converter-seo-guide__section h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.converter-seo-guide__section p {
    margin: 0 0 14px;
}

.converter-formula-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.converter-formula-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 16px;
}

.converter-formula-card h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6366f1;
}

.converter-formula-card p {
    margin: 0 0 10px;
    font-size: 14px;
}

.converter-formula {
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 8px 10px;
    margin: 6px 0 10px;
}

.converter-formula-note {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.converter-seo-guide__footer {
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    color: #64748b;
}

.converter-seo-guide__footer p {
    margin: 0;
}

@media (max-width: 768px) {
    .converter-seo-guide {
        padding: 28px 22px;
    }

    .converter-seo-guide h2 {
        font-size: 22px;
    }

    .converter-formula-grid {
        grid-template-columns: 1fr;
    }
}
