.article-tool { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px; padding: 24px; margin: 24px 0; }
.article-tool h3 { font-size: 1.125rem; font-weight: 700; color: #0f172a; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.article-tool .tool-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.article-tool .tool-inputs label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; display: block; margin-bottom: 4px; }
.article-tool .tool-inputs input, .article-tool .tool-inputs select { width: 100%; border: 1px solid #cbd5e1; background: #ffffff; border-radius: 8px; padding: 8px 10px; font-size: 14px; font-weight: 500; color: #0f172a; transition: all 0.2s; }
.article-tool .tool-inputs input:focus, .article-tool .tool-inputs select:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 4px rgba(59,130,246,0.1); }
.article-tool .tool-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; background: #ffffff; border-radius: 12px; padding: 16px; border: 1px solid #e2e8f0; }
.article-tool .tool-results .result-item { text-align: center; }
.article-tool .tool-results .result-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; margin-bottom: 4px; }
.article-tool .tool-results .result-value { font-size: 1.5rem; font-weight: 700; color: #0f172a; font-family: 'JetBrains Mono', monospace; letter-spacing: -0.03em; }
.article-tool .tool-results .result-unit { font-size: 0.75rem; color: #64748b; font-weight: 400; }
.article-tool .tool-footer { font-size: 12px; color: #94a3b8; margin-top: 12px; }
.article-header-tool { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px 20px; margin-bottom: 24px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.article-header-tool .header-field { display: flex; flex-direction: column; gap: 2px; min-width: 100px; flex: 1; }
.article-header-tool .header-field label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; }
.article-header-tool .header-field input { border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 8px; padding: 7px 10px; font-size: 14px; font-weight: 500; color: #0f172a; transition: all 0.2s; width: 100%; }
.article-header-tool .header-field input:focus { border-color: #3b82f6; background: #ffffff; outline: none; box-shadow: 0 0 0 4px rgba(59,130,246,0.1); }
.article-header-tool .header-result { display: flex; align-items: center; gap: 8px; padding: 6px 14px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; white-space: nowrap; font-size: 13px; font-weight: 600; color: #1e40af; font-family: 'JetBrains Mono', monospace; }
.article-tool .result-compact { display: flex; gap: 20px; flex-wrap: wrap; background: #ffffff; border-radius: 12px; padding: 16px; border: 1px solid #e2e8f0; justify-content: center; }
.article-tool .result-compact .rc-item { text-align: center; min-width: 80px; }
.article-tool .result-compact .rc-value { font-size: 1.5rem; font-weight: 700; color: #0f172a; font-family: 'JetBrains Mono', monospace; letter-spacing: -0.03em; }
.article-tool .result-compact .rc-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; }
.article-tool .result-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 0.85rem; }
.article-tool .result-table th { background: #f1f5f9; text-align: left; padding: 8px 12px; border: 1px solid #e2e8f0; font-weight: 600; color: #0f172a; }
.article-tool .result-table td { padding: 8px 12px; border: 1px solid #e2e8f0; color: #334155; }
.article-tool .verdict { padding: 12px 16px; border-radius: 10px; margin-top: 12px; font-size: 0.9rem; font-weight: 500; }
.article-tool .verdict.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.article-tool .verdict.warning { background: #fefce8; border: 1px solid #fde68a; color: #92400e; }
.article-tool .verdict.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.diag-cta { background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); border-radius: 16px; padding: 24px; text-align: center; }
.diag-cta h4 { color: white; font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.diag-cta p { color: #93c5fd; font-size: 0.85rem; margin-bottom: 16px; }
.diag-cta a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; background: #3b82f6; color: white; border-radius: 12px; font-weight: 700; font-size: 0.95rem; transition: all 0.2s; }
.diag-cta a:hover { background: #2563eb; transform: translateY(-2px); box-shadow: 0 8px 16px -4px rgba(59,130,246,0.3); }

/* Sidebar compact tool */
.side-tool { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px; }
.side-tool h4 { font-size: 0.85rem; font-weight: 700; color: #0f172a; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.side-tool .st-field { margin-bottom: 8px; }
.side-tool .st-field label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; display: block; margin-bottom: 2px; }
.side-tool .st-field input, .side-tool .st-field select { width: 100%; border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 6px; padding: 5px 8px; font-size: 12px; font-weight: 500; color: #0f172a; }
.side-tool .st-field input:focus, .side-tool .st-field select:focus { border-color: #3b82f6; background: #fff; outline: none; }
.side-tool .st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #f8fafc; border-radius: 8px; padding: 8px; margin-top: 8px; }
.side-tool .st-grid .st-item { text-align: center; }
.side-tool .st-grid .st-label { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; }
.side-tool .st-grid .st-value { font-size: 1rem; font-weight: 700; color: #0f172a; font-family: 'JetBrains Mono', monospace; letter-spacing: -0.03em; }
.side-tool .st-grid .st-unit { font-size: 0.6rem; color: #64748b; }
.side-tool .st-link { display: block; text-align: center; font-size: 11px; color: #3b82f6; font-weight: 600; margin-top: 8px; }
.side-tool .st-link:hover { text-decoration: underline; }
.side-tool .st-verdict { font-size: 11px; padding: 6px 10px; border-radius: 6px; margin-top: 8px; }
.side-tool .st-verdict.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.side-tool .st-verdict.warning { background: #fefce8; border: 1px solid #fde68a; color: #92400e; }
.side-tool .st-verdict.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* Tool description in sidebar */
.st-desc { font-size: 11px; color: #64748b; line-height: 1.5; margin-bottom: 8px; padding: 8px 10px; background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0; }
.st-desc strong { color: #0f172a; }
.tool-scroll-link { font-size: 0.85rem; color: #2563eb; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.tool-scroll-link:hover { text-decoration: underline; }

/* Header result badge */
.hdr-result { display: flex; align-items: center; gap: 6px; padding: 2px 10px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; font-size: 11px; font-weight: 600; color: #1e40af; font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
.hdr-result .hdr-divider { color: #93c5fd; font-weight: 300; }

/* Mobile responsive optimizations */
@media (max-width: 1023px) {
    .article-header-tool { flex-direction: column; align-items: stretch; padding: 12px; gap: 8px; }
    .article-header-tool .header-field { min-width: 0; }
    .article-header-tool .header-result { white-space: normal; font-size: 11px; padding: 4px 10px; }
    .article-content { width: 100% !important; max-width: 100% !important; }
    .article-content h1 { font-size: 1.5rem !important; }
    .article-content h2 { font-size: 1.2rem !important; }
    .article-content h3 { font-size: 1.05rem !important; }
    .article-content p, .article-content li { font-size: 0.9rem; }
    .article-content table { font-size: 0.75rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
    .article-content table th, .article-content table td { padding: 6px 8px; }
    .article-content img { max-width: 100%; height: auto; }
    .article-content .formula-box, .article-content .highlight-box { padding: 12px; font-size: 0.85rem; }
    .side-tool { margin-top: 16px; }
    .max-w-3xl { max-width: 100% !important; }
    .px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }
    .py-12 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
    .gap-12 { gap: 1.5rem !important; }
    footer .px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }
    footer .py-8 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
    .text-3xl { font-size: 1.5rem !important; }
    .text-\[11px\] { font-size: 9px !important; }
    .sticky.top-28 { position: static !important; }
}
@media (max-width: 639px) {
    .article-content h1 { font-size: 1.25rem !important; }
    .article-content .text-3xl { font-size: 1.25rem !important; }
    .article-content .text-lg { font-size: 0.9rem !important; }
    .article-content .text-sm { font-size: 0.8rem !important; }
    .category-tag { font-size: 0.6rem !important; padding: 0.15rem 0.5rem !important; }
    header .px-6 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
    header .py-3, header .py-4 { padding-top: 0.4rem !important; padding-bottom: 0.4rem !important; }
    header h1.text-xl, header .text-xl { font-size: 0.9rem; }
    header .gap-2, header .gap-3 { gap: 0.35rem !important; }
    header .bg-slate-50.border { padding: 0.3rem 0.5rem !important; gap: 0.25rem !important; }
    header .bg-slate-50.border input { width: 3.5rem !important; font-size: 12px !important; }
    header .bg-slate-50.border input.w-20 { width: 3rem !important; }
    header .bg-slate-50.border .w-16 { width: 2.5rem !important; }
    header .bg-slate-50.border .w-px { display: none; }
    header .bg-slate-50.border .text-\[10px\] { font-size: 7px !important; }
    header .hdr-result { font-size: 9px; padding: 1px 6px; gap: 3px; }
    header .hdr-result .hdr-divider { margin: 0 1px; }
    header a.text-sm { font-size: 0.7rem !important; }
    .article-header-tool .header-result { font-size: 10px; }
    .article-tool .tool-results { grid-template-columns: 1fr 1fr; padding: 10px; }
    .article-tool .tool-results .result-value { font-size: 1.1rem; }
    .article-tool .result-compact .rc-value { font-size: 1.1rem; }
    .side-tool { padding: 12px; }
    .side-tool .st-grid .st-value { font-size: 0.85rem; }
    .side-tool .st-link { font-size: 10px; }
    .diag-cta { padding: 16px; }
    .diag-cta h4 { font-size: 0.95rem; }
    .diag-cta p { font-size: 0.75rem; }
    .diag-cta a { padding: 10px 20px; font-size: 0.85rem; }
    .hdr-result { font-size: 9px; padding: 1px 6px; gap: 3px; }
    .hdr-result .hdr-divider { margin: 0 1px; }
}
@media (max-width: 480px) {
    header .bg-slate-50.border input { width: 2.5rem !important; font-size: 11px !important; }
    header .bg-slate-50.border input.w-20 { width: 2.5rem !important; }
    header .bg-slate-50.border .w-16 { width: 2rem !important; }
    header .bg-slate-50.border span:not([class]) { display: none; }
    header .hdr-result { font-size: 8px; padding: 1px 4px; }
    header a.text-sm { display: none; }
    header .gap-2 { gap: 0.2rem !important; }
}
@media (max-width: 480px) {
    .article-tool .tool-results { grid-template-columns: 1fr; }
    .article-tool .tool-results .result-item { text-align: left; display: flex; justify-content: space-between; align-items: center; }
    .article-tool .tool-results .result-label { margin-bottom: 0; }
    .article-tool h3 { font-size: 0.95rem; }
    .side-tool h4 { font-size: 0.8rem; }
    .side-tool .st-field label { font-size: 8px; }
    .side-tool .st-field input { font-size: 11px; }
    .article-content .article-tool .tool-inputs { grid-template-columns: 1fr; }
    footer .flex-col.md\:flex-row { gap: 0.5rem !important; }
    footer .flex.items-center.gap-4 { flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
}
