:root {
  --blue: #00AEEF;
  --blue-dark: #0076B6;
  --navy: #00395D;
  --navy-deep: #002B47;
  --ink: #1B2733;
  --muted: #5B6B7A;
  --line: #DDE3E9;
  --bg: #F4F7FA;
  --card: #FFFFFF;
  --ok: #1E8A4C;
  --warn: #B26A00;
  --danger: #C8102E;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 43, 71, .06), 0 4px 16px rgba(0, 43, 71, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }

/* ---------- Top bars ---------- */
.classification-bar {
  background: var(--navy-deep);
  color: #BFD7E6;
  font-size: 12px;
  letter-spacing: .02em;
  padding: 4px 24px;
  display: flex;
  justify-content: space-between;
}
.header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.header-inner {
  max-width: 1320px; margin: 0 auto;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 24px;
}
.brand { display: flex; align-items: center; gap: 16px; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand img { height: 26px; display: block; }
.brand .divider { width: 1px; height: 28px; background: var(--line); }
.brand .product-name { font-weight: 600; font-size: 18px; color: var(--navy); white-space: nowrap; }
.nav { display: flex; gap: 22px; margin-left: 8px; }
.nav a { color: var(--muted); font-weight: 600; padding: 6px 0; border-bottom: 3px solid transparent; }
.nav a.active, .nav a:hover { color: var(--navy); text-decoration: none; border-bottom-color: var(--blue); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 13px;
  display: grid; place-items: center;
}
.user-meta { font-size: 13px; line-height: 1.2; text-align: right; }
.user-meta small { color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(120deg, var(--navy-deep) 0%, var(--navy) 55%, #005A8C 100%);
  color: #fff;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -30px;
  width: 360px; height: 384px;
  background: url("eagle-white.png") no-repeat center / contain;
  opacity: .07;
}
.hero-inner { max-width: 1320px; margin: 0 auto; padding: 44px 24px 40px; position: relative; z-index: 1; }
.hero h1 { margin: 0 0 6px; font-size: 34px; font-weight: 600; letter-spacing: -.01em; }
.hero p { margin: 0 0 22px; color: #CFE4F2; font-size: 17px; max-width: 640px; }
.search {
  display: flex; max-width: 680px; background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
.search input {
  flex: 1; border: 0; padding: 14px 18px; font: inherit; font-size: 16px; outline: none; color: var(--ink);
}
.search button { border: 0; background: var(--blue); color: #fff; font-weight: 700; padding: 0 26px; }
.search button:hover { background: var(--blue-dark); }
.hero-stats { display: flex; gap: 36px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats div { font-size: 13px; color: #A9CBE0; }
.hero-stats strong { display: block; font-size: 24px; color: #fff; font-weight: 600; }

/* ---------- BU tabs ---------- */
.bu-strip { background: #fff; border-bottom: 1px solid var(--line); }
.bu-strip-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 24px;
  display: flex; gap: 4px; overflow-x: auto;
}
.bu-tab {
  background: none; border: 0; padding: 14px 14px 11px; white-space: nowrap;
  color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent;
}
.bu-tab:hover { color: var(--navy); }
.bu-tab.active { color: var(--navy); border-bottom-color: var(--blue); }
.bu-tab .count {
  display: inline-block; margin-left: 6px; font-size: 12px; background: var(--bg);
  border-radius: 10px; padding: 0 7px; color: var(--muted);
}

/* ---------- Layout ---------- */
.container { max-width: 1320px; margin: 0 auto; padding: 28px 24px 60px; }
.catalogue { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; }
.filters {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; position: sticky; top: 84px;
}
.filters h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  margin: 18px 0 8px;
}
.filters h3:first-child { margin-top: 0; }
.filters label { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; font-size: 14px; }
.filters label .n { margin-left: auto; color: var(--muted); font-size: 12px; }
.filters input[type=checkbox] { accent-color: var(--blue-dark); width: 15px; height: 15px; }
.clear-link { background: none; border: 0; color: var(--blue-dark); padding: 0; font-size: 13px; margin-top: 16px; }

.results-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.results-head h2 { margin: 0; font-size: 20px; font-weight: 600; color: var(--navy); }
.results-head select { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.active-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  background: #E6F6FD; color: var(--navy); border-radius: 14px; padding: 3px 10px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; border: 0;
}
.chip span { font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 10px;
  color: inherit; position: relative; transition: box-shadow .15s, transform .15s, border-color .15s;
  border-top: 4px solid var(--bu-color, var(--blue));
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #C5D3DE; text-decoration: none; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bu-badge { font-size: 12px; font-weight: 700; color: var(--bu-color, var(--navy)); text-transform: uppercase; letter-spacing: .04em; }
.card h3 { margin: 0; font-size: 18px; color: var(--navy); font-weight: 600; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.card-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.card-foot {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line); padding-top: 10px; font-size: 13px; color: var(--muted);
}

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; border-radius: 4px; padding: 2px 8px; white-space: nowrap;
}
.pill.certified { background: #E3F4EA; color: var(--ok); }
.pill.domain { background: var(--bg); color: var(--ink); }
.pill.cls-Internal { background: #E6F6FD; color: var(--blue-dark); }
.pill.cls-Confidential { background: #FFF2DE; color: var(--warn); }
.pill.cls-Restricted { background: #FCE6E9; color: var(--danger); }
.pill.tag { background: #EEF1F4; color: var(--muted); font-weight: 600; }
.pill.sens { background: #FCE6E9; color: var(--danger); }

.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- Product page ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.product-hero {
  background: #fff; border-bottom: 1px solid var(--line);
  border-top: 4px solid var(--bu-color, var(--blue));
}
.product-hero-inner { max-width: 1320px; margin: 0 auto; padding: 22px 24px 0; }
.product-title-row { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.product-title-row h1 { margin: 4px 0 8px; font-size: 30px; font-weight: 600; color: var(--navy); }
.product-title-row .lead { color: var(--muted); font-size: 16px; max-width: 760px; margin: 0 0 14px; }
.actions { display: flex; gap: 10px; flex-shrink: 0; padding-top: 8px; }
.btn {
  border-radius: 6px; padding: 10px 20px; font-weight: 700; border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: #fff; color: var(--navy); border-color: #B8C7D3; }
.btn-secondary:hover { border-color: var(--navy); }
.tabs { display: flex; gap: 6px; margin-top: 18px; }
.tab {
  background: none; border: 0; padding: 12px 14px 10px; font-weight: 600; color: var(--muted);
  border-bottom: 3px solid transparent;
}
.tab.active { color: var(--navy); border-bottom-color: var(--blue); }
.tab:hover { color: var(--navy); }

.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  margin-bottom: 20px;
}
.panel h2 { margin: 0 0 12px; font-size: 18px; color: var(--navy); font-weight: 600; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.person { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.person .avatar { background: var(--blue-dark); }
.person small { display: block; color: var(--muted); font-size: 12px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi strong { display: block; font-size: 24px; color: var(--navy); font-weight: 600; margin-top: 2px; }

table.schema { width: 100%; border-collapse: collapse; font-size: 14px; }
table.schema th {
  text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  padding: 8px 10px; border-bottom: 2px solid var(--line);
}
table.schema td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.schema code { font-family: "SF Mono", Consolas, monospace; font-size: 13px; color: var(--navy); }

.lineage { display: flex; align-items: center; gap: 0; flex-wrap: wrap; padding: 10px 0; }
.lineage-col { display: flex; flex-direction: column; gap: 10px; }
.node {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; background: #fff; font-size: 14px; min-width: 200px;
}
.node small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.node.self { border: 2px solid var(--blue); background: #F0FAFE; font-weight: 600; color: var(--navy); }
.arrow { width: 60px; height: 2px; background: #B8C7D3; position: relative; margin: 0 8px; }
.arrow::after {
  content: ""; position: absolute; right: -1px; top: -4px;
  border-left: 8px solid #B8C7D3; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}
.bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--ok); }
.quality-row { margin-bottom: 14px; font-size: 14px; }
.quality-row div:first-child { display: flex; justify-content: space-between; }

/* ---------- Request side panel ---------- */
.scrim {
  position: fixed; inset: 0; background: rgba(0, 27, 45, .45); opacity: 0; pointer-events: none;
  transition: opacity .2s; z-index: 40;
}
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 460px; max-width: 100%;
  background: #fff; z-index: 50; transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column; visibility: hidden; transition: transform .25s ease, visibility .25s;
}
.drawer.open { transform: none; visibility: visible; box-shadow: -8px 0 30px rgba(0,0,0,.15); }
.drawer-head {
  padding: 20px 24px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start;
}
.drawer-head h2 { margin: 0; font-size: 20px; color: var(--navy); font-weight: 600; }
.drawer-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.close-x { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); padding: 0 4px; }
.drawer-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field select, .field textarea, .field input {
  width: 100%; font: inherit; padding: 9px 11px; border: 1px solid #B8C7D3; border-radius: 6px; background: #fff;
}
.field textarea { min-height: 96px; resize: vertical; }
.field select:focus, .field textarea:focus, .field input:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.notice { background: #F0FAFE; border-left: 4px solid var(--blue); padding: 10px 14px; font-size: 13px; color: var(--navy); border-radius: 4px; margin-bottom: 18px; }
.success { text-align: center; padding: 30px 10px; }
.success .tick {
  width: 64px; height: 64px; border-radius: 50%; background: #E3F4EA; color: var(--ok);
  font-size: 34px; display: grid; place-items: center; margin: 0 auto 14px;
}
.success h3 { color: var(--navy); margin: 0 0 6px; }
.success p { color: var(--muted); margin: 0 0 4px; }

.footer {
  border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 13px;
}
.footer-inner { max-width: 1320px; margin: 0 auto; padding: 18px 24px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .catalogue, .detail-grid { grid-template-columns: 1fr; }
  .filters { position: static; }
  .nav, .user-meta, .brand .product-name, .brand .divider { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .product-title-row { flex-direction: column; }
}
