/* inputoutput.cloud story engagement. Uses the tokens from /news/news.css (--card, --ink, --accent, ...). */
#io-engage { margin-top: 28px; }
#io-engage:empty { min-height: 161px; }
#io-engage[hidden] { display: none !important; }
.ioe { --ioe-red: #c2412d; --ioe-ease: cubic-bezier(0.32, 0.72, 0, 1); }
@media (prefers-color-scheme: dark) { .ioe { --ioe-red: #ff9a85; } }
.ioe[data-state="loading"] .ioe-card, .ioe[data-state="loading"] .ioe-gt { visibility: hidden; }
.ioe[data-state="ready"] .ioe-card { animation: ioe-fade 0.35s ease-out; }
@keyframes ioe-fade { from { opacity: 0; } to { opacity: 1; } }

.ioe-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ioe [hidden] { display: none !important; }
.ioe button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
.ioe-gt { margin: 0 0 8px 16px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); }
.ioe-card { background: var(--card); border-radius: var(--r, 18px); box-shadow: var(--shadow); overflow: hidden; }

/* Bar: views + votes */
.ioe-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; padding: 2px 10px 2px 16px; }
.ioe-views { margin: 0; display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 15px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ioe-views svg { flex: none; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.ioe-vn { font-weight: 650; color: var(--ink); }
.ioe-votes { display: flex; gap: 4px; flex: none; }
.ioe-vote { appearance: none; border: 0; background: none; margin: 0; padding: 5px 0; min-width: 44px; min-height: 44px; color: var(--ink-2); cursor: pointer; border-radius: 999px; }
.ioe-cap { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px 0 11px; border-radius: 999px; background: var(--fill); font-size: 15px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; transition: background-color 0.2s, color 0.2s, transform 0.18s var(--ioe-ease); }
.ioe-vote svg { width: 19px; height: 19px; fill: transparent; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; transition: fill 0.2s; }
.ioe-n { display: inline-block; min-width: 1ch; }
@media (hover: hover) { .ioe-vote:hover .ioe-cap { background: var(--fill-2); } }
.ioe-vote:active .ioe-cap { transform: scale(0.93); }
.ioe-vote[aria-pressed="true"] { color: var(--accent); }
.ioe-vote[aria-pressed="true"] .ioe-cap { background: var(--accent-soft); }
.ioe-vote[aria-pressed="true"] svg { fill: currentColor; fill-opacity: 0.9; }
.ioe-vote:focus-visible { outline: none; }
.ioe-vote:focus-visible .ioe-cap { outline: 2px solid var(--accent); outline-offset: 2px; }
.ioe-vote.pop svg { animation: ioe-pop 0.42s var(--ioe-ease); }
.ioe-vote[data-v="1"].pop svg { transform-origin: 30% 80%; }
.ioe-vote[data-v="-1"].pop svg { transform-origin: 70% 20%; }
@keyframes ioe-pop { 0% { transform: scale(1); } 35% { transform: scale(1.3) rotate(-10deg); } 70% { transform: scale(0.95) rotate(2deg); } 100% { transform: none; } }
.ioe-n.bump { animation: ioe-bump 0.3s var(--ioe-ease); }
@keyframes ioe-bump { from { transform: translateY(5px); opacity: 0.2; } to { transform: none; opacity: 1; } }

/* Disclosure header */
.ioe-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; column-gap: 10px; width: 100%; margin: 0; padding: 13px 14px 13px 16px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; transition: background-color 0.2s; }
.ioe-head::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 0.5px; background: var(--sep); }
@media (hover: hover) { .ioe-head:hover { background: var(--fill); } }
.ioe-head:active { background: var(--fill); }
.ioe-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 14px; }
.ioe-ht { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); }
.ioe-count { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--fill); font-size: 13px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ioe-stack { display: flex; align-items: center; }
.ioe-stack .ioe-av { flex: none; width: 26px; height: 26px; font-size: 10.5px; box-shadow: 0 0 0 2px var(--card); }
.ioe-stack .ioe-av { position: relative; }
.ioe-stack .ioe-av + .ioe-av { margin-left: -7px; }
.ioe-stack .ioe-av:nth-child(1) { z-index: 3; } .ioe-stack .ioe-av:nth-child(2) { z-index: 2; } .ioe-stack .ioe-av:nth-child(3) { z-index: 1; }
.ioe-chev { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--fill); color: var(--ink-2); transition: transform 0.36s var(--ioe-ease); }
.ioe-chev svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ioe-head[aria-expanded="true"] .ioe-chev { transform: rotate(180deg); }
.ioe-pvw { grid-column: 1 / -1; display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.36s var(--ioe-ease), opacity 0.2s; }
.ioe-pvc { min-height: 0; overflow: hidden; }
.ioe-pv { display: block; padding-top: 4px; font-size: 14px; line-height: 20px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ioe-pvn { font-weight: 600; color: var(--ink-2); }
.ioe-head[aria-expanded="true"] .ioe-pvw { grid-template-rows: 0fr; opacity: 0; }

/* Panel */
.ioe-panel { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows 0.4s var(--ioe-ease), visibility 0s linear 0.4s; }
.ioe-panel.open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows 0.4s var(--ioe-ease), visibility 0s; }
.ioe-pin { min-height: 0; overflow: hidden; }
.ioe-pbody { padding: 2px 16px 16px; opacity: 0; transform: translateY(-6px); transition: opacity 0.25s, transform 0.4s var(--ioe-ease); }
.ioe-panel.open .ioe-pbody { opacity: 1; transform: none; transition-delay: 0.05s; }

