/* One full-width row, shared by overview cards and the article text. */
.ifis-article-footer-row{
    box-sizing:border-box;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:4px;
    width:100%;
    min-width:0;
    min-height:44px;
    margin:12px 0 0;
    color:var(--text-muted,#666);
}
.ifis-article-footer-left,.ifis-article-footer-right{display:flex;align-items:center;gap:4px;min-width:0}
.ifis-article-footer-row .ifis-resonance{flex:0 0 auto;margin:0 0 0 auto}
.ifis-article-footer-row .ifis-article-action,
.ifis-article-footer-row .ifis-article-discussion-icon,
.ifis-article-footer-row .ifis-resonance-button{
    box-sizing:border-box;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 44px;
    width:44px;
    height:44px;
    min-height:44px;
    margin:0;
    padding:0;
    border:0;
    border-radius:7px;
    background:transparent;
    color:inherit;
    text-decoration:none;
    line-height:1;
    cursor:pointer;
    touch-action:manipulation;
}
.ifis-article-footer-row svg{
    display:block;
    width:19px;
    height:19px;
    flex:0 0 19px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.6;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.ifis-article-footer-row .ifis-resonance-button[aria-pressed="true"]{color:var(--text-main,#222)}
.ifis-article-footer-row .ifis-resonance-button[aria-pressed="true"] svg{fill:currentColor}
.ifis-article-footer-row .ifis-resonance-button[aria-disabled="true"]{cursor:default}
.ifis-article-footer-row a:hover,
.ifis-article-footer-row button:not(:disabled):hover{background:rgba(128,128,128,.08);color:var(--text-main,#222)}
.ifis-article-footer-row :focus-visible{outline:2px solid currentColor;outline-offset:2px}
.ifis-article-footer-row .ifis-resonance-status.is-visible{max-width:240px;font-size:.8rem}
@media(max-width:600px){
    /* Match the existing full-bleed images, retaining a safe touch inset. */
    #article-list .article-card > .ifis-article-footer-row,
    #article-top > .ifis-article-footer-row{
        width:100vw;
        max-width:100vw;
        margin-left:calc(50% - 50vw);
        margin-right:calc(50% - 50vw);
        padding-left:max(8px,env(safe-area-inset-left));
        padding-right:max(8px,env(safe-area-inset-right));
    }
}


.ifis-article-footer-row{position:relative;flex-wrap:wrap}
.ifis-article-footer-right{margin-left:auto}
.ifis-article-footer-row [hidden]{display:none!important}
.ifis-article-action[aria-pressed="true"] svg{fill:currentColor}
.ifis-article-action-status{width:100%;font-size:.8rem}
.ifis-article-action-status:empty{display:none}

/* Keep the article's helpful heart available while reading. */
.ifis-resonance-floating{
    box-sizing:border-box;
    width:44px;
    height:44px;
    display:flex;
    align-items:center;
    position:fixed;
    right:max(16px,env(safe-area-inset-right));
    bottom:max(16px,env(safe-area-inset-bottom));
    z-index:830;
}
.ifis-resonance-floating .ifis-resonance-button{
    box-sizing:border-box;
    width:44px;height:44px;padding:0;justify-content:center;gap:0;
}
.ifis-resonance-floating .ifis-resonance-status.is-visible{
    position:absolute;right:0;bottom:48px;width:230px;padding:8px;
    border:1px solid rgba(128,128,128,.18);border-radius:7px;
    background:var(--bg,#fff);
}
body.share-overlay-open .ifis-resonance-floating,
html.ifis-more-open .ifis-resonance-floating{visibility:hidden}
/* Narrow desktop cards: keep all five actions on one line. Touch targets stay 44px. */
@media(min-width:1024px) and (hover:hover) and (pointer:fine){
    html.ifis-overview-grid[data-ifis-grid="3"] #article-list .ifis-article-footer-row{gap:0;flex-wrap:nowrap}
    html.ifis-overview-grid[data-ifis-grid="3"] #article-list .ifis-article-footer-left,
    html.ifis-overview-grid[data-ifis-grid="3"] #article-list .ifis-article-footer-right{gap:0}
    html.ifis-overview-grid[data-ifis-grid="3"] #article-list .ifis-article-footer-row .ifis-article-action,
    html.ifis-overview-grid[data-ifis-grid="3"] #article-list .ifis-article-discussion-icon,
    html.ifis-overview-grid[data-ifis-grid="3"] #article-list .ifis-resonance-button{
        width:30px;min-width:30px;flex-basis:30px;
    }
    html.ifis-overview-grid[data-ifis-grid="3"] #article-list .ifis-article-action-status{
        position:absolute;top:100%;left:0;
    }
}

/* The heart defines the horizontal floating controls' height and center line. */
@media(min-width:601px){
    .article-footer{height:44px}
    .article-footer .article-footer-tools{box-sizing:border-box;height:44px}
    .article-footer .article-footer-tool{height:42px;min-height:42px;padding-top:0;padding-bottom:0}
    .ifis-saved-access{box-sizing:border-box;height:44px;display:inline-flex;align-items:center;justify-content:center}
}
