/* ===== Data, BI & AI hubs ===== */

.pane { padding-top: 0; }
.pane[hidden] { display: none; }
.hub { padding-top: 0; }

.hub-lede { max-width: 70ch; }

.footer-fine { margin-top: 8px; font-size: 12px; opacity: 0.7; }

/* --- stats strip --- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.stat-tile b {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.9rem;
  line-height: 1.05;
  color: var(--brand);
}
.stat-tile span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--text-muted); }

/* --- toolbar / filters --- */
.hub-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.search-field { position: relative; flex: 1 1 280px; min-width: 0; }
.search-field svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-faint); pointer-events: none;
}
.search-field input {
  width: 100%;
  padding: 13px 16px 13px 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  font-size: 15px;
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease);
}
.search-field input:focus { border-color: var(--accent-2); outline: none; }
.hub-select {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.hub-select:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.chip-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.fchip {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--dur-fast) var(--ease);
}
.fchip:hover { border-color: var(--accent-2); color: var(--text); }
.fchip[aria-pressed="true"] { background: var(--brand); color: var(--bg); border-color: var(--brand); }
.fchip .n { opacity: 0.65; font-weight: 500; margin-left: 4px; }
.fchip.toggle[aria-pressed="true"] { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }

.result-count { font-size: 13px; color: var(--text-faint); margin: 4px 0 18px; }

