:root {
    color-scheme: dark;
    --bg: #0b0b12;
    --surface: #151521;
    --card: #1b1b2a;
    --accent: #e50914;
    --text: #f5f5f5;
    --muted: #9da5b4;
}
* { box-sizing: border-box; }
body.dark {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
}
.container { max-width: 1100px; margin: 0 auto; padding: 2rem; }
.site-header {
    position: sticky;
    top: 0;
    background: rgba(11,11,18,0.9);
    backdrop-filter: blur(10px);
    z-index: 10;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.logo { color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.4rem; }
nav a { color: var(--muted); text-decoration: none; margin-left: 1rem; }
nav a:hover { color: var(--text); }
.hero { padding: 4rem 0; background: radial-gradient(circle at top, rgba(229,9,20,0.2), transparent 60%); }
.hero.compact { padding: 2rem 0; }
.hero-content { max-width: 500px; }
.btn { display: inline-block; background: var(--accent); color: white; padding: 0.8rem 1.5rem; border-radius: 999px; border: none; text-decoration: none; cursor: pointer; }
.btn.primary { font-weight: 600; }
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--card); padding: 1.5rem; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.3); transition: transform 0.2s ease; color: var(--text); text-decoration: none; }
.card:hover { transform: translateY(-4px); }
.hero-cards { display: grid; gap: 1rem; margin-top: 2rem; }
.hero-cards .card { background: linear-gradient(135deg, rgba(229,9,20,0.3), rgba(27,27,42,1)); }
.section-title { display: grid; gap: 0.4rem; margin-bottom: 1.5rem; }
.section-title h2 { margin: 0; }
.section-title p { margin: 0; color: var(--muted); max-width: 560px; }
.search { position: relative; }
.search input { padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--card); background: var(--surface); color: var(--text); }
.search-results { position: absolute; top: 110%; left: 0; right: 0; background: var(--surface); border-radius: 12px; display: none; padding: 0.5rem; }
.search-results.active { display: block; }
.search-results a { display: block; padding: 0.5rem; color: var(--text); text-decoration: none; }
.site-footer { background: var(--surface); text-align: center; padding: 2rem 0; }
.footer-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    text-align: left;
    margin-bottom: 2rem;
}
.footer-grid a { display: block; color: var(--muted); text-decoration: none; margin-top: 0.5rem; }
.footer-grid a:hover { color: var(--text); }
.footer-form { display: grid; gap: 0.75rem; }
.footer-form input { padding: 0.6rem; border-radius: 10px; border: 1px solid var(--card); background: #0f0f18; color: var(--text); }
.tool-form { display: grid; gap: 1.2rem; max-width: 680px; background: var(--card); padding: 0; border-radius: 22px; box-shadow: 0 18px 42px rgba(0,0,0,0.35); overflow: hidden; }
.tool-form label { display: grid; gap: 0.5rem; font-weight: 600; }
.tool-form select,
.tool-form input {
    padding: 0.85rem;
    border-radius: 14px;
    border: 1px solid #2a2a3d;
    background: #0f0f18;
    color: var(--text);
    font-size: 1rem;
}
.tool-form .field-help { padding-left: 0.25rem; }
.tool-form input:focus,
.tool-form select:focus { outline: 2px solid rgba(229,9,20,0.45); border-color: rgba(229,9,20,0.6); }
.field-help { color: var(--muted); font-size: 0.85rem; }
.tool-result { margin-top: 1.5rem; font-size: 1.2rem; text-align: center; }
.disclaimer { color: var(--muted); font-size: 0.9rem; }
.article-content { line-height: 1.8; font-size: 1.05rem; }
.comments { padding: 2rem 0; background: var(--surface); }
.comment-form { display: grid; gap: 1rem; max-width: 520px; }
.comment-form label { display: grid; gap: 0.5rem; font-weight: 600; }
.comment-form input,
.comment-form textarea {
    padding: 0.7rem;
    border-radius: 12px;
    border: 1px solid var(--card);
    background: #0f0f18;
    color: var(--text);
}
.comment-list { margin-top: 2rem; display: grid; gap: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.chip { padding: 0.4rem 0.9rem; border-radius: 999px; background: var(--surface); color: var(--muted); text-decoration: none; }
.chip.active { background: var(--accent); color: white; }
.pagination { display: flex; justify-content: space-between; margin-top: 2rem; }
.newsletter form { display: flex; gap: 1rem; flex-wrap: wrap; }
.newsletter input { padding: 0.7rem; border-radius: 8px; border: 1px solid var(--card); background: var(--surface); color: var(--text); }
.tool-steps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 1.5rem; }
.tool-step { display: none; }
.tool-step.active { display: grid; gap: 1rem; }
.tool-step.slide-next { animation: slideNext 0.5s ease; }
.tool-step.slide-prev { animation: slidePrev 0.5s ease; }
.step-page { padding: 2rem 2.5rem; min-height: 320px; }
.tool-stepper { display: grid; justify-items: center; }
.tool-stepper .tool-form { width: 100%; }
.tool-stepper .tool-step:not(.active) { display: none; }
.step-actions { display: flex; gap: 1rem; justify-content: space-between; align-items: center; }
.step-actions .btn { min-width: 140px; justify-content: center; }
.step-actions .btn[data-show-result] { width: 100%; }
.formula-card { display: grid; gap: 0.75rem; padding: 1.4rem; border-radius: 16px; background: var(--card); border: 1px solid rgba(255,255,255,0.08); }
.formula-card strong { font-size: 1.1rem; letter-spacing: 0.04em; }
.formula-grid { display: grid; gap: 0.4rem; font-size: 0.9rem; color: var(--muted); }
.formula-grid span { font-size: 1.2rem; color: var(--text); font-weight: 700; margin-right: 0.35rem; }
.bootstrap-card { background: linear-gradient(135deg, rgba(229,9,20,0.15), rgba(27,27,42,1)); box-shadow: 0 14px 32px rgba(0,0,0,0.25); }
.formula-card div { word-break: break-word; }
.formula-card .formula-grid div { display: flex; gap: 0.35rem; align-items: baseline; }
.card-media { width: 100%; height: 180px; border-radius: 12px; background-size: cover; background-position: center; margin-bottom: 1rem; }
.card-body small { display: block; color: var(--muted); margin: 0.5rem 0; }
.meta-link { color: var(--accent); text-decoration: none; }
.meta-link:hover { text-decoration: underline; }
.article-meta { display: flex; gap: 1rem; color: var(--muted); margin-top: 0.5rem; flex-wrap: wrap; }
.article-meta .meta-link { color: var(--accent); }
.share-pill { background: var(--card); padding: 0.4rem 0.9rem; border-radius: 999px; text-decoration: none; color: var(--text); border: none; cursor: pointer; }
.share-pill:hover { background: var(--accent); }
.share-buttons { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.like-count { color: var(--muted); font-size: 0.9rem; }
.like-form { margin: 0; }
.share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    background: #2a2a3d;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.share-btn svg { width: 18px; height: 18px; fill: currentColor; }
.share-btn:hover { transform: translateY(-3px); box-shadow: 0 16px 26px rgba(0,0,0,0.4); }
.share-btn.twitter { background: #1d9bf0; }
.share-btn.facebook { background: #1877f2; }
.share-btn.mail { background: #6b7280; }
.share-btn.like { background: #e11d48; }
.share-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.amp-link { color: var(--muted); text-decoration: none; }
.amp-link:hover { color: var(--text); }
.article-image { width: 100%; max-height: 380px; object-fit: cover; border-radius: 16px; margin-bottom: 1.5rem; }
.article-actions { display: flex; justify-content: space-between; margin-top: 2rem; }
.article-share { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
@media (max-width: 600px) {
    .step-page { padding: 1.5rem; }
    .share-btn { width: 38px; height: 38px; }
}
@media (max-width: 768px) {
    .site-header .container { flex-direction: column; align-items: flex-start; }
    nav a { margin-left: 0; margin-right: 1rem; }
    .grid-2 { grid-template-columns: 1fr; }
}
@keyframes slideNext {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slidePrev {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
