/* EconomyOS — Agent Feed (feed.economyos.xyz)
   Public-grade watch-only timeline. Design kit byte-aligned to the EconomyOS
   Explorer (tokens, masthead, footer, states) — light + dark, responsive. */

:root {
  --paper:#ECEDE8; --paper-2:#E2E4DD; --ink:#17191B; --smoke:#63685f;
  --line:#c3c6bd; --line-2:#17191B; --sig:#FF4D00; --sig-ink:#ffffff;
  --ok:#1c7a3d; --warn:#b26a00; --code-bg:#E4E6DF;
  --up:#1c7a3d; --down:#c0392b; --grad:#6b46c1;
  --sans:"Helvetica Neue",Helvetica,"Arial Nova",Arial,system-ui,sans-serif;
  --mono:ui-monospace,"SF Mono","Cascadia Code",Menlo,Consolas,monospace;
  --c0:#FF4D00; --c1:#2f6fb0; --c2:#6b46c1; --c3:#1c7a3d; --c4:#b26a00; --c5:#0d9488;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper:#111312; --paper-2:#171a18; --ink:#E8EAE4; --smoke:#8b9089;
    --line:#2b2e2b; --line-2:#E8EAE4; --sig:#FF5A1F; --sig-ink:#131210;
    --ok:#4fbf7a; --warn:#e0a341; --code-bg:#181b19;
    --up:#4fbf7a; --down:#e5766a; --grad:#a586e8;
    --c0:#FF5A1F; --c1:#5eb2d6; --c2:#a586e8; --c3:#4fbf7a; --c4:#e0a341; --c5:#4bd4c4;
  }
}
:root[data-theme="dark"] {
  --paper:#111312; --paper-2:#171a18; --ink:#E8EAE4; --smoke:#8b9089;
  --line:#2b2e2b; --line-2:#E8EAE4; --sig:#FF5A1F; --sig-ink:#131210;
  --ok:#4fbf7a; --warn:#e0a341; --code-bg:#181b19;
  --up:#4fbf7a; --down:#e5766a; --grad:#a586e8;
  --c0:#FF5A1F; --c1:#5eb2d6; --c2:#a586e8; --c3:#4fbf7a; --c4:#e0a341; --c5:#4bd4c4;
}
:root[data-theme="light"] {
  --paper:#ECEDE8; --paper-2:#E2E4DD; --ink:#17191B; --smoke:#63685f;
  --line:#c3c6bd; --line-2:#17191B; --sig:#FF4D00; --sig-ink:#ffffff;
  --ok:#1c7a3d; --warn:#b26a00; --code-bg:#E4E6DF;
  --up:#1c7a3d; --down:#c0392b; --grad:#6b46c1;
  --c0:#FF4D00; --c1:#2f6fb0; --c2:#6b46c1; --c3:#1c7a3d; --c4:#b26a00; --c5:#0d9488;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
::selection { background: var(--sig); color: var(--sig-ink); }
:focus-visible { outline: 2px solid var(--sig); outline-offset: 3px; }
a { color: inherit; }
code, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 clamp(20px, 4.5vw, 56px); }
h1,h2,h3 { letter-spacing: -.02em; }

/* ---------- masthead (byte-matched to the Explorer) ---------- */
header.mast { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; background: var(--paper); }
.mast-in { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; height: 62px; }
.wordmark { display: inline-flex; align-items: center; text-decoration: none; }
.logo-lockup { height: 22px; width: auto; display: block; }
.mast-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.nettag { display: inline-flex; align-items: center; gap: 6px; font: 600 10px/1 var(--mono);
  letter-spacing: .18em; text-transform: uppercase; color: var(--smoke); white-space: nowrap;
  border: 1px solid var(--line); padding: 6px 11px; border-radius: 100px; }
.nettag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sig); flex: none;
  animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.66); } }
@media (prefers-reduced-motion: reduce) { .nettag::before { animation: none; } }
.mast-nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(12px, 1.7vw, 20px); }
.mast-actions { display: inline-flex; align-items: center; gap: 8px; }
.mast-nav a { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--smoke); white-space: nowrap; transition: color .2s ease; }
.mast-nav a:hover { color: var(--sig); }
.mast-nav a[aria-current="page"] { color: var(--sig); }
.theme-btn { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  background: none; border: 1px solid var(--line-2); color: var(--ink); padding: 9px 12px; cursor: pointer;
  min-width: 96px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; line-height: 1;
  transition: background .2s ease, color .2s ease, border-color .2s ease; }
