/* css/components.css — buttons, bubbles, cards, inputs */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  transition: background 120ms, color 120ms, border 120ms, box-shadow 120ms;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}
.btn-primary:hover:not(:disabled) { background: var(--btn-primary-hover); }
.btn-secondary {
  color: var(--btn-secondary-text);
  border-color: var(--accent-light);
}
.btn-danger {
  background: #fff;
  color: var(--dot-red);
  border-color: var(--dot-red);
}
.btn-danger:hover:not(:disabled) { background: var(--dot-red); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--sidebar-hover);
  color: var(--accent-dark);
}
.btn-full { width: 100%; }
.btn-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 12px;
  margin-top: 8px;
  background: transparent;
  border: 1px dashed var(--accent-light);
  border-radius: var(--r-md);
  color: var(--accent-primary);
  font-weight: 500;
}
.btn-add:hover { background: var(--bg-card); }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top:20px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--accent-light);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: 14px;
  transition: border 120ms, box-shadow 120ms;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(117, 13, 55, 0.12);
}
.field .hint { color: var(--text-muted); font-size: 12px; }
.form-error {
  color: var(--dot-red);
  font-size: 13px;
  min-height: 1.2em;
}

/* Sidebar items */
.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-md);
  color: var(--text-primary);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  transition: background 100ms, color 100ms;
}

/* Leading Feather icons: fixed flex slot so long titles / meta never squeeze SVG width */
.sidebar-item > svg.feather {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  display: block;
}

.sidebar-row {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.sidebar-row .sidebar-item {
  flex: 1 1 auto;
  min-width: 0;
}

.sidebar-row .icon-btn.delete {
  flex: 0 0 auto;
  padding: 6px;
  border-radius: var(--r-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 100ms, color 100ms, background 100ms;
}

.sidebar-row:hover .icon-btn.delete,
.sidebar-row .icon-btn.delete:focus-visible {
  opacity: 1;
}

.sidebar-row .icon-btn.delete:hover {
  color: var(--danger, #ef4444);
  background: rgba(239, 68, 68, 0.1);
}

.sidebar-row .icon-btn.delete i {
  width: 16px;
  height: 16px;
  display: block;
}

/* Compact "+" action button used in sidebar section headers. */
.icon-btn.add {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm, 6px);
  border: 1px solid var(--accent-light);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.icon-btn.add:hover {
  background: var(--sidebar-hover);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}
.icon-btn.add:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.icon-btn.add i { width: 14px; height: 14px; display: block; }
.sidebar-item:hover { background: var(--sidebar-hover); }
.sidebar-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-txt);
}
.sidebar-item .name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-item .meta { font-size: 11px; color: var(--text-muted); }
.sidebar-item.active .meta { color: rgba(255,255,255,0.75); }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}
.status-dot.green { background: var(--dot-green); }
.status-dot.red   { background: var(--dot-red); }
.status-dot.amber { background: var(--dot-amber); }

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.user-card .user-account-toggle {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}
.user-card .avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--accent-primary);
  color: var(--text-inverse);
  display: grid;
  place-items: center;
  font-weight: 600;
}
.user-card .info { flex: 1 1 auto; overflow: hidden; }
.user-card .info .email {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Bubbles */
.bubble {
  max-width: 720px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
  box-shadow: var(--shadow-card);
}
.bubble.user {
  align-self: flex-end;
  background: var(--bubble-user-bg);
  color: var(--bubble-user-txt);
  border-bottom-right-radius: 4px;
}

/* Summary line shown under a user bubble when the turn included file
   attachments. Mirrors the paperclip chip style but sits in the transcript. */
.user-attachment-summary {
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 80%;
  margin-top: -4px;
}
.user-attachment-summary .summary-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-input);
  border: 1px solid var(--accent-light);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--text-secondary);
  align-self: flex-end;
}
.user-attachment-summary i {
  width: 12px; height: 12px; display: block;
  color: var(--accent-primary);
}
.bubble.assistant {
  align-self: flex-start;
  background: var(--bubble-asst-bg);
  color: var(--bubble-asst-txt);
  border: 1px solid var(--bubble-border);
  border-bottom-left-radius: 4px;
}
.bubble.assistant .rich + .auto-media { margin-top: 10px; }
.bubble.assistant .auto-media > * + * { margin-top: 10px; }

/* Rich markdown/HTML rendered inside assistant bubbles. `white-space` on the
   parent bubble is pre-wrap; inside .rich we let the block elements flow. */
