/* ==========================================================================
   TrendRadar Workspace Theme
   Design system based on approved concept (/tmp/trendradar-ui-concept-z0e2sujg/index.html)
   Palette: Warm Cream & Purple (Default) | Calm Seafoam & Slate (body[data-theme="calm"])
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  --tr-paper: #faf8f3;
  --tr-surface: #ffffff;
  --tr-sidebar-bg: #f1eee7;
  --tr-ink: #25252b;
  --tr-muted: #6b6873;
  --tr-line: #dedbd4;
  --tr-line-subtle: #edeae2;
  --tr-purple: #5a3fd0;
  --tr-purple-hover: #4730b3;
  --tr-purple-shadow: #3b2990;
  --tr-lilac: #ede7ff;
  --tr-lime: #d5ee9d;
  --tr-selected-bg: #f7f3ff;
  --tr-radar-border: #b5a4ef;
  --tr-sidebar-w: 226px;
  --tr-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tr-radius-sm: 8px;
  --tr-radius-md: 12px;
  --tr-radius-lg: 16px;
  --tr-radius-xl: 20px;
  --tr-radius-pill: 9999px;
  --tr-min-tap: 44px;
}

/* Theme Calm override */
body[data-theme="calm"] {
  --tr-paper: #f5f7f8;
  --tr-sidebar-bg: #eef1f1;
  --tr-purple: #176b59;
  --tr-purple-hover: #115647;
  --tr-purple-shadow: transparent;
  --tr-lilac: #e2f0e9;
  --tr-lime: #dceee5;
  --tr-selected-bg: #f0f8f3;
  --tr-radar-border: #9ec5b6;
}

/* Ensure hidden attribute always wins over display rules */
[hidden] {
  display: none !important;
}

/* --- Base Body & Typography Tokens --- */
body {
  background-color: var(--tr-paper);
  color: var(--tr-ink);
  font-family: var(--tr-font);
  line-height: 1.5;
  min-width: 320px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* High-contrast and accessible focus outlines (min 44px targets) */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.news-card:focus-visible,
.news-filter:focus-visible {
  outline: 3px solid var(--tr-purple) !important;
  outline-offset: 3px !important;
}

/* --- App Shell & Sidebar Layout --- */
.app-shell {
  display: grid;
  grid-template-columns: var(--tr-sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  min-width: 0;
  background-color: var(--tr-paper);
}

.app-sidebar {
  padding: 32px 20px;
  border-right: 1px solid var(--tr-line);
  background: var(--tr-sidebar-bg);
  display: flex;
  flex-direction: column;
  gap: 34px;
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  font-size: 23px;
  letter-spacing: -1px;
  color: var(--tr-ink);
  text-decoration: none;
}

.brand .mark {
  width: 35px;
  height: 35px;
  background: var(--tr-ink);
  color: var(--tr-lime);
  border-radius: var(--tr-radius-md);
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
  user-select: none;
}

.brand-accent {
  color: var(--tr-purple);
}

.sidebar-caption {
  color: var(--tr-muted);
  font-size: 12px;
  margin: 6px 0 0;
}

.sidebar-nav {
  display: grid;
  gap: 7px;
}

.sidebar-nav button,
.sidebar-nav a {
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--tr-radius-md);
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--tr-ink);
  min-height: var(--tr-min-tap);
  padding: 8px 14px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.sidebar-nav button:hover,
.sidebar-nav a:hover {
  background: rgba(37, 37, 43, 0.05);
  border-color: var(--tr-line);
}

.sidebar-nav button.active,
.sidebar-nav a.active {
  background: var(--tr-ink);
  color: #ffffff;
  border-color: var(--tr-ink);
}

.sidebar-nav .navicon {
  width: 22px;
  text-align: center;
  font-size: 17px;
  line-height: 1;
  opacity: 0.9;
}

.sidebar-note {
  margin-top: auto;
  border: 1px solid #cdc8be;
  border-radius: var(--tr-radius-lg);
  padding: 15px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--tr-ink);
}

