@import url('https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --color-bg: #FFFBF7;
    --color-bg-dark: #efefef;
    --color-border: #000;
    --color-text: #000;
    --color-text-muted: #333;
    --color-primary: #0056B3;
    --color-primary-hover: #007BFF;
    --color-disabled: #CCC;
    --color-success: #28A745;
    --color-error: #DC3545;
    --font-family: "Libre Caslon Text", serif;
    --font-size-xlg: 28px;
    --font-size-lg: 22px;
    --font-size-md: 18px;
    --font-size-sm: 14px;
    --line-height: 1.6;
    --space-unit: 10px;
    --space-sm: 10px;
    --space-md: 20px;
    --radius: 4px;
    --transition-fast: 0.3s ease-in;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-lg);
    line-height: var(--line-height);
    color: var(--color-text);
    background: var(--color-bg);
    zoom: 1;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: var(--space-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6, h7, h8{
    font-weight: normal;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
}

#prototype-warning{
    text-align: center;
    padding: 4px;
    font-size: var(--font-size-sm);
}

.logo{
    width: 30%;
    display: block;
    margin-left: -0.6em;
}

.logo img{
    min-width: 100%;
}

.logo img{
    cursor: pointer;
}

nav {
    align-items: center;
    gap: 12px;
}

.nav-user {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-sm);
}

#prototype-warning{
    text-align: center;
    padding: 4px;
    font-size: var(--font-size-sm);
}

.logo{
    display: block;
    max-width: 200px;
}

.logo img{
    width: 100%;
    cursor: pointer;
}

.nav-main {
    align-items: center;
    gap: 12px;
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.nav-main .nav-link {
    font-size: var(--font-size-lg);
    text-decoration: underline;
}

.nav-account {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

.nav-user {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    white-space: nowrap;
}

.nav-link {
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    text-decoration: none;
}

.nav-link:hover {
    color: var(--color-primary-hover);
}

button.nav-link {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    text-decoration: none;
}

button.nav-link:hover {
    color: var(--color-primary-hover);
    cursor: pointer;
}

/* Main */
main {
    flex: 1;
}

/* Footer */
footer {
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
}

.footer-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

footer .links li{
    font-size: var(--font-size-sm);
    display: inline;
}

footer .links a{
    color: var(--color-text);
}

.usage-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.usage-bar-container {
    flex: 1;
    max-width: 120px;
    height: 4px;
    background: var(--color-bg-dark);
    border-radius: 2px;
    overflow: hidden;
}

.usage-bar {
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.usage-bar-over {
    background: var(--color-error);
}

.usage-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

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

.btn:disabled {
    background: var(--color-disabled);
    cursor: not-allowed;
}

/* Forms */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: var(--font-size-md);
    margin-bottom: 4px;
    color: var(--color-text-muted);
}

input[type="email"],
input[type="password"],
input[type="text"],
textarea {
    width: 100%;
    padding: var(--space-sm);
    background-color: white;
    border: 1px solid black;
    border-radius: var(--radius);
    font-size: var(--font-size-md);
    font-family: var(--font-family);
    resize: vertical;
    outline: none;
    box-shadow: none; /* Removes additional glow effects in some versions */
    -webkit-box-shadow: none; /* Specific for WebKit/Safari */
}

textarea:focus{
   border: 1px solid blue;
}

/* Auth form */
.auth-form {
    max-width: 640px;
    margin: 0 auto;
}

.auth-form h1 {
    margin-bottom: var(--space-md);
}

.auth-form .btn{
  display: block;
  width: 100%;
}

.auth-form .btn + .plan-description{
  margin-top: 1em;
}

.auth-form #sign-up-description{
  margin-bottom: 1em;
}

.auth-form form{
  margin-bottom: 2em;
  padding: 2em;
  border: 1px solid gray;
  background-color: white;
  border-radius: 4px;
}

.auth-form hr{
  margin: 2em 0;
  border-top-width: 2px;
  border-top-style: dashed;
}

/* New Session */
#sign-up-or-log-in.auth-form form{
  background-color: transparent;
  border: none;
  padding: 0;
}

#sign-up-or-log-in.auth-form form .buttons{
  display: flex;
}

#sign-up-or-log-in.auth-form form .buttons > *{
  display: flex;
}

.auth-form hr{

}

/* Settings form */
.settings-form {
    max-width: 500px;
    margin: 60px auto;
}

.settings-form h1 {
    margin-bottom: var(--space-md);
}

.settings-form h2 {
    margin-bottom: var(--space-sm);
    font-weight: normal;
}

.settings-form hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-md) 0;
}

.settings-billing p {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-sm);
}

.success-message {
    color: var(--color-success);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-sm);
}

.btn-secondary {
    background: var(--color-text-muted);
}

