:root {
  --accent: #2c561a;
  --accent-2: #3f7428;
  --green: #2d9f64;
  --red: #ff6473;
  --yellow: #f4b841;
  --ink: #1a2a10;
  --muted: #6b7f5e;
  --line: #d4c9b4;
  --panel: #fefcf8;
  --bg: #f0e8d9;
  --surface2: #ede4d3;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

button {
  font: inherit;
}

.product-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 190px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  z-index: 20;
}

.sidebar-title {
  color: var(--accent);
  font-size: 14px;
  font-weight: 850;
  margin: 0 0 18px 8px;
}

.product-sidebar a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 750;
  margin-bottom: 6px;
}

.product-sidebar a.active,
.product-sidebar a:hover {
  background: var(--surface2);
  color: var(--accent);
}

.section-head p,
.panel-head p,
.eyebrow,
.top-actions span {
  color: var(--muted);
}

.label,
.pill {
  color: var(--accent);
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.shell {
  margin-left: 190px;
  min-height: 100vh;
}

.topbar {
  height: 72px;
  background: var(--panel);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.topbar h1 {
  margin: 0;
}

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

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-toggle,
.window-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--line);
}

.window-toggle {
  background: var(--surface2);
  border-color: var(--line);
}

.top-actions span {
  color: var(--muted);
}

.top-actions button,
.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent);
  border-radius: 7px;
  font-weight: 800;
  cursor: default;
}

.top-actions button {
  background: var(--accent);
  color: #fff;
  border-color: var(--line);
  padding: 9px 14px;
}

.lang-toggle button,
.window-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 6px;
}

.window-toggle button {
  color: var(--accent);
  font-weight: 850;
}

.lang-toggle button.active,
.window-toggle button.active {
  background: #fff;
  color: var(--accent);
}

.window-note {
  color: var(--muted);
  margin: 10px 0 0;
}

.section-head,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.section-head {
  padding: 24px 32px 10px;
}

h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.section-head p,
.panel-head p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  margin: 4px 0 0;
}

.ghost-button {
  padding: 9px 13px;
}

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

.metric-card,
.score-card,
.winner-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(44, 86, 26, 0.04);
}

.metric-card {
  min-height: 148px;
  padding: 14px;
}

.metric-card .kicker,
.score-card span,
.winner-card .meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.metric-card .value {
  font-size: 25px;
  font-weight: 780;
  line-height: 1.15;
  margin: 8px 0 6px;
}

.metric-card .status {
  color: var(--green);
  font-size: 13px;
  font-weight: 720;
}

.metric-card .delta.bad,
.metric-card .status.bad {
  color: var(--red);
}

.sparkline {
  width: 100%;
  height: 46px;
  margin-top: 10px;
}

.sparkline path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}

.score-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 32px 28px;
}

.decision-list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.decision-action {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.decision-action > span {
  align-self: start;
  color: var(--accent);
  background: var(--surface2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  padding: 4px 8px;
  text-align: center;
}

.decision-action.watch > span {
  color: var(--red);
}

.decision-action.fix > span,
.decision-action.hold > span {
  color: #8a6600;
}

.decision-action strong {
  color: var(--accent);
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.decision-action p {
  color: var(--ink);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.4;
  margin: 4px 0 0;
}

.decision-action em {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
  margin-top: 4px;
}

.score-card {
  padding: 13px 14px;
  min-height: 78px;
}

.score-card strong {
  display: block;
  font-size: 23px;
  font-weight: 780;
  margin-top: 5px;
}

.winner-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 0 32px 28px;
}

.winner-card {
  overflow: hidden;
}

.winner-card img {
  width: 100%;
  aspect-ratio: 1.55 / 1;
  object-fit: cover;
  background: #eee;
  display: block;
}

.winner-body {
  padding: 11px;
}

.winner-body h3 {
  color: var(--accent);
  font-size: 13px;
  line-height: 1.25;
  margin: 0 0 9px;
  word-break: break-word;
}

.mini-row {
  display: grid;
  grid-template-columns: minmax(58px, 74px) minmax(58px, 1fr) minmax(46px, max-content);
  column-gap: 8px;
  align-items: center;
  margin-top: 7px;
  font-size: 12px;
}

.mini-row .meta {
  min-width: 0;
}

.mini-row strong {
  justify-self: end;
  min-width: 46px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.bar {
  height: 5px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.bar.warn span {
  background: var(--red);
}

.panel {
  margin: 0 32px 34px;
  padding: 16px;
}

.table-wrap {
  overflow: auto;
  margin-top: 16px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1040px;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: right;
  white-space: nowrap;
}

td.heat {
  background-color: var(--heat-bg, transparent);
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.18);
}

th:first-child,
td:first-child,
th:last-child,
td:last-child {
  text-align: left;
}

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

.creative-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 230px;
}

.creative-cell strong,
.creative-cell small {
  display: block;
}

.creative-cell small {
  color: var(--muted);
  margin-top: 2px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creative-cell img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
}

.read {
  font-weight: 800;
  color: var(--accent);
}

.data-notes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.note-strip {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.note-strip span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  min-width: 112px;
}

.note-strip p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  line-height: 1.45;
}

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

.metric-glossary span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
}

