
:root{
  --bg:#f6f0ff;
  --paper:#fffdfb;
  --ink:#2c2640;
  --muted:#746c89;
  --lav:#d8c9ff;
  --lav2:#eee7ff;
  --pink:#ffd5ea;
  --blue:#cdefff;
  --mint:#d9f5e6;
  --yellow:#fff0b8;
  --border:#3b3250;
  --shadow:#b7a7d6;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  color:var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.8), transparent 30%),
    linear-gradient(135deg, #f8efff 0%, #fdf7ff 45%, #edf9ff 100%);
  font-family:Inter,system-ui,sans-serif;
}

button,input{font:inherit}

.page-shell{
  width:min(1480px, calc(100% - 28px));
  margin:18px auto 28px;
}

.retro-window{
  background:rgba(255,255,255,.93);
  border:2px solid var(--border);
  box-shadow:5px 5px 0 var(--shadow);
}

.topbar{
  min-height:92px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 20px;
  background:linear-gradient(90deg,#efd8ff,#ffe5f1 50%,#daf2ff);
}

.brand{display:flex;align-items:center;gap:14px}
.brand-icon{
  width:54px;height:54px;
  display:grid;place-items:center;
  background:var(--paper);
  border:2px solid var(--border);
  box-shadow:3px 3px 0 var(--shadow);
  font-size:27px;
}
h1,h2,p{margin:0}
h1{
  font-family:"IBM Plex Mono",monospace;
  font-size:clamp(24px,3vw,40px);
  letter-spacing:-1.5px;
}
.brand p{
  margin-top:4px;
  color:var(--muted);
  font-family:"IBM Plex Mono",monospace;
  font-size:12px;
}
.top-actions{display:flex;gap:6px}

.retro-btn{
  border:2px solid var(--border);
  background:var(--paper);
  color:var(--ink);
  padding:9px 12px;
  cursor:pointer;
  box-shadow:3px 3px 0 var(--shadow);
  font-family:"IBM Plex Mono",monospace;
  font-weight:600;
}
.retro-btn:hover{transform:translate(-1px,-1px);box-shadow:4px 4px 0 var(--shadow)}
.retro-btn:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--shadow)}
.retro-btn.small{width:34px;height:34px;padding:0}
.retro-btn.danger{background:#ffd9df}

.source-tabs{
  display:flex;
  gap:8px;
  padding:14px 2px 12px;
  overflow:auto;
}
.source-tab{
  white-space:nowrap;
  border:2px solid var(--border);
  background:#fff;
  padding:10px 14px;
  box-shadow:3px 3px 0 var(--shadow);
  cursor:pointer;
  font-family:"IBM Plex Mono",monospace;
  font-weight:700;
}
.source-tab.active{background:var(--pink)}

.dashboard{
  display:grid;
  grid-template-columns:230px minmax(0,1fr) 300px;
  gap:18px;
  align-items:start;
}

.window-title{
  min-height:38px;
  padding:8px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background:linear-gradient(90deg,var(--lav2),var(--blue));
  border-bottom:2px solid var(--border);
  font-family:"IBM Plex Mono",monospace;
  font-size:13px;
  font-weight:700;
  text-transform:lowercase;
}

.sidebar{position:sticky;top:14px}
.search-box{padding:12px;border-bottom:1px dashed #b9aec8}
.search-box input{
  width:100%;
  border:2px solid var(--border);
  background:#fffdfd;
  padding:10px;
  outline:none;
}
.search-box input:focus{box-shadow:0 0 0 3px var(--pink)}

.category-list{padding:10px}
.category-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border:0;
  background:transparent;
  color:var(--ink);
  padding:9px 8px;
  text-align:left;
  cursor:pointer;
  border-bottom:1px dotted #d4cadd;
}
.category-btn:hover,.category-btn.active{background:var(--lav2)}
.category-count{
  min-width:24px;
  height:24px;
  display:grid;place-items:center;
  border:1px solid var(--border);
  background:#fff;
  font-family:"IBM Plex Mono",monospace;
  font-size:11px;
}

.tiny-note{
  margin:10px;
  padding:12px;
  border:2px dashed var(--border);
  background:var(--yellow);
  display:grid;
  gap:5px;
  font-size:12px;
}
.tiny-note strong{font-family:"IBM Plex Mono",monospace}

.feed{min-width:0}
.date-banner{
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  background:linear-gradient(135deg,#fff,#fff5fb);
}
.eyebrow{
  font-size:10px;
  letter-spacing:1.5px;
  color:var(--muted);
  font-family:"IBM Plex Mono",monospace;
}
.date-banner h2{
  margin-top:4px;
  font-family:"IBM Plex Mono",monospace;
  font-size:clamp(18px,2vw,27px);
}
.status-pill{
  border:2px solid var(--border);
  padding:8px 10px;
  background:var(--mint);
  font-family:"IBM Plex Mono",monospace;
  font-size:11px;
  white-space:nowrap;
}

.feed-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 2px 10px;
}
.muted{color:var(--muted)}
.news-feed{display:grid;gap:14px}

.news-card{
  background:#fff;
  border:2px solid var(--border);
  box-shadow:4px 4px 0 var(--shadow);
  padding:16px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:14px;
  transition:.15s ease;
}
.news-card:hover{transform:translate(-1px,-1px);box-shadow:5px 5px 0 var(--shadow)}
.news-meta{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  align-items:center;
  margin-bottom:8px;
  font-family:"IBM Plex Mono",monospace;
  font-size:10px;
}
.badge{
  border:1.5px solid var(--border);
  padding:4px 6px;
  background:#fff;
}
.badge.official{background:var(--mint)}
.badge.press{background:var(--blue)}
.badge.category{background:var(--lav2)}
.news-card h3{
  font-size:18px;
  line-height:1.28;
  margin:0 0 7px;
}
.news-card p{
  color:var(--muted);
  line-height:1.5;
  font-size:13px;
}
.news-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
}
.source-chip{
  font-size:11px;
  border:1.5px solid var(--border);
  background:var(--pink);
  padding:5px 7px;
  font-family:"IBM Plex Mono",monospace;
}
.link-btn{
  text-decoration:none;
  color:var(--ink);
  font-weight:700;
  border-bottom:2px solid var(--ink);
  font-size:12px;
}

