/* BA News — "VNPAY Light" fintech dashboard.
   One accent (#005baa) locked page-wide; category colors only at tag/rule scale;
   bright #009edb only on the brand square + lead band top rule. */

:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --hair: #e5edf5;

  --navy: #0a2540;
  --body: #425466;
  --muted: #697386;
  --faint: #8898aa;

  --blue: #005baa;
  --blue-hover: #004a8f;
  --blue-tint: rgba(0, 91, 170, 0.08);
  --blue-halo: rgba(0, 91, 170, 0.15);
  --bright: #009edb;

  --c-banking: #005baa;
  --c-fintech: #0e7490;
  --c-digital: #0284c7;
  --c-legal: #b45309;
  --c-career: #be185d;
  --c-jobs: #15803d;
  --c-ai: #6d28d9;

  --shadow: 0 1px 3px rgba(50, 50, 93, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-raise: 0 4px 12px rgba(50, 50, 93, 0.1);

  --radius: 6px;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color 150ms ease-out; }
button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  box-shadow: 0 0 0 4px var(--blue-halo);
}

::selection { background: rgba(0, 91, 170, 0.18); color: var(--navy); }

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--hair);
  transition: box-shadow 150ms ease-out;
}

.topbar.scrolled { box-shadow: var(--shadow); }

.topbar-in {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.brand-ba {
  color: var(--navy);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.brand-sq {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 1.5px;
  background: var(--bright);
}

.brand-news {
  color: var(--blue);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  position: relative;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  height: 56px;
  line-height: 56px;
  white-space: nowrap;
}

.nav a:hover { color: var(--navy); }

.nav a.active { color: var(--blue); }

.nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px; /* sits on the topbar border */
  height: 2px;
  background: var(--blue);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
}

.search {
  width: 240px;
  height: 32px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 13px;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
  appearance: none;
  -webkit-appearance: none;
}

.search::placeholder { color: var(--faint); }

.search:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-halo);
}

.search::-webkit-search-cancel-button { -webkit-appearance: none; }

.stamp {
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- Shared atoms ---------- */

.tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.5;
  transition: filter 150ms ease-out;
}

.tag-banking { color: var(--c-banking); background: rgba(0, 91, 170, 0.08); }
.tag-fintech { color: var(--c-fintech); background: rgba(14, 116, 144, 0.08); }
.tag-digital { color: var(--c-digital); background: rgba(2, 132, 199, 0.08); }
.tag-legal   { color: var(--c-legal);   background: rgba(180, 83, 9, 0.08); }
.tag-career  { color: var(--c-career);  background: rgba(190, 24, 93, 0.08); }
.tag-jobs    { color: var(--c-jobs);    background: rgba(21, 128, 61, 0.08); }
.tag-ai      { color: var(--c-ai);      background: rgba(109, 40, 217, 0.08); }
.tag-multi   { color: var(--muted);     background: rgba(105, 115, 134, 0.08); }

.tag:hover { filter: brightness(0.85); }

.meta {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.meta .t {
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.fav {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex: none;
}

.chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-tint);
  border-radius: 4px;
  padding: 2px 7px;
  transition: background 150ms ease-out, color 150ms ease-out;
}

.chip:hover { background: rgba(0, 91, 170, 0.14); color: var(--blue-hover); }
.chip:active { transform: scale(0.97); }

.cluster-others {
  display: none;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px 12px;
}

.cluster-others.open { display: block; }

.cluster-others a {
  display: block;
  font-size: 12.5px;
  color: var(--body);
  padding: 4px 0;
}

.cluster-others a + a { border-top: 1px solid var(--hair); }

.cluster-others a:hover { color: var(--blue); }

.cluster-others .co-src {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--faint);
  margin-right: 6px;
}

.clamp2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Lead band ---------- */

.leadband {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 28px;
  margin-top: 20px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-top: 2px solid var(--bright);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.leadband:empty { display: none; }

.lead-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}

.lead-title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.lead-title a:hover { color: var(--blue); }

.lead-summary {
  font-size: 14px;
  color: var(--body);
  line-height: 1.6;
}

.lead-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  min-width: 0;
}

.lead-cell {
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
}

.lead-cell:nth-child(odd) { border-right: 1px solid var(--hair); }
.lead-cell:nth-child(-n+2) { border-bottom: 1px solid var(--hair); padding-top: 0; }
.lead-cell:nth-child(n+3) { padding-bottom: 0; }
.lead-cell:nth-child(even) { padding-right: 0; }

.cell-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
}

.cell-title a:hover { color: var(--blue); }
.lead-cell .meta { margin-top: auto; }

/* ---------- Panel grid ---------- */

.panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 0 32px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-top: 2px solid var(--muted);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: box-shadow 150ms ease-out;
}

.panel:hover { box-shadow: var(--shadow-raise); }

