:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --ink: #171b22;
  --muted: #687385;
  --line: #dde3ea;
  --green: #176b52;
  --green-soft: #dcebe5;
  --blue: #315c9d;
  --blue-soft: #e1e8f6;
  --amber: #9a5a13;
  --amber-soft: #f5e6cf;
  --red: #aa3d36;
  --red-soft: #f2dfdc;
  --shadow: 0 18px 45px rgb(32 35 31 / 8%);
  font-family: "Aptos", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  overflow-x: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #eef1f4;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--surface);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.metric-card span,
.metric-card small,
.sidebar-card p,
td small {
  color: var(--muted);
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-list a {
  color: var(--ink);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 8px;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-list a.active,
.nav-list a:hover {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.sidebar-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.sidebar-card p {
  margin: 8px 0 0;
  line-height: 1.45;
  font-size: 14px;
}

.workspace {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 28px;
  min-width: 0;
}

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

.offer-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.offer-strip article,
.offer-box,
.provenance-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.offer-strip article {
  min-height: 150px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.offer-strip strong,
.offer-strip p,
.offer-box p,
.provenance-card strong,
.provenance-card p {
  display: block;
}

.offer-strip strong {
  font-size: 19px;
  line-height: 1.15;
}

.offer-strip p,
.offer-box p,
.provenance-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}

.topbar h1,
.hero-copy h2,
.panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 0.98;
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 750;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.primary-button,
.icon-button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--ink);
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
  min-width: 0;
}

.primary-button {
  background: var(--ink);
  color: var(--surface);
}

.icon-button {
  background: var(--surface);
  color: var(--ink);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.hero-panel {
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgb(23 107 82 / 94%), rgb(32 35 31 / 94%)),
    radial-gradient(circle at 80% 20%, rgb(255 255 255 / 40%), transparent 28%);
  color: var(--surface);
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
  gap: 24px;
  align-items: end;
  box-shadow: var(--shadow);
}

.hero-panel .eyebrow,
.hero-panel p {
  color: rgb(255 253 248 / 78%);
}

.hero-copy h2 {
  font-size: clamp(32px, 3.7vw, 54px);
  line-height: 0.98;
  max-width: 760px;
  overflow-wrap: anywhere;
}

.hero-copy p:not(.eyebrow) {
  max-width: 650px;
  line-height: 1.55;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.hero-copy,
.risk-card,
.metric-card,
.panel {
  min-width: 0;
}

.risk-card {
  border: 1px solid rgb(255 253 248 / 20%);
  border-radius: 8px;
  padding: 18px;
  background: rgb(255 253 248 / 10%);
  backdrop-filter: blur(10px);
}

.risk-card strong,
.risk-card span,
.risk-card p {
  display: block;
}

.risk-label {
  color: rgb(255 253 248 / 72%);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 750;
}

.risk-card strong {
  margin-top: 10px;
  font-size: 24px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.risk-card p {
  margin: 12px 0 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-card {
  min-height: 138px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.metric-card strong {
  font-size: 44px;
  line-height: 1;
}

.foundation-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.product-list {
  display: grid;
  gap: 10px;
}

.product-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.product-id {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.product-row h4 {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.25;
}

.product-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.product-channels {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.channel-pill,
.empty-pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.channel-pill span {
  color: rgb(23 27 34 / 62%);
  font-weight: 650;
}

.channel-pill.getyourguide {
  background: var(--blue-soft);
  color: var(--blue);
}

.channel-pill.viator {
  background: var(--green-soft);
  color: var(--green);
}

.empty-pill {
  background: #f3f4f6;
  color: var(--muted);
}

.review-state,
.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.review-state-card,
.channel-card {
  min-height: 142px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.review-state-card span,
.channel-card span,
.channel-card small {
  color: var(--muted);
}

.review-state-card span,
.channel-card span {
  display: block;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.review-state-card strong {
  display: block;
  margin-top: 12px;
  font-size: 28px;
  line-height: 1.05;
}

.review-state-card p,
.channel-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}

.channel-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.channel-card header strong {
  font-size: 34px;
  line-height: 1;
}

.channel-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 18px;
}

.load-error {
  margin: 0;
  color: var(--red);
  font-weight: 700;
}

.metric-card.warning {
  background: var(--amber-soft);
}

.metric-card.danger {
  background: var(--red-soft);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 18px;
  margin-bottom: 18px;
}

.section-grid.balanced {
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
}

.panel {
  padding: 20px;
  box-shadow: var(--shadow);
}

.panel.large {
  min-height: 480px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel h3 {
  font-size: 22px;
}

.status-pill,
.source-status,
.severity-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.status-pill {
  background: var(--surface-2);
  color: var(--muted);
}

.alert-list {
  display: grid;
  gap: 12px;
}

.alert-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.severity-pill.critical {
  background: var(--red-soft);
  color: var(--red);
}

.severity-pill.high {
  background: var(--amber-soft);
  color: var(--amber);
}

.severity-pill.medium {
  background: var(--blue-soft);
  color: var(--blue);
}

.alert-row h4 {
  margin: 0;
  font-size: 18px;
}

.alert-row p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.alert-count {
  text-align: right;
  font-weight: 800;
  font-size: 22px;
}

.alert-count small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.action-list {
  margin: 0;
  padding-left: 22px;
}

.action-list li {
  margin: 0 0 16px;
  line-height: 1.45;
}

.offer-box {
  margin-top: 22px;
  padding: 16px;
  background: #f8fbff;
}

.source-list,
.review-grid {
  display: grid;
  gap: 12px;
}

.source-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.provenance-panel {
  margin-bottom: 18px;
}

.provenance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.provenance-card {
  min-height: 126px;
  padding: 16px;
}

.provenance-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 750;
  margin-bottom: 10px;
}

.provenance-card strong {
  font-size: 20px;
  line-height: 1.15;
}

.source-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.source-card h4 {
  margin: 0;
}

.source-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.source-status.live {
  background: var(--green-soft);
  color: var(--green);
}

.source-status.next {
  background: var(--blue-soft);
  color: var(--blue);
}

.source-status.parked {
  background: var(--surface-2);
  color: var(--muted);
}

.profile-table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  font-size: 14px;
}

td strong {
  display: block;
}

td small {
  display: block;
  margin-top: 4px;
  line-height: 1.35;
}

.review-panel {
  margin-bottom: 28px;
}

.review-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-card {
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.review-card strong,
.review-card span {
  display: block;
}

.review-card span {
  color: var(--muted);
  margin: 6px 0 12px;
  font-size: 12px;
}

.review-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
  }

  .nav-list {
    display: flex;
    flex-wrap: wrap;
  }

  .sidebar-card {
    display: none;
  }

  .hero-grid,
  .section-grid,
  .section-grid.balanced,
  .offer-strip,
  .provenance-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .workspace {
    padding: 18px;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .primary-button,
  .icon-button {
    width: 100%;
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-panel {
    min-height: auto;
    padding: 22px;
  }

  .hero-copy h2 {
    font-size: 34px;
    max-width: 100%;
  }

  .metric-grid,
  .foundation-metrics,
  .review-state,
  .channel-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .product-row {
    grid-template-columns: 1fr;
  }

  .product-channels {
    justify-content: flex-start;
  }

  .alert-row {
    grid-template-columns: 1fr;
  }

  .alert-count {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .workspace {
    padding-right: 30px;
  }

  .sidebar {
    align-items: stretch;
    display: grid;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar h1 {
    font-size: 32px;
  }

  .topbar-actions {
    grid-template-columns: 1fr;
  }

  .hero-copy h2 {
    font-size: 22px;
    line-height: 1.04;
    max-width: 280px;
  }

  .hero-copy p:not(.eyebrow) {
    font-size: 14px;
    max-width: 280px;
  }

  .risk-card strong {
    font-size: 20px;
  }
}
