/* Daily logistics intelligence — compact enough for a morning scan, with a
   stronger editorial hierarchy than the operational tables elsewhere. */

.news-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
  margin: 2px 0 16px;
}
.news-heading h1 { margin: 0; font-size: 29px; line-height: 1.1; letter-spacing: -.035em; }
.news-heading p { margin: 5px 0 0; color: var(--ink-2); }
.news-heading-actions { display: flex; align-items: center; gap: 12px; }
.news-updated { color: var(--ink-3); font-size: 12px; text-align: right; }

.news-alert {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--orange) 30%, var(--line));
  border-radius: 9px;
  background: var(--orange-bg);
  color: var(--orange);
  font-size: 12.5px;
}
.news-alert.error { border-color: color-mix(in srgb, var(--red) 35%, var(--line)); background: var(--red-bg); color: var(--red); }

.news-role-switcher {
  display: grid;
  grid-template-columns: minmax(205px, .72fr) minmax(320px, 1.7fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent-soft) 34%, var(--panel));
  box-shadow: var(--shadow);
}
.news-role-switcher label > span,
.news-role-status > span {
  display: block;
  margin: 0 0 4px 1px;
  color: var(--ink-3);
  font-size:10.5px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.news-role-switcher select {
  width: 100%;
  height: 36px;
  padding: 0 34px 0 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
}
.news-role-switcher select:focus { outline: 3px solid color-mix(in srgb, var(--accent) 24%, transparent); border-color: var(--accent); }
.news-role-copy { min-width: 0; padding-left: 16px; border-left: 1px solid color-mix(in srgb, var(--accent) 23%, var(--line)); }
.news-role-copy strong { display: block; color: var(--ink); font-size: 14px; letter-spacing: -.01em; }
.news-role-copy span { display: block; max-width: 760px; margin-top: 3px; color: var(--ink-2); font-size: 11.5px; line-height: 1.42; }
.news-role-status { min-width: 128px; text-align: right; }
.news-role-status b { display: block; color: var(--accent); font-size: 11.5px; }

.news-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.news-kpi {
  appearance: none;
  position: relative;
  min-height: 88px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  text-align: left;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.news-kpi:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); box-shadow: 0 7px 20px rgba(20, 30, 44, .09); }
.news-kpi:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.news-kpi.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 70%, var(--panel)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent), var(--shadow); }
.news-kpi span { display: block; color: var(--ink-3); font-size: 10.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.news-kpi strong { display: block; margin-top: 4px; font-size: 25px; line-height: 1.1; letter-spacing: -.04em; }
.news-kpi small { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; color: var(--ink-2); font-size: 11.5px; }
.news-kpi small i { color: var(--accent); font-style: normal; font-weight: 750; white-space: nowrap; }
.news-kpi.active small i { color: var(--green); }
.news-kpi.danger strong { color: var(--red); }
.news-kpi.local strong { color: var(--accent); }

.news-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(270px, .75fr);
  gap: 12px;
  margin-bottom: 12px;
}
.news-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.news-panel > header { padding: 13px 15px 10px; border-bottom: 1px solid var(--line-2); }
.news-panel h2 { margin: 0; font-size: 14px; }
.news-panel header p { margin: 2px 0 0; color: var(--ink-3); font-size: 11.5px; }

.news-priority {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(255px, .8fr);
  min-height: 292px;
}
.news-priority-card {
  position: relative;
  min-width: 0;
  background: var(--panel);
}
.news-priority-lead { display: grid; grid-template-columns: minmax(220px, 1.05fr) minmax(210px, .95fr); }
.news-priority-stack { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); border-left: 1px solid var(--line-2); }
.news-priority-secondary { display: grid; grid-template-columns: 112px minmax(0, 1fr); min-height: 0; }
.news-priority-secondary + .news-priority-secondary { border-top: 1px solid var(--line-2); }
.news-priority-body { min-width: 0; padding: 15px; }
.news-priority-lead .news-priority-body { display: flex; flex-direction: column; justify-content: center; padding: 19px; }
.news-priority-secondary .news-priority-body { padding: 13px; }
.news-priority-top { display: flex; align-items: center; gap: 8px; }
.news-priority-top .news-topic { margin-left: auto; }
.news-priority-card h3 { margin: 9px 0 7px; font-size: 14px; line-height: 1.34; }
.news-priority-lead h3 { font-size: 18px; line-height: 1.3; letter-spacing: -.018em; }
.news-priority-secondary h3 { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; margin-top: 8px; font-size: 13px; }
.news-priority-card h3 a { color: var(--ink); text-decoration: none; }
.news-priority-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.news-priority-meta { color: var(--ink-3); font-size: 11px; }
.news-priority-meta a { float: right; color: var(--accent); font-weight: 750; text-decoration: none; }
.news-priority-action { margin: 4px 0 15px; color: var(--ink-2); font-size: 12px; line-height: 1.45; }