.sidebar-note strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.35;
}

.sidebar-note p {
  margin: 0;
  color: var(--tr-muted);
  font-size: 12px;
  line-height: 1.45;
}

/* --- App Main & Workspace Header --- */
.app-main {
  min-width: 0;
  padding: 28px 38px 48px;
  box-sizing: border-box;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.workspace-header .crumb {
  font-size: 13px;
  color: var(--tr-muted);
}

.workspace-header .badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  padding: 6px 12px;
  border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius-pill);
  background: var(--tr-surface);
  color: var(--tr-ink);
  font-weight: 500;
}

.workspace-header .badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--tr-purple);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Masthead typography */
.workspace-mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 750;
  color: var(--tr-purple);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.workspace-mast h1 {
  font-size: clamp(28px, 3.2vw, 42px);
  letter-spacing: -1.4px;
  line-height: 1.15;
  margin: 4px 0 6px;
  color: var(--tr-ink);
}

.workspace-mast .muted,
.muted-text {
  color: var(--tr-muted);
  font-size: 14px;
  margin: 0;
}

/* Primary actions */
button.primary,
.button-primary {
  background: var(--tr-purple);
  color: #ffffff;
  border: 1px solid var(--tr-purple);
  border-radius: var(--tr-radius-md);
  font-weight: 650;
  padding: 10px 18px;
  min-height: var(--tr-min-tap);
  box-shadow: 0 3px 0 var(--tr-purple-shadow);
  cursor: pointer;
  box-sizing: border-box;
}

button.primary:hover,
.button-primary:hover {
  background: var(--tr-purple-hover);
  border-color: var(--tr-purple-hover);
}

/* --- News UI Components & Layout --- */
#news-workspace {
  display: block;
  width: 100%;
}

.news-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 18px;
  flex-wrap: wrap;
}

#news-filter-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.news-filter {
  background: transparent;
  border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius-pill);
  font-size: 13px;
  font-weight: 550;
  color: var(--tr-ink);
  padding: 8px 16px;
  min-height: var(--tr-min-tap);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  box-sizing: border-box;
}

.news-filter:hover {
  border-color: var(--tr-purple);
}

.news-filter.active,
.news-filter[aria-pressed="true"] {
  background: var(--tr-ink);
  border-color: var(--tr-ink);
  color: #ffffff;
}

.news-search-box {
  position: relative;
  max-width: 320px;
  width: 100%;
}

#news-search {
  width: 100%;
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
  padding: 10px 14px;
  border-radius: var(--tr-radius-md);
  min-height: var(--tr-min-tap);
  font-size: 14px;
  color: var(--tr-ink);
  box-sizing: border-box;
}

#news-search::placeholder {
  color: var(--tr-muted);
}

/* 2-column report / news layout (>= 1100px) */
.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

.news-listhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--tr-muted);
}

.news-count {
  font-weight: 600;
  color: var(--tr-ink);
}

#news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* News card: accessible button styling */
.news-card {
  display: block;
  text-align: left;
  width: 100%;
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--tr-radius-lg);
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
  position: relative;
  cursor: pointer;
  color: var(--tr-ink);
  text-decoration: none;
  min-height: var(--tr-min-tap);
  box-sizing: border-box;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.news-card:hover {
  border-color: var(--tr-purple);
}

.news-card.is-selected,
.news-card.selected,
.news-card[aria-pressed="true"] {
  border-color: var(--tr-purple);
  box-shadow: inset 4px 0 0 var(--tr-purple);
  background: var(--tr-selected-bg);
}

.news-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--tr-muted);
  margin-bottom: 10px;
}

.news-badge {
  display: inline-block;
  border-radius: 6px;
  padding: 2px 8px;
  background: #e9eddf;
  color: #425027;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.news-badge.purple {
  background: var(--tr-lilac);
  color: var(--tr-purple);
}

