:root {
  color-scheme: light;
  --bg: #f3efe6;
  --bg-accent: #e2efe7;
  --panel: rgba(255, 252, 246, 0.92);
  --panel-strong: #fffdf8;
  --border: rgba(54, 69, 79, 0.14);
  --text: #1f2a33;
  --muted: #5c6870;
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --warning: #b7791f;
  --danger: #b42318;
  --shadow: 0 18px 40px rgba(38, 43, 48, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Aptos", "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(228, 244, 237, 0.9), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 231, 197, 0.75), transparent 28%),
    linear-gradient(135deg, var(--bg) 0%, #f7f4ee 55%, #eef5f2 100%);
}

a {
  color: inherit;
}

button,
a {
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
  gap: 24px;
  padding: 24px;
}

.sidebar,
.workspace,
.primary-column,
.secondary-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.sidebar .panel,
.hero,
.focus-card,
.transcript-card,
.side-card,
.history-page {
  padding: 22px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 4px;
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f766e, #164e63);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.25);
}

.brand-block h1,
.hero h2,
.panel h2,
.panel h3 {
  margin: 0;
  letter-spacing: -0.02em;
}

.brand-block h1 {
  font-size: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-panel h2,
.hero h2 {
  font-size: 28px;
  line-height: 1.1;
}

.status-panel p,
.hero-copy,
.empty-state p,
.participants-text,
.step p,
.meta-list dd,
#videoLink,
.line-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.participants-text {
  font-size: 13px;
  line-height: 1.7;
}

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

.side-card .panel-heading {
  margin-bottom: 10px;
}

.side-card .panel-heading h3 {
  font-size: 18px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.side-card .eyebrow {
  margin-bottom: 8px;
  color: #687782;
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.status-pill.is-warning {
  background: rgba(183, 121, 31, 0.12);
  color: var(--warning);
}

.status-pill.is-danger {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

.progress-steps {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.step {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.48);
  opacity: 0.62;
}

.step strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.step-dot {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  border-radius: 999px;
  border: 2px solid rgba(31, 42, 51, 0.18);
  background: transparent;
}

.step.is-active,
.step.is-complete {
  opacity: 1;
  border-color: rgba(15, 118, 110, 0.18);
}

.step.is-active {
  background: rgba(220, 242, 237, 0.72);
}

.step.is-active .step-dot,
.step.is-complete .step-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.meta-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.meta-list div {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(54, 69, 79, 0.1);
}

.meta-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.meta-list dt {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-list dd {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.hero {
  display: block;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 251, 248, 0.92)),
    var(--panel-strong);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 20px;
}

.empty-state {
  padding: 40px 24px;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 10px;
  font-size: 26px;
}

.is-hidden {
  display: none;
}

.focus-card pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.75;
}

.transcript-card {
  min-height: 320px;
}

#transcript {
  display: grid;
  gap: 12px;
}

.transcript-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  border: 1px dashed rgba(54, 69, 79, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}

.line {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(54, 69, 79, 0.08);
}

.line-speaker {
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 700;
}

.side-card {
  overflow: hidden;
  padding-inline: 20px;
}

.side-card-body {
  display: grid;
  gap: 12px;
}

.participant-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.participant-chip {
  display: grid;
  gap: 6px;
  padding: 14px 16px 13px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(223, 243, 238, 0.85), rgba(255, 255, 255, 0.78));
  border: 1px solid rgba(15, 118, 110, 0.16);
}

.participant-name {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.participant-role {
  font-size: 11px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

#videoLink {
  display: grid;
  gap: 10px;
}

.source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(225, 244, 239, 0.8));
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.source-link:hover {
  text-decoration: underline;
}

.source-caption,
.source-empty {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.source-empty {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(54, 69, 79, 0.16);
  background: rgba(255, 255, 255, 0.5);
}

.history-card {
  min-height: 220px;
}

.show-all-button,
.back-button,
.pagination-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.show-all-button {
  width: 100%;
}

.show-all-button:hover,
.back-button:hover,
.pagination-button:hover:not(:disabled) {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(233, 245, 240, 0.95);
}

.pagination-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

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

.history-item {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(54, 69, 79, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(247, 251, 249, 0.68));
}

.history-meta {
  display: grid;
  gap: 6px;
}

.history-title {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.history-time {
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.history-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
}

.history-link a:hover {
  text-decoration: underline;
}

.history-page {
  display: grid;
  gap: 20px;
}

.history-page.is-hidden {
  display: none;
}

.history-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.history-page-copy {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.history-table-wrap {
  overflow: auto;
  border: 1px solid rgba(54, 69, 79, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

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

.history-table th,
.history-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

.history-table th {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(245, 249, 247, 0.9);
}

.history-table td {
  font-size: 14px;
  line-height: 1.5;
  border-top: 1px solid rgba(54, 69, 79, 0.08);
}

.history-table td strong {
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.history-table a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.history-table a:hover {
  text-decoration: underline;
}

.history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-pagination-info {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

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

  .hero {
    display: block;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 16px;
    gap: 16px;
  }

  .sidebar .panel,
  .hero,
  .focus-card,
  .transcript-card,
  .side-card,
  .history-page {
    padding: 18px;
  }

  .history-page-header,
  .history-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .status-panel h2,
  .hero h2,
  .empty-state h3 {
    font-size: 22px;
  }
}
