:root {
  --bg: #f7f3ea;
  --ink: #1f2933;
  --muted: #667085;
  --panel: #fffdf7;
  --line: #ded6c8;
  --accent: #256f5b;
  --accent-strong: #174d3f;
  --warn: #a44716;
  --gold: #d8962f;
  --blue: #276c9f;
  --shadow: 0 16px 40px rgba(48, 36, 20, 0.08);
  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);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.cc-header {
  align-items: center;
  background: rgba(255, 253, 247, 0.9);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.cc-brand,
.cc-nav,
.button-row {
  align-items: center;
  display: flex;
  gap: 12px;
}

.cc-brand,
.cc-nav a {
  text-decoration: none;
}

.cc-brand {
  font-weight: 800;
}

.cc-mark {
  align-items: center;
  background: var(--accent);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-size: 0.8rem;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.cc-nav {
  color: var(--muted);
  font-size: 0.95rem;
}

.cc-section {
  margin: 0 auto;
  max-width: 1240px;
  padding: 28px clamp(16px, 4vw, 48px) 56px;
}

.narrow {
  max-width: 560px;
}

.landing-hero {
  padding: clamp(44px, 8vw, 96px) 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.1;
  margin: 0 0 14px;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 5.2rem);
  letter-spacing: 0;
  max-width: 820px;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

h3 {
  font-size: 1.1rem;
  margin-top: 24px;
}

p {
  line-height: 1.6;
}

.lead {
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  max-width: 760px;
}

.muted {
  color: var(--muted);
}

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  padding: 10px 14px;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--line);
  color: var(--accent-strong);
}

.hero-row {
  align-items: start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 24px 0;
}

.feature-grid,
.live-grid,
.dashboard-grid,
.stats-grid {
  display: grid;
  gap: 16px;
}

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

.live-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
}

.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

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

.report-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

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

.panel {
  margin-bottom: 16px;
  padding: 18px;
}

.safety-banner {
  border-color: #dfb074;
  color: #5e3b12;
  padding: 12px 14px;
}

.metric-card {
  box-shadow: none;
  min-height: 92px;
  padding: 14px;
}

.metric-card span {
  color: var(--muted);
  display: block;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.metric-card strong,
.big-value {
  color: var(--accent-strong);
  display: block;
  font-size: 1.55rem;
}

.stream-frame {
  align-items: center;
  aspect-ratio: 16 / 10;
  background: #2d2922;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.stream-frame:fullscreen {
  aspect-ratio: auto;
  border-radius: 0;
  height: 100vh;
  width: 100vw;
}

.stream-frame:fullscreen img {
  height: 100vh;
  width: 100vw;
}

.annotatable-frame {
  position: relative;
}

.freeze-badge {
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid rgba(250, 204, 21, 0.75);
  border-radius: 8px;
  color: #fef3c7;
  font-size: 0.82rem;
  font-weight: 800;
  left: 12px;
  padding: 6px 8px;
  position: absolute;
  top: 12px;
  z-index: 2;
}

.stream-frame img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

#annotation-canvas {
  cursor: crosshair;
  height: 100%;
  inset: 0;
  pointer-events: auto;
  position: absolute;
  width: 100%;
}

.stream-fullscreen-button {
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(222, 214, 200, 0.9);
  border-radius: 8px;
  color: var(--accent-strong);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 7px 10px;
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 3;
}

.stream-fullscreen-button:hover {
  background: white;
}

.stream-fullscreen-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.annotation-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.panel-heading-row {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.panel-heading-row p {
  margin: 0;
}

.audio-controls {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.audio-controls label {
  min-width: 140px;
}

.spectrogram-shell {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  margin-top: 16px;
  min-height: 260px;
  overflow: hidden;
}

#audio-spectrogram {
  display: block;
  height: 260px;
  width: 100%;
}

.spectrogram-axis {
  align-content: space-between;
  background: #0f172a;
  color: #cbd5e1;
  display: grid;
  font-size: 0.72rem;
  font-weight: 800;
  justify-items: center;
  padding: 10px 6px;
  text-transform: uppercase;
}

.audio-meter-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.audio-meter-row div {
  display: grid;
  gap: 6px;
}

.audio-meter-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.audio-meter-row meter {
  height: 14px;
  width: 100%;
}

.empty-frame {
  color: #fff7e6;
  font-weight: 800;
}

.status-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.status-list p {
  margin: 0;
}

.stale-warning,
.form-error {
  background: #fff0df;
  border: 1px solid #e1a366;
  border-radius: 8px;
  color: var(--warn);
  margin-bottom: 12px;
  padding: 10px 12px;
}

.hidden {
  display: none;
}

.stack-form {
  display: grid;
  gap: 12px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 0.92rem;
  font-weight: 700;
  gap: 6px;
}

input,
textarea,
select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-prompts button {
  background: #eef7f3;
  border: 1px solid #c9ddd5;
  border-radius: 8px;
  color: var(--accent-strong);
  cursor: pointer;
  padding: 7px 9px;
}

.chat-answer {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.chat-answer h4 {
  margin: 12px 0 4px;
}

.chat-answer ul {
  margin: 4px 0 12px;
  padding-left: 20px;
}

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

table {
  border-collapse: collapse;
  font-size: 0.92rem;
  width: 100%;
}

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

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

.note-list p {
  border-top: 1px solid var(--line);
  margin: 12px 0 0;
  padding-top: 12px;
}

.annotation-lab {
  display: grid;
  gap: 16px;
}

.annotation-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.tag-list span {
  background: #eef7f3;
  border: 1px solid #c9ddd5;
  border-radius: 8px;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 6px 8px;
}

.annotation-assist {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.annotation-assist p {
  margin: 0;
}

.annotation-assist ul {
  margin: 0;
  padding-left: 18px;
}

.assist-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assist-suggestions button {
  background: #fff7e6;
  border: 1px solid #e1a366;
  border-radius: 8px;
  color: var(--warn);
  cursor: pointer;
  font-weight: 800;
  padding: 6px 8px;
}

@media (max-width: 840px) {
  .cc-header,
  .hero-row {
    align-items: stretch;
    flex-direction: column;
  }

  .cc-nav {
    flex-wrap: wrap;
  }

  .feature-grid,
  .live-grid,
  .dashboard-grid,
  .annotation-grid,
  .report-stats {
    grid-template-columns: 1fr;
  }

  .panel-heading-row {
    align-items: stretch;
    flex-direction: column;
  }

  .audio-controls {
    justify-content: flex-start;
  }

  .status-list,
  .stats-grid,
  .audio-meter-row {
    grid-template-columns: 1fr;
  }
}

@media print {
  .cc-header,
  .print-button,
  .btn {
    display: none;
  }

  body {
    background: white;
  }

  .panel,
  .safety-banner,
  .metric-card {
    box-shadow: none;
  }
}
