/* Article action bar (partials/article-actions.hbs). Sits in the article column above the share row,
   with the share row's geometry; blue marks my own reactions and saves, gold marks follows. */
.aa { max-width: var(--content-width); margin: 3.5rem auto 0; padding: 1.25rem 0 0.25rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.aa [hidden] { display: none !important; }
.aa + .post-share { margin-top: 0; }
/* Moved by article-actions.js to where the reading ends, above the bibliography: the text column's width */
.aa--inline { max-width: none; margin-bottom: 0; }
.aa--inline + .tnh-bibliography, .aa--inline + [data-tnh-bibliography] { margin-top: 0; padding-top: 0; border-top: 0; } /* one divider, not two: */
.aa--inline + .tnh-bibliography > h2:first-child, .aa--inline + [data-tnh-bibliography] > h2:first-child { margin-top: 2.5rem; } /* the heading's own hairline stays */
.aa--inline .aa__note:not(:has(> :not([hidden]))) { min-height: 0; margin-top: 0; } /* no empty band above it */
.aa__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; }
.aa__group, .aa__follows { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.aa__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.aa__btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-width: 44px; height: 44px; padding: 0 0.8rem;
    border: 1px solid var(--csi-line-gold); border-radius: 12px; background: rgba(255, 255, 255, 0.03);
    color: var(--csi-ink); font: 600 0.86rem/1 var(--font-body); font-variant-numeric: tabular-nums; letter-spacing: 0; cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.aa__btn svg { stroke-width: 2; }
.aa__btn:hover { color: var(--pure-white); border-color: var(--noble-gold); background: rgba(212, 175, 55, 0.08); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }
.aa__btn[aria-pressed="true"] { color: var(--pure-white); border-color: var(--accent-glow); background: var(--csi-on); }
.aa__btn[aria-pressed="true"]:hover { background: var(--accent-hover, #0077ed); }
.aa__btn[aria-pressed="true"] svg { fill: currentColor; fill-opacity: 0.35; }
.aa__btn[data-aa-save][aria-pressed="true"] svg { fill-opacity: 1; }
.aa__btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.aa__btn[aria-busy="true"] { cursor: progress; }
.aa__btn--count { padding: 0 0.95rem; }
.aa__count { color: var(--pure-white); }
.aa__btn[aria-pressed="true"] .aa__count { color: var(--pure-white); }

.aa__follow {
    display: inline-flex; align-items: center; gap: 0.45rem; min-height: 40px; padding: 0 1rem; border: 1px solid var(--csi-line-gold);
    border-radius: var(--radius-pill); background: transparent; color: var(--noble-gold-light); cursor: pointer;
    font: 600 0.74rem/1.2 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.aa__follow:hover { border-color: var(--noble-gold); background: rgba(212, 175, 55, 0.08); }
.aa__follow-name { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--pure-white); }
.aa__follow-name svg { width: 15px; height: 15px; color: var(--noble-gold-light); }
.aa__follow .aa__check { display: none; }
.aa__follow[aria-pressed="true"] { border-color: rgba(212, 175, 55, 0.7); background: rgba(212, 175, 55, 0.14); }
.aa__follow[aria-pressed="true"] .aa__plus { display: none; }
.aa__follow[aria-pressed="true"] .aa__check { display: inline; }
.aa__follow[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.aa__btn:focus-visible, .aa__follow:focus-visible, .aa__note a:focus-visible { outline: 2px solid var(--accent-glow); outline-offset: 3px; }
.post-comments:focus { outline: none; }

/* Tooltips: the header's .nav-tooltip skin; the words are translatable nodes */
.aa__tipwrap { position: relative; display: inline-flex; }
.aa__tip {
    position: absolute; bottom: calc(100% + 9px); left: 50%; z-index: 30; width: max-content; max-width: 240px; padding: 4px 10px;
    border: 1px solid rgba(212, 175, 55, 0.45); border-radius: 8px; background: rgba(10, 10, 16, 0.97); color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem; line-height: 1.4; letter-spacing: 0; text-align: center; pointer-events: none;
    opacity: 0; visibility: hidden; transform: translateX(-50%); transition: opacity 150ms ease, visibility 0s linear 150ms;
}
.aa__group > .aa__tipwrap:first-child .aa__tip { left: 0; transform: none; text-align: start; }
.aa__group > .aa__tipwrap:nth-last-child(-n+2) .aa__tip { left: auto; right: 0; transform: none; text-align: end; } /* trailing tips stay on screen */
.aa__btn:focus-visible + .aa__tip, .aa__btn.is-tip + .aa__tip { opacity: 1; visibility: visible; transition: opacity 150ms ease 150ms, visibility 0s linear 150ms; }
@media (hover: hover) and (pointer: fine) {
    .aa__tipwrap:hover .aa__tip { opacity: 1; visibility: visible; transition: opacity 150ms ease 350ms, visibility 0s linear 350ms; }
}

/* .aa scoped so the post body's paragraph and link rules (.gh-content p, a) never restyle it above the bibliography */
.aa .aa__note { min-height: 1.4rem; margin: 0.75rem 0 0; color: rgba(236, 240, 246, 0.72); font-size: 0.82rem; line-height: 1.5; letter-spacing: 0; }
.aa .aa__note a { color: var(--pure-white); font-weight: 600; }

/* Top actions (partials/article-top-actions.hbs): the same buttons, round, in the hero's meta row after a hairline */
.aat { display: inline-flex; align-items: center; gap: 0.375rem; padding-inline-start: 1rem; border-inline-start: 1px solid rgba(255, 255, 255, 0.14); }
.post-header__meta:has(> .aat) { column-gap: 1.25rem; }
.aat.is-own-row { flex-basis: 100%; justify-content: center; padding-inline-start: 0; border-inline-start: 0; } /* wrapped under the byline: no hairline to lean on */
.aat [hidden] { display: none !important; }
.aat__btn { min-width: 0; width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.aat__listen { position: relative; display: inline-flex; align-items: center; gap: 2px; }
.aat__listen .aat__play { border-radius: 50%; }
/* With Listen later available, Listen and its menu are one split button: a shared outline, an inner hairline */
.aat__listen:has(.aat__more:not([hidden])) { gap: 0; border: 1px solid var(--csi-line-gold); border-radius: 20px; background: rgba(255, 255, 255, 0.03); transition: border-color 0.2s ease; }
.aat__listen:has(.aat__more:not([hidden])):hover { border-color: var(--noble-gold); }
.aat__listen:has(.aat__more:not([hidden])) .aa__btn { height: 38px; border: 0; background: none; box-shadow: none; transform: none; }
.aat__listen:has(.aat__more:not([hidden])) .aat__play { width: 40px; border-radius: 19px 0 0 19px; }
.aat__listen:has(.aat__more:not([hidden])) .aat__play[aria-pressed="true"] { background: var(--csi-on); }
.aat__listen:has(.aat__more:not([hidden])) .aa__btn:hover { background: rgba(212, 175, 55, 0.1); }
.aat__more { min-width: 0; width: 26px; height: 40px; padding: 0 2px 0 0; border-radius: 0 19px 19px 0; }
.aat__listen:has(.aat__more:not([hidden])) .aat__more { border-inline-start: 1px solid rgba(212, 175, 55, 0.4); }
.aat__listen:has(.aat__more:not([hidden])) .aat__more[aria-expanded="true"] { background: rgba(212, 175, 55, 0.14); }
.aat__play .aat__i-pause, .aat__play[aria-pressed="true"] .aat__i-play { display: none; }
.aat__play[aria-pressed="true"] .aat__i-pause { display: block; }
.aat__play svg.aat__i-play { margin-inline-start: 2px; }
.aat__menu { top: calc(100% + 8px); right: 0; text-align: start; }
.aat .aa__tip { top: calc(100% + 9px); bottom: auto; }
.page-hero-inner > .aat { margin-top: 1.5rem; padding-inline-start: 0; border-inline-start: 0; }

@media (max-width: 767px) {
    .aa { margin-top: 2.5rem; padding: 1.1rem 1rem; }
    .aa--inline { padding-inline: 0; }
    .aa__row { gap: 0.9rem; }
    .aa__follows { width: 100%; }
    .aa__follow { padding: 0 0.85rem; letter-spacing: 0.08em; }
    .aat { width: 100%; justify-content: center; padding-inline-start: 0; border-inline-start: 0; }
    .aat__menu { right: 50%; transform: translateX(50%); }
}
@media (prefers-reduced-motion: reduce) {
    .aa__btn, .aa__follow, .aa__tip { transition: none; }
    .aa__btn:hover { transform: none; }
}
