@import url("shell.css");

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 0.6em; font-weight: 700; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 0.8em; }
code, pre, .mono, kbd { font-family: var(--mono); font-size: 0.86em; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0.05em 0.35em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.2rem 0; }
.ltr { direction: ltr; unicode-bidi: isolate; text-align: left; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Layout ---------- */
.main { padding: 28px 32px 48px; min-width: 0; }
.container { max-width: 1180px; margin: 0 auto; }

@media (max-width: 900px) {
  .main { padding: 18px 16px 40px; }
}

/* ---------- Page header ---------- */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-header h1 { margin: 0; }
.page-header p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-header h2, .card-header h3 { margin: 0; font-size: 1rem; }
.card-body { padding: 16px 18px; }
.card-body > :last-child { margin-bottom: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.section { margin-top: 22px; }
.grid > .card + .card { margin-top: 0; } /* the grid's gap already spaces the cards */

.stat { padding: 16px 18px; }
.stat-label { color: var(--muted); font-size: 0.85rem; }
.stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1.3; margin-top: 2px; }
.stat-value small { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.stat-sub { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.robot-summary { gap: 0; }
.robot-summary .stat { color: inherit; border-inline-start: 1px solid var(--border); }
.robot-summary .stat:first-child { border-inline-start: 0; }
.robot-summary a.stat:hover { background: var(--surface-2); text-decoration: none; }
.text-err { color: var(--err); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 0.9rem; font-weight: 600; line-height: 1.4;
  cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, var(--border)); }
.btn-danger:hover { background: var(--err-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { min-height: 30px; padding: 3px 10px; font-size: 0.82rem; }
.btn svg { width: 16px; height: 16px; }
form.inline { display: inline; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 9px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 600; line-height: 1.7; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-err { background: var(--err-soft); color: var(--err); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td { padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; background: var(--surface-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.table .actions { justify-content: flex-end; flex-wrap: nowrap; }
.cell-sub { display: block; color: var(--muted); font-size: 0.8rem; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.field .help { color: var(--muted); font-size: 0.8rem; margin-top: 5px; line-height: 1.6; }
.field .errorlist { list-style: none; margin: 5px 0 0; padding: 0; color: var(--err); font-size: 0.82rem; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--err); }
.checkbox-field label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.checkbox-list { display: flex; flex-direction: column; gap: 6px; }
.checkbox-list label { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 0.9rem; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { padding: 3px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font-size: 0.82rem; }
.chip:hover { background: var(--surface-2); text-decoration: none; }
.chip.active { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.tool-group-title { grid-column: 1 / -1; font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-top: 6px; border-bottom: 1px solid var(--border); padding-bottom: 2px; }
input[type="text"], input[type="password"], input[type="url"], input[type="number"], input[type="search"], input[type="email"], select, textarea {
  width: 100%; padding: 8px 11px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 0.92rem; line-height: 1.6;
}
textarea { resize: vertical; min-height: 70px; }
textarea.mono, input.mono { font-family: var(--mono); font-size: 0.85rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); }
.form-actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.errorlist.nonfield { list-style: none; padding: 10px 14px; margin: 0 0 16px; border-radius: var(--radius-sm); background: var(--err-soft); color: var(--err); }

/* ---------- Alerts ---------- */
.messages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.alert { padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid transparent; font-size: 0.92rem; }
.alert-success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert-error { background: var(--err-soft); color: var(--err); border-color: color-mix(in srgb, var(--err) 25%, transparent); }
.alert-warning { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert strong { font-weight: 700; }

/* ---------- Code blocks ---------- */
.code-block { position: relative; }
.code-block pre, pre.code {
  margin: 0; padding: 14px 16px; overflow-x: auto;
  background: var(--code-bg); color: var(--code-text);
  border: 1px solid var(--code-border); border-radius: var(--radius-sm);
  direction: ltr; text-align: left; font-size: 0.83rem; line-height: 1.65; white-space: pre;
}
.code-block pre code, pre.code code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.code-block pre { padding-top: 38px; } /* room for the copy button */
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  padding: 2px 10px; border-radius: 6px; border: 1px solid var(--code-border);
  background: rgba(255, 255, 255, 0.06); color: var(--code-text);
  font: inherit; font-size: 0.75rem; cursor: pointer;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.14); }
.copy-inline { display: flex; align-items: center; gap: 8px; }
.copy-inline code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 10px; direction: ltr; text-align: left; }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty h3 { color: var(--text); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 0.9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.provider-card .card-body { display: flex; flex-direction: column; gap: 10px; }
.provider-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .field { min-width: 160px; }
.new-token { border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); }
.steps { margin: 0; padding-inline-start: 1.3em; }
.steps li { margin-bottom: 6px; }
details summary { cursor: pointer; }

/* ---------- Reports ---------- */
.logs-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; }
.tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 4px 14px; border-radius: 999px; color: var(--text-2); font-size: 0.86rem; font-weight: 600; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.logs-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.logs-filters select { width: auto; min-width: 130px; max-width: 220px; padding: 5px 10px; font-size: 0.85rem; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-2); cursor: pointer; }
.logs-table td { vertical-align: middle; }
.logs-table .tool-name { font-family: var(--mono); font-size: 0.84rem; direction: ltr; unicode-bidi: isolate; }
.logs-table .err-text { color: var(--err); }
.logs-table tr.is-error td:first-child { box-shadow: inset -3px 0 0 var(--err); }
.logs-table .num { font-variant-numeric: tabular-nums; }
.source { display: inline-block; margin-inline-start: 4px; padding: 0 7px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 0.72rem; line-height: 1.6; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-ok { color: var(--ok); }
.status-err { color: var(--err); }
@media (max-width: 640px) { .logs-filters select { flex: 1 1 140px; max-width: none; } }

/* ---------- Live report ---------- */
.live-status { display: inline-flex; align-items: center; gap: 7px; font-size: 0.85rem; font-weight: 600; color: var(--text-2); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.live-status[data-state="live"] .live-dot { background: var(--ok); animation: live-pulse 2s ease-out infinite; }
.live-status[data-state="offline"] .live-dot, .live-status[data-state="login"] .live-dot { background: var(--err); }
.live-status[data-state="offline"], .live-status[data-state="login"] { color: var(--err); }
@keyframes live-pulse {
  from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  to { box-shadow: 0 0 0 7px transparent; }
}
.live-fade { transition: opacity 0.2s; }
.is-stale .live-fade { opacity: 0.55; }
.live-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.live-side { display: flex; flex-direction: column; gap: 16px; }
.live-side .card + .card { margin-top: 0; }
@media (max-width: 1000px) { .live-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .live-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 9px 18px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.rank-list li:last-child { border-bottom: 0; }
.rank-name { min-width: 0; overflow-wrap: anywhere; }
.rank-value { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-list .rank-empty { justify-content: center; color: var(--muted); padding: 18px; }
tr.row-new td { animation: row-new 3s ease-out; }
@keyframes row-new { from { background: var(--accent-soft); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
  tr.row-new td, .live-status[data-state="live"] .live-dot { animation: none; }
}
.chart-legend { display: flex; gap: 14px; font-size: 0.82rem; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.swatch-ok, .key-ok { background: var(--chart-ok); }
.swatch-err, .key-err { background: var(--chart-err); }
.live-chart { position: relative; min-height: 190px; border-radius: var(--radius-sm); }
.live-chart svg { display: block; direction: ltr; overflow: visible; }
.chart-grid { stroke: var(--border); stroke-width: 1; shape-rendering: crispEdges; }
.chart-tick { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart-peak { fill: var(--text-2); font-size: 11px; font-weight: 700; font-family: var(--font); }
.bar-ok { fill: var(--chart-ok); }
.bar-err { fill: var(--chart-err); }
.bar-hover { fill: var(--surface-2); }
.chart-tip {
  position: absolute; z-index: 2; pointer-events: none; min-width: 110px;
  padding: 7px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: var(--shadow); font-size: 0.8rem; line-height: 1.7; white-space: nowrap;
}
.chart-tip strong { font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.chart-tip .key { display: inline-block; width: 12px; height: 2px; margin-inline-end: 7px; vertical-align: middle; }
.chart-table { margin-top: 10px; }
.chart-table .table-wrap { max-height: 260px; overflow-y: auto; margin-top: 6px; }

/* ---------- Auth page ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .brand { justify-content: center; padding-bottom: 8px; }

/* ---------- Chat ---------- */
.main.main-chat { padding: 0; }
.chat-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); height: 100vh; }
.chat-list { display: flex; flex-direction: column; min-height: 0; border-inline-end: 1px solid var(--border); background: var(--surface); }
.chat-list-head { padding: 16px 14px 10px; }
.chat-list-head .btn { width: 100%; }
.chat-list nav { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
.chat-list nav a {
  display: block; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 0.88rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-list nav a:hover { background: var(--surface-2); text-decoration: none; }
.chat-list nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 18px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.chat-toolbar select, .chat-toolbar input { width: auto; min-width: 0; padding: 5px 9px; font-size: 0.85rem; }
.chat-toolbar .model-input { width: 190px; }
.chat-toolbar .spacer { flex: 1; }
.chat-settings { padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); display: none; }
.chat-settings.open { display: block; }
.tool-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; margin-top: 6px; }
.tool-picker label { display: flex; gap: 8px; align-items: flex-start; font-size: 0.85rem; font-weight: 500; }
.tool-picker label span { overflow-wrap: anywhere; }
.chat-messages { flex: 1; overflow-y: auto; padding: 22px 18px 12px; }
.chat-thread { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; flex-direction: column; gap: 6px; }
.msg-user { align-items: flex-end; }
.msg-assistant { align-items: stretch; }
.bubble { padding: 10px 14px; border-radius: 14px; max-width: 100%; overflow-wrap: anywhere; }
.msg-user .bubble { background: var(--user-bubble); color: var(--user-bubble-text); border-start-end-radius: 4px; white-space: pre-wrap; max-width: 85%; }
.msg-assistant .bubble { background: var(--surface); border: 1px solid var(--border); border-start-start-radius: 4px; }
.msg-meta { font-size: 0.75rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.bubble.typing::after { content: "▍"; animation: blink 1s steps(2, start) infinite; color: var(--accent); }
@keyframes blink { to { visibility: hidden; } }
.notice { font-size: 0.85rem; padding: 6px 12px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); }
.notice.info { background: var(--info-soft); color: var(--info); }
.notice.error { background: var(--err-soft); color: var(--err); }
.thinking { font-size: 0.85rem; color: var(--muted); border-inline-start: 3px solid var(--border-strong); padding: 2px 12px; }
.thinking summary { font-weight: 600; }
.thinking .thinking-body { white-space: pre-wrap; margin-top: 6px; max-height: 280px; overflow-y: auto; }
.tool-card { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 0.85rem; }
.tool-card summary { display: flex; align-items: center; gap: 8px; padding: 7px 12px; list-style: none; }
.tool-card summary::-webkit-details-marker { display: none; }
.tool-card summary .tool-name { font-family: var(--mono); font-weight: 600; direction: ltr; }
.tool-card summary .tool-status { margin-inline-start: auto; }
.tool-card .tool-body { padding: 0 12px 10px; display: grid; gap: 8px; }
.tool-card pre { margin: 0; padding: 8px 10px; max-height: 260px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; direction: ltr; text-align: left; font-family: var(--mono); font-size: 0.78rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.tool-card .label { color: var(--muted); font-size: 0.75rem; }
.spinner { width: 12px; height: 12px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; display: inline-block; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.composer { border-top: 1px solid var(--border); background: var(--surface); padding: 12px 18px 16px; }
.composer-inner { max-width: 860px; margin: 0 auto; display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { min-height: 46px; max-height: 240px; resize: none; }
.composer .hint { max-width: 860px; margin: 6px auto 0; font-size: 0.75rem; color: var(--muted); }
.chat-empty { text-align: center; color: var(--muted); margin-top: 12vh; }
.chat-empty h2 { color: var(--text); }
@media (max-width: 900px) {
  .chat-layout { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - 60px); }
  .chat-list { display: none; }
  .chat-messages { min-height: 50vh; }
  .chat-toolbar .model-input { width: 140px; }
}

/* ---------- Change request preview ---------- */
.preview h3 { font-size: 0.92rem; margin: 16px 0 8px; color: var(--text-2); }
.preview h3:first-child { margin-top: 0; }
.preview ul { margin: 0; padding-inline-start: 1.3em; }
.preview pre.code { margin: 0; max-height: 240px; overflow: auto; font-size: 0.78rem; }
.alert ul { margin: 6px 0 0; padding-inline-start: 1.3em; }

/* ---------- Rendered markdown ---------- */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 0.7em; }
.md ul, .md ol { margin: 0 0 0.7em; padding-inline-start: 1.4em; }
.md li { margin: 0.15em 0; }
.md h1, .md h2, .md h3, .md h4 { margin: 0.9em 0 0.4em; font-size: 1.02rem; }
.md h1 { font-size: 1.15rem; }
.md blockquote { margin: 0 0 0.7em; padding: 2px 12px; border-inline-start: 3px solid var(--border-strong); color: var(--text-2); }
.md pre { margin: 0 0 0.7em; padding: 12px 14px; overflow-x: auto; background: var(--code-bg); color: var(--code-text); border-radius: var(--radius-sm); direction: ltr; text-align: left; font-size: 0.82rem; line-height: 1.6; position: relative; }
.md pre code { background: none; border: 0; padding: 0; color: inherit; }
.md table { border-collapse: collapse; margin: 0 0 0.8em; font-size: 0.88rem; display: block; overflow-x: auto; max-width: 100%; }
.md th, .md td { border: 1px solid var(--border); padding: 5px 10px; text-align: start; }
.md th { background: var(--surface-2); }
.md hr { margin: 0.8em 0; }