.news-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.3px;
  margin: 0 0 8px;
  color: var(--tr-ink);
}

.news-card-desc {
  font-size: 13px;
  color: var(--tr-muted);
  margin: 0 0 10px;
  line-height: 1.5;
}

.news-card-source {
  font-size: 12px;
  color: var(--tr-muted);
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: center;
}

/* News Detail Panel */
.news-detail,
#news-detail {
  border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius-xl);
  background: var(--tr-surface);
  padding: 24px;
  position: sticky;
  top: 20px;
  box-sizing: border-box;
}

.news-detail h2 {
  font-size: 22px;
  letter-spacing: -0.5px;
  line-height: 1.3;
  margin: 14px 0 10px;
  color: var(--tr-ink);
}

.news-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--tr-muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.news-detail-meta .meta-source {
  font-weight: 600;
  color: var(--tr-ink);
}

.news-detail-meta .meta-divider {
  color: var(--tr-line);
  user-select: none;
}

.news-detail-meta .meta-time {
  color: var(--tr-muted);
}

.news-detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 16px;
  padding: 10px 16px;
  background: var(--tr-purple);
  color: #ffffff !important;
  border-radius: var(--tr-radius-md);
  text-decoration: none;
  font-weight: 650;
  font-size: 14px;
  min-height: var(--tr-min-tap);
  box-sizing: border-box;
  box-shadow: 0 3px 0 var(--tr-purple-shadow);
  transition: background-color 0.15s ease;
}

.news-detail-link:hover {
  background: var(--tr-purple-hover);
  text-decoration: none;
}

body[data-theme="calm"] .news-detail-link {
  box-shadow: none;
}

.news-detail p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--tr-ink);
  margin: 10px 0;
}

.news-detail a:not(.news-detail-link) {
  color: var(--tr-purple);
  text-underline-offset: 3px;
}

.news-detail .detail-sources {
  padding: 14px 0;
  margin: 16px 0;
  border-top: 1px solid var(--tr-line);
  border-bottom: 1px solid var(--tr-line);
  font-size: 12px;
  color: var(--tr-ink);
}

.news-detail .detail-sources b {
  display: block;
  margin-bottom: 4px;
}

/* Source library and fieldset container */
fieldset#sources-fields,
.sources-fields {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: block;
  width: 100%;
}

.news-empty,
#news-empty {
  padding: 32px 24px;
  text-align: center;
  background: var(--tr-surface);
  border: 1px dashed var(--tr-line);
  border-radius: var(--tr-radius-lg);
  color: var(--tr-muted);
  margin: 16px 0;
}

/* Pseudo decorative radar container */
.radar-decor {
  height: 140px;
  background: var(--tr-lilac);
  border-radius: var(--tr-radius-md);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  margin: 14px 0;
}

.radar-circle {
  height: 100px;
  width: 100px;
  border: 1px solid var(--tr-radar-border);
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
}

.radar-circle::before {
  content: "";
  position: absolute;
  inset: 15px;
  border: 1px solid var(--tr-radar-border);
  border-radius: 50%;
}

.radar-circle::after {
  content: "";
  position: absolute;
  inset: 30px;
  border: 1px solid var(--tr-radar-border);
  border-radius: 50%;
}

.radar-decor .radar-target {
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  background: var(--tr-lime);
  color: var(--tr-ink);
  border: 2px solid var(--tr-ink);
  border-radius: 8px;
  padding: 3px 10px;
  box-shadow: 3px 3px 0 var(--tr-ink);
}

body[data-theme="calm"] .radar-decor .radar-target {
  box-shadow: none;
}

/* --- Panel & Frame Isolation --- */
/* Prevent iframe in #report from overwhelming news interface */
#report.panel {
  display: flex;
  flex-direction: column;
}