.bubble.assistant .rich { white-space: normal; }
.bubble.assistant .rich > *:first-child { margin-top: 0; }
.bubble.assistant .rich > *:last-child  { margin-bottom: 0; }
.bubble.assistant .rich p { margin: 0 0 8px; }
.bubble.assistant .rich ul,
.bubble.assistant .rich ol { margin: 0 0 8px 20px; padding: 0; }
.bubble.assistant .rich li { margin: 2px 0; }
.bubble.assistant .rich h1,
.bubble.assistant .rich h2,
.bubble.assistant .rich h3,
.bubble.assistant .rich h4 {
  margin: 10px 0 6px;
  color: var(--accent-dark);
  font-weight: 600;
  line-height: 1.25;
}
.bubble.assistant .rich h1 { font-size: 20px; }
.bubble.assistant .rich h2 { font-size: 17px; }
.bubble.assistant .rich h3 { font-size: 15px; }
.bubble.assistant .rich h4 { font-size: 14px; }
.bubble.assistant .rich a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bubble.assistant .rich a:hover { color: var(--accent-dark); }
.bubble.assistant .rich code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: rgba(117, 13, 55, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}
.bubble.assistant .rich pre {
  margin: 8px 0;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--accent-light);
  border-radius: var(--r-md);
  overflow-x: auto;
}
.bubble.assistant .rich pre code { background: transparent; padding: 0; }
.bubble.assistant .rich blockquote {
  margin: 8px 0;
  padding: 6px 12px;
  border-left: 3px solid var(--accent-primary);
  color: var(--text-secondary);
  background: rgba(117, 13, 55, 0.04);
}
.bubble.assistant .rich table {
  border-collapse: collapse;
  margin: 8px 0;
  width: 100%;
  font-size: 13px;
}
.bubble.assistant .rich th,
.bubble.assistant .rich td {
  border: 1px solid var(--accent-light);
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}
.bubble.assistant .rich th { background: rgba(117, 13, 55, 0.06); font-weight: 600; }
.bubble.assistant .rich iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--r-md);
}
.bubble.assistant .rich hr { border: 0; border-top: 1px solid var(--accent-light); margin: 12px 0; }

/* Thumbnail grid rendered when the assistant message contains image URLs. */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  width: 100%;
}
.image-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--accent-light);
  border-radius: var(--r-md);
  padding: 6px;
  min-width: 0;
}
.image-tile .thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: calc(var(--r-md) - 2px);
  background: var(--bg-input);
}
.image-tile .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 160ms ease;
}
.image-tile:hover .thumb img { transform: scale(1.03); }
.image-tile .tile-actions {
  display: flex;
  justify-content: stretch;
}
.image-tile .tile-actions .btn {
  flex: 1 1 auto;
  padding: 6px 8px;
  font-size: 12px;
  gap: 4px;
}
.image-tile .tile-actions .btn i { width: 14px; height: 14px; }
.image-tile .caption {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Video player list — one 16:9 player per URL with download/open actions. */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--accent-light);
  border-radius: var(--r-md);
  padding: 6px;
}
.video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: calc(var(--r-md) - 2px);
  display: block;
}
.video-card .tile-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.video-card .tile-actions .btn { padding: 6px 10px; font-size: 12px; }
.video-card .tile-actions .btn i { width: 14px; height: 14px; }

/* Audio player list — compact row with inline controls + download icon. */
.audio-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.audio-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--accent-light);
  border-radius: var(--r-md);
  padding: 6px 8px;
}
.audio-card audio { flex: 1 1 auto; min-width: 0; }
.audio-card .btn.download { padding: 6px; }
.audio-card .btn.download i { width: 14px; height: 14px; }

/* Document grid — file-type icon tile with download button. */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.doc-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--accent-light);
  border-radius: var(--r-md);
  padding: 12px 10px;
  text-align: center;
}
.doc-tile .doc-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border-radius: var(--r-md);
  padding: 16px 0;
}
.doc-tile .doc-icon i {
  width: 36px;
  height: 36px;
  color: var(--accent-primary);
}
.doc-tile .doc-icon .ext {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--accent-light);
  border-radius: 4px;
  padding: 1px 4px;
}
.doc-tile .doc-name {
  font-size: 12.5px;
  color: var(--text-primary, var(--accent-dark));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-tile .tile-actions { display: flex; }
.doc-tile .tile-actions .btn {
  flex: 1 1 auto;
  padding: 6px 8px;
  font-size: 12px;
  gap: 4px;
}
.doc-tile .tile-actions .btn i { width: 14px; height: 14px; }

.bubble.assistant.thinking {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  min-height: 0;
  line-height: 1.3;
  color: var(--text-muted);
  font-size: 13px;
}

.bubble.assistant.thinking .thinking-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.bubble.assistant.thinking .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.45;
  animation: cmsai-thinking 1.2s infinite ease-in-out;
}