.right-rail{display:grid;gap:18px}
.panel{overflow:hidden}
.stats{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  padding:12px;
}
.stat-card{
  min-height:92px;
  border:2px solid var(--border);
  background:linear-gradient(135deg,var(--yellow),#fff);
  display:grid;
  place-items:center;
  text-align:center;
  padding:10px;
}
.stat-number{
  font:700 30px "IBM Plex Mono",monospace;
}
.analysis-card{padding:14px}
.analysis-card ol{
  margin:10px 0 0;
  padding-left:20px;
  display:grid;
  gap:8px;
  font-size:13px;
  line-height:1.35;
}
.small-copy{padding:14px;font-size:12px;line-height:1.5}

.empty-state{
  border:2px dashed var(--border);
  background:#fff;
  padding:28px;
  text-align:center;
  color:var(--muted);
}

footer{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:18px;
  color:var(--muted);
  font-family:"IBM Plex Mono",monospace;
  font-size:10px;
}

@media (max-width:1100px){
  .dashboard{grid-template-columns:210px minmax(0,1fr)}
  .right-rail{grid-column:1/-1;grid-template-columns:repeat(3,1fr)}
}

@media (max-width:760px){
  .page-shell{width:min(100% - 18px,1480px)}
  .dashboard{grid-template-columns:1fr}
  .sidebar{position:static}

  .feed,
  .right-rail{
    display:contents;
}

.sidebar{
  order:1;
}

.date-banner{
  order:2;
}

.right-rail > .panel:nth-child(1){
  order:3;
}

.feed-toolbar{
  order:4;
}

.news-feed{
  order:5;
}

.right-rail > .panel:nth-child(2){
  order:6;
}

.right-rail > .panel:nth-child(3){
  order:7;
}

  .top-actions{display:none}
  .date-banner,.feed-toolbar,footer{align-items:flex-start;flex-direction:column}
  .news-card{grid-template-columns:1fr}
  .news-actions{
  flex-direction:row;
  align-items:center;
  justify-content:space-between;
  width:100%;
}