#report-frame {
  width: 100%;
  height: 72vh;
  min-height: 480px;
  max-height: 800px;
  border: 0;
  display: block;
  border-radius: 0 0 var(--tr-radius-md) var(--tr-radius-md);
}

/* Source library panel styling */
#sources.panel,
.panel-sources {
  padding: 24px;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.source-card {
  padding: 18px;
  border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius-lg);
  background: var(--tr-surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.source-card .logo {
  font-weight: 850;
  font-size: 22px;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  color: var(--tr-ink);
}

/* --- Responsive Breakpoints --- */

/* Responsive: Screens under 1100px (tablet / compact desktop) */
@media (max-width: 1099px) {
  .app-shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .app-sidebar {
    padding: 24px 14px;
    gap: 20px;
  }

  .app-main {
    padding: 24px 20px 40px;
  }

  .news-layout {
    grid-template-columns: 1fr;
  }

  .news-detail,
  #news-detail {
    position: static;
    margin-top: 20px;
  }

  .radar-decor {
    height: 110px;
  }

  .news-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .news-search-box {
    max-width: none;
  }
}

/* Responsive: Mobile devices (< 650px) */
@media (max-width: 649px) {
  .app-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 320px;
  }

  .app-sidebar {
    padding: 14px 16px;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--tr-line);
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .sidebar-caption,
  .sidebar-note {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-nav button,
  .sidebar-nav a {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 13px;
    gap: 6px;
    white-space: nowrap;
  }

  .sidebar-nav .navicon {
    width: 16px;
    font-size: 15px;
  }

  .app-main {
    padding: 16px 14px 40px;
  }

  .workspace-mast {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .workspace-mast h1 {
    font-size: 30px;
  }

  .workspace-mast button.primary,
  .workspace-mast .button-primary {
    width: 100%;
  }

  .news-layout {
    gap: 16px;
  }

  .news-card {
    padding: 15px 16px;
  }

  .news-card-title {
    font-size: 16px;
  }

  .news-detail,
  #news-detail {
    padding: 18px 16px;
  }

  #report-frame {
    height: 60vh;
    min-height: 380px;
  }
}