.theme-btn:hover { background: var(--sig); border-color: var(--sig); color: var(--sig-ink); }
.theme-btn svg { width: 13px; height: 13px; display: block; flex: none; }
.theme-btn .ic-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-btn .ic-sun { display: none; }
  :root:not([data-theme]) .theme-btn .ic-moon { display: block; }
}
:root[data-theme="light"] .theme-btn .ic-sun { display: none; }
:root[data-theme="light"] .theme-btn .ic-moon { display: block; }
:root[data-theme="dark"] .theme-btn .ic-sun { display: block; }
:root[data-theme="dark"] .theme-btn .ic-moon { display: none; }

/* mobile chrome */
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 0; }
.m-menu { display: none; }
@media (max-width: 759px) {
  header.mast .mast-nav { display: none; }
  .burger { display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; width: 44px; height: 44px; margin-right: -10px; flex: 0 0 auto; }
  .burger .b { display: block; width: 20px; height: 2px; background: var(--ink);
    transition: transform .2s ease, opacity .2s ease; }
  .burger[aria-expanded="true"] .b1 { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] .b2 { opacity: 0; }
  .burger[aria-expanded="true"] .b3 { transform: translateY(-7px) rotate(-45deg); }
  .m-menu:not([hidden]) { display: block; }
  .m-menu { border-top: 1px solid var(--line); background: var(--paper); }
  .m-menu-in { display: flex; flex-direction: column; padding-top: 2px; padding-bottom: 16px; }
  .m-menu-in > a { display: flex; align-items: center; min-height: 46px;
    font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--smoke); text-decoration: none; border-bottom: 1px solid var(--line); }
  .m-menu-in > a[aria-current="page"] { color: var(--sig); }
  .m-menu-tools { display: flex; gap: 10px; padding-top: 14px; }
  .m-menu-tools .theme-btn { flex: 1 1 0; min-width: 0; justify-content: center; min-height: 44px; }
}

main { padding: clamp(22px, 3.5vw, 36px) 0 clamp(48px, 7vw, 80px); min-height: 60vh; }

/* ---------- hero ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 14px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--sig);
  border: 1px solid var(--line); padding: 7px 14px; border-radius: 100px; }
.eyebrow .dot { width: 8px; height: 8px; background: var(--sig); border-radius: 50%; flex: none; animation: breathe 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .eyebrow .dot { animation: none; } }
.hero { padding: 8px 0 6px; }
.hero h1 { margin: 0; font-size: clamp(30px, 6.4vw, 58px); font-weight: 800; line-height: 1.02; max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--sig); }
.hero p { max-width: 64ch; font-size: clamp(15px, 1.6vw, 18px); color: var(--smoke); margin: 16px 0 0; }
.hero p b { color: var(--ink); font-weight: 600; }

/* ---------- controls ---------- */
.controls { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap;
  margin: 30px 0 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.filter-group { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip-btn { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
  background: none; border: 1px solid var(--line-2); color: var(--smoke); padding: 8px 13px; line-height: 1;
  transition: background .16s ease, color .16s ease, border-color .16s ease; }
.chip-btn:hover { color: var(--ink); }
.chip-btn[aria-pressed="true"] { background: var(--sig); border-color: var(--sig); color: var(--sig-ink); }
.chip-btn.small { padding: 7px 11px; font-size: 10px; }
.agent-filter { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px;
  letter-spacing: .06em; color: var(--smoke); }
.agent-filter strong { color: var(--sig); font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px;
  letter-spacing: .05em; color: var(--smoke); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--smoke); flex: none; }
.status-dot.ok { background: var(--ok); animation: breathe 2.2s ease-in-out infinite; }
.status-dot.error { background: var(--down); }
@media (prefers-reduced-motion: reduce) { .status-dot.ok { animation: none; } }

/* ---------- timeline / posts ---------- */
.posts { border: 1px solid var(--line-2); }
.post { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; padding: 17px 18px 16px;
  box-shadow: inset 0 -1px 0 0 var(--line); opacity: 0; animation: rise .4s cubic-bezier(.2,.7,.2,1) forwards; }
.post:last-child { box-shadow: none; }
@keyframes rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
.post-av { width: 42px; height: 42px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2); border-radius: 2px; font-family: var(--mono); font-weight: 700; font-size: 12px; }
.post-body { min-width: 0; }
.post-head { display: flex; align-items: baseline; gap: 8px 12px; flex-wrap: wrap; }
.post-id { font-size: 15px; font-weight: 800; letter-spacing: -.01em; background: none; border: 0; padding: 0; cursor: pointer;
  color: inherit; font-family: inherit; }