.metric-glossary strong,
.metric-glossary em {
  display: block;
}

.metric-glossary strong {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.metric-glossary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  margin-top: 2px;
}

.brief-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 0 32px 40px;
}

.brief-grid .panel {
  margin: 0;
}

.planned-test {
  margin-top: 8px;
}

.timeline-purpose {
  border-left: 3px solid var(--accent);
  padding: 2px 0 2px 12px;
  margin: 12px 0 18px;
}

.timeline-purpose span {
  color: var(--accent);
  display: block;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 5px;
}

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

.timeline-purpose ul {
  color: var(--muted);
  display: grid;
  gap: 4px;
  font-size: 13px;
  line-height: 1.4;
  margin: 8px 0 0;
  padding-left: 18px;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 0;
  margin-top: 14px;
  padding-left: 136px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 110px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.timeline-event {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 0 0 18px;
}

.timeline-event time {
  position: absolute;
  left: -136px;
  top: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  width: 94px;
  white-space: nowrap;
}

.timeline-event::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-event strong {
  color: var(--accent);
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.timeline-event p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 4px 0 0;
}

.recommendation,
.brief-item,
.angle-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  background: #fff;
}

.brief-list,
.angle-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

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

.brief-list .brief-item,
.angle-list .angle-item {
  margin-top: 0;
}

.recommendation strong,
.brief-item strong,
.angle-item strong {
  display: block;
  color: var(--accent);
  font-size: 14px;
  line-height: 1.3;
}

.brief-item span,
.angle-item span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.recommendation p,
.brief-item p,
.angle-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 1120px) {
  .product-sidebar {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .shell {
    margin-left: 0;
  }

  .metric-grid,
  .score-row,
  .winner-grid,
  .brief-list,
  .angle-list,
  .metric-glossary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar,
  .section-head,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .score-row,
  .winner-grid,
  .brief-grid,
  .brief-list,
  .angle-list,
  .metric-glossary {
    grid-template-columns: 1fr;
  }

  .note-strip {
    display: block;
  }

  .timeline-list {
    padding-left: 0;
  }

  .timeline-list::before {
    left: 0;
  }

  .timeline-event {
    padding-left: 20px;
  }

  .timeline-event time {
    position: static;
    display: block;
    width: auto;
    text-align: left;
    margin-bottom: 5px;
  }

  .timeline-event::before {
    left: -3px;
    top: 4px;
  }

  .note-strip span {
    display: block;
    margin-bottom: 4px;
  }

  .topbar {
    height: auto;
    padding: 18px;
  }

  .section-head,
  .metric-grid,
  .score-row,
  .winner-grid,
  .brief-grid {
    padding-left: 18px;
    padding-right: 18px;
  }

  .panel {
    margin-left: 18px;
    margin-right: 18px;
  }
}
