/* FeedbackHut shared styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #ffffff;
    --surface: #f8f9fb;
    --raised: #eef0f4;
    --border: #e0e2e8;
    --text: #2a2a32;
    --text-bright: #111118;
    --text-dim: #5a5a6e;
    --text-faint: #8a8a9a;
    --blue: #2563EB;
    --green: #059669;
    --red: #dc2626;
    --amber: #d97706;
    --purple: #7c3aed;
    --sans: 'Inter', -apple-system, system-ui, sans-serif;
    --mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
}

body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* ===== HEADER ===== */
header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 16px 0; }
header .wrap { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--text-bright); text-decoration: none; }
.logo b { color: var(--blue); }
.tagline { font-size: 13px; color: var(--text-faint); margin-top: 2px; }
header .meta { font-family: var(--mono); font-size: 11px; color: var(--text-faint); text-align: right; }
.back { font-family: var(--mono); font-size: 12px; color: var(--text-dim); text-decoration: none; }
.back:hover { color: var(--blue); }

/* ===== SECTIONS ===== */
main { padding: 32px 0 64px; }
.section-title { font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--text-faint); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.section + .section { margin-top: 48px; }

/* ===== SEVERITY BADGES ===== */
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; }
.badge .pip { width: 6px; height: 6px; border-radius: 50%; }
.badge.ship-stopper  { background: rgba(220,38,38,0.1); color: var(--red); }
.badge.heads-up      { background: rgba(217,119,6,0.1); color: var(--amber); }
.badge.worth-knowing { background: rgba(37,99,235,0.1); color: var(--blue); }
.badge.background    { background: rgba(90,90,110,0.1); color: var(--text-dim); }
.badge.ship-stopper .pip  { background: var(--red); }
.badge.heads-up .pip      { background: var(--amber); }
.badge.worth-knowing .pip { background: var(--blue); }
.badge.background .pip    { background: var(--text-faint); }

