:root {
  color-scheme: light;
  --bg: #f7f7f2;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #111827;
  --soft: #f3f4f6;
}

html {
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Author display rules (e.g. .button-link { display: inline-flex }) must not
   override the HTML hidden attribute, or Sign in CTAs stay visible after auth. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-wrap: break-word;
}

.page {
  width: min(100%, 1440px);
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 32px);
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 24px;
}

.hero > div {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 40px);
  line-height: 1.05;
}

.subhead {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero-actions > * {
  min-width: 0;
}

button {
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.2;
  min-height: 44px;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button.ghost {
  background: var(--soft);
  color: var(--ink);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.2;
  min-height: 44px;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  text-decoration: none;
}

.button-link.ghost {
  background: var(--soft);
  color: var(--ink);
}

.button-link.disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  min-width: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  min-height: 760px;
  min-width: 0;
}

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

.panel-header h2 {
  margin: 0;
  font-size: 18px;
}

.panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

.field-label {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.text-input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font: 14px/1.4 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fcfcfc;
}

textarea {
  width: 100%;
  min-width: 0;
  height: 610px;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  resize: vertical;
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #fcfcfc;
}

.summary {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--soft);
  margin-bottom: 16px;
}

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

.validation {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #f8fafc;
  font-size: 14px;
  line-height: 1.5;
}

.validation p {
  margin: 6px 0 0;
}

.validation ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.validation.valid {
  border-color: #86efac;
  background: #f0fdf4;
}

.validation.valid_low_confidence {
  border-color: #fde68a;
  background: #fffbeb;
}

.validation.insufficient_signal,
.validation.invalid,
.validation.empty {
  border-color: #fecaca;
  background: #fef2f2;
}

.validation-state {
  color: var(--muted);
  font-size: 13px;
}

.validation-issue-group {
  margin-top: 10px;
}