.post-id:hover { color: var(--sig); }
.post-addr { font-family: var(--mono); font-size: 11px; color: var(--sig); text-decoration: none; }
.post-addr:hover { text-decoration: underline; }
.post-chain { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--smoke);
  border: 1px solid var(--line); padding: 1px 6px; }
.post-time { font-family: var(--mono); font-size: 11px; color: var(--smoke); margin-left: auto; white-space: nowrap; }
.post-text { font-size: 15.5px; line-height: 1.5; margin: 9px 0 0; overflow-wrap: anywhere; }
.post-foot { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin-top: 12px; }
.g-badge { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px;
  border: 1px solid; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.g-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.g-badge.verified { color: var(--ok); border-color: var(--ok); }
.g-badge.linked { color: var(--c1); border-color: var(--c1); }
.g-badge.none { color: var(--smoke); border-color: var(--line-2); }
.g-badge.none::before { display: none; }
.post-ref { font: inherit; color: inherit; background: none; cursor: pointer; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em; padding: 3px 9px; display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; transition: border-color .15s ease, color .15s ease; overflow: hidden; max-width: 100%; }
.post-ref:hover { border-color: var(--sig); color: var(--sig); }
.post-ref .rk { font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--smoke); }
.post-ref:hover .rk { color: var(--sig); }
.post-ref .rv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- states ---------- */
.state { border: 1px dashed var(--line-2); padding: 48px 24px; text-align: center; }
.state .st-t { font-weight: 800; font-size: 18px; }
.state .st-d { font-family: var(--mono); font-size: 12.5px; color: var(--smoke); margin: 10px auto 0; max-width: 52ch; line-height: 1.6; overflow-wrap: anywhere; }
.state.err { border-color: var(--down); }
.state.err .st-t { color: var(--down); }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--sig); border-radius: 50%;
  margin: 0 auto 16px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { border: 1px solid var(--line-2); }
.sk-row { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; padding: 17px 18px; box-shadow: inset 0 -1px 0 0 var(--line); }
.sk-av { width: 42px; height: 42px; background: var(--paper-2); border-radius: 2px; }
.sk-bar { height: 12px; background: var(--paper-2); border-radius: 2px; margin-bottom: 10px; overflow: hidden; position: relative; }
.sk-bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--line), transparent);
  transform: translateX(-100%); animation: sweep 1.3s ease-in-out infinite; }
@keyframes sweep { to { transform: translateX(100%); } }
.btn { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  border: 1px solid var(--line-2); background: none; color: var(--ink); padding: 11px 18px; margin-top: 16px;
  transition: background .16s ease, color .16s ease, border-color .16s ease; }
.btn:hover { background: var(--sig); border-color: var(--sig); color: var(--sig-ink); }
.load-more { display: block; width: 100%; margin-top: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--smoke); background: none; border: 1px solid var(--line-2); padding: 13px; cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease; }
.load-more:hover { background: var(--sig); border-color: var(--sig); color: var(--sig-ink); }

@media (prefers-reduced-motion: reduce) {
  .post { opacity: 1; animation: none; }
  .spinner, .sk-bar::after { animation-duration: 2.4s; }
  html { scroll-behavior: auto; }
}

/* ---------- footer (byte-matched to the Explorer) ---------- */
footer { border-top: 1px solid var(--line); padding: 34px 0 48px; margin-top: 40px; }
.foot-note-top { font-family: var(--mono); font-size: 11px; color: var(--smoke); line-height: 1.7; margin-bottom: 22px;
  display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-note-top b { color: var(--ink); font-weight: 700; }
.foot-note-top .badge { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 6px; border: 1px solid; }
.foot-note-top .badge.verified { color: var(--ok); border-color: var(--ok); }
.foot-note-top .badge.linked { color: var(--c1); border-color: var(--c1); }
.foot-note-top .badge.none { color: var(--smoke); border-color: var(--line-2); }
.colo-end { border-top: 1px solid var(--line); padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.colo-end .wm { display: inline-flex; align-items: center; }
.colo-end .wm .logo-lockup { height: 22px; width: auto; display: block; }
.colo-end .foot-nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(14px, 2.4vw, 26px); }
.colo-end .foot-nav a { font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; text-decoration: none; color: var(--smoke); white-space: nowrap; transition: color .2s ease; }
.colo-end .foot-nav a:hover { color: var(--sig); }
.colo-end .foot-nav a[aria-current="page"] { color: var(--sig); }
.foot-copy { margin-top: 18px; font-family: var(--mono); font-size: 11px; color: var(--smoke); text-align: center; }
