﻿:root {
  --ink: #101714;
  --muted: #5e6a64;
  --line: #d7dfda;
  --line-strong: #b8c4bd;
  --paper: #ffffff;
  --canvas: #f3f6f4;
  --green: #0e6a50;
  --green-soft: #e6f3ed;
  --coral: #a9463d;
  --coral-soft: #f8eae7;
  --amber: #936311;
  --amber-soft: #f7f0dc;
  --blue: #315f7c;
  --blue-soft: #e8f0f5;
  --shadow: 0 10px 30px rgba(20, 35, 28, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background: var(--canvas);
  color: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  color: #fff;
  background: #101714;
  border-bottom: 3px solid #b78736;
}

.brand-lockup,
.topbar-meta,
.record-nav,
.metric-line,
.identity-line,
.keyword-meta,
.brand-lockup {
  gap: 14px;
  min-width: 0;
}

.brand-word {
  font-size: 19px;
  font-weight: 800;
}

.workspace-name {
  padding-left: 14px;
  color: #d6ded9;
  border-left: 1px solid #56605b;
  font-size: 14px;
}

.topbar-meta {
  gap: 12px;
  color: #d6ded9;
  font-size: 13px;
  white-space: nowrap;
}

.global-status,
.field-count,
.treatment-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.global-status {
  color: #d4f2e4;
  background: #1b513f;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.sidebar {
  position: sticky;
  top: 64px;
  align-self: start;
  height: calc(100vh - 64px);
  overflow: hidden;
  background: #eef2ef;
  border-right: 1px solid var(--line);
}

.sidebar-controls {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--line);
}

.sidebar-controls label,
.eyebrow,
.section-label,
.field-label,
.keyword-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

#searchInput {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  outline: none;
}

#searchInput:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(14, 106, 80, 0.12);
}

.tab-button {
  cursor: pointer;
  border: 0;
  background: transparent;
}

.product-list {
  height: calc(100% - 92px);
  padding: 8px;
  overflow-y: auto;
}

.product-button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  width: 100%;
  min-height: 62px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  cursor: pointer;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
}

.product-button:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
}

.product-button.is-active {
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: 0 3px 12px rgba(20, 35, 28, 0.06);
}