.bubble.assistant.thinking .dot:nth-child(2) { animation-delay: 0.15s; }
.bubble.assistant.thinking .dot:nth-child(3) { animation-delay: 0.30s; }

.bubble.assistant.thinking .thinking-label {
  display: inline-block;
  font-style: italic;
  max-width: min(560px, 92vw);
  white-space: normal;
}

/* Rate-limit retry state: subtle amber tint + slower dot pulse so the
   user reads it as "still working" rather than an error. The orchestrator
   emits stage="rate_limit" on 429/529 retries from Anthropic. */
.bubble.assistant.thinking[data-stage="rate_limit"] .thinking-label {
  color: var(--warning, #b45309);
}
.bubble.assistant.thinking[data-stage="rate_limit"] .dot {
  background: var(--warning, #b45309);
  animation-duration: 1.8s;
}

/* Slow Sitefinity API: longer explanatory message after ~30 s */
.bubble.assistant.thinking[data-stage="tool_slow"] .thinking-label {
  color: var(--text-secondary, inherit);
}
.bubble.assistant.thinking[data-stage="tool_slow"] .dot {
  animation-duration: 1.65s;
}

@keyframes cmsai-thinking {
  0%, 80%, 100% { transform: translateY(0);    opacity: 0.35; }
  40%           { transform: translateY(-4px); opacity: 1; }
}

/* Approval card */
.approval-card {
  align-self: stretch;
  background: var(--approval-bg);
  border: 1px solid var(--approval-border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.approval-card .header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--accent-primary);
}
.approval-card .summary { color: var(--accent-dark); line-height: 1.45; }
.approval-card .approval-hint {
  font-size: 13px;
  line-height: 1.45;
  color: var(--accent-dark);
  background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
  border: 1px solid var(--accent-light);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}
.approval-card .approval-entity-preview {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr;
  gap: 4px 14px;
  font-size: 13px;
  align-items: baseline;
}
.approval-card .approval-entity-preview dt {
  margin: 0;
  font-weight: 600;
  color: var(--text-muted, var(--accent-dark));
  opacity: 0.9;
}
.approval-card .approval-entity-preview dd {
  margin: 0;
  color: var(--accent-dark);
  word-break: break-word;
}
.approval-card .approval-tech {
  font-size: 12px;
  color: var(--accent-dark);
}
.approval-card .approval-tech summary {
  cursor: pointer;
  font-weight: 600;
  padding: 4px 0;
}
.approval-card .approval-tool-pre {
  margin: 8px 0 0;
  padding: 10px;
  border-radius: var(--r-sm);
  background: var(--bg-muted, var(--bg-card));
  border: 1px solid var(--accent-light);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.approval-card .diff {
  font-family: var(--font-mono);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.approval-card .diff .row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
}
.approval-card .diff .row.old {
  background: var(--diff-old-bg);
  color: var(--diff-old-txt);
}
.approval-card .diff .row.new {
  background: var(--diff-new-bg);
  color: var(--diff-new-txt);
}
.approval-card .diff .label {
  font-weight: 600;
  opacity: 0.8;
}
.approval-card .actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
  flex-wrap: wrap;
}
/* Auto-approved cards are informational rather than action-required, so we
   tone them down (less saturated background, muted header) to make the
   in-progress bulk run easier to scan. */
.approval-card.auto-approved {
  background: var(--bg-card);
  border-color: var(--accent-light);
  opacity: 0.85;
}
.approval-card.auto-approved .header {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Bulk write approval + result cards */
.bulk-approval-card .bulk-meta,
.bulk-result-card .bulk-stats {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.bulk-preview-list,
.bulk-fail-list {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-secondary);
}
.bulk-preview-more {
  font-style: italic;
  color: var(--text-muted);
}
.bulk-result-card {
  align-self: stretch;
  background: var(--bg-card);
  border: 1px solid var(--accent-light);
  border-radius: var(--r-lg);
  padding: 14px 16px;
}
.bulk-result-card .header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--accent-dark);
}
.bulk-result-card .actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.bubble.thinking .bulk-progress {
  margin-top: 10px;
  width: 100%;
}
.bulk-progress-track {
  height: 6px;
  background: var(--bg-sidebar);
  border-radius: 999px;
  overflow: hidden;
}
.bulk-progress-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 999px;
  transition: width 200ms ease;
}
.bulk-progress-text {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Disambiguation */
.disambiguation-list {
  align-self: stretch;
  background: var(--bg-card);
  border: 1px solid var(--accent-light);
  border-radius: var(--r-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.disambiguation-row {
  padding: 10px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 100ms, border-color 100ms;
}
.disambiguation-row:hover {
  background: var(--bg-sidebar);
  border-color: var(--accent-light);
}
.disambiguation-row .title {
  font-weight: 600;
  color: var(--accent-dark);
}
.disambiguation-row .meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Composer */
.composer {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  resize: none;
  min-height: 24px;
  max-height: 180px;
  padding: 6px 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}
.send-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  background: var(--accent-primary);
  color: var(--text-inverse);
  border: none;
  flex-shrink: 0;
}
.send-btn:hover:not(:disabled) { background: var(--btn-primary-hover); }
.send-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--accent-light);
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pill.red   { background: #fde8ec; color: var(--dot-red); }
.pill.amber { background: #fff4d6; color: #8a6100; }

/* ── Slim landing footer ───────────────────────────────────────────────────
   Used by _LandingLayout when the rich marketing footer isn't shown (auth
   pages, /privacy, etc.). Always visible across all landing-style pages so
   "Powered by Elabry" and "Privacy Policy" links are reachable site-wide. */
.footer-bar {
  border-top: 1px solid var(--accent-light);
  background: var(--bg-card);
  padding: 14px 24px;
  display: flex;
  justify-content: center;
}
.footer-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.footer-bar-inner a {
  color: var(--text-secondary);
  text-decoration: none;
}
.footer-bar-inner a:hover { color: var(--accent-primary); text-decoration: underline; }
.footer-bar-sep { color: var(--text-muted); opacity: 0.6; }

/* Sidebar footer line for _DashboardLayout — placed inside .user-section so
   it stays pinned to the bottom of the sidebar across every dashboard page. */
.sidebar-footer-line {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--sidebar-divider);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.sidebar-footer-line a {
  color: var(--text-secondary);
  text-decoration: none;
}
.sidebar-footer-line a:hover { color: var(--accent-primary); text-decoration: underline; }

/* Inline Elabry wordmark used inside "Powered by …" links across both
   layouts. The link itself never underlines (the logo is the brand mark);
   sizing is controlled by .elabry-mark-{sm,md} so the same image fits the
   slim sidebar/auth-footer line as well as the taller landing footer. */
.elabry-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  vertical-align: middle;
  line-height: 0;
}
.elabry-link:hover { text-decoration: none; opacity: 0.8; }
.elabry-mark {
  width: auto;
  display: inline-block;
  vertical-align: middle;
}
.elabry-mark-sm { height: 16px; }
.elabry-mark-md { height: 22px; }

/* ── Policy / long-form content ────────────────────────────────────────────
   Used by /privacy (and any future legal/policy page) inside _LandingLayout.
   Constrained measure + generous spacing for comfortable reading. */
.policy {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 72px;
  color: var(--text-primary);
}
.policy-header { margin-bottom: 32px; }
.policy-brand { display: inline-block; margin-bottom: 24px; line-height: 0; }
.policy-brand img { height: 40px; width: auto; }
.policy h1 {
  font-size: 36px;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-weight: 700;
}
.policy-effective { color: var(--text-secondary); margin: 0; font-size: 14px; }
.policy-body h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 36px 0 12px;
  color: var(--accent-dark);
  font-weight: 600;
}
.policy-body h3 {
  font-size: 16px;
  line-height: 1.4;
  margin: 24px 0 8px;
  color: var(--accent-dark);
  font-weight: 600;
}
.policy-body p,
.policy-body li { font-size: 15px; line-height: 1.7; }
.policy-body p { margin: 0 0 14px; }
.policy-body ul {
  margin: 0 0 14px;
  padding-left: 22px;
}
.policy-body ul ul { margin: 6px 0 6px; }
.policy-body li { margin: 0 0 6px; }
.policy-body hr {
  border: 0;
  border-top: 1px solid var(--accent-light);
  margin: 32px 0;
}
.policy-body a { color: var(--accent-primary); text-decoration: underline; }
.policy-body a:hover { color: var(--btn-primary-hover); }
.policy-updated {
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 13px;
}
