/* ---------- Layout helpers ---------- */
.ar-wrap { --ar-primary: var(--bs-primary, #f59e0b); }

.ar-breadcrumb { font-size: 14px; }
.ar-breadcrumb a { color: #6c757d; text-decoration: none; }
.ar-breadcrumb a:hover { color: #495057; text-decoration: underline; }
.ar-breadcrumb .sep { color: #adb5bd; margin: 0 6px; }

.ar-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ar-primary);
    margin-bottom: .75rem;
}

/* ---------- Article header ---------- */
.ar-header { max-width: 860px; }
.ar-title {
    font-size: clamp(1.9rem, 4.2vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.01em;
    margin-bottom: 1rem;
}
.ar-lead { font-size: 1.2rem; line-height: 1.6; color: #5c6370; margin-bottom: 1.5rem; }

.ar-byline { display: flex; align-items: center; gap: 14px; }
.ar-byline-name { font-weight: 600; }
.ar-byline-name a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.ar-byline-meta { font-size: 14px; color: #6c757d; }

.ar-avatar {
    width: 48px; height: 48px; flex-shrink: 0;
    border-radius: 50%;
    background: var(--ar-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem;
}
.ar-avatar-lg { width: 64px; height: 64px; font-size: 1.5rem; margin-bottom: 1rem; }

.ar-verified {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 600;
    color: #198754; background: #d1f5e0;
    padding: 2px 8px; border-radius: 999px;
    vertical-align: middle;
}

.ar-hero {
    border-radius: 1.25rem;
    overflow: hidden;
    background: #f1f1f1;
    aspect-ratio: 16 / 9;
    max-height: 540px;
    margin: 2rem 0;
}
.ar-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Table of contents ---------- */
.ar-toc {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.ar-toc-title { font-weight: 700; margin-bottom: .5rem; color: #1d4ed8; }
.ar-toc ul { list-style: none; margin: 0; padding: 0; }
.ar-toc li { padding: .25rem 0; }
.ar-toc li.l3 { padding-left: 1.25rem; font-size: .95rem; }
.ar-toc a { color: #495057; text-decoration: none; }
.ar-toc a:hover { color: var(--ar-primary); }

/* ---------- Article body typography ---------- */
.ar-content { font-size: 1.125rem; line-height: 1.85; color: #2b2f36; }
.ar-content > *:first-child { margin-top: 0; }
.ar-content p { margin-bottom: 1.25rem; }
.ar-content h2, .ar-section h2 { font-size: 1.75rem; font-weight: 700; line-height: 1.25; margin: 2.5rem 0 1rem; scroll-margin-top: 110px; }
.ar-content h3 { font-size: 1.35rem; font-weight: 700; margin: 2rem 0 .75rem; scroll-margin-top: 110px; }
.ar-content h4 { font-size: 1.15rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.ar-content ul, .ar-content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.ar-content li { margin-bottom: .4rem; }
.ar-content a { color: var(--ar-primary); text-decoration: underline; text-underline-offset: 3px; }
.ar-content img { max-width: 100%; height: auto; border-radius: .75rem; margin: 1rem 0; }
.ar-content figure { margin: 1.75rem 0; }
.ar-content figcaption { text-align: center; font-size: .9rem; color: #6c757d; margin-top: .5rem; }
.ar-content blockquote {
    border-left: 4px solid var(--ar-primary);
    background: #faf7f2;
    padding: .75rem 1.25rem;
    margin: 1.75rem 0;
    border-radius: 0 .75rem .75rem 0;
    font-style: italic;
}
.ar-content table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 1rem; }
.ar-content th, .ar-content td { border: 1px solid #e0e0e0; padding: .6rem .85rem; text-align: left; }
.ar-content th { background: #f6f6f6; }
.ar-content hr { margin: 2.5rem 0; opacity: .15; }
.ar-content pre, .ar-content code { background: #f3f3f3; border-radius: .4rem; }
.ar-content code { padding: .1rem .35rem; font-size: .95em; }
.ar-content pre { padding: 1rem; overflow-x: auto; }

/* ---------- How-to steps ---------- */
.ar-section { margin-top: 3rem; }
.ar-steps { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.ar-step {
    display: flex; gap: 1rem;
    background: #fff; border: 1px solid #e5e5e5; border-radius: 1rem;
    padding: 1.1rem 1.25rem; margin-bottom: .9rem;
}
.ar-step-num {
    width: 36px; height: 36px; flex-shrink: 0;
    border-radius: 50%; background: var(--ar-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.ar-step-title { font-weight: 700; margin-bottom: .25rem; }
.ar-step p { margin: 0; color: #4a505a; line-height: 1.7; }

/* ---------- FAQ ---------- */
.ar-faq { background: #fff; border: 1px solid #e5e5e5; border-radius: 1rem; padding: 0 1.25rem; margin-bottom: .75rem; }
.ar-faq summary { cursor: pointer; font-weight: 600; padding: 1rem 0; list-style: none; position: relative; padding-right: 1.5rem; }
.ar-faq summary::-webkit-details-marker { display: none; }
.ar-faq summary::after { content: '+'; position: absolute; right: 0; top: .85rem; font-size: 1.4rem; line-height: 1; color: var(--ar-primary); }
.ar-faq[open] summary::after { content: '\2212'; }
.ar-faq p { padding-bottom: 1rem; margin: 0; color: #4a505a; line-height: 1.7; }

/* ---------- Sidebar ---------- */
.ar-side-sticky { position: sticky; top: 110px; }
.ar-side-card {
    background: #fff; border: 1px solid #e5e5e5; border-radius: 1rem;
    padding: 1.5rem; box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.ar-side-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6c757d; margin-bottom: 1rem; }

/* ---------- Cards (index + related) ---------- */
.ar-card {
    background: #fff; border: 1px solid #e5e5e5; border-radius: 1rem;
    overflow: hidden; height: 100%;
    display: flex; flex-direction: column;
      transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease, border-color .3s ease;
}
.ar-card:hover,
.ar-card:focus-within {
    transform: translateY(-6px);
    border-color: #bfdbfe;
    box-shadow: 0 16px 36px rgba(37, 99, 235, .14), 0 4px 12px rgba(0, 0, 0, .06);
}
.ar-card-img { display: block; aspect-ratio: 16 / 10; background: #f1f1f1; overflow: hidden; }
.ar-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ar-card:hover .ar-card-img img { transform: scale(1.04); }
.ar-card-body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.ar-card-meta { font-size: 13px; color: #6c757d; margin-bottom: .5rem; }
.ar-card-title { font-size: 1.2rem; font-weight: 700; line-height: 1.3; margin-bottom: .6rem; }
.ar-card-title a { color: #1d4ed8; text-decoration: none; transition: color .2s ease; }
.ar-card:hover .ar-card-title a,
.ar-card-title a:hover { color: #1e40af; }
.ar-card-text {
    color: #5c6370; line-height: 1.6; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

@media (min-width: 992px) {
    .ar-card-big { display: grid; grid-template-columns: 1.3fr 1fr; }
    .ar-card-big .ar-card-img { aspect-ratio: auto; min-height: 340px; height: 100%; }
    .ar-card-big .ar-card-body { padding: 2rem 2.25rem; justify-content: center; }
    .ar-card-big .ar-card-title { font-size: 1.9rem; }
    .ar-card-big .ar-card-text { -webkit-line-clamp: 4; font-size: 1.05rem; }
}

@media (max-width: 575.98px) {
    .ar-content { font-size: 1.05rem; }
    .ar-hero { border-radius: 1rem; margin: 1.25rem 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ar-card,
    .ar-card-img img { transition: none; }
    .ar-card:hover,
    .ar-card:focus-within { transform: none; }
    .ar-card:hover .ar-card-img img { transform: none; }
}

/* ===== Logo blue + card hover + table header ===== */
.ar-wrap {
    --ar-blue: #1f3f94;          /* LOGO BLUE: change only this line to match exactly */
    --ar-blue-dark: #162f73;
    --ar-blue-soft: #b9c8ee;
    --ar-blue-glow: rgba(31, 63, 148, .18);
}

/* Browsers that support color-mix derive every other shade from --ar-blue automatically */
@supports (color: color-mix(in srgb, red, blue)) {
    .ar-wrap {
        --ar-blue-dark: color-mix(in srgb, var(--ar-blue) 78%, black);
        --ar-blue-soft: color-mix(in srgb, var(--ar-blue) 30%, white);
        --ar-blue-glow: color-mix(in srgb, var(--ar-blue) 20%, transparent);
    }
}

/* Card hover: small lift, blue-tinted shadow, pale blue border */
.ar-card {
    transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease, border-color .3s ease;
}
.ar-card:hover,
.ar-card:focus-within {
    transform: translateY(-6px);
    border-color: var(--ar-blue-soft);
    box-shadow: 0 16px 36px var(--ar-blue-glow), 0 4px 12px rgba(0, 0, 0, .06);
}

/* Blue titles */
.ar-card-title a { color: var(--ar-blue); }
.ar-card:hover .ar-card-title a,
.ar-card-title a:hover { color: var(--ar-blue-dark); }
.ar-toc-title { color: var(--ar-blue); }

/* Article tables: blue header row with white text */
.ar-content table th,
.ar-content table thead td {
    background: var(--ar-blue);
    color: #fff;
    border-color: var(--ar-blue-dark);
    font-weight: 700;
}

/* Respect "reduce motion" device settings */
@media (prefers-reduced-motion: reduce) {
    .ar-card,
    .ar-card-img img { transition: none; }
    .ar-card:hover,
    .ar-card:focus-within { transform: none; }
    .ar-card:hover .ar-card-img img { transform: none; }
}