.more-wrap { text-align: center; margin-top: 26px; }
.empty-note {
  padding: 36px;
  text-align: center;
  color: var(--text-muted);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

/* --- Databricks update feed --- */
.upd-list { display: grid; gap: 10px; }
.upd-month {
  margin-top: 18px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brand);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.upd-month small { font-family: var(--font-sans); font-size: 12.5px; color: var(--text-faint); font-weight: 500; margin-left: 8px; }
.upd {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.upd-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.upd h4 { margin-top: 8px; font-size: 1.02rem; }
.upd p { margin-top: 5px; font-size: 14px; color: var(--text-muted); line-height: 1.55; }
.upd a { display: inline-block; white-space: nowrap; margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--accent-2); }
.upd a:hover { text-decoration: underline; }

.theme-tag {
  font-size: 11.5px; font-weight: 600; color: var(--text-muted);
  background: var(--surface-2); border-radius: var(--radius-full); padding: 3px 10px;
}
.status {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  border-radius: var(--radius-full); padding: 3px 9px; border: 1px solid transparent;
}
.s-ga { background: rgba(26,143,163,0.14); color: var(--teal-600); }
.s-beta { background: rgba(201,162,75,0.18); color: var(--gold-600); }
.s-preview { border-color: var(--gold-600); color: var(--gold-600); }
.s-update { background: var(--surface-2); color: var(--text-muted); }
.s-frontier { background: rgba(67,56,202,0.14); color: #4338ca; }
.s-retiring { background: rgba(194,84,84,0.14); color: #b94747; }
:root[data-theme="dark"] .s-ga { color: #5cc9dd; }
:root[data-theme="dark"] .s-beta, :root[data-theme="dark"] .s-preview { color: var(--gold-500); }
:root[data-theme="dark"] .s-frontier { color: #a5b4fc; }
:root[data-theme="dark"] .s-retiring { color: #e58a8a; }

/* --- takeaways --- */
.insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.insight-card { padding: 26px; }
.insight-card .num { font-family: var(--font-serif); font-size: 13px; font-weight: 700; color: var(--accent); }
.insight-card h3 { font-size: 1.08rem; margin-top: 8px; line-height: 1.3; }
.insight-card p { margin-top: 10px; font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* --- infographics --- */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.info-card { overflow: hidden; }
.info-card button.thumb { display: block; width: 100%; padding: 0; background: #0f2138; cursor: zoom-in; }
.info-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; transition: transform var(--dur-med) var(--ease); }
.info-card button.thumb:hover img { transform: scale(1.015); }
.info-card figcaption { padding: 18px 22px 20px; }
.info-card figcaption strong { font-family: var(--font-serif); font-size: 1.05rem; color: var(--brand); display: block; }
.info-card figcaption p { margin-top: 6px; font-size: 13.5px; color: var(--text-muted); line-height: 1.55; }
.info-links { margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; }
.info-links a { color: var(--accent-2); }
.info-links a:hover { text-decoration: underline; }

/* --- practitioner topics --- */
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.topic-card { padding: 22px; }
.topic-card .area { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-2); }
.topic-card h3 { font-size: 1rem; margin-top: 8px; line-height: 1.35; }
.topic-card p { margin-top: 8px; font-size: 13.5px; color: var(--text-muted); line-height: 1.55; }
.topic-card .from { margin-top: 12px; font-size: 12px; color: var(--text-faint); }

/* --- notes --- */
.hub-note {
  margin-top: 28px;
  padding: 16px 20px;
  border-left: 3px solid var(--border-strong);
  background: var(--surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-muted);
}
.hub-note a { color: var(--accent-2); font-weight: 600; }
.source-list { display: grid; gap: 10px; margin-top: 8px; }
.source-list a { color: var(--accent-2); font-weight: 600; }
.source-list a:hover { text-decoration: underline; }

/* --- AI tool cards --- */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-card { padding: 20px 22px; display: flex; flex-direction: column; }
.tool-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tool-card h4 { font-size: 1.02rem; line-height: 1.3; word-break: break-word; }
.cat-tag {
  flex-shrink: 0; font-size: 10.5px; font-weight: 700; color: var(--accent-2);
  background: var(--surface-2); border-radius: var(--radius-full); padding: 3px 9px; white-space: nowrap;
}
.tool-card p { margin-top: 8px; font-size: 13.5px; color: var(--text-muted); line-height: 1.55; flex: 1; }
.tool-badges { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.badge-mini {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  border-radius: var(--radius-full); padding: 2px 8px;
}
.b-oss { background: rgba(67,56,202,0.14); color: #4338ca; }
:root[data-theme="dark"] .b-oss { color: #a5b4fc; }
.b-new { background: rgba(26,143,163,0.14); color: var(--teal-600); }
:root[data-theme="dark"] .b-new { color: #5cc9dd; }
.b-promo { background: var(--surface-2); color: var(--text-faint); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 14px; font-size: 12.5px; font-weight: 700; }
.tool-actions a, .tool-actions button { color: var(--accent-2); font-size: 12.5px; font-weight: 700; padding: 0; }
.tool-actions a:hover, .tool-actions button:hover { text-decoration: underline; }
.tool-actions .insight-btn { margin-left: auto; color: var(--text-muted); }
.tool-insight {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--text-muted);
}
.tool-insight h5 { font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.tool-insight .row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mini-chip {
  padding: 4px 11px; border-radius: var(--radius-full); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 600;
}
.mini-chip:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* --- AI insights panel --- */
.insight-cols { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 22px; }
.panel-card { padding: 26px; }
.panel-card h3 { font-size: 1.1rem; }
.panel-card .sub { margin-top: 4px; font-size: 13px; color: var(--text-muted); }
.bar-row { display: grid; grid-template-columns: 190px 1fr 40px; gap: 12px; align-items: center; margin-top: 12px; font-size: 13.5px; }
.bar-row button { text-align: left; color: var(--text); font-weight: 600; }
.bar-row button:hover { color: var(--accent-2); }
.bar-track { height: 12px; background: var(--surface-2); border-radius: var(--radius-full); overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold-500), var(--teal-500)); border-radius: var(--radius-full); }
.bar-row .v { text-align: right; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.kw-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.kw { padding: 6px 12px; border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text); }
.kw:hover { border-color: var(--accent-2); color: var(--accent-2); }
.kw small { color: var(--text-faint); margin-left: 5px; font-weight: 500; }
.fact-list { display: grid; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--text-muted); line-height: 1.55; }
.fact-list b { color: var(--text); }
.check-list { display: grid; gap: 8px; margin-top: 12px; }
.check-list li { position: relative; padding-left: 22px; font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-2); }

/* --- shortlist & issues --- */
.pick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pick-card { padding: 22px 24px; }
.pick-card h3 { font-size: 1.05rem; }
.pick-card p { margin-top: 8px; font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.pick-card a { display: inline-block; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--accent-2); }
.issue-list { display: grid; gap: 10px; }
.issue { display: grid; grid-template-columns: 110px 1fr auto; gap: 16px; align-items: start; padding: 16px 20px; }
.issue .d { font-weight: 700; color: var(--brand); font-size: 14px; line-height: 1.3; }
.issue .d small { display: block; font-weight: 500; color: var(--text-faint); font-size: 12px; margin-top: 2px; }
.issue .tools { display: flex; flex-wrap: wrap; gap: 6px; }
.issue a { font-size: 12.5px; font-weight: 700; color: var(--accent-2); white-space: nowrap; }
.issue a:hover { text-decoration: underline; }

/* --- wide lightbox variant (infographics) --- */
.lightbox-box.wide { max-width: min(1180px, 96vw); padding: 22px 22px 18px; }
.lightbox-box.wide .lightbox-img {
  width: 100%; height: auto; max-height: 72vh; object-fit: contain;
  padding: 0; border: 0; background: transparent; border-radius: var(--radius-sm);
}

/* --- responsive --- */
@media (max-width: 1080px) {
  .insight-grid, .topic-grid, .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .insight-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .insight-grid, .topic-grid, .tool-grid, .info-grid, .pick-grid { grid-template-columns: 1fr; }
  .upd { padding: 16px; }
  .bar-row { grid-template-columns: 1fr 40px; }
  .bar-row .bar-track { grid-column: 1 / -1; order: 3; }
  .issue { grid-template-columns: 1fr; gap: 8px; }
}

html { scroll-padding-top: calc(var(--nav-h) + 12px); }
