/* Agent Porter. No external fonts or assets: everything is served from this site. */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f8;
  --ink: #111827;
  --muted: #5b6575;
  --line: #e2e7ef;
  --brand: #2453d6;
  --brand-ink: #ffffff;
  --brand-soft: #e8eefc;
  --brand-dark: #1a3fa8;
  --ok: #157347;
  --ok-soft: #e4f5ec;
  --error: #b42318;
  --error-soft: #fdecea;
  --warning: #a15c00;
  --warning-soft: #fff4e0;
  --code-bg: #0e1526;
  --code-ink: #dfe7f5;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 4px 16px rgb(16 24 40 / 6%);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --surface: #121a2e;
    --surface-2: #182238;
    --ink: #e7ecf6;
    --muted: #9aa6bd;
    --line: #26324d;
    --brand: #6d8dff;
    --brand-ink: #0b1020;
    --brand-soft: #1c2a52;
    --brand-dark: #93abff;
    --ok: #4cc38a;
    --ok-soft: #12322a;
    --error: #ff8a80;
    --error-soft: #3a1717;
    --warning: #ffc266;
    --warning-soft: #3a2a10;
    --code-bg: #070b16;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

code, kbd, pre, textarea, .file-path { font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace; }
code { font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 6px; }
a { color: var(--brand); }
h2, h3 { line-height: 1.25; }
h3 { font-size: 1.02rem; margin: 0 0 .4rem; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: .88rem; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Top bar ---------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; }
.topbar nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.topbar nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: .94rem; transition: background .15s var(--ease), color .15s var(--ease); }
.topbar nav a:hover { color: var(--ink); background: var(--surface-2); }

/* ---- Hero ------------------------------------------------------------- */
.hero { max-width: 1120px; margin: 0 auto; padding: 56px 20px 24px; }
.eyebrow { margin: 0 0 10px; color: var(--brand); font-weight: 600; font-size: .9rem; letter-spacing: .02em; }
.hero h1 { margin: 0 0 14px; font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: -.02em; line-height: 1.1; }
.lead { max-width: 720px; font-size: 1.15rem; color: var(--muted); margin: 0 0 22px; }
.lead strong { color: var(--ink); }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0 0 18px; }
.steps li { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 6px; font-weight: 600; font-size: .95rem; }
.steps span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: .85rem; }
.trust { display: flex; align-items: center; gap: 8px; color: var(--muted); margin: 0; font-size: .95rem; }
.trust svg { width: 18px; height: 18px; fill: var(--ok); }

/* ---- Panels ----------------------------------------------------------- */
main { max-width: 1120px; margin: 0 auto; padding: 8px 20px 40px; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 20px 0;
  animation: rise .35s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 1.35rem; display: flex; align-items: center; gap: 10px; }
.step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-size: .9rem; font-weight: 700; flex: none; }

.badge { margin: 0; padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warning-soft); color: var(--warning); border-color: transparent; }

/* ---- Buttons and fields ------------------------------------------------ */
[hidden] { display: none !important; }

button, .button {
  font: inherit; font-weight: 600; font-size: .95rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; padding: 9px 16px; cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease);
}
button:active:not(:disabled), .button:active { transform: translateY(1px); }
.primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 2px rgb(0 0 0 / 12%); }
.primary:hover:not(:disabled) { background: var(--brand-dark); }
.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.secondary:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.ghost { background: transparent; color: var(--brand); padding: 6px 10px; }
.ghost:hover:not(:disabled) { background: var(--brand-soft); }
.ghost.danger { color: var(--error); }
.ghost.danger:hover:not(:disabled) { background: var(--error-soft); }
.large { padding: 12px 22px; font-size: 1rem; }
button:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

/* Busy state: a spinner before the label, set by the page while work runs. */
button[aria-busy="true"] { pointer-events: none; }
button[aria-busy="true"]::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

input, select, textarea {
  font: inherit; font-size: .95rem; width: 100%;
  padding: 9px 11px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); outline: none; }
textarea { font-size: .88rem; line-height: 1.5; resize: vertical; }
kbd { font-size: .78rem; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface-2); }

/* ---- Step 1: drop zone, examples, files ------------------------------- */
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 28px 20px; text-align: center; background: var(--surface-2);
  transition: border-color .15s var(--ease), background .15s var(--ease);
  cursor: pointer;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--brand); background: var(--brand-soft); }
.dropzone svg { width: 34px; height: 34px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { font-weight: 600; margin: 6px 0 2px; }
.drop-help { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
.drop-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.examples-head { margin: 22px 0 10px; }
.examples-head h3 { color: var(--muted); font-weight: 600; font-size: .95rem; }
.examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.example {
  text-align: left; display: block; width: 100%;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  font-weight: 400;
}
.example:hover:not(:disabled) { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-1px); }
.example.selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.example .tag { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--brand-dark); background: var(--brand-soft); padding: 2px 8px; border-radius: 999px; margin-bottom: 6px; }
.example strong { display: block; font-size: 1rem; }
.example span.blurb { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }

.files-area { margin-top: 22px; }
.files-toolbar, .output-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.files-toolbar h3, .output-head h3 { margin: 0; }
.count { color: var(--muted); font-weight: 500; }
.toolbar-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.file-list { display: grid; gap: 8px; }
.file { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.file > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; background: var(--surface-2); }
.file > summary::-webkit-details-marker { display: none; }
.file > summary::before { content: "▸"; color: var(--muted); transition: transform .15s var(--ease); }
.file[open] > summary::before { transform: rotate(90deg); }
.file-path { flex: 1; min-width: 0; padding: 5px 8px; font-size: .88rem; background: transparent; border-color: transparent; }
.file-path:hover { border-color: var(--line); }
.file-size { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.file textarea { border: 0; border-radius: 0; border-top: 1px solid var(--line); min-height: 120px; }
.file textarea:focus { box-shadow: inset 0 0 0 2px var(--brand-soft); }

.options { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.options > summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.options[open] { padding-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.grid label, label.block { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.hint { color: var(--muted); font-size: .88rem; margin: 6px 0 0; }

.convert-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.convert-bar p { margin: 0; }
.kbd-hint { color: var(--muted); font-size: .85rem; }

/* ---- Step 2: result ---------------------------------------------------- */
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; font-weight: 600; outline: none; }
.banner p { margin: 0; }
.banner.ok { background: var(--ok-soft); color: var(--ok); }
.banner.error { background: var(--error-soft); color: var(--error); }
.banner::before { font-size: 1.1rem; }
.banner.ok::before { content: "✓"; }
.banner.error::before { content: "!"; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 14px 0 18px; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--surface-2); }
.stat b { display: block; font-size: 1.5rem; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.warn b { color: var(--warning); }
.stat.error b { color: var(--error); }

.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 22px; }
@media (max-width: 820px) { .result-grid { grid-template-columns: 1fr; } }

.agent-map, .agent-map ul { list-style: none; margin: 0; padding: 0; }
.agent-map ul { padding-left: 18px; border-left: 2px solid var(--line); margin-left: 8px; }
.agent-map li { margin: 6px 0; }
.agent-node { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-family: ui-monospace, Consolas, monospace; font-size: .86rem; }
.agent-node.front { border-color: var(--brand); background: var(--brand-soft); }
.agent-node small { font-family: ui-sans-serif, system-ui, sans-serif; color: var(--muted); font-size: .75rem; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { padding: 4px 12px; border-radius: 999px; font-size: .85rem; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.report { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.report li { padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border-left: 4px solid var(--line); font-size: .93rem; }
.report li.error { border-color: var(--error); background: var(--error-soft); }
.report li.warning { border-color: var(--warning); background: var(--warning-soft); }
.report li.info { border-color: var(--brand); }
.report li.ok { border-color: var(--ok); background: var(--ok-soft); }
.report .level { font-weight: 700; text-transform: capitalize; margin-right: 4px; }
.report li.error .level { color: var(--error); }
.report li.warning .level { color: var(--warning); }
.report li.info .level { color: var(--brand); }
.report li.ok .level { color: var(--ok); }
.report .fix { color: var(--muted); font-size: .86rem; margin-top: 3px; }

.output { margin-top: 22px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.tab { flex: none; padding: 6px 12px; font-size: .84rem; font-weight: 600; border-radius: 8px 8px 0 0; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); border-bottom: 0; }
.tab[aria-selected="true"] { background: var(--code-bg); color: var(--code-ink); border-color: var(--code-bg); }
.code {
  margin: 0; max-height: 440px; overflow: auto;
  background: var(--code-bg); color: var(--code-ink);
  padding: 16px; border-radius: 0 12px 12px 12px;
  font-size: .84rem; line-height: 1.55; white-space: pre;
}

.next { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 22px; padding: 18px; border-radius: 12px; background: var(--brand-soft); }
.next h3 { display: flex; align-items: center; gap: 10px; }
.next-steps { margin: 6px 0 0; padding-left: 20px; }
.next-steps li { margin: 3px 0; }

/* ---- Check ------------------------------------------------------------- */
.check-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.check-row textarea { flex: 1; }
@media (max-width: 600px) { .check-row { flex-direction: column; align-items: stretch; } }

/* ---- Assistant (the runtime reads these variables) --------------------- */
.assistant { margin-top: 20px; }
/* The runtime hard-codes white backgrounds (agent cards, chat forms, consent cards,
   dialogs), so the chat keeps light colors in both page themes, like an embedded widget.
   Theme-following colors here would put light text on those white boxes in dark mode. */
#agent-app {
  color-scheme: light;
  --ns-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ns-bg: #ffffff;
  --ns-fg: #111827;
  --ns-primary: #2453d6;
  --ns-accent: #1a3fa8;
  --ns-border: #e2e7ef;
  --ns-panelbg: #ffffff;
  --ns-msgbg: #f0f3f8;
  --ns-muted: #5b6575;
  color: #111827;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
#agent-app input, #agent-app select, #agent-app textarea { background: #ffffff; color: #111827; border-color: #d5dbe5; }
#assistant-status { color: var(--muted); font-size: .92rem; }
.assistant-note { color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .assistant-panels { grid-template-columns: 1fr; } }

/* ---- How it works ------------------------------------------------------ */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }
.how-grid article { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); }
.how-grid p { margin: 0; color: var(--muted); font-size: .93rem; }
.faq { border-top: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 8px 0 0; }

/* ---- Toast ------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--surface);
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  box-shadow: var(--shadow); z-index: 40;
  animation: rise .2s var(--ease);
}

footer { max-width: 1120px; margin: 0 auto; padding: 8px 20px 40px; color: var(--muted); font-size: .9rem; }

.github-row { margin: 14px 0 4px; }
.github-row label { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 6px; }
.github-input { display: flex; gap: 8px; }
.github-input input { flex: 1; min-width: 0; }
.github-row .field-hint { margin: 6px 0 0; }

/* ---- Feedback ---------------------------------------------------------- */
.feedback-dialog {
  width: min(520px, 94vw); padding: 20px 22px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.feedback-dialog::backdrop { background: rgb(8 12 24 / 55%); }
.feedback-dialog h2 { margin: 0 0 8px; font-size: 1.15rem; }
.feedback-dialog label { display: block; margin: 10px 0 4px; font-weight: 600; }
.feedback-dialog select, .feedback-dialog textarea, .feedback-dialog input { width: 100%; }
.feedback-dialog .honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; }
#feedback-status { min-height: 1.2em; margin: 6px 0 0; }
.feedback-dialog .field-hint { margin: 4px 0 0; }
.feedback-dialog > form > p.muted { margin: 0 0 4px; }
.link-button { padding: 0; border: 0; background: none; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; }
.feedback-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

@media (max-width: 640px) {
  .topbar nav { display: none; }
  .panel { padding: 18px; }
  .hero { padding-top: 36px; }
}

/* ---- Guide, help and tooltips ------------------------------------------ */
.small-button { padding: 6px 12px; font-size: .88rem; }
.topbar nav { margin-left: auto; }
.guide { border-color: var(--brand); }
.guide-intro { max-width: 780px; margin-top: 0; }
.guide-steps { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; counter-reset: step; }
.guide-steps li { counter-increment: step; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.guide-steps b { display: block; }
.guide-steps b::before { content: counter(step) ". "; color: var(--brand); }
.guide-steps span { color: var(--muted); font-size: .9rem; }
.guide-actions { display: flex; gap: 10px; flex-wrap: wrap; }
a.button { text-decoration: none; }

.help {
  width: 20px; height: 20px; padding: 0; margin-left: 6px; vertical-align: 2px;
  border-radius: 50%; font-size: .72rem; font-weight: 700; font-style: italic;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.help:hover, .help:focus-visible { color: var(--brand); border-color: var(--brand); }

.tooltip {
  position: fixed; z-index: 60; max-width: 280px; pointer-events: none;
  background: var(--ink); color: var(--surface);
  padding: 7px 10px; border-radius: 8px; font-size: .84rem; font-weight: 500; line-height: 1.4;
  box-shadow: var(--shadow);
}

.field-hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--muted); font-size: .82rem; margin: 0 0 8px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: -6px; }
.dot.error { background: var(--error); }
.dot.warning { background: var(--warning); }
.dot.info { background: var(--brand); }
.file-about { margin: 6px 0; color: var(--muted); font-size: .86rem; min-height: 1.3em; }

.score { font-family: ui-sans-serif, system-ui, sans-serif; font-size: .74rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; cursor: help; }
.score.ok { background: var(--ok-soft); color: var(--ok); }
.score.warn { background: var(--warning-soft); color: var(--warning); }
.score.error { background: var(--error-soft); color: var(--error); }
.stat.ok b { color: var(--ok); }
.stat[data-tip] { cursor: help; }

.next-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 240px; }
.tool-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 12px; }
#check-input { margin-top: 6px; }
.export-area { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.export-area .report { margin-bottom: 12px; }
.faq-heading { margin-top: 18px; }

/* ---- Live preview ------------------------------------------------------ */
.preview-dialog {
  width: min(1100px, 96vw); height: min(860px, 92vh); padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.preview-dialog[open] { display: flex; flex-direction: column; }
.preview-dialog::backdrop { background: rgb(8 12 24 / 55%); backdrop-filter: blur(2px); }
.preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.preview-head h2 { margin: 0; font-size: 1.15rem; }
.preview-head p { margin: 2px 0 0; }
#preview-frame { flex: 1; width: 100%; border: 0; background: #ffffff; }

@media (max-width: 640px) {
  .next-actions { min-width: 0; width: 100%; }
  .topbar-inner { gap: 10px; }
  .topbar .small-button { margin-left: auto; }
}
.assistant-points { margin: 0 0 10px; padding-left: 20px; color: var(--muted); }
.assistant-points li { margin: 2px 0; }

/* Dark theme: solid buttons with white text, so an active button never looks disabled. */
@media (prefers-color-scheme: dark) {
  .primary { background: #3b5bdb; color: #ffffff; }
  .primary:hover:not(:disabled) { background: #4c6ef5; }
  .steps span { background: #3b5bdb; color: #ffffff; }
}