.cat { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-faint); background: var(--raised); padding: 3px 8px; border-radius: 4px; }
.sources-label { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.timestamp { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

/* ===== LEAD STORY ===== */
.lead { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px 32px; }
.lead .badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.lead h1 { font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--text-bright); margin-bottom: 14px; }
.lead h1 a { color: inherit; text-decoration: none; }
.lead h1 a:hover { color: var(--blue); }
.lead .body { font-size: 15px; line-height: 1.75; color: var(--text); margin-bottom: 16px; }
.lead .impact { font-size: 14px; line-height: 1.7; color: var(--text-dim); background: var(--raised); border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0; padding: 14px 18px; margin-bottom: 20px; }
.lead .full-link { font-family: var(--mono); font-size: 11px; color: var(--blue); text-decoration: none; margin-left: 4px; }
.lead .full-link:hover { text-decoration: underline; }

/* ===== SECONDARY LEADS ===== */
.lead-secondary-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
a.lead-secondary { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px 22px; text-decoration: none; color: inherit; transition: border-color 0.15s; }
a.lead-secondary:hover { border-color: var(--blue); }
a.lead-secondary .badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
a.lead-secondary h2 { font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--text-bright); margin-bottom: 8px; }
.lead-secondary-summary { font-size: 13px; line-height: 1.6; color: var(--text-dim); margin-bottom: 8px; }
.lead-secondary-meta { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

/* ===== SOURCE BADGES ===== */
.source-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.source-badges-label { font-family: var(--mono); font-size: 11px; color: var(--text-faint); margin-right: 4px; }
a.source-pill { font-family: var(--mono); font-size: 10px; color: var(--text-dim); background: var(--surface); border: 1px solid var(--border); padding: 3px 8px; border-radius: 100px; text-decoration: none; transition: 0.15s; }
a.source-pill:hover { color: var(--blue); border-color: var(--blue); }

/* ===== FOOTER ===== */
footer { border-top: 1px solid var(--border); padding: 32px 0; text-align: center; font-size: 13px; color: var(--text-faint); }

/* ===== FILTER BAR ===== */
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.filters button { font-family: var(--mono); font-size: 11px; padding: 6px 14px; border-radius: 100px; border: 1px solid var(--border); background: none; color: var(--text-faint); cursor: pointer; transition: 0.15s; }
.filters button:hover { color: var(--text); border-color: #444; }
.filters button.on, .filters button[aria-pressed="true"] { background: rgba(37,99,235,0.08); border-color: var(--blue); color: var(--blue); }

/* ===== STORY BOARD ===== */
a.board-item { display: flex; align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--border); gap: 12px; transition: background 0.1s; text-decoration: none; color: inherit; }
a.board-item:hover { background: var(--raised); border-radius: 8px; }
.board-item .rank { font-family: var(--mono); font-size: 13px; color: var(--text-faint); width: 28px; text-align: center; flex-shrink: 0; }
.board-item .title { flex: 1; font-size: 14px; font-weight: 500; color: var(--text-bright); line-height: 1.4; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-item .severity-col { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.board-item .sev-pill { font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; padding: 3px 8px; border-radius: 4px; white-space: nowrap; }
.sev-pill.ship-stopper  { background: rgba(220,38,38,0.1); color: var(--red); }
.sev-pill.heads-up      { background: rgba(217,119,6,0.1); color: var(--amber); }
.sev-pill.worth-knowing { background: rgba(37,99,235,0.1); color: var(--blue); }
.sev-pill.background    { background: rgba(90,90,110,0.08); color: var(--text-faint); }
.board-item .board-cat { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-faint); width: 120px; text-align: right; flex-shrink: 0; }

/* ===== STORY CARDS ===== */
.cards { display: flex; flex-direction: column; gap: 8px; }
a.card { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px 22px; gap: 20px; transition: border-color 0.15s; text-decoration: none; color: inherit; }
a.card:hover { border-color: #bbb; }
.card .card-body { flex: 1; min-width: 0; }
.card .card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.card h3 { font-size: 15px; font-weight: 600; color: var(--text-bright); line-height: 1.4; margin-bottom: 4px; }
.card .desc { font-size: 13px; color: var(--text-dim); line-height: 1.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .card-severity { flex-shrink: 0; text-align: center; }
.card .card-severity .sev-label { font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; }
.card .card-sources { font-family: var(--mono); font-size: 10px; color: var(--text-faint); margin-top: 6px; }

/* ===== STORY PAGE ===== */
.story-wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }
article { padding: 40px 0 64px; }
.story-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
article h1 { font-size: 28px; font-weight: 700; line-height: 1.3; color: var(--text-bright); margin-bottom: 24px; }
.story-section { margin-bottom: 32px; }
.story-section-label { font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--text-faint); margin-bottom: 12px; }
.story-section p { font-size: 16px; line-height: 1.8; color: var(--text); }
.impact-box { font-size: 15px; line-height: 1.75; color: var(--text-dim); background: var(--surface); border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0; padding: 16px 20px; }
.takeaway-box { font-size: 15px; line-height: 1.75; color: var(--text); background: rgba(5,150,105,0.06); border-left: 3px solid var(--green); border-radius: 0 8px 8px 0; padding: 16px 20px; }

/* ===== SOURCE LIST ===== */
.source-list { list-style: none; }
.source-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.source-list li:last-child { border-bottom: none; }
.source-list a { font-size: 14px; font-weight: 500; color: var(--text-bright); text-decoration: none; line-height: 1.4; }
.source-list a:hover { color: var(--blue); }
.source-list .source-origin { font-family: var(--mono); font-size: 11px; color: var(--text-faint); margin-top: 2px; }

/* ===== RELATED ===== */
.related-list { list-style: none; }
.related-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.related-list li:last-child { border-bottom: none; }
.related-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.related-list a:hover .related-title { color: var(--blue); }
.related-title { font-size: 14px; font-weight: 500; color: var(--text-bright); line-height: 1.4; transition: color 0.1s; }
.related-sev { font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; flex-shrink: 0; padding: 3px 8px; border-radius: 4px; }

/* ===== SHARE BUTTONS ===== */
.share-bar { display: flex; gap: 8px; align-items: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.share-bar-label { font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); margin-right: 4px; }
.share-btn { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); text-decoration: none; cursor: pointer; transition: 0.15s; }
.share-btn:hover { border-color: var(--text-dim); color: var(--text-bright); }
.share-btn.copied { border-color: var(--green); color: var(--green); }

/* ===== SHOW ALL BUTTON ===== */
.show-all-wrap { text-align: center; margin-top: 16px; }
.show-all-btn { font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 10px 28px; border-radius: 100px; border: 1px solid var(--border); background: none; color: var(--text-dim); cursor: pointer; transition: 0.15s; }
.show-all-btn:hover { border-color: var(--blue); color: var(--blue); }

/* ===== SPONSOR BAR ===== */
.sponsor-bar { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 20px; margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sponsor-bar-text { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.sponsor-bar a { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--blue); text-decoration: none; padding: 5px 14px; border: 1px solid var(--blue); border-radius: 100px; transition: 0.15s; }
.sponsor-bar a:hover { background: var(--blue); color: #fff; }

/* ===== DARK MODE TOGGLE ===== */
.theme-toggle { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; cursor: pointer; font-size: 16px; line-height: 1; color: var(--text-dim); transition: 0.15s; }
.theme-toggle:hover { border-color: var(--text-dim); }

/* ===== SPARKLINE TIMELINE ===== */
.sparkline-wrap { margin-top: 12px; }
.sparkline { width: 100%; height: 60px; display: block; }
.sparkline-dot { opacity: 0; transition: opacity 0.15s; cursor: pointer; }
.sparkline:hover .sparkline-dot { opacity: 1; }
.sparkline-labels { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--text-faint); margin-top: 6px; }

/* ===== ARCHIVE ===== */
.archive-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.archive-nav a { font-family: var(--mono); font-size: 12px; padding: 6px 14px; border-radius: 100px; border: 1px solid var(--border); color: var(--text-dim); text-decoration: none; transition: 0.15s; }
.archive-nav a:hover { border-color: var(--blue); color: var(--blue); }
.archive-day { margin-bottom: 40px; }
.archive-day-title { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* ===== CATEGORY NAV ===== */
.category-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.category-nav a { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; padding: 6px 14px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); text-decoration: none; transition: all 0.15s; }
.category-nav a:hover { border-color: var(--blue); color: var(--blue); }
.category-nav a.category-nav-active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ===== CATEGORY HEADER ===== */
.category-header { margin-bottom: 32px; }
.category-header h1 { font-size: 24px; margin-bottom: 8px; }
.category-header .category-meta { font-family: var(--mono); font-size: 12px; color: var(--text-faint); margin-bottom: 12px; }
.category-header .category-desc { font-size: 14px; color: var(--text-dim); line-height: 1.6; max-width: 640px; }
.category-rss { font-family: var(--mono); font-size: 11px; color: var(--text-faint); text-decoration: none; margin-left: 12px; }
.category-rss:hover { color: var(--blue); }

/* ===== WEEKLY ROUNDUP ===== */
.week-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; font-family: var(--mono); font-size: 12px; }
.week-nav a { color: var(--blue); text-decoration: none; }
.week-nav a:hover { text-decoration: underline; }
.week-glance { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 32px; }
.week-glance-item { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.week-glance-item .cat-name { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); margin-bottom: 4px; }
.week-glance-item .cat-count { font-size: 28px; font-weight: 700; color: var(--text-bright); }
.week-top-story { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.week-top-story h3 { font-size: 16px; margin-bottom: 8px; }
.week-top-story h3 a { color: var(--text-bright); text-decoration: none; }
.week-top-story h3 a:hover { color: var(--blue); }
.week-top-story .week-story-body { font-size: 14px; color: var(--text-dim); line-height: 1.6; margin-bottom: 8px; }
.week-top-story .week-story-meta { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

/* ===== EMPTY ===== */
.empty { text-align: center; padding: 80px 20px; color: var(--text-dim); }
.empty h2 { font-size: 20px; margin-bottom: 8px; }
.empty p { font-size: 14px; color: var(--text-faint); }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .wrap, .story-wrap { padding: 0 16px; }
    .lead { padding: 20px; }
    .lead h1 { font-size: 20px; }
    .lead-secondary-row { grid-template-columns: 1fr; }
    a.lead-secondary h2 { font-size: 15px; }
    article h1 { font-size: 22px; }
    .board-item .board-cat { display: none; }
    .board-item .title { font-size: 13px; }
    .card { padding: 14px 16px; gap: 14px; }
    .card .desc { display: none; }
    header .wrap { flex-direction: column; align-items: flex-start; gap: 4px; }
    .share-bar { flex-wrap: wrap; }
    .sponsor-bar { flex-direction: column; text-align: center; }
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
    --bg: #1a1a22;
    --surface: #22222c;
    --raised: #2a2a36;
    --border: #333340;
    --text: #d0d0d8;
    --text-bright: #eeeef2;
    --text-dim: #9090a0;
    --text-faint: #606070;
}
[data-theme="dark"] header { background: rgba(26,26,34,0.92); }
[data-theme="dark"] a.card:hover { border-color: #555; }
[data-theme="dark"] a.board-item:hover { background: var(--raised); }