.btn-secondary:hover {
    background: var(--color-text);
}

/* Errors */
.errors {
    list-style: none;
    margin-bottom: 12px;
    padding: var(--space-sm);
    background: #FFF0F0;
    border: 1px solid var(--color-error);
    border-radius: var(--radius);
}

.errors li {
    font-size: var(--font-size-sm);
    color: var(--color-error);
}

/* Conversations list */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.list-header h1 {
    font-size: 22px;
}

.conversation-items {
    list-style: none;
}

.conversation-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border: 1px solid black;
    background-color: white;
    margin: 1em 0;
    padding: 0.75em;
    border-radius: var(--radius);
}

.conversation-link {
    flex: 1;
    text-decoration: none;
    color: var(--color-text);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.conversation-link:hover .conversation-title {
    color: var(--color-primary);
}

.conversation-title {
    font-size: var(--font-size-md);
    max-width: 80ch;
    overflow: hidden;
    text-overflow: ellipsis;
}

.back-link {
    display: inline-block;
    margin-bottom: 0.5em;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--font-size-sm);
}

.back-link:hover {
    color: var(--color-primary);
}

.conversation-meta {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.delete-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.5;
}

.delete-btn:hover {
    opacity: 1;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-md) 0;
}

.pagination-link {
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    text-decoration: none;
}

.pagination-link:hover {
    color: var(--color-primary-hover);
}

.pagination-info {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

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

/* Chat */
.chat-container {
    display: flex;
    flex-direction: column;
    min-height: 60vh;
}

.messages {
    flex: 1;
    padding-bottom: var(--space-md);
    display: flex;
    flex-direction: column;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--color-text-muted);
    font-size: var(--font-size-lg);
    text-align: center;
}

.message {
    padding: 2px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: fadeIn 0.3s ease-in;
    margin-bottom: 16px;
}

.user-message {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.user-message .message-body {
    font-family: var(--font-family);
    background: white;
    border: 1px solid black;
    padding: 12px 16px;
    border-radius: var(--radius);
    max-width: 80%;
    font-size: var(--font-size-md);
    text-align: justify;
    white-space: pre-wrap;
    line-height: var(--line-height);
    overflow: hidden;
}

.user-message .message-actions {
    flex-basis: 100%;
    justify-content: flex-end;
    margin: -0.3em 0;
}

.agent-message .message-body {
    font-size: var(--font-size-md);
    line-height: var(--line-height);
    text-align: justify;
    overflow: hidden;
}

.md-pending {
    visibility: hidden;
}

.agent-message .message-body p:first-child {
    margin-top: 0;
}

.agent-message .message-body p:last-child {
    margin-bottom: 0;
}

.agent-message .perspective-text ul,
.agent-message .perspective-text ol,
.agent-message .perspective-text p,
.agent-message .message-body ul,
.agent-message .message-body ol,
.agent-message .message-body p {
    margin: 1em 0;
}

.agent-message .perspective-text li,
.agent-message .message-body li {
    margin: 0.5em 0;
}

.agent-message .perspective-text ul,
.agent-message .perspective-text ol,
.agent-message .message-body ul,
.agent-message .message-body ol {
    padding-left: 1.5em;
}

.agent-message .message-body code {
    font-family: monospace;
    font-size: 0.9em;
    background: var(--color-bg-dark);
    padding: 0.15em 0.3em;
    border-radius: 3px;
}

.agent-message .message-body pre {
    background: var(--color-bg-dark);
    padding: 0.75em 1em;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 0.5em 0;
}

.agent-message .message-body pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

.agent-message .message-body blockquote {
    border-left: 3px solid var(--color-border);
    padding-left: 0.75em;
    margin: 0.5em 0;
    color: var(--color-text-muted);
}

.agent-message .message-body h1,
.agent-message .message-body h2,
.agent-message .message-body h3,
.agent-message .message-body h4 {
    margin: 0.75em 0 0.25em;
    font-weight: 700;
}

.individual-perspective .perspective-text.md-pending {
    visibility: hidden;
}

.individual-perspective .perspective-text p:first-child {
    margin-top: 0;
}

.individual-perspective .perspective-text p:last-child {
    margin-bottom: 0;
}

.agent-response {
    width: 100%;
}

/* Thinking block */
.thinking-block {
    margin-bottom: 12px;
}

.thinking-block summary {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    user-select: none;
}

.perspectives {
    margin-top: 8px;
    padding: 12px;
    border-radius: var(--radius);
}

.perspective {
    margin-bottom: 15px;
    font-size: var(--font-size-md);
    line-height: 1.4;
    text-align: justify;
    display: flex;
}

.perspective:last-child {
    margin-bottom: 0;
}

.perspective-name {
    font-weight: 700;
    margin-right: 8px;
    text-transform: capitalize;
}

.perspective-statement {
  display: inline-block;
  font-size: var(--font-size-md);
}

.hide-perspectives-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    cursor: pointer;
    margin-top: 4px;
    user-select: none;
}