.news-impact, .news-topic {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.news-impact { padding: 5px 7px; }
.news-impact.high { background: var(--red-bg); color: var(--red); }
.news-impact.watch { background: var(--orange-bg); color: var(--orange); }
.news-impact.briefing { background: var(--grey-bg); color: var(--slate); }
.news-topic { padding: 0; color: var(--ink-3); }

.news-mix { padding: 15px; }
.news-mix-total { appearance: none; display: flex; align-items: baseline; justify-content: space-between; width: 100%; gap: 12px; margin: 0 0 10px; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.news-mix-total strong { font-size: 23px; letter-spacing: -.04em; }
.news-mix-total span { color: var(--ink-3); font-size: 11px; }
.news-mix-total span i { margin-left: 5px; color: var(--accent); font-style: normal; font-weight: 750; }
.news-mix-total:hover strong, .news-mix-total:hover span i { color: var(--accent); }
.news-mix-total:focus-visible, .news-mix-row:focus-visible, .news-mix-bar button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.news-mix-bar { display: flex; height: 11px; overflow: hidden; border-radius: 999px; background: var(--line-2); }
.news-mix-bar button { appearance: none; position: relative; min-width: 2px; height: 100%; padding: 0; border: 0; cursor: pointer; transition: filter .15s ease, box-shadow .15s ease; }
.news-mix-bar button:hover { filter: brightness(1.18); z-index: 1; }
.news-mix-bar button.active { box-shadow: inset 0 0 0 2px var(--panel), inset 0 0 0 4px var(--ink); z-index: 2; }
.news-mix-bar .customs_trade, .news-mix-dot.customs_trade { background: #8b5cf6; }
.news-mix-bar .canada_rail, .news-mix-dot.canada_rail { background: var(--accent); }
.news-mix-bar .ports_vessels, .news-mix-dot.ports_vessels { background: #16a2a2; }
.news-mix-bar .supply_chain, .news-mix-dot.supply_chain { background: #e69a22; }
.news-mix-bar .procurement_pricing, .news-mix-dot.procurement_pricing { background: #c47724; }
.news-mix-bar .finance_economy, .news-mix-dot.finance_economy { background: #6574c4; }
.news-mix-bar .customers_sales, .news-mix-dot.customers_sales { background: #d85d89; }
.news-mix-bar .warehouse_fleet, .news-mix-dot.warehouse_fleet { background: #4c8d63; }
.news-mix-bar .product_compliance, .news-mix-dot.product_compliance { background: #7b6bc9; }
.news-mix-bar .technology_business, .news-mix-dot.technology_business { background: #4b7187; }
.news-mix-legend { display: grid; gap: 7px; margin-top: 13px; }
.news-mix-row { appearance: none; display: grid; grid-template-columns: 9px 1fr auto; align-items: center; width: 100%; gap: 7px; margin: -2px 0; padding: 5px 6px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font: inherit; font-size: 11.5px; text-align: left; cursor: pointer; transition: background .15s ease, color .15s ease; }
.news-mix-row:hover { background: var(--panel-2); color: var(--ink); }
.news-mix-row.active { background: var(--accent-soft); color: var(--ink); }
.news-mix-dot { width: 8px; height: 8px; border-radius: 50%; }
.news-mix-row b { display: flex; align-items: center; gap: 5px; color: var(--ink); }
.news-mix-row b i { color: var(--accent); font-style: normal; }
.news-mix-row.active b i { color: var(--green); }

.news-toolbar {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(150px, .7fr)) auto;
  align-items: end;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.news-toolbar label { min-width: 0; }
.news-toolbar label > span { display: block; margin: 0 0 4px 1px; color: var(--ink-3); font-size:10.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.news-toolbar input, .news-toolbar select {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  padding: 0 9px;
}
.news-toolbar input:focus, .news-toolbar select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 42%, transparent); border-color: var(--accent); }
.news-toolbar .btn { height: 34px; padding: 0 11px; }
.news-toolbar .btn:disabled { opacity: .48; cursor: not-allowed; }
.news-result-line { display: flex; justify-content: space-between; gap: 14px; margin: 10px 2px 7px; color: var(--ink-3); font-size: 11.5px; }
.news-result-line #newsCount { color: var(--ink-2); font-weight: 650; }

.news-feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.news-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.news-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 34%, var(--line)); box-shadow: 0 9px 25px rgba(20, 30, 44, .09); }
.news-card-body { display: flex; min-width: 0; height: 100%; flex-direction: column; padding: 14px 15px 13px; }
.news-card-top { display: flex; align-items: center; gap: 8px; }
.news-card-top .news-topic { margin-left: auto; }
.news-card h3 { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; margin: 10px 0 6px; font-size: 15px; line-height: 1.34; }
.news-card h3 a { color: var(--ink); text-decoration: none; }
.news-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.news-action-lens { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; margin: 4px 0 0; padding-left: 9px; border-left: 2px solid var(--line); color: var(--ink-2); font-size: 11.5px; line-height: 1.42; }
.news-card.high .news-action-lens { border-left-color: var(--red); }
.news-card.watch .news-action-lens { border-left-color: var(--orange); }
.news-action-lens b { display: block; color: var(--ink); font-size:10px; letter-spacing: .06em; text-transform: uppercase; }
.news-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; color: var(--ink-3); font-size: 11px; }
.news-card-footer a { color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.news-card-footer a:hover { text-decoration: underline; }

.news-visual { position: relative; isolation: isolate; overflow: hidden; background: #dfe8ed; }
.news-visual::after { content: ''; position: absolute; z-index: -1; inset: 0; opacity: .5; background: radial-gradient(circle at 76% 20%, rgba(255,255,255,.38) 0 7%, transparent 7.5%), linear-gradient(145deg, transparent 48%, rgba(255,255,255,.15) 49% 52%, transparent 53%); }
.news-visual img { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.news-card:hover .news-visual img, .news-priority-card:hover .news-visual img { transform: scale(1.025); }
.news-visual-fallback { position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 13px; color: #fff; background: linear-gradient(155deg, #1b7494, #10465e); }
.news-visual-fallback span { font-size: 12px; font-weight: 800; }
.news-visual-fallback b { margin-top: 2px; opacity: .7; font-size:10px; letter-spacing: .09em; text-transform: uppercase; }
.news-visual.customs_trade .news-visual-fallback { background: linear-gradient(155deg, #8b5cf6, #4c328c); }
.news-visual.canada_rail .news-visual-fallback { background: linear-gradient(155deg, #207aa4, #164b75); }
.news-visual.ports_vessels .news-visual-fallback { background: linear-gradient(155deg, #24a5a3, #116473); }
.news-visual.supply_chain .news-visual-fallback { background: linear-gradient(155deg, #e8a02a, #9d6310); }
.news-visual.procurement_pricing .news-visual-fallback { background: linear-gradient(155deg, #cc842e, #7d4614); }
.news-visual.finance_economy .news-visual-fallback { background: linear-gradient(155deg, #7583cf, #3e4d8e); }
.news-visual.customers_sales .news-visual-fallback { background: linear-gradient(155deg, #dc6a95, #8f3157); }
.news-visual.warehouse_fleet .news-visual-fallback { background: linear-gradient(155deg, #5b9c70, #2f6040); }
.news-visual.product_compliance .news-visual-fallback { background: linear-gradient(155deg, #8c7bd6, #4f3c91); }
.news-visual.technology_business .news-visual-fallback { background: linear-gradient(155deg, #5e8194, #2e4e61); }
.news-visual-lead { min-height: 292px; }
.news-visual-secondary { min-height: 100%; }
.news-visual-card { aspect-ratio: 16 / 8.5; border-bottom: 1px solid var(--line-2); }
.news-visual.image-failed img { display: none; }

.news-load-more { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0 4px; color: var(--ink-3); font-size: 11.5px; }
.news-load-more .btn { min-width: 122px; }

.news-empty, .news-loading { grid-column: 1 / -1; padding: 42px 18px; border: 1px dashed var(--line); border-radius: 10px; color: var(--ink-3); text-align: center; }
.news-loading::before { content: ''; display: inline-block; width: 13px; height: 13px; margin-right: 8px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; vertical-align: -2px; animation: news-spin .8s linear infinite; }
@keyframes news-spin { to { transform: rotate(360deg); } }

.news-sources { margin-top: 12px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 11.5px; }
.news-sources summary { width: fit-content; padding: 11px 2px; color: var(--ink-3); cursor: pointer; }
.news-source-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding-bottom: 12px; }
.news-source-status { padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.news-source-status b { display: block; color: var(--ink); font-size: 11px; }
.news-source-status span { color: var(--green); }
.news-source-status.failed span { color: var(--red); }

@media (max-width: 1050px) {
  .news-role-switcher { grid-template-columns: minmax(190px, .8fr) minmax(280px, 1.4fr); }
  .news-role-status { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding-top: 7px; border-top: 1px solid var(--line-2); text-align: left; }
  .news-role-status > span { margin: 0; }
  .news-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-toolbar .btn { width: fit-content; }
  .news-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .news-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .news-heading-actions { width: 100%; justify-content: space-between; }
  .news-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-role-switcher { grid-template-columns: 1fr; gap: 10px; }
  .news-role-copy { padding: 9px 0 0; border-top: 1px solid color-mix(in srgb, var(--accent) 23%, var(--line)); border-left: 0; }
  .news-role-status { grid-column: auto; }
  .news-overview-grid, .news-feed { grid-template-columns: 1fr; }
  .news-priority { grid-template-columns: 1fr; }
  .news-priority-lead { grid-template-columns: 1fr; }
  .news-priority-stack { border-top: 1px solid var(--line-2); border-left: 0; }
  .news-priority-secondary { grid-template-columns: 116px minmax(0, 1fr); }
  .news-visual-lead { min-height: 190px; }
  .news-priority-lead .news-priority-body { padding: 16px; }
  .news-toolbar { grid-template-columns: 1fr; }
  .news-result-line { align-items: flex-start; flex-direction: column; gap: 2px; }
}
@media (max-width: 430px) {
  .news-kpi small { align-items: flex-start; flex-direction: column; gap: 2px; }
  .news-kpi small i { align-self: flex-start; }
  .news-priority-secondary { grid-template-columns: 98px minmax(0, 1fr); }
  .news-priority-secondary .news-topic { display: none; }
  .news-card h3 { font-size: 14px; }
}
