:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #5f6b7a;
  --line: #d8dee8;
  --paper: #f8f7f2;
  --surface: #ffffff;
  --primary: #0f6f75;
  --primary-dark: #0b555a;
  --accent: #b23836;
  --warm: #c08a2c;
  --focus: #164c9f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--primary-dark);
}

button,
a {
  outline-color: var(--focus);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(18px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand img {
  flex: 0 0 auto;
  border-radius: 50%;
}

.brand h1 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand p,
.panel-header p,
.meeting-meta,
.summary-meta,
.summary-empty p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.source-link,
button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 13px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.source-link,
.secondary-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

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

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button:hover,
.source-link:hover {
  border-color: var(--primary);
}

button:disabled {
  cursor: wait;
  opacity: 0.66;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
  gap: 24px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px clamp(18px, 4vw, 44px) 44px;
}

.meetings-panel,
.summary-panel {
  min-width: 0;
}

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

.panel-header h2,
.summary-empty h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0;
}

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

.meeting-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--warm);
  border-radius: 8px;
  background: var(--surface);
}

.meeting-card.is-cached {
  border-left-color: var(--primary);
}

.meeting-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
  letter-spacing: 0;
}

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

.meeting-actions a {
  font-size: 0.9rem;
  font-weight: 650;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  background: #edf1f5;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-pill.ready {
  background: #e3f4ef;
  color: #0c6254;
}

.summary-panel {
  position: sticky;
  top: 18px;
  align-self: start;
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.summary-empty {
  display: grid;
  min-height: 320px;
  place-content: center;
  padding: 32px;
  text-align: center;
}

.summary {
  padding: clamp(18px, 3vw, 34px);
}

.summary h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.summary h3 {
  margin: 24px 0 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 0;
}

.summary p {
  line-height: 1.6;
}

.summary ul {
  padding-left: 1.2rem;
}

.summary li {
  margin: 8px 0;
  line-height: 1.55;
}

.error {
  border-left: 4px solid var(--accent);
  padding: 12px 14px;
  background: #fff3f1;
  color: #64201d;
}

.hidden {
  display: none;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    position: static;
    max-height: none;
  }
}