.hide-perspectives-toggle input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.agent-select {
    padding: 6px 10px;
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    color: var(--color-text-muted);
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    margin-bottom: 2px;
    visibility: hidden;
}

.agent-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.agent-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.individual-perspective {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1em;
    padding-right: 1em;
}

.individual-perspective .perspective-emoji {
    margin-right: 0.25em;
    font-size: 1em;
    display: inline-block;
    position: relative;
    top: -3px;
    flex-shrink: 0;
    line-height: var(--line-height);
}

.perspective-emoji-hidden {
    visibility: hidden;
}

.individual-perspective .perspective-text {
    flex: 1;
    font-size: var(--font-size-md);
    line-height: var(--line-height);
    text-align: justify;
}

.individual-perspective + .message-body {
    margin-top: 0;
}

.perspective-divider {
    color: var(--color-text-muted);
    font-size: var(--font-size-md);
    user-select: none;
}

/* Contribution bar (linear pie chart) */
.contribution-bar {
    margin-top: 12px;
    margin-bottom: 0;
}

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    align-items: center;
}

.message-actions form {
    display: inline;
}

.btn-action {
    font-size: 0.75rem;
    background: transparent;
    color: var(--color-text-muted);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-family);
    border: none;
    text-decoration: underline;
}

.btn-action:hover{
  color: var(--color-text);
}

.contribution-segments {
    display: flex;
    height: 6px;
    overflow: hidden;
}

.contribution-segments .segment {
    height: 100%;
    min-width: 1px;
    transition: width 0.3s ease;
}

.contribution-labels {
    position: relative;
    height: 22px;
    margin-top: 2px;
}

.contribution-labels .label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 14px;
    line-height: 22px;
}

@media print {
    .contribution-segments .segment {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Chat input */
.chat-input {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.chat-input textarea {
    flex: 1;
    min-width: 0;
}

.chat-input #send-btn {
}

.chat-input-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-basis: 100%;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.chat-input-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Status bar */
.status-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.status-bar .status {
    margin-bottom: 0;
    flex: 0 0 auto;
}

.btn-upload {
    background: transparent;
    cursor: pointer;
    border: none;
    font-size: 0.75rem;
    font-family: var(--font-family);
    color: var(--color-text-muted);
    margin-left: auto;
    white-space: nowrap;
    text-decoration: underline;
}

.btn-upload:hover {
    color: var(--color-text);
}

.btn-upload:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.file-input {
    display: none;
}

.btn-file {
    display: none;
}

.attachment-list {
    flex-basis: 100%;
    margin-top: -4px;
    margin-bottom: 4px;
}

.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 10px 20px;
    font-size: var(--font-size-sm);
    color: #ffffff;
}

.attachment-remove {
    background: transparent;
    border: none;
    cursor: pointer;
    color: white;
    font-size: var(--font-size-md);
    padding: 0 2px;
    position: relative;
    right: -7px;
    line-height: 1;
}

#status-indicator {
}

#agent-select {
  max-width: 100%;
  overflow: hidden;
}

/* Status */
.status {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.status.connected {
    color: var(--color-success);
}

.status.disconnected {
    color: var(--color-error);
}

/* Error page */
.error-page {
    text-align: center;
    padding: 60px 0;
}

.error-page h1 {
    margin-bottom: var(--space-md);
}

.error-page p {
    margin-bottom: var(--space-md);
    color: var(--color-text-muted);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.3s ease-in;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #aaa;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media only screen and (max-width: 1020px) {
  .user-message {
    justify-content: flex-start;
    width: 100%;
  }

  .user-message .message-body,
  .agent-message .message-body,
  .individual-perspective .perspective-text,
  .conversation-title{
    font-size: 0.73em;
  }

  .user-message .message-body {
    width: 100%;
    max-width: 100%;
  }

  .chat-input {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-input textarea {
    width: 100%;
  }

  .chat-input-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .chat-input #send-btn {
    width: 100%;
  }

  .individual-perspective {
      padding-right: 0.5em;
  }

  .agent-card {
      flex-direction: column;
      align-items: stretch;
      text-align: left;
  }

  .agent-card-main {
      width: 100%;
  }

  .agent-card-actions {
      flex-direction: row;
      width: 100%;
      margin-top: 12px;
  }

  .agent-card-actions .btn {
      flex: 1;
      display: block;
      text-align: center;
  }
}

/* Admin */
.admin-customers {
    width: 100%;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-md) 0;
    font-size: 0.75em;
}

.admin-table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid var(--color-border);
    font-weight: normal;
    color: var(--color-text-muted);
}