/* Composer */
.ioe-form { position: relative; padding: 4px 12px 10px; border-radius: 16px; background: var(--bg); border: 0.5px solid var(--sep); transition: box-shadow 0.2s, border-color 0.2s; }
.ioe-form:focus-within { border-color: transparent; box-shadow: 0 0 0 1.5px var(--accent), 0 0 0 5px var(--accent-soft); }
.ioe-who { display: flex; align-items: center; gap: 10px; border-bottom: 0.5px solid var(--sep); }
.ioe-who .ioe-av { flex: none; width: 28px; height: 28px; font-size: 11px; transition: background-color 0.25s, color 0.25s; }
.ioe-av.ioe-anon { background: var(--fill-2); color: var(--ink-3); }
.ioe-name-in, .ioe-text-in { display: block; width: 100%; margin: 0; border: 0; border-radius: 0; background: none; color: var(--ink); font-family: inherit; font-size: 16px; -webkit-appearance: none; appearance: none; }
.ioe-name-in { flex: 1; min-width: 0; min-height: 44px; padding: 0; font-weight: 600; }
.ioe-text-in { min-height: 64px; max-height: 260px; padding: 10px 0 6px; line-height: 1.45; resize: none; overflow-y: auto; }
.ioe-name-in::placeholder, .ioe-text-in::placeholder { color: var(--ink-3); opacity: 1; font-weight: 400; }
.ioe-name-in:focus, .ioe-text-in:focus { outline: none; }
.ioe-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.ioe-foot { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.ioe-msg { flex: 1; min-width: 0; margin: 0; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.ioe-msg.ioe-err { color: var(--ioe-red); font-weight: 500; }
.ioe-msg.ioe-ok { color: var(--live, #2f9e5b); font-weight: 500; }
.ioe-left { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ioe-left.ioe-over { color: var(--ioe-red); font-weight: 600; }
.ioe-post { position: relative; flex: none; height: 36px; min-width: 76px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 15px; font-weight: 650; cursor: pointer; transition: background-color 0.2s, color 0.2s, transform 0.15s, opacity 0.2s; }
.ioe-post::after { content: ""; position: absolute; inset: -4px; }
.ioe-post:not(:disabled):active { transform: scale(0.95); }
@media (hover: hover) { .ioe-post:not(:disabled):hover { filter: brightness(1.06); } }
.ioe-post:disabled { background: var(--fill-2); color: var(--ink-3); cursor: default; }
.ioe-busy .ioe-post:disabled { background: var(--accent); color: var(--accent-ink); opacity: 0.7; }
.ioe-post:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* List */
.ioe-empty { margin: 0; padding: 22px 8px 6px; text-align: center; font-size: 15px; color: var(--ink-3); }
.ioe-list { list-style: none; margin: 8px 0 0; padding: 0; }
.ioe-item { position: relative; display: flex; gap: 12px; padding: 14px 0; }
.ioe-item + .ioe-item::before { content: ""; position: absolute; top: 0; left: 48px; right: 0; height: 0.5px; background: var(--sep); }
.ioe-item:focus { outline: none; }
.ioe-av { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: hsl(var(--h, 30) 52% 85%); color: hsl(var(--h, 30) 40% 27%); font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em; line-height: 1; user-select: none; }
@media (prefers-color-scheme: dark) { .ioe-av { background: hsl(var(--h, 30) 26% 31%); color: hsl(var(--h, 30) 75% 87%); } }
.ioe-body { flex: 1; min-width: 0; }
.ioe-meta { display: flex; align-items: baseline; margin: 0; min-width: 0; font-size: 13px; line-height: 20px; color: var(--ink-3); }
.ioe-meta .ioe-name { flex: 0 1 auto; min-width: 0; width: auto; font-size: 15px; font-weight: 650; color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ioe-dot { flex: none; margin: 0 6px; }
.ioe-time { flex: none; white-space: nowrap; }
.ioe-text { margin: 2px 0 0; font-size: 16px; line-height: 1.45; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.ioe-new { animation: ioe-in 0.45s var(--ioe-ease); }
.ioe-new::after { content: ""; position: absolute; inset: 4px -10px; border-radius: 14px; background: var(--accent-soft); pointer-events: none; animation: ioe-hl 2.8s ease-out forwards; }
@keyframes ioe-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes ioe-hl { 0%, 45% { opacity: 1; } 100% { opacity: 0; } }
.ioe-more { display: block; width: 100%; min-height: 44px; margin: 4px 0 0; border: 0; border-radius: 12px; background: var(--fill); color: var(--accent); font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color 0.2s; }
@media (hover: hover) { .ioe-more:hover { background: var(--fill-2); } }
.ioe-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 400px) {
  .ioe-bar { padding-left: 14px; padding-right: 8px; }
  .ioe-cap { padding: 0 11px 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .ioe *, .ioe *::before, .ioe *::after { animation: none !important; transition: none !important; }
  .ioe-new::after { display: none; }
}
