/* ==========================================================================
   Article content — Persian blog reading scale
   Body ~16px, line-height ~2, modest heading steps (not oversized).
   ========================================================================== */

.html-blogpost-page .ab-article .ab-content,
.ab-article.ab-article--enhanced .ab-content.ab-content--card,
.ab-article .ab-content,
.blogDetail__body {
    --ab-body-size: 1rem;
    --ab-body-line: 1.95;
    --ab-body-color: #3f4064;
    --ab-h2-size: 1.375rem;
    --ab-h3-size: 1.2rem;
    --ab-h4-size: 1.1rem;
    --ab-h5-size: 1rem;
    --ab-space-block: 1.5rem;
    --ab-space-heading: 2rem;
}

.html-blogpost-page .ab-article .ab-content,
.ab-article.ab-article--enhanced .ab-content.ab-content--card,
.ab-article .ab-content {
    color: var(--ab-body-color);
    font-size: var(--ab-body-size);
    line-height: var(--ab-body-line);
    font-weight: 400;
    word-wrap: break-word;
    margin-bottom: 0;
}

.html-blogpost-page .ab-article .ab-content > *:first-child,
.ab-article .ab-content > *:first-child {
    margin-top: 0;
}

.html-blogpost-page .ab-article .ab-content > *:last-child,
.ab-article .ab-content > *:last-child {
    margin-bottom: 0;
}

/* Reset theme flattening */
.html-blogpost-page .ab-article .ab-content :is(h1, h2, h3, h4, h5, h6, .ab-heading),
.ab-article.ab-article--enhanced .ab-content.ab-content--card :is(h1, h2, h3, h4, h5, h6, .ab-heading),
.ab-article .ab-content :is(h1, h2, h3, h4, h5, h6, .ab-heading),
.blogDetail__body :is(h1, h2, h3, h4, h5, h6, .ab-heading),
.details__body .ab-content :is(h1, h2, h3, h4, h5, h6, .ab-heading) {
    background: transparent !important;
    padding: 0 !important;
    text-transform: none;
    font-style: normal;
    scroll-margin-top: 90px;
    font-family: inherit;
    display: block;
    letter-spacing: 0;
}

/* H2 — section */
.html-blogpost-page .ab-article .ab-content :is(h2, .ab-heading--h2, h1:not(.ab-article__title)),
.ab-article.ab-article--enhanced .ab-content.ab-content--card :is(h2, .ab-heading--h2),
.ab-article .ab-content :is(h2, .ab-heading--h2, h1:not(.ab-article__title)),
.blogDetail__body :is(h2, .ab-heading--h2) {
    margin: var(--ab-space-heading) 0 .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #e8ecf1;
    font-size: var(--ab-h2-size);
    font-weight: 700;
    line-height: 1.55;
    color: #23254e;
}

/* H3 — subsection */
.html-blogpost-page .ab-article .ab-content :is(h3, .ab-heading--h3),
.ab-article.ab-article--enhanced .ab-content.ab-content--card :is(h3, .ab-heading--h3),
.ab-article .ab-content :is(h3, .ab-heading--h3),
.blogDetail__body :is(h3, .ab-heading--h3) {
    margin: 1.65rem 0 .6rem;
    font-size: var(--ab-h3-size);
    font-weight: 700;
    line-height: 1.6;
    color: #2d2f55;
    border-bottom: 0;
    padding-bottom: 0;
}

/* H4 */
.html-blogpost-page .ab-article .ab-content :is(h4, .ab-heading--h4),
.ab-article.ab-article--enhanced .ab-content.ab-content--card :is(h4, .ab-heading--h4),
.ab-article .ab-content :is(h4, .ab-heading--h4),
.blogDetail__body :is(h4, .ab-heading--h4) {
    margin: 1.35rem 0 .5rem;
    font-size: var(--ab-h4-size);
    font-weight: 600;
    line-height: 1.65;
    color: #3f4064;
}

.html-blogpost-page .ab-article .ab-content :is(h5, h6, .ab-heading--h5, .ab-heading--h6),
.ab-article.ab-article--enhanced .ab-content.ab-content--card :is(h5, h6),
.ab-article .ab-content :is(h5, h6),
.blogDetail__body :is(h5, h6) {
    margin: 1.15rem 0 .45rem;
    font-size: var(--ab-h5-size);
    font-weight: 600;
    line-height: 1.7;
    color: #5a5c7a;
}

/* Body */
.html-blogpost-page .ab-article .ab-content :is(.ab-paragraph, p),
.ab-article.ab-article--enhanced .ab-content.ab-content--card :is(.ab-paragraph, p),
.ab-article .ab-content :is(.ab-paragraph, p),
.blogDetail__body :is(.ab-paragraph, p) {
    margin: 0 0 var(--ab-space-block);
    font-size: var(--ab-body-size);
    font-weight: 400;
    line-height: var(--ab-body-line);
    color: var(--ab-body-color);
}

.html-blogpost-page .ab-article .ab-content :is(.ab-paragraph, p):last-child,
.ab-article .ab-content :is(.ab-paragraph, p):last-child {
    margin-bottom: 0;
}

.html-blogpost-page .ab-article .ab-content :is(strong, b),
.ab-article .ab-content :is(strong, b) {
    font-weight: 700;
    color: #23254e;
}

.html-blogpost-page .ab-article .ab-content :is(h2, h3, h4, h5, h6, .ab-heading) :is(strong, b),
.ab-article .ab-content :is(h2, h3, h4, h5, h6, .ab-heading) :is(strong, b) {
    font-weight: inherit;
    color: inherit;
}

.html-blogpost-page .ab-article .ab-content :is(em, i),
.ab-article .ab-content :is(em, i) {
    font-style: italic;
}