.admin-table th a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.admin-table th a:hover {
    color: var(--color-primary);
}

.admin-table td {
    padding: 4px 8px;
    border-bottom: 1px solid var(--color-border);
    line-height: 1.4;
}

.admin-row:hover {
    background-color: var(--color-bg-dark);
}

.admin-cell-number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.admin-cell-date {
    white-space: nowrap;
    color: var(--color-text-muted);
}

.admin-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    text-transform: capitalize;
}

.admin-status-active {
    background-color: #d4edda;
    color: #155724;
}

.admin-status-trialing {
    background-color: #cce5ff;
    color: #004085;
}

.admin-status-past_due,
.admin-status-unpaid,
.admin-status-canceled {
    background-color: #f8d7da;
    color: #721c24;
}

.admin-status-none {
    background-color: var(--color-bg-dark);
    color: var(--color-text-muted);
}

.admin-uuid-link {
    color: var(--color-primary);
    text-decoration: none;
    font-family: var(--font-mono, monospace);
}

.admin-uuid-link:hover {
    text-decoration: underline;
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
    margin: var(--space-md) 0;
}

.admin-detail-label {
    color: var(--color-text-muted);
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-detail-value {
    font-size: 0.75em;
}

.admin-detail-section {
    margin: var(--space-lg) 0;
}

.admin-detail-section h3 {
    margin-bottom: var(--space-sm);
    font-size: 0.85em;
    color: var(--color-text-muted);
}

/* Agent list */
.agents-list {
    margin: 0 auto;
}

.agent-search-form {
    margin-bottom: var(--space-md);
    display: none;
}

.agent-search-input {
    width: 100%;
    padding: 8px 12px;
    font-size: var(--font-size-md);
    font-family: var(--font-family);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: white;
    outline: none;
}

.agent-search-input:focus {
    border-color: var(--color-primary);
}

.agent-items {
    list-style: none;
    padding: 0;
}

.agent-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    gap: 16px;
    font-size: 14px;
}

.agent-card + .agent-card {
    border-top: 1px solid var(--color-border);
}

.agent-card-main {
    flex: 1;
    min-width: 0;
}

.agent-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.agent-display-name {
    font-size: var(--font-size-md);
    font-weight: 700;
}

.agent-meta {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.agent-meta .agent-version {
    margin-left: 8px;
}

.agent-perspectives {
  margin-bottom: 0.5em;
}

.agent-description {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin: 0 0 0.5em 0;
    line-height: 1.4;
}

.agent-perspectives-emoji {
    margin-bottom: 6px;
    font-size: var(--font-size-md);
}

.agent-perspectives-emoji .agent-emoji {
    margin-right: 4px;
}

.agent-tags {
    display: none;
    flex-wrap: wrap;
    font-size: 14px;
}

.agent-tag {
    display: inline;
}

.agent-tag + .agent-tag::before {
    content: ", ";
}

.agent-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.agent-card-actions .btn {
    font-size: var(--font-size-sm);
    text-align: center;
    white-space: nowrap;
}

/* Tier bar (3-segment token usage indicator) */
.tier-bar {
    display: block;
    gap: 3px;
    align-items: center;
    margin-bottom: 0.5em;
}

.tier-segment {
    display: inline-flex;
    width: 20px;
    height: 8px;
    background: var(--color-bg-dark);
    border-radius: 2px;
}

.tier-filled {
    background: var(--color-primary);
}

.tier-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-left: 6px;
}

.tier-bar-label {
    font-size: 14px;
}

/* Agent detail */
.agent-detail {
    margin: 0 auto;
}

.agent-detail h1 {
    font-size: var(--font-size-xlg);
    margin-bottom: var(--space-sm);
}

.agent-detail-header {
    margin-bottom: var(--space-md);
}

.agent-detail-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.agent-detail-title-row .btn {
    flex-shrink: 0;
}

.agent-detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.agent-detail-id {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.agent-detail-id code {
    font-family: monospace;
    font-size: 0.85em;
}

.agent-detail .agent-tags {
    margin-bottom: var(--space-md);
}

.agent-detail-perspectives {
    margin-top: var(--space-md);
}

.agent-detail-perspectives h2 {
    font-size: var(--font-size-md);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.perspective-section {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 12px;
    overflow: hidden;
}

.perspective-emoji-column {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    padding:  0px 10px 0px 10px;
}

.perspective-content {
    flex: 1;
    min-width: 0;
    padding: 4px 8px 8px 8px;
}

.perspective-header {
    margin-bottom: 6px;
}

.perspective-emoji-large {
    display: none;
}

.perspective-display-name {
    font-size: var(--font-size-md);
    font-weight: 700;
}

.perspective-role-badge {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    background: var(--color-bg-dark);
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.perspective-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}