.p-banking { border-top-color: var(--c-banking); }
.p-fintech { border-top-color: var(--c-fintech); }
.p-digital { border-top-color: var(--c-digital); }
.p-legal   { border-top-color: var(--c-legal); }
.p-career  { border-top-color: var(--c-career); }
.p-jobs    { border-top-color: var(--c-jobs); }
.p-ai      { border-top-color: var(--c-ai); }

.panel-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 13px 16px 10px;
  border-bottom: 1px solid var(--hair);
}

.panel-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
}

.p-banking .panel-name { color: var(--c-banking); }
.p-fintech .panel-name { color: var(--c-fintech); }
.p-digital .panel-name { color: var(--c-digital); }
.p-legal   .panel-name { color: var(--c-legal); }
.p-career  .panel-name { color: var(--c-career); }
.p-jobs    .panel-name { color: var(--c-jobs); }
.p-ai      .panel-name { color: var(--c-ai); }

.panel-count {
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.panel-all {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.panel-all:hover { color: var(--blue); }

.panel-list { list-style: none; padding: 6px; }

.row {
  display: block;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 150ms ease-out;
}

.row:hover { background: var(--surface-hover); }
.row:active { transform: scale(0.995); }

.row-title {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--navy);
  transition: color 150ms ease-out;
}

.row:hover .row-title { color: var(--blue); }

.row-meta {
  font-size: 11.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-job {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-job .co { font-weight: 600; }

.row-doc { font-weight: 600; color: var(--c-legal); }

.row-cluster { padding: 0 10px 8px; }

/* ---------- Focus view ---------- */

.focus-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 24px 0 16px;
  flex-wrap: wrap;
}

.focus-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.focus-count {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.backlink {
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
}

.backlink:hover { color: var(--blue-hover); text-decoration: underline; }

.entries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 4px 24px;
  margin-bottom: 40px;
}

.entry {
  padding: 18px 0;
  border-bottom: 1px solid var(--hair);
  min-width: 0;
}

.entry .tag { margin-bottom: 8px; }

.entry-title {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
  margin-bottom: 6px;
}

.entry-title a:hover { color: var(--blue); }

.entry-summary {
  font-size: 13.5px;
  color: var(--body);
  line-height: 1.6;
  margin-bottom: 8px;
}

.entry-extra {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* ---------- Flat search results ---------- */

.result-head {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  padding: 20px 0 12px;
}

/* ---------- States ---------- */

.empty {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  margin-bottom: 40px;
  color: var(--body);
  font-size: 14px;
}

.empty .hint {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.error-msg {
  margin-top: 20px;
  margin-bottom: 40px;
  padding: 20px 24px;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--body);
}

@keyframes skpulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.sk {
  background: #eef2f6;
  border-radius: 4px;
  animation: skpulse 1.4s ease-in-out infinite;
}

.sk-line { height: 12px; margin-bottom: 10px; }
.sk-title { height: 20px; margin-bottom: 12px; }

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--hair);
  background: var(--surface);
}

.foot-in {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}

.foot-note {
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- Archive page ---------- */

.arch-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 24px 0 16px;
  flex-wrap: wrap;
}

.arch-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.daypick {
  margin-left: auto;
  height: 32px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 13px;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.daypick:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-halo);
}

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

@media (max-width: 1199px) {
  .panels { grid-template-columns: repeat(2, 1fr); }
  .stamp { display: none; }
}

@media (max-width: 900px) {
  .leadband { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .lead-side { grid-template-rows: auto; }
  .lead-cell { padding: 14px 16px; }
  .lead-cell:nth-child(-n+2) { padding-top: 14px; }
  .lead-cell:nth-child(n+3) { padding-bottom: 14px; }
  .lead-cell:nth-child(even) { padding-right: 16px; }
  .entries { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 760px) {
  .topbar { position: static; }
  .topbar.scrolled { box-shadow: none; }
  .topbar-in {
    height: auto;
    flex-wrap: wrap;
    gap: 0 16px;
    padding-top: 10px;
    padding-bottom: 0;
  }
  .topbar-right { margin-left: auto; }
  .search { width: 150px; }
  .nav {
    order: 3;
    width: 100%;
    height: 44px;
    gap: 16px;
  }
  .nav a { height: 44px; line-height: 44px; }
  .wrap { padding: 0 16px; }
  .topbar-in, .foot-in { padding-left: 16px; padding-right: 16px; }
  .panels { grid-template-columns: 1fr; }
  .panels .panel-list li:nth-child(n+7) { display: none; }
  .leadband { padding: 16px; margin-top: 16px; }
  .lead-side { grid-template-columns: 1fr; }
  .lead-cell:nth-child(odd) { border-right: 0; }
  .lead-cell:nth-child(n) { padding: 12px 0; border-bottom: 1px solid var(--hair); }
  .lead-cell:last-child { border-bottom: 0; padding-bottom: 0; }
  .entries { padding: 0 16px; }
  .foot-in { padding-top: 16px; padding-bottom: 24px; }
}