/* Inline text formatting (editor + storefront) */
.html-blogpost-page .ab-article .ab-content .ab-fmt-color--red,
.ab-article.ab-article--enhanced .ab-content.ab-content--card .ab-fmt-color--red,
.ab-article .ab-content .ab-fmt-color--red,
.blogDetail__body .ab-fmt-color--red,
.codex-editor .ab-fmt-color--red { color: #dc2626 !important; }
.html-blogpost-page .ab-article .ab-content .ab-fmt-color--blue,
.ab-article.ab-article--enhanced .ab-content.ab-content--card .ab-fmt-color--blue,
.ab-article .ab-content .ab-fmt-color--blue,
.blogDetail__body .ab-fmt-color--blue,
.codex-editor .ab-fmt-color--blue { color: #2563eb !important; }
.html-blogpost-page .ab-article .ab-content .ab-fmt-color--green,
.ab-article.ab-article--enhanced .ab-content.ab-content--card .ab-fmt-color--green,
.ab-article .ab-content .ab-fmt-color--green,
.blogDetail__body .ab-fmt-color--green,
.codex-editor .ab-fmt-color--green { color: #059669 !important; }
.html-blogpost-page .ab-article .ab-content .ab-fmt-color--orange,
.ab-article.ab-article--enhanced .ab-content.ab-content--card .ab-fmt-color--orange,
.ab-article .ab-content .ab-fmt-color--orange,
.blogDetail__body .ab-fmt-color--orange,
.codex-editor .ab-fmt-color--orange { color: #ea580c !important; }
.html-blogpost-page .ab-article .ab-content .ab-fmt-color--purple,
.ab-article.ab-article--enhanced .ab-content.ab-content--card .ab-fmt-color--purple,
.ab-article .ab-content .ab-fmt-color--purple,
.blogDetail__body .ab-fmt-color--purple,
.codex-editor .ab-fmt-color--purple { color: #7c3aed !important; }
.html-blogpost-page .ab-article .ab-content .ab-fmt-color--gray,
.ab-article.ab-article--enhanced .ab-content.ab-content--card .ab-fmt-color--gray,
.ab-article .ab-content .ab-fmt-color--gray,
.blogDetail__body .ab-fmt-color--gray,
.codex-editor .ab-fmt-color--gray { color: #64748b !important; }

.html-blogpost-page .ab-article .ab-content .ab-fmt-size--sm,
.ab-article .ab-content .ab-fmt-size--sm,
.blogDetail__body .ab-fmt-size--sm,
.codex-editor .ab-fmt-size--sm { font-size: 0.875em !important; }
.html-blogpost-page .ab-article .ab-content .ab-fmt-size--lg,
.ab-article .ab-content .ab-fmt-size--lg,
.blogDetail__body .ab-fmt-size--lg,
.codex-editor .ab-fmt-size--lg { font-size: 1.125em !important; }
.html-blogpost-page .ab-article .ab-content .ab-fmt-size--xl,
.ab-article .ab-content .ab-fmt-size--xl,
.blogDetail__body .ab-fmt-size--xl,
.codex-editor .ab-fmt-size--xl { font-size: 1.15em !important; }

.html-blogpost-page .ab-article .ab-content .ab-fmt-align--left,
.ab-article .ab-content .ab-fmt-align--left,
.blogDetail__body .ab-fmt-align--left,
.codex-editor .ab-fmt-align--left {
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: left !important;
    unicode-bidi: plaintext;
}
.html-blogpost-page .ab-article .ab-content .ab-fmt-align--center,
.ab-article .ab-content .ab-fmt-align--center,
.blogDetail__body .ab-fmt-align--center,
.codex-editor .ab-fmt-align--center {
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: center !important;
    unicode-bidi: plaintext;
}
.html-blogpost-page .ab-article .ab-content .ab-fmt-align--right,
.ab-article .ab-content .ab-fmt-align--right,
.blogDetail__body .ab-fmt-align--right,
.codex-editor .ab-fmt-align--right {
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: right !important;
    unicode-bidi: plaintext;
}

.html-blogpost-page .ab-article .ab-content u,
.ab-article .ab-content u { text-decoration: underline; text-underline-offset: 2px; }
.html-blogpost-page .ab-article .ab-content mark,
.ab-article .ab-content mark { background: #fef08a; padding: 0 .15em; border-radius: 2px; }

/* Links — editorial (subtle on storefront) */
.html-blogpost-page .ab-article .ab-content a.ab-editor-link--internal,
.html-blogpost-page .ab-article .ab-content a[data-ab-link-type]:not([data-ab-link-type="url"]),
.ab-article .ab-content a.ab-editor-link--internal,
.ab-article .ab-content a[data-ab-link-type]:not([data-ab-link-type="url"]) {
    color: #047857;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    background: none;
    border-bottom: 0;
    padding: 0;
    border-radius: 0;
}

.html-blogpost-page .ab-article .ab-content a.ab-editor-link--external,
.ab-article .ab-content a.ab-editor-link--external {
    color: #6d28d9;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    background: none;
    border-bottom: 0;
    padding: 0;
    border-radius: 0;
}

.ab-article .ab-content a.ab-editor-link--internal:hover,
.ab-article .ab-content a[data-ab-link-type]:not([data-ab-link-type="url"]):hover {
    color: #065f46;
}

.ab-article .ab-content a.ab-editor-link--external:hover {
    color: #5b21b6;
}

.ab-article .ab-content a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.ab-article .ab-content a:hover {
    color: #1d4ed8;
}

/* — Lists — */
.html-blogpost-page .ab-article .ab-content :is(.ab-list, ul:not([class]), ol:not([class])),
.ab-article .ab-content :is(.ab-list, ul:not([class]), ol:not([class])) {
    margin: 0 0 1.35rem;
    padding-inline-start: 1.65rem;
    font-size: var(--ab-body-size);
    font-weight: 400;
    line-height: var(--ab-body-line);
    color: var(--ab-body-color);
    list-style-position: outside;
}

.html-blogpost-page .ab-article .ab-content :is(.ab-list li, ul:not([class]) li, ol:not([class]) li),
.ab-article .ab-content :is(.ab-list li, ul:not([class]) li, ol:not([class]) li) {
    margin: .5rem 0;
    padding-inline-start: .25rem;
}

.html-blogpost-page .ab-article .ab-content :is(.ab-list li, ul:not([class]) li)::marker,
.ab-article .ab-content :is(.ab-list li, ul:not([class]) li)::marker {
    color: #767790;
    font-weight: 400;
}

.html-blogpost-page .ab-article .ab-content :is(ol.ab-list, ol:not([class])),
.ab-article .ab-content :is(ol.ab-list, ol:not([class])) {
    list-style-type: decimal;
}

.html-blogpost-page .ab-article .ab-content ol.ab-list--marker-paren,
.ab-article .ab-content ol.ab-list--marker-paren {
    list-style: none;
    counter-reset: ab-list;
}

.html-blogpost-page .ab-article .ab-content ol.ab-list--marker-paren > li,
.ab-article .ab-content ol.ab-list--marker-paren > li {
    counter-increment: ab-list;
    position: relative;
}

.html-blogpost-page .ab-article .ab-content ol.ab-list--marker-paren > li::before,
.ab-article .ab-content ol.ab-list--marker-paren > li::before {
    content: counter(ab-list) ") ";
    position: absolute;
    inset-inline-start: -1.65rem;
    color: #767790;
    font-weight: 400;
}

.html-blogpost-page .ab-article .ab-content ol.ab-list--marker-dot,
.ab-article .ab-content ol.ab-list--marker-dot {
    list-style-type: decimal;
}

.html-blogpost-page .ab-article .ab-content :is(ul.ab-list, ul:not([class])),
.ab-article .ab-content :is(ul.ab-list, ul:not([class])) {
    list-style-type: disc;
}

/* Legacy aliases — keep old selectors working */
.ab-content {
    color: #3f4064;
    font-size: 1rem;
    line-height: 1.95;
    word-wrap: break-word;
    margin-bottom: 0;
}

.ab-content > *:first-child { margin-top: 0; }
.ab-content > *:last-child { margin-bottom: 0; }

/* — Blockquote (editor quote block) — */
.ab-content .ab-quote {
    margin: 1.35rem 0;
    padding: 1rem 1.15rem;
    border-inline-start: 3px solid #d0d5dd;
    background: #f9fafb;
    border-radius: 0 8px 8px 0;
    color: #5a5c7a;
    font-style: normal;
}

.ab-content .ab-quote p {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.85;
}

.ab-content .ab-quote cite {
    display: block;
    margin-top: .75rem;
    font-size: .9rem;
    font-style: normal;
    font-weight: 600;
    color: #64748b;
}

/* — Code — */
.ab-content .ab-code {
    margin: 1.5rem 0;
    padding: 1.15rem 1.25rem;
    overflow-x: auto;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .9rem;
    line-height: 1.6;
    border: 1px solid #1e293b;
}

.ab-content .ab-code code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* — Tables — */
.ab-content .ab-table-wrap {
    margin: 1.75rem 0;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.ab-content .ab-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}

.ab-content .ab-table th,
.ab-content .ab-table td {
    padding: .75rem 1rem;
    text-align: start;
    border-bottom: 1px solid #eef2f7;
    vertical-align: top;
}

.ab-content .ab-table thead th {
    background: #f8fafc;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 2px solid #e2e8f0;
}

.ab-content .ab-table tbody tr:last-child td {
    border-bottom: 0;
}

.ab-content .ab-table tbody tr:nth-child(even) td {
    background: #fafbfc;
}

/* — Images — */
.ab-content .ab-image {
    margin: 1.35rem 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.ab-content .ab-image img {
    display: block;
    width: 100%;
    height: auto;
}

.ab-content .ab-image figcaption {
    padding: .65rem 1rem;
    font-size: .875rem;
    color: #64748b;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #eef2f7;
}

.ab-content .ab-image--border img {
    border: 1px solid #dee2e6;
}

.ab-content .ab-image--stretched img {
    width: 100%;
}

.ab-content .ab-image--background {
    padding: 12px;
    background: #f8fafc;
}

.ab-content .ab-image--shadow img {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.ab-content .ab-image--stretched.ab-image--background img {
    width: calc(100% - 24px);
}

/* — Delimiter — */
.ab-content .ab-delimiter {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2.5rem 0;
    height: 1px;
    background: transparent;
}

.ab-content .ab-delimiter::before {
    content: "•••";
    letter-spacing: .35em;
    color: #94a3b8;
    font-size: .85rem;
    background: #fff;
    padding: 0 1rem;
}

/* — Alerts — */
.ab-content .ab-alert {
    padding: 1rem 1.25rem 1rem 1.35rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    border-inline-start: 4px solid transparent;
    line-height: 1.65;
}

.ab-content .ab-alert--info {
    background: #eff6ff;
    border-inline-start-color: #2563eb;
    color: #1e40af;
}

.ab-content .ab-alert--warning {
    background: #fffbeb;
    border-inline-start-color: #d97706;
    color: #92400e;
}

.ab-content .ab-alert--success {
    background: #ecfdf5;
    border-inline-start-color: #059669;
    color: #065f46;
}

.ab-content .ab-alert--danger {
    background: #fef2f2;
    border-inline-start-color: #dc2626;
    color: #991b1b;
}

/* — CTA — */
.ab-content .ab-cta {
    margin: 2rem 0;
    text-align: center;
}

.ab-content .ab-cta__btn {
    display: inline-block;
    padding: .85rem 1.75rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: transform .15s ease, box-shadow .15s ease;
}

.ab-content .ab-cta__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, .12);
    text-decoration: none;
}

.ab-content .ab-cta__btn--primary {
    background: #111827;
    color: #fff;
}

.ab-content .ab-cta__btn--secondary {
    background: #fff;
    color: #111827;
    border: 2px solid #111827;
}

/* — FAQ block — */
.ab-content .ab-faq {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.ab-content .ab-faq__item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0;
    margin: 0;
    background: #fff;
    overflow: hidden;
}

.ab-content .ab-faq__item summary {
    padding: .9rem 1.15rem;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    list-style: none;
}

.ab-content .ab-faq__item summary::-webkit-details-marker {
    display: none;
}

.ab-content .ab-faq__item[open] summary {
    border-bottom: 1px solid #eef2f7;
    background: #f8fafc;
}

.ab-content .ab-faq__answer {
    padding: .9rem 1.15rem 1.1rem;
    color: #475569;
    line-height: 1.75;
    font-size: .98rem;
}

/* — Product / category blocks — */
.ab-content .ab-product-block,
.ab-content .ab-category-block {
    margin: 2.5rem 0;
    padding: 1.35rem;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px solid #e2e8f0;
}

.ab-content .ab-product-card__name,
.ab-content .ab-product-card__title,
.ab-content .ab-category-card__title {
    font-size: .95rem;
    font-weight: 700;
    margin: .65rem 0 .25rem;
    line-height: 1.4;
}

.ab-content .ab-product-card__name a,
.ab-content .ab-product-card__title a,
.ab-content .ab-category-card__title a {
    color: #0f172a;
    text-decoration: none;
}

.ab-content .ab-product-card__name a:hover,
.ab-content .ab-product-card__title a:hover,
.ab-content .ab-category-card__title a:hover {
    color: #2563eb;
}

.ab-content .ab-product-card__price {
    font-weight: 700;
    color: #059669;
    font-size: .95rem;
}

/* Product card headings — smaller than article h4 */
.ab-content .ab-product-card .ab-product-card__name,
.ab-content .ab-product-card h4.ab-product-card__name {
    margin: .65rem 0 .25rem;
    padding: 0;
    border: 0;
    font-size: .95rem;
    font-weight: 700;
    color: #0f172a;
    text-transform: none;
    letter-spacing: normal;
}

/* — Pullquote (distinct from ab-quote) — */
.ab-content .ab-pullquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-inline-start: 3px solid #3b82f6;
    font-size: 1.05rem;
    line-height: 1.75;
    color: #2d2f55;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
}

.ab-content .ab-pullquote p {
    margin: 0;
    font-weight: 500;
}

/* — Media blocks spacing — */
.ab-content .ab-video,
.ab-content .ab-gallery,
.ab-content .ab-audio,
.ab-content .ab-file,
.ab-content .ab-embed {
    margin: 2rem 0;
}

.ab-product-block__items,
.ab-category-block__items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.ab-product-block--slider .ab-product-block__items,
.ab-category-block--slider .ab-category-block__items {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
}

.ab-product-card,
.ab-category-card {
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 1rem;
    background: #fff;
}

.ab-product-card__image img,
.ab-category-card__image img {
    width: 100%;
    border-radius: 8px;
}

.ab-faq__item {
    border: 1px solid #ececec;
    border-radius: 8px;
    padding: .75rem 1rem;
    margin-bottom: .75rem;
}

.ab-alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin: 1rem 0;
}

.ab-video {
    margin: 1.5rem 0;
}

.ab-video__responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.ab-video__iframe,
.ab-video__player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ab-video__player {
    object-fit: contain;
    background: #000;
}

.ab-video figcaption {
    margin-top: .5rem;
    font-size: .9rem;
    color: #666;
    text-align: center;
}

.ab-alert--info { background: #eef6ff; }
.ab-alert--warning { background: #fff7e6; }
.ab-alert--success { background: #edfbf3; }
.ab-alert--danger { background: #fff0f0; }

/* Legacy alert rules — detailed styles live under .ab-content above */

.ab-cta {
    margin: 1.5rem 0;
}

.ab-cta__btn {
    display: inline-block;
    padding: .75rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
}

.ab-cta__btn--primary {
    background: #111;
    color: #fff;
}

.ab-toc {
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 1rem;
    background: #fafafa;
}

.ab-toc--sidebar {
    align-self: stretch;
}

.ab-toc--inline {
    display: none;
}

.ab-toc__title {
    display: block;
    margin-bottom: .6rem;
    font-size: .875rem;
    font-weight: 600;
    color: #23254e;
}

.ab-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ab-toc__item {
    margin: .35rem 0;
}

.ab-toc__item--level-2 {
    margin-top: .5rem;
}

.ab-toc__item--level-2:first-child {
    margin-top: 0;
}

.ab-toc__item--level-3 {
    padding-inline-start: .85rem;
}

.ab-toc__item--level-4 {
    padding-inline-start: 1.55rem;
}

.ab-toc__link {
    display: block;
    color: #5a5c7a;
    text-decoration: none;
    font-size: .8125rem;
    font-weight: 400;
    line-height: 1.6;
}

.ab-toc__item--level-2 > .ab-toc__link {
    font-size: .875rem;
    font-weight: 700;
    color: #23254e;
}

.ab-toc__item--level-3 > .ab-toc__link {
    font-size: .8125rem;
    font-weight: 400;
    color: #5a5c7a;
}

.ab-toc__item--level-4 > .ab-toc__link {
    font-size: .78rem;
    font-weight: 400;
    color: #6b7280;
}

.ab-toc__item--level-3 > .ab-toc__link::before,
.ab-toc__item--level-4 > .ab-toc__link::before {
    content: "– ";
    color: #cbd5e1;
    font-weight: 400;
}

.ab-toc__link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.ab-toc__item--level-2 > .ab-toc__link:hover {
    color: #1d4ed8;
}

/* Hierarchy overrides (theme link weights) */
.ab-blog-post .ab-toc.ab-toc--hierarchical .ab-toc__item--level-2 > .ab-toc__link {
    font-size: .9rem;
    font-weight: 700;
    color: #1e293b;
}

.ab-blog-post .ab-toc.ab-toc--hierarchical .ab-toc__item--level-3 > .ab-toc__link {
    font-size: .8125rem;
    font-weight: 400;
    color: #64748b;
}

.ab-blog-post .ab-toc.ab-toc--hierarchical .ab-toc__item--level-4 > .ab-toc__link {
    font-size: .78rem;
    font-weight: 400;
    color: #94a3b8;
}

.ab-author-box {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 2rem 0;
    padding: 1rem;
    border-radius: 12px;
    background: #fafafa;
}

.ab-related-posts {
    margin-top: 2rem;
}

.ab-related-posts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.ab-reading-progress {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    height: 3px;
    background: var(--ab-reading-progress-fill, #111827);
    width: 0;
    z-index: 99999;
    pointer-events: none;
    transition: width 0.12s ease-out;
}

html.html-blogpost-page {
    --ab-reading-progress-track: rgba(15, 23, 42, 0.12);
    --ab-reading-progress-fill: #111827;
}

html.html-blogpost-page::before {
    content: '';
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: 3px;
    background: var(--ab-reading-progress-track);
    z-index: 99998;
    pointer-events: none;
}

.ab-blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 1.5rem;
    align-items: start;
}

.ab-blog-layout--article {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 2rem;
    align-items: stretch;
}

.ab-blog-layout--article .ab-article__sidebar {
    grid-column: 1;
    grid-row: 1;
}

.ab-blog-layout--article .ab-article__main {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

[dir="rtl"] .ab-blog-layout--article {
    grid-template-columns: minmax(0, 1fr) 280px;
}

[dir="rtl"] .ab-blog-layout--article .ab-article__sidebar {
    grid-column: 2;
}

[dir="rtl"] .ab-blog-layout--article .ab-article__main {
    grid-column: 1;
}

.ab-blog-layout--no-sidebar {
    grid-template-columns: 1fr;
}

.ab-blog-layout--no-sidebar .ab-article__main {
    grid-column: 1;
}

.ab-article__sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-self: stretch;
    min-height: 0;
}

.ab-article__toc-rail {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
}

.ab-article__toc-sticky {
    z-index: 12;
    width: 100%;
    transition: box-shadow .2s ease, border-color .2s ease;
}

.ab-article__toc-sticky.is-pinned .ab-toc--enhanced,
.ab-article__toc-sticky.is-pinned.ab-toc--enhanced {
    border-color: #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .08);
}

.ab-content .ab-heading {
    scroll-margin-top: calc(var(--ab-sticky-top, 90px) + 1rem);
}

.ab-article-sidebar__box {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    transition: box-shadow .2s ease, border-color .2s ease;
}

.ab-article-sidebar__box:hover {
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
}

.ab-article-sidebar__box h3 {
    font-size: .9375rem;
    margin: 0 0 .75rem;
    font-weight: 700;
    color: #23254e;
}

.ab-article-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ab-article-sidebar__list li { margin: .45rem 0; }

.ab-article-sidebar__list a {
    color: #334155;
    text-decoration: none;
    font-size: .875rem;
    line-height: 1.55;
}

.ab-article-sidebar__list a:hover { color: #2563eb; }

@media (max-width: 991px) {
    .ab-blog-layout,
    .ab-blog-layout--article {
        display: flex;
        flex-direction: column;
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .ab-blog-layout--article .ab-article__sidebar,
    .ab-blog-layout--article .ab-article__main {
        grid-column: 1;
        grid-row: auto;
        min-width: 0;
        width: 100%;
    }

    .ab-article__sidebar--toc-only {
        display: none;
    }

    .ab-article__toc-rail {
        display: none !important;
        min-height: 0 !important;
    }

    .ab-article__toc-sticky {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: auto !important;
    }

    .ab-article__toc-sticky.is-pinned .ab-toc--enhanced,
    .ab-article__toc-sticky.is-pinned.ab-toc--enhanced {
        box-shadow: none;
    }

    .ab-toc--sidebar {
        display: none;
    }

    .html-blogpost-page .ab-article--enhanced,
    .ab-article--enhanced {
        padding: 0 var(--ab-mobile-gutter, 0.75rem) calc(2rem + var(--ab-mobile-toc-fab-offset, 4.75rem));
    }

    .ab-article__hero {
        margin-bottom: 1.25rem;
    }

    .ab-article__title {
        font-size: clamp(1.35rem, 5vw, 1.65rem);
        margin-bottom: .5rem;
    }

    .ab-article__meta {
        font-size: .78rem;
        line-height: 1.5;
    }

    .ab-article__header {
        margin-bottom: 1rem;
        padding-bottom: .85rem;
    }

    .ab-article__featured {
        margin-bottom: 1rem;
        border-radius: 8px;
    }

    .ab-article__featured img {
        max-height: 220px;
    }

    .ab-content--card {
        padding: 1rem;
        border-radius: 8px;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .ab-content--card :is(img, video, iframe, svg, table) {
        max-width: 100%;
    }

    .ab-content--card .ab-table-wrap {
        max-width: 100%;
    }

    .ab-article-sidebar__box {
        padding: .9rem 1rem;
    }

    .ab-article__sidebar {
        align-self: stretch;
    }

    .ab-article-sidebar__list a {
        display: block;
        padding: .35rem 0;
        min-height: 2.25rem;
        line-height: 1.5;
    }

    .ab-content .ab-table-wrap {
        margin-inline: -.25rem;
        border-radius: 8px;
        -webkit-overflow-scrolling: touch;
    }

    /* Storefront mobile — full-width single column */
    .html-blog-page,
    .html-blogpost-page {
        --ab-mobile-gutter: 0.75rem;
    }

    .html-blog-page .ab-pack,
    .html-blogpost-page .ab-pack,
    .html-blogpost-page .ab-blog-post,
    .html-blog-page .page,
    .html-blogpost-page .page,
    .html-blog-page .block,
    .html-blog-page .arContainer,
    .html-blogpost-page .arContainer {
        width: 100%;
        max-width: 100%;
    }

    .html-blog-page .arContainer--main {
        padding: 0;
    }

    .html-blog-page .grid--1x2,
    .html-blog-page .grid--1x2-200,
    .html-blog-page .grid--1x22 {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .html-blog-page .blogs__list,
    .html-blog-page .blogs__sidebar,
    .html-blog-page .section--blogs__header {
        width: 100%;
        padding-inline: var(--ab-mobile-gutter);
    }

    .html-blog-page .blog {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .html-blog-page .blog__imageBox,
    .html-blog-page .blog__content {
        width: 100%;
    }

    .html-blog-page .blog__image {
        width: 100%;
        min-width: 0;
        height: auto;
        max-height: 220px;
        object-fit: cover;
    }

    .html-blog-page .ab-pack,
    .html-blog-page .ab-mag-page {
        width: 100%;
        max-width: none;
        margin-inline: 0;
        padding-inline: var(--ab-mobile-gutter);
    }

    .html-blogpost-page .ab-article--enhanced,
    .ab-article--enhanced,
    .ab-pack-article .ab-article--enhanced,
    .ab-pack-article--narrow .ab-article--enhanced {
        max-width: none;
        width: 100%;
        margin-inline: 0;
        padding-inline: var(--ab-mobile-gutter);
        padding-bottom: calc(2rem + var(--ab-mobile-toc-fab-offset, 4.75rem));
    }

    .html-blog-page .ab-pack-list__header,
    .html-blog-page .ab-pack-list__meta,
    .html-blog-page .ab-pack-list__pager,
    .html-blog-page .ab-mag-page__header {
        width: 100%;
    }

    .html-blog-page .ab-pack-list__items,
    .html-blog-page .ab-pack-home__grid,
    .html-blog-page .ab-pack-home__grid--classic,
    .html-blog-page .ab-mag-archive .ab-pack-list__items,
    .html-blog-page .ab-mag-section__grid,
    .html-blog-page .ab-mag-section__grid--featured,
    .html-blogpost-page .ab-related-posts__grid,
    .html-blogpost-page .ab-product-block__items,
    .html-blogpost-page .ab-category-block__items {
        grid-template-columns: 1fr !important;
    }

    .html-blog-page .ab-pack-list--editorial .ab-pack-list__card,
    .ab-pack-list--editorial .ab-pack-list__card {
        grid-template-columns: 1fr;
    }

    .html-blog-page .ab-pack-list--editorial .ab-pack-list__image img,
    .ab-pack-list--editorial .ab-pack-list__image img {
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: 220px;
        object-fit: cover;
    }

    .html-blog-page .ab-pack-list__card,
    .html-blog-page .ab-mag-card {
        width: 100%;
    }

    .html-blog-page .ab-mag-layout {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    .html-blog-page .ab-mag-layout__main,
    .html-blog-page .ab-mag-sidebar {
        width: 100%;
        min-width: 0;
    }

    .html-blog-page .ab-mag-hero__slide.is-active {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr !important;
        min-height: 0;
    }

    .html-blog-page .ab-mag-hero__media img {
        min-height: 200px;
        max-height: 260px;
        height: auto;
    }

    .html-blogpost-page .ab-content--card,
    .html-blogpost-page .ab-article__featured,
    .html-blogpost-page .ab-related-posts--enhanced,
    .html-blogpost-page .ab-author-box--enhanced,
    .html-blogpost-page .ab-tags--enhanced,
    .html-blogpost-page .ab-comments,
    .html-blogpost-page .ab-article-sidebar__box {
        width: 100%;
        max-width: 100%;
    }

    .html-blogpost-page .ab-gallery--cols-2,
    .html-blogpost-page .ab-gallery--cols-3,
    .html-blogpost-page .ab-gallery--cols-4 {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 992px) {
    .ab-toc--mobile-collapsible > summary {
        pointer-events: none;
        cursor: default;
    }

    .ab-toc--mobile-collapsible > summary::after {
        display: none;
    }
}

@media (max-width: 767px) {
    .ab-article__featured img {
        max-height: 180px;
    }

    .ab-article__title {
        font-size: 1.3rem;
        line-height: 1.5;
    }

    .ab-content .ab-table {
        font-size: .875rem;
    }

    .ab-content .ab-table th,
    .ab-content .ab-table td {
        padding: .6rem .75rem;
    }
}

/* Article page shell */
.html-blogpost-page .ab-article--enhanced,
.ab-article--enhanced {
    max-width: 75rem;
    margin: 0 auto;
    padding: 0 1.25rem 2.5rem;
}

.ab-article__hero {
    margin-bottom: 1.75rem;
}

.ab-article__hero .ab-article__header {
    margin-bottom: 1.25rem;
}

.ab-article__hero .ab-article__featured {
    margin-bottom: 0;
}

.ab-breadcrumb {
    margin-bottom: .75rem;
    font-size: .8125rem;
}

.ab-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    color: #64748b;
}

.ab-breadcrumb__item:not(:last-child)::after {
    content: "/";
    margin-inline-start: .5rem;
    color: #cbd5e1;
}

.ab-breadcrumb__item a {
    color: #2563eb;
    text-decoration: none;
}

.ab-breadcrumb__item a:hover { text-decoration: underline; }

.ab-breadcrumb__item.is-current span {
    color: #334155;
    font-weight: 600;
}

.ab-article__header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e8ecf1;
}

.ab-article__title {
    font-size: clamp(1.5rem, 2.8vw, 1.875rem);
    font-weight: 700;
    line-height: 1.55;
    margin: 0 0 .65rem;
    color: #23254e;
    letter-spacing: 0;
}

.ab-article__meta {
    color: #767790;
    font-size: .8125rem;
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.6;
}

.ab-article__featured {
    margin: 0 0 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
}

.ab-article__featured img {
    display: block;
    width: 100%;
    max-height: 340px;
    object-fit: cover;
}

.ab-content--card {
    background: #fff;
    border: 1px solid #eceef2;
    border-radius: 10px;
    padding: 1.25rem 1.35rem;
    box-shadow: none;
}

.ab-content--card > .ab-heading:first-child,
.ab-content--card > h2:first-child {
    margin-top: 0;
}

.ab-author-box--enhanced {
    margin-top: 2rem;
    padding: 1rem 1.15rem;
    border: 1px solid #eceef2;
    border-radius: 10px;
    background: #fafbfc;
}

.ab-author-box--enhanced strong {
    font-size: .9375rem;
    font-weight: 600;
    color: #23254e;
}

.ab-author-box--enhanced img { border-radius: 50%; object-fit: cover; width: 56px; height: 56px; }
.ab-author-box--enhanced p { margin: .25rem 0 0; color: #5a5c7a; line-height: 1.75; font-size: .9375rem; }

.ab-related-posts--enhanced {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eceef2;
}

.ab-related-posts--enhanced h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #23254e;
}

.ab-related-card {
    padding: .85rem;
    border-radius: 8px;
    border: 1px solid #eceef2;
    background: #fff;
    transition: box-shadow .2s ease;
}

.ab-related-card h4 {
    font-size: .9375rem;
    font-weight: 600;
    margin: .5rem 0 .3rem;
    line-height: 1.55;
}
.ab-related-card h4 a {
    color: #0f172a;
    text-decoration: none;
}
.ab-related-card h4 a:hover { color: #2563eb; }
.ab-related-card p {
    font-size: .9rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}
.ab-related-card:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, .06); }
.ab-toc--enhanced {
    border: 1px solid #eceef2;
    border-radius: 8px;
    padding: .85rem 1rem;
    background: #fafbfc;
    font-size: .875rem;
    transition: box-shadow .2s ease, border-color .2s ease;
}

.ab-toc--enhanced:hover {
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
}
.ab-tags--enhanced { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.ab-tag { display: inline-block; padding: .35rem .75rem; border-radius: 999px; background: #f1f5f9; color: #334155; text-decoration: none; }
.ab-tag:hover { background: #e2e8f0; }

.ab-gallery {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.ab-gallery--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ab-gallery--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ab-gallery--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 767px) {
    .ab-gallery--cols-3,
    .ab-gallery--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ab-gallery__item {
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
}

.ab-gallery__item img {
    width: 100%;
    height: auto;
    display: block;
}

.ab-gallery__item figcaption {
    padding: .5rem .75rem;
    font-size: .85rem;
    color: #64748b;
}

.ab-spacer {
    display: block;
    width: 100%;
}

.ab-pullquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-inline-start: 3px solid #2563eb;
    font-size: 1.05rem;
    line-height: 1.75;
    color: #2d2f55;
    background: #f8fafc;
}

.ab-pullquote p { margin: 0; }
.ab-pullquote__cite {
    display: block;
    margin-top: .75rem;
    font-size: .9rem;
    color: #64748b;
    font-style: normal;
}

.ab-audio {
    margin: 1.5rem 0;
}

.ab-audio__player {
    width: 100%;
}

.ab-audio figcaption {
    margin-top: .5rem;
    font-size: .85rem;
    color: #64748b;
}

.ab-file {
    margin: 1.25rem 0;
}

.ab-file__link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 500;
}

.ab-file__link:hover {
    background: #eff6ff;
    text-decoration: none;
}

.ab-embed {
    margin: 1.5rem 0;
}

.ab-embed__responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #0f172a;
}

.ab-embed__iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ab-embed figcaption {
    margin-top: .5rem;
    font-size: .85rem;
    color: #64748b;
}

.ab-author-social {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .75rem;
    margin-top: .5rem;
    font-size: .85rem;
}

.ab-author-social a { color: #2563eb; text-decoration: none; }
.ab-author-social a:hover { text-decoration: underline; }

.ab-password-form { margin-top: 2rem; }

/* Comments */
.ab-comments {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.ab-comments__header {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1.25rem;
}

.ab-comments__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #23254e;
}

.ab-comments__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 .5rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: .85rem;
    font-weight: 600;
}

.ab-comments__list {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ab-comment {
    display: flex;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .04);
}

.ab-comment__avatar {
    flex: 0 0 48px;
}

.ab-comment__avatar img,
.ab-comment__avatar-fallback {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.ab-comment__avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.ab-comment__avatar-link {
    display: block;
    line-height: 0;
}

.ab-comment__body {
    flex: 1;
    min-width: 0;
}

.ab-comment__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .35rem .75rem;
    margin-bottom: .5rem;
}

.ab-comment__author {
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
}

.ab-comment__author:hover {
    color: #2563eb;
}

.ab-comment__date {
    color: #94a3b8;
    font-size: .85rem;
}

.ab-comment__text {
    color: #334155;
    line-height: 1.7;
    word-break: break-word;
}

.ab-comment__text p {
    margin: 0 0 .65rem;
}

.ab-comment__text p:last-child {
    margin-bottom: 0;
}

.ab-comments__form-wrap {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

.ab-comments__form-title {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.ab-comments__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ab-comments__label {
    display: block;
    margin-bottom: .45rem;
    font-weight: 600;
    color: #334155;
    font-size: .95rem;
}

.ab-comments__textarea {
    width: 100%;
    min-height: 120px;
    padding: .85rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    line-height: 1.6;
    color: #0f172a;
    background: #fff;
    resize: vertical;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ab-comments__textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

.ab-comments__textarea:disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

.ab-comments__field-error {
    display: block;
    margin-top: .35rem;
    color: #dc2626;
    font-size: .85rem;
}

.ab-comments__captcha {
    max-width: 100%;
}

.ab-comments__actions {
    display: flex;
    justify-content: flex-start;
}

.ab-comments__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .65rem 1.35rem;
    border: 0;
    border-radius: 10px;
    background: #4f46e5;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
}

.ab-comments__submit:hover {
    background: #4338ca;
}

.ab-comments__submit:active {
    transform: translateY(1px);
}

.ab-comments__alert {
    padding: .75rem 1rem;
    border-radius: 10px;
    font-size: .92rem;
    line-height: 1.5;
}

.ab-comments__alert--success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.ab-comments__alert--error,
.ab-comments__form .validation-summary-errors {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.ab-comments__alert--info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.ab-comments__closed {
    margin-top: 1rem;
    padding: .85rem 1rem;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: .95rem;
    text-align: center;
    border: 1px dashed #cbd5e1;
}

@media (max-width: 640px) {
    .ab-comment {
        flex-direction: column;
        gap: .75rem;
    }

    .ab-comments__form-wrap {
        padding: 1.15rem;
    }
}

.ab-comments__rating {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.ab-comments__rating .ab-comments__label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 600;
    color: #0f172a;
}

.ab-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem 1rem;
    margin-top: .75rem;
}

.ab-rating__stars {
    display: inline-flex;
    gap: .15rem;
}

.ab-rating__star {
    border: 0;
    background: transparent;
    color: #cbd5e1;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.ab-rating__star.is-filled,
.ab-rating__star:hover,
.ab-rating__star:focus {
    color: #f59e0b;
}

.ab-rating__value {
    font-weight: 700;
    color: #0f172a;
}

.ab-rating__count {
    color: #64748b;
    font-size: .9rem;
}

.ab-pack-list__rating {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    margin-top: .35rem;
    color: #b45309;
    font-size: .9rem;
    font-weight: 600;
}

.ab-pack-list__rating-stars {
    letter-spacing: -1px;
}

/* Mobile TOC FAB + bottom sheet (max-width: 991px only) */
.ab-mobile-toc {
    display: none;
}

@media (max-width: 991px) {
    .ab-mobile-toc {
        display: block;
    }

    .ab-mobile-toc__fab {
        position: fixed;
        z-index: 10000020;
        inset-inline: 1rem;
        bottom: max(1rem, env(safe-area-inset-bottom));
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .5rem;
        min-height: 3rem;
        padding: .65rem 1.15rem;
        border: 1px solid rgba(35, 37, 78, .12);
        border-radius: 999px;
        background: #fff;
        box-shadow: 0 8px 28px rgba(15, 23, 42, .18);
        color: #23254e;
        font: inherit;
        font-size: .9rem;
        font-weight: 700;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        transition: transform .15s ease, box-shadow .15s ease;
    }

    .ab-mobile-toc__fab:active {
        transform: scale(.98);
    }

    .ab-mobile-toc__fab-icon {
        font-size: 1.05rem;
        line-height: 1;
    }

    .ab-mobile-toc__backdrop {
        position: fixed;
        inset: 0;
        z-index: 10000025;
        background: rgba(15, 23, 42, .45);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .2s ease, visibility .2s ease;
    }

    .ab-mobile-toc__backdrop.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .ab-mobile-toc__panel {
        position: fixed;
        z-index: 10000030;
        inset-inline: 0;
        bottom: 0;
        max-height: min(70vh, 32rem);
        display: flex;
        flex-direction: column;
        border-radius: 1rem 1rem 0 0;
        background: #fff;
        box-shadow: 0 -8px 32px rgba(15, 23, 42, .16);
        transform: translateY(100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform .25s ease, visibility .25s ease;
    }

    .ab-mobile-toc__panel.is-open {
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }

    .ab-mobile-toc__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        padding: .85rem 1rem .65rem;
        border-bottom: 1px solid rgba(35, 37, 78, .08);
        flex-shrink: 0;
    }

    .ab-mobile-toc__title {
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
        color: #23254e;
    }

    .ab-mobile-toc__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(35, 37, 78, .06);
        color: #475569;
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
    }

    .ab-mobile-toc__list {
        list-style: none;
        margin: 0;
        padding: .5rem 1rem max(1rem, env(safe-area-inset-bottom));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ab-mobile-toc__item {
        margin: 0;
    }

    .ab-mobile-toc__link {
        display: block;
        padding: .55rem 0;
        color: #334155;
        font-size: .9rem;
        line-height: 1.45;
        text-decoration: none;
        border-bottom: 1px solid rgba(35, 37, 78, .06);
    }

    .ab-mobile-toc__item:last-child .ab-mobile-toc__link {
        border-bottom: 0;
    }

    .ab-mobile-toc__item--level-2 .ab-mobile-toc__link {
        padding-inline-start: .75rem;
    }

    .ab-mobile-toc__item--level-3 .ab-mobile-toc__link {
        padding-inline-start: 1.5rem;
        font-size: .85rem;
    }

    .ab-mobile-toc__item--level-4 .ab-mobile-toc__link,
    .ab-mobile-toc__item--level-5 .ab-mobile-toc__link,
    .ab-mobile-toc__item--level-6 .ab-mobile-toc__link {
        padding-inline-start: 2.25rem;
        font-size: .8125rem;
    }

    body.ab-mobile-toc-open {
        overflow: hidden;
    }
}