.product-thumb {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.product-nav-copy {
  min-width: 0;
}

.product-nav-name,
.product-nav-sku {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-nav-name {
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: 750;
}

.product-nav-sku {
  color: var(--muted);
  font-size: 11px;
}

.main-panel {
  min-width: 0;
  background: var(--canvas);
}

.product-header {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 260px;
  padding: 28px clamp(24px, 4vw, 58px);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.product-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 10px;
  border-right: 1px solid var(--line);
}

.product-image {
  width: 100%;
  max-width: 190px;
  height: 200px;
  object-fit: contain;
}

.product-heading {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding-left: clamp(24px, 4vw, 52px);
}

.identity-line {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.product-heading h1 {
  max-width: 850px;
  margin: 0 0 10px;
  font-size: 42px;
  font-weight: 730;
  line-height: 1.08;
}

.product-subline {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

.header-link {
  width: fit-content;
  font-size: 13px;
  font-weight: 700;
}

.view-toolbar {
  position: sticky;
  top: 64px;
  z-index: 10;
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(20px, 4vw, 58px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.tabs {
  display: flex;
  min-width: 0;
  height: 53px;
  align-items: stretch;
  gap: 22px;
  overflow-x: auto;
}

.tab-button {
  position: relative;
  flex: 0 0 auto;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.tab-button:hover,
.tab-button.is-active {
  color: var(--ink);
}

.tab-button.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  content: "";
  background: var(--green);
}

.record-nav {
  flex: 0 0 auto;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.icon-button {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  cursor: pointer;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 22px;
  line-height: 1;
}

.icon-button:hover {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.view-content {
  width: min(1120px, calc(100% - 40px));
  min-height: 500px;
  margin: 0 auto;
  padding: 32px 0 72px;
}

.content-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.content-section:first-child {
  padding-top: 0;
}

.content-section:last-child {
  border-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.field-count {
  color: var(--muted);
  background: #e8ece9;
}

.copy-field,
.keyword-block,
.comparison-panel,
.source-panel,
.audit-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.copy-field {
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.62;
  box-shadow: var(--shadow);
}

.copy-field.title-copy {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.copy-field.backend-copy {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  word-break: break-word;
}

.amazon-bullet-list {
  margin: 0;
  padding: 14px 24px 14px 44px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.amazon-bullet-row {
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  color: #2a3530;
  font-size: 14px;
  line-height: 1.55;
}

.amazon-bullet-row::after {
  content: attr(data-character-count);
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
}

.amazon-bullet-row:last-child {
  border-bottom: 0;
}

.body-copy {
  color: #2a3530;
  font-size: 14px;
  line-height: 1.65;
}

.body-copy {
  white-space: pre-line;
}

.two-column,
.comparison-grid,
.keyword-grid,
.metric-grid {
  display: grid;
  gap: 18px;
}

.two-column,
.comparison-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-panel,
.comparison-panel,
.keyword-block,
.audit-panel {
  min-width: 0;
  padding: 20px;
}

.source-panel h3,
.comparison-panel h3,
.keyword-block h3,
.audit-panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.comparison-panel.is-old {
  border-top: 3px solid #929d97;
}

.comparison-panel.is-new {
  border-top: 3px solid var(--green);
}

.comparison-value {
  color: #25312b;
  font-size: 14px;
  line-height: 1.62;
  white-space: pre-line;
}

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

.keyword-block.primary {
  border-top: 4px solid var(--green);
}

.keyword-block.secondary {
  border-top: 4px solid var(--blue);
}

.keyword-term {
  margin: 0 0 18px;
  font-size: 23px;
  font-weight: 760;
  line-height: 1.2;
}

.keyword-meta {
  flex-wrap: wrap;
  gap: 18px;
}

.metric {
  min-width: 86px;
}

.metric strong,
.metric span {
  display: block;
}

.metric strong {
  font-size: 17px;
}

.metric span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

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

.metric-card {
  min-height: 96px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.metric-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 28px;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
}

.decision-band {
  padding: 20px 22px;
  color: #153126;
  background: var(--green-soft);
  border-left: 4px solid var(--green);
}

.decision-band strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.decision-band p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.treatment-tag {
  color: #87372f;
  background: var(--coral-soft);
}

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

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

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 10px 16px;
    align-items: end;
  }

  .sidebar-controls label {
    grid-column: 1;
  }

  #searchInput {
    grid-column: 1;
  }

  .product-list {
    display: flex;
    height: auto;
    gap: 6px;
    padding: 8px 14px 12px;
    overflow-x: auto;
  }

  .product-button {
    flex: 0 0 230px;
  }

  .view-toolbar {
    top: 64px;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 58px;
    padding: 0 14px;
  }

  .workspace-name,
  .topbar-meta > span:first-child {
    display: none;
  }

  .topbar-meta {
    gap: 6px;
  }

  .app-shell {
    min-height: calc(100vh - 58px);
  }

  .sidebar-controls {
    grid-template-columns: 1fr;
  }

  .product-header {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .product-image-wrap {
    min-height: 150px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .product-image {
    height: 150px;
  }

  .product-heading {
    padding: 22px 0 4px;
  }

  .product-heading h1 {
    font-size: 28px;
  }

  .view-toolbar {
    top: 58px;
    padding: 0 12px;
  }

  .tabs {
    gap: 16px;
  }

  .tab-button {
    font-size: 12px;
  }

  .record-nav {
    display: none;
  }

  .view-content {
    width: calc(100% - 28px);
    padding-top: 22px;
  }

  .two-column,
  .comparison-grid,
  .keyword-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .amazon-bullet-list {
    padding: 12px 16px 12px 34px;
  }

  .copy-field,
  .source-panel,
  .comparison-panel,
  .keyword-block,
  .audit-panel {
    padding: 16px;
  }
}