.delivery-status {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.delivery-status.sending {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.delivery-status.sent {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.delivery-status.blocked {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.run-log {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.run-log.empty {
  color: var(--muted);
}

.run-log.failed {
  border-color: #fecaca;
  background: #fef2f2;
}

.run-log.succeeded {
  border-color: #bbf7d0;
}

.run-log ol {
  margin: 0;
  padding-left: 22px;
}

.run-log-entry {
  margin: 6px 0;
}

.run-log-entry.failed {
  color: #991b1b;
}

.run-log-entry.succeeded {
  color: #166534;
}

.run-log-entry.skipped {
  color: #92400e;
}

.run-log-entry small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.artifact,
.internal-review-artifact {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
  background: #fff;
  min-width: 0;
  overflow-wrap: anywhere;
}

.artifact.empty,
.internal-review-artifact.empty {
  color: var(--muted);
}

.artifact.ready,
.internal-review-artifact.ready {
  border-color: #bbf7d0;
}

.artifact.blocked,
.internal-review-artifact.blocked {
  border-color: #fecaca;
}

.artifact-body h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

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

.artifact-section h3,
.secondary-heading {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.artifact-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin: 10px 0;
  background: #fcfcfc;
}

.artifact-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.artifact-card p,
.artifact-status p,
.artifact-review-ask {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.5;
}

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

.artifact ul,
.internal-review-artifact ul {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.review-console {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
  background: #fff7ed;
}

.library-console {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
}

.library-page {
  max-width: 1680px;
}

.library-hero {
  align-items: center;
}

.library-dashboard {
  border: 1px solid #d1d5db;
  border-radius: 28px;
  padding: clamp(16px, 3vw, 24px);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  min-width: 0;
}

.review-console-header,
.library-console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.review-console-header h3,
.library-console-header h3 {
  margin: 0;
  font-size: 18px;
}

.library-actions,
.library-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.library-page-note {
  color: var(--muted);
  font-size: 13px;
}

.library-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}

.library-filter-field {
  display: grid;
  gap: 6px;
  min-width: min(100%, 240px);
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.library-filter-select {
  min-width: min(100%, 240px);
  min-height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 36px 10px 12px;
  background: #fff;
  color: var(--ink);
  font: 14px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
}

.library-filter-select:focus {
  outline: 3px solid rgba(17, 24, 39, 0.14);
  outline-offset: 1px;
}

.library-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  text-align: right;
}

.library-approve-all {
  flex: 0 0 auto;
  background: #166534;
}

.review-queue,
.review-detail,
.library-status,
.library-list {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  font-size: 14px;
  line-height: 1.5;
}

.review-queue {
  margin-bottom: 12px;
}

.library-status {
  margin-bottom: 12px;
  color: var(--muted);
}

.library-status.sent {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.library-status.blocked {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.review-queue.empty,
.review-queue.pending,
.review-detail.empty,
.review-detail.pending,
.library-list.empty,
.library-list.pending {
  color: var(--muted);
}

.review-queue.failed,
.review-detail.failed,
.library-list.failed {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.review-run-list,
.library-card-list {
  display: grid;
  gap: 8px;
}

.library-list-featured .library-card-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 18px;
  align-items: start;
}

.review-run-card,
.library-card {
  width: 100%;
  min-width: 0;
  text-align: left;
  border: 1px solid #d1d5db;
  background: #fffdf8;
  color: var(--ink);
  padding: 16px;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.review-run-card {
  white-space: pre-line;
}

.review-run-card.selected {
  border-color: #f59e0b;
  background: #fffbeb;
}

.library-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.library-card-header > * {
  min-width: 0;
}

.library-card h4 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.library-statement {
  margin: 14px 0;
  line-height: 1.5;
  font-size: 15px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.library-meta {
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
}

.library-owner-block {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 220px;
  min-width: 0;
}

.library-owner-block strong {
  overflow-wrap: anywhere;
}

.library-owner-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.library-eyebrow,
.library-heuristic-number {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.library-card-title {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.library-chip-row,
.library-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.library-chip,
.library-score-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: #f8fafc;
  color: #374151;
  font-size: 12px;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.library-score-pill {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.library-chip.internal-only {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.library-chip.expert-visible {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.library-chip.expert-draft {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.auto-approval-feedback {
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 10px 12px;
  margin-top: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.45;
}

.auto-approval-feedback.ship {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.auto-approval-feedback.reject {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.auto-approval-feedback p {
  margin: 6px 0 0;
}

.library-why {
  border-left: 3px solid #111827;
  padding: 10px 12px;
  margin: 12px 0;
  background: #f8fafc;
  border-radius: 0 12px 12px 0;
}

.library-why strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.library-why p {
  margin: 0;
  color: #374151;
  font-size: 14px;
  line-height: 1.5;
}

.library-status-badge {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--soft);
  color: var(--ink);
  font-size: 12px;
  text-transform: capitalize;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.library-status-badge.approved {
  background: #dcfce7;
  color: #166534;
}

.library-status-badge.rejected {
  background: #fee2e2;
  color: #991b1b;
}

.library-status-badge.retired {
  background: #e5e7eb;
  color: #374151;
}

.library-action-button {
  padding: 8px 10px;
  border-radius: 10px;
}

.review-detail h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.review-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.review-meta-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fcfcfc;
}

.review-meta-row span,
.review-meta-row strong {
  display: block;
}

.review-meta-row span {
  color: var(--muted);
  font-size: 12px;
}

.review-meta-row strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.review-reasons {
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff7ed;
  color: #7c2d12;
}

.review-stage-details {
  margin-top: 12px;
  color: var(--muted);
}

.review-stage-details ol {
  margin: 8px 0 0;
  padding-left: 20px;
  overflow-wrap: anywhere;
}

.secondary-heading {
  margin-top: 18px;
}

.heuristics {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.card-row {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.5;
}

.card-label {
  display: inline-block;
  min-width: 138px;
  color: var(--muted);
}

.artifact-code-block {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 260px;
  border-radius: 12px;
  padding: 12px;
  background: #111827;
  color: #f9fafb;
  font-size: 12px;
  line-height: 1.5;
}

.expert-page {
  max-width: 1680px;
}

/* Customer console — Skillify brand (IBM Plex Sans + logo lockup) */
.customer-console-body {
  --cc-bg: #eef1f6;
  --cc-bg-deep: #dfe5ef;
  --cc-surface: #f7f9fc;
  --cc-panel: #ffffff;
  --cc-ink: #16223d;
  --cc-muted: #5e7191;
  --cc-line: rgba(147, 161, 188, 0.45);
  --cc-accent: #16223d;
  --cc-accent-soft: #e8edf5;
  --cc-ok: #0f766e;
  --cc-warn: #b45309;
  --cc-danger: #b91c1c;
  --cc-display: "IBM Plex Sans", "Segoe UI", sans-serif;
  --cc-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --cc-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --cc-ease: cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(165deg, var(--cc-bg) 0%, #f7f9fc 46%, var(--cc-bg-deep) 100%);
  color: var(--cc-ink);
  font-family: var(--cc-body);
}

.customer-console-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(11, 31, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 31, 51, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 35%, transparent 85%);
}

.customer-console-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.45;
  will-change: transform;
}

.customer-console-blob-a {
  width: min(52vw, 420px);
  height: min(52vw, 420px);
  top: -8%;
  left: -6%;
  background: radial-gradient(circle, rgba(147, 161, 188, 0.35), transparent 68%);
  animation: customer-blob-drift 18s var(--cc-ease) infinite alternate;
}

.customer-console-blob-b {
  width: min(44vw, 360px);
  height: min(44vw, 360px);
  top: 12%;
  right: -8%;
  background: radial-gradient(circle, rgba(22, 34, 61, 0.14), transparent 70%);
  animation: customer-blob-drift 22s var(--cc-ease) infinite alternate-reverse;
}

@keyframes customer-blob-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(18px, 22px, 0) scale(1.06); }
}

@keyframes customer-panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.customer-console-body > .page {
  position: relative;
  z-index: 1;
}

.customer-page {
  max-width: 1040px;
  color: var(--cc-ink);
}

.customer-page .eyebrow {
  color: var(--cc-muted);
  letter-spacing: 0.1em;
  font-weight: 600;
}

.customer-page .library-page-note {
  color: var(--cc-muted);
}

.customer-page .library-status {
  border-color: var(--cc-line);
}

.customer-page .button-link,
.customer-page button:not(.customer-tab):not(.customer-site-link):not(.ghost) {
  background: var(--cc-accent);
  color: #fff;
  border-radius: 12px;
  transition: background 180ms var(--cc-ease), transform 180ms var(--cc-ease);
}

.customer-page .button-link:hover,
.customer-page button:not(.customer-tab):not(.customer-site-link):not(.ghost):hover {
  background: #21252e;
}

.customer-page .button-link.ghost,
.customer-page button.ghost {
  background: var(--cc-accent-soft);
  color: var(--cc-ink);
}

.customer-page .button-link:focus-visible,
.customer-page button:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 2px;
}

.customer-console-bar {
  position: relative;
  top: auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin: 0 0 20px;
  padding: 12px 0 16px;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.customer-site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.customer-site-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--cc-muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 180ms var(--cc-ease);
}

.customer-site-link:hover,
.customer-site-link:focus-visible {
  color: var(--cc-ink);
  text-decoration: underline;
}

.customer-site-link:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 2px;
}

.customer-console-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.customer-console-brand {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.customer-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.customer-logo-full {
  display: block;
  width: min(220px, 56vw);
  height: auto;
}

.customer-console-product {
  margin: 0.15rem 0 0;
  color: var(--cc-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-transform: lowercase;
  min-height: 1.35em;
}

.customer-typewriter-text {
  white-space: pre;
}

.customer-typewriter-cursor {
  display: inline-block;
  margin-left: 2px;
  font-weight: 400;
  color: var(--cc-ink);
  animation: customer-typewriter-blink 0.9s steps(1, end) infinite;
}

.customer-typewriter-cursor.is-done {
  animation: none;
  opacity: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes customer-typewriter-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer-typewriter-cursor {
    animation: none;
    opacity: 0;
  }
}

.customer-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  margin-left: 0;
  max-width: none;
  width: 100%;
}

.customer-help-site-links a {
  color: var(--cc-accent);
  font-weight: 600;
}

.customer-tab {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 42px;
  min-width: 5.5rem;
  border: 0;
  border-radius: 100px;
  padding: 9px 18px;
  font-family: var(--cc-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #3f3f3f;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.45);
  cursor: pointer;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, #f7f7f7 0%, #d0d0d0 24%, #9a9a9a 52%, #c8c8c8 76%, #efefef 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28),
    0 14px 8px rgba(0, 0, 0, 0.04),
    0 8px 6px rgba(0, 0, 0, 0.08),
    0 3px 3px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  transition:
    transform 160ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 160ms cubic-bezier(0.4, 0, 0.2, 1),
    color 180ms var(--cc-ease),
    filter 180ms var(--cc-ease);
}

.customer-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 28%,
    rgba(255, 255, 255, 0.65) 48%,
    transparent 68%
  );
  background-size: 220% 100%;
  background-position: 120% 0;
  opacity: 0.6;
  mix-blend-mode: soft-light;
  animation: customer-metal-sheen 4.8s ease-in-out infinite;
  z-index: 0;
}

.customer-tab::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(0, 0, 0, 0.12) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 1px rgba(0, 0, 0, 0.12);
  z-index: 0;
}

.customer-tab {
  z-index: 1;
}

.customer-tab:hover {
  color: #222;
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.34),
    0 12px 6px rgba(0, 0, 0, 0.05),
    0 8px 5px rgba(0, 0, 0, 0.08),
    0 4px 4px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.customer-tab:hover::before {
  animation-duration: 1.8s;
  opacity: 0.85;
}

.customer-tab.active {
  color: #f5f5f5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #6e6e6e 0%, #343434 28%, #101010 55%, #262626 78%, #484848 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 14px 8px rgba(0, 0, 0, 0.06),
    0 8px 6px rgba(0, 0, 0, 0.1),
    0 3px 3px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 1px rgba(0, 0, 0, 0.45);
}

.customer-tab.active::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.35) 100%);
}

.customer-tab:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.25),
    inset 0 2px 4px rgba(0, 0, 0, 0.35),
    inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.customer-tab:focus-visible {
  outline: 2px solid #16223d;
  outline-offset: 3px;
}

@keyframes customer-metal-sheen {
  0%,
  55% {
    background-position: 130% 0;
  }
  100% {
    background-position: -40% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer-tab::before {
    animation: none;
  }
}

.customer-auth-card.expert-auth-card {
  border: 1px solid var(--cc-line);
  border-radius: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(11, 31, 51, 0.04);
  min-width: 0;
}

.customer-email-auth:not([hidden]) {
  display: grid;
  gap: 12px;
  margin: 14px 0 4px;
  max-width: 28rem;
}

.customer-email-auth-form {
  display: grid;
  gap: 10px;
}

.customer-email-auth-field {
  display: grid;
  gap: 4px;
  font-size: 0.86rem;
  color: var(--cc-ink-muted, #4a5b6c);
}

.customer-email-auth-field input {
  width: 100%;
  border: 1px solid var(--cc-line, #d5dde6);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--cc-ink, #0b1f33);
  background: #fff;
}

.customer-email-auth-field input:focus {
  outline: 2px solid rgba(11, 31, 51, 0.18);
  outline-offset: 1px;
}

.customer-email-auth-actions {
  margin-top: 2px;
}

#customer-email-auth-status[data-tone='error'] {
  color: #8a1f1f;
}

#customer-email-auth-status[data-tone='ok'] {
  color: #1f5a36;
}

.customer-console-workbench,
.customer-key-panel {
  border: 1px solid var(--cc-line);
  border-radius: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(11, 31, 51, 0.04);
  min-width: 0;
}

.customer-console-workbench > .customer-tab-panel > .eyebrow {
  margin-bottom: 2px;
}

.customer-console-workbench > .customer-tab-panel > h2 {
  margin: 0 0 12px;
  font-family: var(--cc-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.customer-page h1,
.customer-page h2,
.customer-page h3,
.customer-page button,
.customer-page .button-link,
.customer-page .library-status,
.customer-page .expert-list,
.customer-page input,
.customer-page select {
  font-family: var(--cc-body);
}

.customer-account-card h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  font-family: var(--cc-body);
  font-weight: 700;
}

#customer-account-keys-note {
  margin: 14px 0 0;
}

.customer-tab-panel {
  min-width: 0;
}

.customer-tab-panel.active:not([hidden]) {
  animation: customer-panel-in 220ms var(--cc-ease);
}

.customer-tab-panel + .customer-tab-panel {
  margin-top: 0;
}

.customer-tab-panel h2 {
  margin: 4px 0 8px;
}

.customer-account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}

.customer-account-card {
  min-width: 0;
  border: 1px solid var(--cc-line);
  border-radius: 14px;
  background: var(--cc-surface);
  padding: 16px;
}

.customer-account-card h2 {
  margin: 0 0 12px;
}

.customer-detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.customer-detail-list div {
  display: grid;
  grid-template-columns: minmax(112px, 0.35fr) minmax(0, 0.65fr);
  gap: 12px;
  border-top: 1px solid var(--cc-line);
  padding-top: 10px;
}

.customer-detail-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.customer-detail-list dt {
  color: var(--cc-muted);
  font-weight: 600;
}

.customer-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.customer-key-box {
  border: 1px solid var(--cc-line);
  border-radius: 14px;
  padding: 16px;
  background: var(--cc-surface);
  min-width: 0;
}

.customer-legal-accept {
  display: grid;
  gap: 10px;
  margin: 14px 0 4px;
}

.customer-legal-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--cc-ink, #16223d);
}

.customer-legal-check input {
  margin-top: 3px;
  flex: 0 0 auto;
}

.customer-legal-check a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.customer-key-security-note {
  margin-top: 12px;
}

.customer-help-intro {
  max-width: 42rem;
}

.customer-help-section {
  margin-top: 1.5rem;
  max-width: 42rem;
}

.customer-help-section > h3 {
  margin: 0 0 0.5rem;
  font-family: var(--cc-body, 'IBM Plex Sans', sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--cc-ink, #16223d);
}

.customer-help-section .hero-actions {
  margin-top: 0.25rem;
}

.customer-help-claude-steps > li {
  margin-bottom: 0.85rem;
}

.customer-help-screenshot {
  display: block;
  margin: 0.65rem 0 0.15rem;
  max-width: 36rem;
}

.customer-help-screenshot-frame {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(22, 34, 61, 0.14);
  background:
    linear-gradient(180deg, rgba(248, 249, 252, 0.95), rgba(236, 239, 245, 0.9));
}

img.customer-help-screenshot-frame {
  background: #fff;
}

.customer-help-copy-block {
  display: block;
  margin: 0.75rem 0 0.35rem;
  padding: 0.9rem 1rem;
  max-width: 42rem;
  overflow-x: auto;
  border: 1px solid rgba(22, 34, 61, 0.14);
  background: rgba(248, 249, 252, 0.92);
  color: var(--cc-ink, #16223d);
  font-family: ui-monospace, 'IBM Plex Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
}

.customer-help-copy-block:focus-visible {
  outline: 2px solid rgba(22, 34, 61, 0.35);
  outline-offset: 2px;
}

.customer-help-disclaimer {
  margin-top: 1.75rem;
  max-width: 42rem;
}

.customer-legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(22, 34, 61, 0.12);
  color: var(--cc-muted, #5b6578);
  font-size: 0.88rem;
}

.customer-legal-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.customer-legal-page {
  max-width: 44rem;
}

.customer-legal-header {
  margin-bottom: 1.5rem;
}

.customer-legal-article {
  display: grid;
  gap: 0.85rem;
}

.customer-legal-article h2 {
  margin: 0.75rem 0 0;
  font-size: 1.05rem;
}

.customer-legal-article p,
.customer-legal-article ul {
  margin: 0;
  color: var(--cc-muted, #5b6578);
  line-height: 1.55;
}

.customer-legal-article ul {
  padding-left: 1.2rem;
}

.customer-legal-nav {
  margin-top: 2rem;
  color: var(--cc-muted, #5b6578);
  font-size: 0.9rem;
}

.customer-key-box .customer-key-raw {
  display: block;
  margin: 8px 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #16223d;
  color: #f7fafc;
  word-break: break-all;
  font-family: var(--cc-mono);
  font-size: 0.88rem;
}

.customer-key-box .customer-key-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.customer-key-panel .expert-list {
  max-height: none;
  overflow: visible;
}

.customer-env-guidance {
  margin-top: 18px;
}

.customer-env-block {
  margin: 8px 0 10px;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--cc-line);
  border-radius: 12px;
  background: #16223d;
  color: #eef1f6;
  font-size: 0.88rem;
  line-height: 1.5;
}

.customer-env-block code {
  font-family: var(--cc-mono);
  white-space: pre;
  color: inherit;
}

.customer-ledger {
  display: grid;
  gap: 0;
  margin-top: 12px;
  border: 1px solid var(--cc-line);
  border-radius: 8px;
  background: var(--cc-panel);
  overflow: hidden;
}

.customer-ledger.empty {
  padding: 12px 14px;
  color: var(--cc-muted);
  font-size: 0.9rem;
  border-style: dashed;
  background: transparent;
}

.customer-ledger-head,
.customer-ledger-item {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(4.5rem, 0.55fr) minmax(6.5rem, 0.9fr) minmax(4rem, 0.45fr);
  align-items: center;
  gap: 8px 12px;
  padding: 7px 12px;
  min-height: 34px;
}

.customer-ledger-head {
  border-bottom: 1px solid var(--cc-line);
  background: var(--cc-accent-soft);
  color: var(--cc-muted);
  font-family: var(--cc-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.customer-ledger-item {
  border-bottom: 1px solid rgba(147, 161, 188, 0.28);
  background: var(--cc-panel);
  color: var(--cc-ink);
  font-size: 0.86rem;
  line-height: 1.25;
}

.customer-ledger-item:last-child {
  border-bottom: 0;
}

.customer-ledger-item:nth-child(even) {
  background: rgba(238, 241, 246, 0.55);
}

.customer-ledger-item--credit,
.customer-ledger-item--debit {
  /* polarity is carried by .customer-ledger-delta only — keep row chrome muted */
  color: var(--cc-ink);
}

.customer-ledger-title {
  min-width: 0;
  font-weight: 550;
  color: var(--cc-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-ledger-balance,
.customer-ledger-when,
.customer-ledger-delta {
  font-family: var(--cc-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}

.customer-ledger-balance,
.customer-ledger-when {
  color: var(--cc-muted);
  font-size: 0.78rem;
  font-weight: 450;
}

.customer-ledger-balance,
.customer-ledger-delta {
  text-align: right;
  justify-self: end;
}

.customer-ledger-delta {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}

.customer-ledger-item--credit .customer-ledger-delta {
  color: var(--cc-ok);
}

.customer-ledger-item--debit .customer-ledger-delta {
  color: var(--cc-danger);
}

.customer-ledger-head .customer-ledger-col-balance,
.customer-ledger-head .customer-ledger-col-amount {
  text-align: right;
  justify-self: end;
}

#customer-usage-balance,
#customer-credits-balance {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--cc-ink);
  font-variant-numeric: tabular-nums;
}

#customer-credits-exhausted-message {
  margin-top: 16px;
}

.customer-credits-quote {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--cc-line);
}

@media (max-width: 640px) {
  .customer-ledger-head {
    display: none;
  }

  .customer-ledger-item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title delta"
      "meta meta";
    gap: 2px 10px;
    padding: 9px 12px;
    min-height: 0;
  }

  .customer-ledger-title {
    grid-area: title;
  }

  .customer-ledger-delta {
    grid-area: delta;
    align-self: start;
    margin-top: 1px;
  }

  .customer-ledger-balance,
  .customer-ledger-when {
    grid-area: meta;
  }

  .customer-ledger-balance {
    display: none;
  }

  .customer-ledger-when {
    text-align: left;
    justify-self: start;
  }
}

/* Sliding icon CTA — vanilla port of the collaborate pill (no React/shadcn). */
.customer-page a.customer-quote-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  height: 48px;
  padding: 4px 56px 4px 24px;
  overflow: hidden;
  border: none;
  border-radius: 999px;
  background: var(--cc-accent);
  color: #fff;
  font-family: var(--cc-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    padding 500ms var(--cc-ease),
    background 180ms var(--cc-ease),
    transform 180ms var(--cc-ease);
}

.customer-page a.customer-quote-cta:hover {
  padding: 4px 24px 4px 56px;
  background: #101828;
  transform: none;
}

.customer-page a.customer-quote-cta:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 3px;
}

.customer-quote-label {
  position: relative;
  z-index: 1;
  transition: transform 500ms var(--cc-ease);
}

.customer-quote-icon {
  position: absolute;
  top: 50%;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--cc-panel);
  color: var(--cc-ink);
  transform: translateY(-50%);
  transition:
    right 500ms var(--cc-ease),
    transform 500ms var(--cc-ease);
}

.customer-page a.customer-quote-cta:hover .customer-quote-icon {
  right: calc(100% - 44px);
  transform: translateY(-50%) rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
  .customer-page a.customer-quote-cta,
  .customer-quote-label,
  .customer-quote-icon {
    transition: none;
  }

  .customer-page a.customer-quote-cta:hover {
    padding: 4px 56px 4px 24px;
  }

  .customer-page a.customer-quote-cta:hover .customer-quote-icon {
    right: 4px;
    transform: translateY(-50%);
  }
}

.customer-env-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .customer-console-blob-a,
  .customer-console-blob-b,
  .customer-tab-panel.active:not([hidden]) {
    animation: none;
  }

  .customer-tab,
  .customer-site-link,
  .customer-page .button-link,
  .customer-page button {
    transition: none;
  }

  .customer-tab::before {
    animation: none;
  }
}

.claude-setup-page .claude-setup-steps {
  margin: 18px 0 0;
  padding-left: 1.25rem;
}

.claude-setup-page .claude-setup-steps > li {
  margin: 0 0 22px;
}

.claude-setup-page .claude-setup-steps h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.claude-setup-steps.compact {
  margin: 12px 0 16px;
  padding-left: 1.2rem;
}

.claude-setup-steps.compact li {
  margin: 0 0 8px;
}

.claude-setup-substeps {
  margin: 8px 0 0;
  padding-left: 1.1rem;
}

.claude-setup-troubleshoot {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.claude-setup-troubleshoot ul {
  margin: 8px 0 12px;
  padding-left: 1.2rem;
}

.library-page-note.warn {
  color: #92400e;
}

.customer-agent-panel {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--cc-line, #e5e7eb);
}

.customer-agent-title {
  margin: 4px 0 10px;
  font-size: 1.15rem;
  font-family: var(--cc-display, inherit);
}

.customer-agent-steps {
  margin: 0 0 14px 1.1rem;
  padding: 0;
}

.customer-agent-sample-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.92rem;
}

.customer-agent-sample-label select {
  max-width: 28rem;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--cc-line, #d1d5db);
  border-radius: 10px;
  background: #fff;
  font-family: var(--cc-body, inherit);
}

.expert-auth-card,
.expert-workbench,
.expert-submit-panel {
  border: 1px solid #d1d5db;
  border-radius: 24px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

.expert-auth-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.expert-auth-card h2 {
  margin: 0 0 6px;
}

.expert-workbench {
  display: grid;
  grid-template-columns: minmax(380px, 0.95fr) minmax(520px, 1.35fr);
  gap: 18px;
  min-width: 0;
}

.expert-submit-panel {
  max-width: 860px;
  margin: 0 auto;
  min-width: 0;
}

.expert-submit-panel .expert-form {
  margin-bottom: 14px;
}

.expert-plus-link {
  font-weight: 700;
}

.expert-plus-link.compact {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
}

.expert-sidebar,
.expert-detail-panel {
  min-width: 0;
}

.expert-list,
.expert-detail,
.expert-form {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  font-size: 14px;
  line-height: 1.5;
}

.expert-sidebar .library-status {
  display: block;
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
}

.expert-list {
  clear: both;
  margin-bottom: 14px;
  max-height: 700px;
  overflow: auto;
}

.expert-list.empty,
.expert-list.failed,
.expert-detail.empty {
  color: var(--muted);
}

.expert-list.failed {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.expert-list-items {
  display: grid;
  gap: 14px;
}

.expert-list-item {
  cursor: pointer;
  padding: 14px;
  box-shadow: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.expert-list-item:hover,
.expert-list-item:focus {
  border-color: #9ca3af;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.expert-list-item.selected,
.expert-list-item.selected:focus {
  border-color: #111827;
  background: #fffbeb;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.expert-list-item .library-card-header {
  margin-bottom: 10px;
}

.expert-list-item .library-owner-avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.expert-list-item .library-card-title {
  padding-top: 10px;
}

.expert-list-item .library-card h4,
.expert-list-item h4 {
  font-size: 15px;
  line-height: 1.15;
}

.expert-list-item .library-chip-row {
  gap: 5px;
}

.expert-list-item .library-chip {
  font-size: 11px;
  padding: 4px 7px;
}

.expert-list-item .library-statement {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  font-size: 13px;
}

.expert-detail-card {
  margin-bottom: 14px;
}

.expert-detail-card .library-statement {
  font-size: 16px;
}

.expert-detail-card .library-why {
  margin-top: 16px;
}

.expert-form {
  margin-top: 14px;
}

.expert-form label {
  display: block;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.expert-form select,
.expert-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  font-weight: 400;
}

.expert-form h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

#customer-claude-snippet {
  white-space: pre-wrap;
  overflow: auto;
  font-size: 12px;
  line-height: 1.45;
}

.expert-textarea {
  height: 150px;
  margin-bottom: 14px;
}

.expert-textarea.small {
  height: 92px;
}

.expert-history {
  border: 1px solid #fed7aa;
  border-radius: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  background: #fff7ed;
}

.expert-history ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.expert-history li {
  margin-bottom: 6px;
}

.json-output {
  white-space: pre-wrap;
  background: #0f172a;
  color: #e5eefc;
  border-radius: 16px;
  padding: 16px;
  min-height: 280px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel {
    min-height: auto;
  }

  .review-meta-grid {
    grid-template-columns: 1fr;
  }

  .expert-workbench {
    grid-template-columns: 1fr;
  }

  .customer-account-grid {
    grid-template-columns: 1fr;
  }

  .expert-auth-card {
    align-items: flex-start;
    flex-direction: column;
  }

  textarea {
    height: 420px;
  }

  .expert-textarea,
  .expert-textarea.small {
    height: 160px;
  }
}

@media (max-width: 768px) {
  .hero,
  .library-hero {
    gap: 16px;
    margin-bottom: 18px;
  }

  .hero-actions,
  .panel-actions,
  .library-actions,
  .library-card-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .customer-console-bar {
    align-items: stretch;
    padding-top: 10px;
  }

  .customer-console-primary {
    align-items: flex-start;
  }

  .customer-tabs {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }

  .hero-actions > .button-link,
  .hero-actions > button,
  .panel-actions > button,
  .library-card-actions > button {
    flex: 1 1 180px;
  }

  .panel,
  .expert-auth-card,
  .expert-workbench,
  .expert-submit-panel,
  .customer-console-workbench,
  .customer-key-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .panel-header,
  .review-console-header,
  .library-console-header {
    align-items: flex-start;
  }

  textarea {
    height: 320px;
  }

  .expert-textarea {
    height: 140px;
  }

  .expert-textarea.small {
    height: 112px;
  }

  .library-list-featured .library-card-list {
    grid-template-columns: 1fr;
  }

  .library-card-actions {
    justify-content: flex-start;
  }

  .library-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .library-filter-field,
  .library-filter-select {
    width: 100%;
  }

  .library-bulk-actions {
    justify-content: space-between;
    text-align: left;
  }

  .expert-list {
    max-height: none;
  }

  .json-output {
    min-height: 220px;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 12px;
  }

  h1 {
    font-size: 30px;
  }

  .subhead {
    font-size: 15px;
  }

  .hero-actions > .button-link,
  .hero-actions > button,
  .panel-actions > button,
  .library-card-actions > button {
    flex-basis: 100%;
  }

  .expert-sidebar .hero-actions > .expert-plus-link.compact {
    flex: 0 0 44px;
    width: 44px;
  }

  .panel,
  .review-console,
  .library-console,
  .library-dashboard,
  .expert-auth-card,
  .expert-workbench,
  .expert-submit-panel,
  .expert-list,
  .expert-detail,
  .expert-form {
    padding: 14px;
    border-radius: 16px;
  }

  .customer-detail-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .panel-header,
  .review-console-header,
  .library-console-header,
  .library-card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .library-owner-block {
    flex-basis: auto;
  }

  .library-status-badge {
    align-self: flex-start;
  }

  .library-bulk-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .library-approve-all {
    width: 100%;
  }

  .text-input,
  textarea {
    font-size: 16px;
  }

  textarea {
    height: 280px;
  }

  .expert-textarea {
    height: 132px;
  }

  .expert-textarea.small {
    height: 100px;
  }

  .card-label {
    display: block;
    min-width: 0;
    margin-bottom: 2px;
  }

  .json-output,
  .artifact-code-block {
    max-height: 50vh;
  }
}

@media (max-width: 390px) {
  .page {
    padding: 10px;
  }

  h1 {
    font-size: 28px;
  }

  .panel,
  .review-console,
  .library-dashboard,
  .expert-auth-card,
  .expert-workbench,
  .expert-submit-panel,
  .expert-list,
  .expert-detail,
  .expert-form {
    padding: 12px;
  }

  textarea {
    height: 260px;
  }
}