/* Align existing forms and report markup with the workspace shell. */
.app-main{width:100%;max-width:1500px;margin:0 auto;padding-bottom:90px;color:var(--tr-ink)}
.app-sidebar{position:sticky;top:0;height:100vh;align-self:start}
.app-sidebar .caption{font-size:12px;color:var(--tr-muted);margin:8px 0 0}
.app-sidebar .brand strong{font-size:23px;white-space:nowrap}
.app-sidebar .brand{gap:7px}
.app-main .workspace-header{padding:0;background:transparent;border:0;min-height:46px}
#workspace-title{font-size:13px;color:var(--tr-muted);margin-right:auto}
#theme-toggle{font-size:12px;background:transparent;border-color:var(--tr-line)}
.app-main .status{padding:12px 16px;background:transparent;border-color:var(--tr-line);font-size:13px}
.app-main .status p{font-size:12px;color:var(--tr-muted);margin:3px 0 0}
#message:empty{min-height:0;margin:16px 0}
.app-main .panel{background:transparent;border:0;overflow:visible}
.app-main .toolbar{padding:0;margin:24px 0 20px;border:0}
.app-main .toolbar h1{font-size:clamp(32px,3vw,44px);font-weight:800;letter-spacing:-1.4px;line-height:1.15;margin-bottom:10px}
.app-main .toolbar>div:last-child{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
#open-report{font-size:13px;color:var(--tr-purple)}
#news-workspace{padding:0}
.news-toolbar{align-items:flex-end;gap:20px}
.news-toolbar>label{display:grid;gap:7px;flex:0 1 320px;font-size:12px;color:var(--tr-muted)}
#news-search{font-size:14px}
#news-count{font-size:12px;color:var(--tr-muted);margin:0 0 12px}
#news-list{max-height:67vh;overflow-y:auto;padding:1px 7px 4px 1px;scrollbar-width:thin}
.news-card-title{display:block}
.news-card-groups{display:block;font-size:11px;color:var(--tr-purple);margin-top:7px}
.news-card-source{font-size:12px}
.news-detail-title{font-size:25px!important;line-height:1.3;margin:0 0 18px!important}
.news-detail-source{font-size:14px;font-weight:650;margin:14px 0 4px}
.news-detail-published,.news-detail-groups{font-size:12px;color:var(--tr-muted)}
.news-original-link{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--tr-line);border-radius:12px;min-height:44px;width:100%;padding:10px 14px;text-decoration:none;color:var(--tr-purple);margin-top:20px;font-weight:650;font-size:14px}
.news-detail-note{font-size:12px;line-height:1.6;color:var(--tr-muted);border-top:1px solid var(--tr-line);margin-top:20px;padding-top:14px}
#sources.panel{padding:0}
.app-main .section-heading{padding:20px 0 6px}
.app-main .section-heading h1{font-size:32px;letter-spacing:-1px}
.app-main .section-heading p,.app-main .help{color:var(--tr-muted)}
.app-main .card{margin:18px 0;padding:24px;border-color:var(--tr-line);background:var(--tr-surface);border-radius:18px}
.app-main .tracking-layout{padding:0;display:block}
.app-main .tracking-layout>.card{margin:18px 0}
.app-main .save-bar{border-color:var(--tr-line);bottom:16px}
.app-main #history-list,.app-main #trash-list{padding:4px 0 24px}
.app-main .history-row{background:var(--tr-surface);border:1px solid var(--tr-line);border-radius:14px;padding:17px 20px;margin:10px 0}
@media(max-width:1099px){#news-list{max-height:52vh}.app-sidebar .brand strong{font-size:18px}.app-sidebar .brand .mark{width:25px;height:29px}.app-main{padding:24px 20px 100px}}
@media(max-width:649px){.app-sidebar{height:auto;position:static;padding:16px}.app-sidebar .caption{display:none}.app-main{padding:20px 16px 100px}.app-main .toolbar{margin-top:22px}.app-main .toolbar h1{font-size:34px}.news-toolbar>label{flex:auto;width:100%}#news-list{max-height:48vh}.app-main .card{padding:17px}.app-main .section-heading h1{font-size:28px}.app-main .history-row{padding:16px}.app-main .workspace-header{gap:10px}#workspace-title{width:100%;flex-basis:100%}#theme-toggle{flex:1}.app-main .workspace-header .primary{flex:1}.sidebar-nav{scrollbar-width:none;gap:4px}.sidebar-nav button{padding:8px 9px;gap:6px}}
.news-card{flex-shrink:0}
.news-card-meta{flex-wrap:wrap;justify-content:space-between}
.news-toolbar>label{min-width:0}
.app-main #report-time{color:var(--tr-muted)}
#news-detail:empty{display:none}
@media(prefers-reduced-motion:reduce){.news-card,.news-filter{transition:none;scroll-behavior:auto}}
.news-card-meta{margin:13px 0 0}
.news-card-group{background:var(--tr-lilac);color:var(--tr-purple);padding:3px 8px;border-radius:6px;font-size:11px;font-weight:600}
.news-card-published{font-size:11px;color:var(--tr-muted);margin-left:auto}
@media(max-width:649px){.app-sidebar .sidebar-nav{display:flex;flex-wrap:nowrap;overflow-x:auto;margin:0}.app-sidebar .sidebar-nav button{flex:0 0 auto}.app-main .workspace-header{flex-direction:row;align-items:center}}
.app-sidebar{min-width:0;max-width:100%}
.app-sidebar .sidebar-nav{min-width:0;max-width:100%;width:100%}
.news-layout>section{min-width:0}
.news-card-title,.news-detail-title,.news-card-source{overflow-wrap:anywhere}
.app-main input[type=checkbox]{accent-color:var(--tr-purple)}
.app-main .setting-group{border-color:var(--tr-line)}
.app-main .setting-group>summary{background:var(--tr-paper)}
.app-main .setting-item{border-color:var(--tr-line)}
.news-workspace-note{font-size:14px;padding:14px 16px;border:1px solid var(--tr-line);border-radius:12px;background:var(--tr-surface);color:var(--tr-muted)}

/* --- Visual Emphasis Refinements --- */
#run.primary,
button#run.primary {
  background: var(--tr-purple);
  color: #ffffff;
  border: 2px solid var(--tr-purple);
  font-weight: 700;
  min-height: 48px;
  box-shadow: 0 2px 0 var(--tr-purple-shadow);
  border-radius: var(--tr-radius-md);
  padding: 10px 20px;
}
#run.primary:disabled,
button#run.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  border-color: var(--tr-line);
  background: var(--tr-muted);
}
.mast-eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 750;
  color: var(--tr-purple);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.mast-highlight {
  background: var(--tr-lime);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--tr-ink);
}
#report .toolbar h1 {
  font-size: clamp(38px, 4vw, 48px);
  letter-spacing: -1.6px;
  line-height: 1.12;
  margin-bottom: 8px;
}
.news-card {
  border: 1px solid var(--tr-line);
  box-shadow: 0 1px 2px rgba(37, 37, 43, 0.04);
}
.news-card-title {
  color: var(--tr-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.38;
}
.news-card.is-selected,
.news-card.selected,
.news-card[aria-pressed="true"] {
  border: 2px solid var(--tr-purple) !important;
  background: var(--tr-lilac) !important;
  box-shadow: inset 6px 0 0 var(--tr-purple) !important;
}
.news-filter.active,
.news-filter[aria-pressed="true"] {
  background: var(--tr-ink);
  color: #ffffff;
  border-color: var(--tr-ink);
  box-shadow: inset 0 0 0 1px var(--tr-ink);
}
.sidebar-nav button.active,
.sidebar-nav a.active {
  background: var(--tr-ink);
  color: #ffffff;
  border-left: 4px solid var(--tr-lime);
}
#news-detail:not(:empty) {
  border-top: 3px solid var(--tr-purple);
  background: var(--tr-surface);
}
#news-detail:not(:empty)::before {
  content: "ĐANG ĐỌC";
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--tr-purple);
  background: var(--tr-lilac);
  border-radius: var(--tr-radius-pill);
  padding: 3px 9px;
  margin-bottom: 12px;
}
.news-original-link {
  background: var(--tr-purple) !important;
  color: #ffffff !important;
  border: 2px solid var(--tr-purple) !important;
  font-weight: 700 !important;
  min-height: 48px !important;
  box-shadow: 0 2px 0 var(--tr-purple-shadow);
  border-radius: var(--tr-radius-md);
}
.news-original-link:hover {
  background: var(--tr-purple-hover) !important;
  border-color: var(--tr-purple-hover) !important;
}
body[data-theme="calm"] .news-original-link {
  box-shadow: none;
}
.save-bar:has(#save:not(:disabled)) {
  background: var(--tr-lilac);
  border: 2px solid var(--tr-purple);
  box-shadow: 0 4px 18px rgba(90, 63, 208, 0.16);
}
body[data-theme="calm"] .save-bar:has(#save:not(:disabled)) {
  box-shadow: none;
}

.mast-highlight{white-space:nowrap}
.paused-sources{margin:16px 0;border:1px solid var(--tr-line);border-radius:12px;padding:10px 14px;background:var(--tr-paper)}
.paused-sources summary{font-size:14px;color:var(--tr-muted)}
.paused-source-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--tr-line)}
.paused-source-row span{min-width:0;overflow-wrap:anywhere}
.paused-source-row button{flex-shrink:0;font-size:13px;color:var(--tr-purple)}
@media(max-width:440px){.paused-source-row{align-items:flex-start;flex-direction:column}}
