/* ============================================================================
   Prompt Builder Engine — /app.css (maker app and operator screens)
   Served same-origin. Markup contract:
     <html lang="en" data-theme="light|dark">   ← from the theme cookie; ABSENT when the maker has not chosen
     <body class="pbe">                          ← every rule below is scoped to .pbe
   Theme: the attribute lives on <html> and nowhere else. Selectors match it as an
   ancestor ([data-theme="dark"] .pbe) so the same sheet also styles a preview that
   sets the attribute on a wrapper. No inline styles anywhere (CSP style-src 'self').
   Breakpoints: ≤ 720 px phone (nav collapses, columns stack, dl stacks);
                ≥ 960 px two-column layouts (.cols, .cols-rev, .grid-2).
   The same two breakpoints are repeated as container queries on .pbe so the rules
   hold when the page is rendered inside a preview or a design canvas.
   ========================================================================== */

/* ---------- 0. Fonts (self-hosted; no CDN at runtime) ---------------------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/InterVariable-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* InterVariable-latin.woff2 is the latin subset (100 KB) of InterVariable.woff2 from Inter 4.1 (github.com/rsms/inter, SIL OFL 1.1 — see /fonts/OFL-Inter.txt). */

/* ---------- 1. Platform tokens ------------------------------------------- */
.pbe {
  /* light (default) — contrast vs bg / surface noted */
  --bg: #F3F4F6;            /* page */
  --surface: #FFFFFF;       /* cards, inputs */
  --surface-2: #E9ECEF;     /* wells, table heads, hover */
  --ink: #15191F;           /* headings, primary text    16.0 / 17.6 */
  --ink-2: #4D5661;         /* body, labels               6.8 / 7.5  */
  --ink-3: #5F6872;         /* captions                   5.1 / 5.7 (4.8 on surface-2) */
  --line: #D9DEE3;          /* hairlines */
  --line-strong: #767F89;   /* input borders              3.7 / 4.1  */
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235F6872' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); /* --ink-3: 4.8:1 on surface-2 */
  --accent: #D99F4E;        /* Spark — fills only */
  --on-accent: #15191F;     /* ink on Spark               8.0 */
  --accent-text: #936001;   /* Spark as text/link         4.9 / 5.4  */
  --accent-soft: #F7EBD6;   /* tint for selected / progress track */
  --accent-edge: #936001;   /* 1px edge: Spark fill is 2.1:1 vs bg, so the edge defines it */
  --focus: #936001;         /* ring                       4.9 (≥3 non-text) */
  --danger-text: #B42318;   /* 6.7 on surface */
  --danger-soft: #FCEBE9;
  --ok-text: #1B7A4A;       /* 5.2 on surface */
  --ok-soft: #E3F4EA;
  --shadow-1: 0 1px 2px rgba(15,17,21,.06), 0 1px 3px rgba(15,17,21,.08);
  --shadow-2: 0 12px 28px -14px rgba(15,17,21,.28);
  --overlay: rgba(15,17,21,.5);

  /* type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-12: 12px; --lh-12: 16px;
  --fs-13: 13px; --lh-13: 18px;
  --fs-14: 14px; --lh-14: 20px;
  --fs-16: 16px; --lh-16: 24px;
  --fs-18: 18px; --lh-18: 26px;
  --fs-22: 22px; --lh-22: 28px;
  --fs-28: 28px; --lh-28: 34px;
  /* space 4-base */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;
  /* radius */
  --r-control: 8px; --r-card: 14px; --r-pill: 999px;
  /* motion */
  --ease: cubic-bezier(.16,1,.3,1); --t-fast: 120ms; --t-base: 200ms;
  --maxw: 1120px;

  color: var(--ink-2); background: var(--bg); font: var(--fs-16)/var(--lh-16) var(--font);
  letter-spacing: -0.006em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  container-type: inline-size; container-name: pbe;
  margin: 0; min-height: 100%;
}
/* Dark: the maker chose it (cookie → <html data-theme="dark">) */
[data-theme="dark"] .pbe {
  --bg: #0F1115;            /* Focus Void */
  --surface: #15191F;
  --surface-2: #1B2027;
  --ink: #DCE1E5;           /* Mirror                     14.4 on bg */
  --ink-2: #B4BDC6;         /* body                        9.3 / 8.6 (Guide is too dim for forms; see notes) */
  --ink-3: #818C97;         /* Guide — captions            5.5 / 5.2 (4.8 on surface-2) */
  --line: #262C34;
  --line-strong: #5C6670;   /* 3.4 on surface */
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23818C97' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); /* --ink-3: 4.8:1 on surface-2 */
  --accent: #D99F4E;        /* Spark */
  --on-accent: #0F1115;     /* 8.1 */
  --accent-text: #E0AA5C;   /* 9.0 on bg */
  --accent-soft: #2A2416;
  --accent-edge: transparent; /* Spark is 8.1:1 vs bg, no edge needed */
  --focus: #E0AA5C;
  --danger-text: #FF9B8E;
  --danger-soft: #3A1A16;
  --ok-text: #6FCF97;
  --ok-soft: #14301F;
  --shadow-1: 0 0 0 1px var(--line);
  --shadow-2: 0 0 0 1px var(--line), 0 16px 40px -20px rgba(0,0,0,.8);
  --overlay: rgba(0,0,0,.6);
}
/* No cookie yet: follow the system. Only the real page (html > body.pbe) qualifies. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) > body.pbe {
    --bg: #0F1115; --surface: #15191F; --surface-2: #1B2027; --ink: #DCE1E5; --ink-2: #B4BDC6; --ink-3: #818C97; --line: #262C34; --line-strong: #5C6670;
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23818C97' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    --accent: #D99F4E; --on-accent: #0F1115; --accent-text: #E0AA5C; --accent-soft: #2A2416; --accent-edge: transparent; --focus: #E0AA5C;
    --danger-text: #FF9B8E; --danger-soft: #3A1A16; --ok-text: #6FCF97; --ok-soft: #14301F;
    --shadow-1: 0 0 0 1px var(--line); --shadow-2: 0 0 0 1px var(--line), 0 16px 40px -20px rgba(0,0,0,.8); --overlay: rgba(0,0,0,.6);
  }
  html:not([data-theme]):has(> body.pbe) { background: #0F1115; }
}
/* CI-624: the window below a short page. body.pbe's background does not reach the canvas (measured white), so
   the real page's <html> carries --bg itself (the tokens live on body, out of html's reach). */
html:has(> body.pbe) { background: #F3F4F6; }
html[data-theme="dark"]:has(> body.pbe) { background: #0F1115; }

/* ---------- 2. Base ------------------------------------------------------- */
.pbe *, .pbe *::before, .pbe *::after { box-sizing: border-box; }
.pbe h1, .pbe h2, .pbe h3, .pbe p, .pbe ul, .pbe ol, .pbe dl, .pbe dd, .pbe figure { margin: 0; }
.pbe h1 { font-size: var(--fs-28); line-height: var(--lh-28); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.pbe h2 { font-size: var(--fs-22); line-height: var(--lh-22); font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.pbe h3 { font-size: var(--fs-16); line-height: var(--lh-16); font-weight: 600; color: var(--ink); }
.pbe .h2-sm { font-size: var(--fs-18); line-height: var(--lh-18); }
.pbe .h3-sm { font-size: var(--fs-14); line-height: var(--lh-14); }
.pbe a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; border-radius: 3px; }
.pbe a:hover { text-decoration-thickness: 2px; }
.pbe :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pbe ::selection { background: var(--accent); color: var(--on-accent); }
.pbe .muted { color: var(--ink-3); }
.pbe .ok { color: var(--ok-text); }
.pbe .danger { color: var(--danger-text); }
.pbe .small { font-size: var(--fs-14); line-height: var(--lh-14); }
.pbe .caption { font-size: var(--fs-13); line-height: var(--lh-13); color: var(--ink-3); }
.pbe .eyebrow { font-size: var(--fs-12); line-height: var(--lh-12); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.pbe .lede { font-size: var(--fs-16); line-height: var(--lh-16); color: var(--ink-2); max-width: 60ch; }
.pbe .ink { color: var(--ink); }
.pbe .strong { font-weight: 600; }
.pbe .medium { font-weight: 500; }
.pbe .center { text-align: center; }
.pbe .wrap-any { overflow-wrap: anywhere; }
.pbe .block { display: block; }
.pbe .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pbe svg.i { width: 18px; height: 18px; flex: none; }
.pbe svg.i-sm { width: 14px; height: 14px; }
.pbe .mono { font-family: var(--mono); font-size: var(--fs-14); line-height: var(--lh-14); }
.pbe .crumbs { font-size: var(--fs-13); line-height: var(--lh-13); color: var(--ink-3); margin-bottom: var(--s-2); }
/* spacing utilities (4-base) */
.pbe .mt-1 { margin-top: var(--s-1); } .pbe .mt-2 { margin-top: var(--s-2); } .pbe .mt-3 { margin-top: var(--s-3); } .pbe .mt-4 { margin-top: var(--s-4); } .pbe .mt-5 { margin-top: var(--s-5); } .pbe .mt-6 { margin-top: var(--s-6); } .pbe .mt-8 { margin-top: var(--s-8); }
.pbe .mb-1 { margin-bottom: var(--s-1); } .pbe .mb-2 { margin-bottom: var(--s-2); } .pbe .mb-3 { margin-bottom: var(--s-3); } .pbe .mb-4 { margin-bottom: var(--s-4); } .pbe .mb-0 { margin-bottom: 0; }
.pbe .gap-2 { gap: var(--s-2); } .pbe .gap-3 { gap: var(--s-3); } .pbe .gap-4 { gap: var(--s-4); } .pbe .gap-6 { gap: var(--s-6); }
.pbe .grow { flex: 1 1 auto; min-width: 0; } .pbe .full { flex: 1 1 100%; } .pbe .shrink { min-width: 0; } .pbe .nowrap { white-space: nowrap; }

/* ---------- 3. Shell: header, nav, account, theme toggle ------------------ */
.pbe .shell { min-height: 100%; display: flex; flex-direction: column; }
.pbe .hdr { background: var(--surface); border-bottom: 1px solid var(--line); }
.pbe .hdr-in { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s-4); height: 60px; display: flex; align-items: center; gap: var(--s-3); }
.pbe .brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: -0.015em; white-space: nowrap; min-width: 0; }
.pbe .brand .mark { width: 26px; height: 26px; }
.pbe .nav { display: flex; gap: var(--s-1); margin-left: var(--s-4); }
.pbe .nav a { color: var(--ink-2); text-decoration: none; font-size: var(--fs-14); font-weight: 500; padding: 8px 12px; border-radius: var(--r-pill); white-space: nowrap; }
.pbe .nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.pbe .nav a:hover { color: var(--ink); }
.pbe .hdr-right { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
/* theme toggle: <form method="post" action="/theme"> with one <button>; works without JS */
.pbe .theme { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; min-width: 36px; padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font: 500 var(--fs-13)/1 var(--font); cursor: pointer; }
.pbe .theme:hover { border-color: var(--line-strong); color: var(--ink); }
.pbe .theme .i { width: 16px; height: 16px; color: var(--accent-text); }
/* account menu: <details>, opens without JS */
.pbe details.menu { position: relative; }
.pbe details.menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; min-width: 36px; padding: 0 6px 0 4px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); cursor: pointer; color: var(--ink-2); font-size: var(--fs-13); font-weight: 500; }
.pbe details.menu > summary::-webkit-details-marker { display: none; }
.pbe details.menu > summary:hover { border-color: var(--line-strong); }
.pbe .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; letter-spacing: 0; flex: none; }
.pbe details.menu .pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-2); padding: var(--s-2); z-index: 20; }
.pbe .pop .who { padding: 10px 12px 8px; font-size: var(--fs-13); color: var(--ink-3); border-bottom: 1px solid var(--line); margin-bottom: 6px; overflow-wrap: anywhere; }
.pbe .pop a, .pbe .pop button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-control); color: var(--ink); text-decoration: none; font: 500 var(--fs-14)/var(--lh-14) var(--font); background: none; border: 0; text-align: left; cursor: pointer; }
.pbe .pop a:hover, .pbe .pop button:hover { background: var(--surface-2); }
.pbe .pop a[aria-current="page"] { background: var(--surface-2); }
.pbe .pop .i { color: var(--ink-3); width: 16px; height: 16px; }
/* phone nav: a disclosure that only shows at ≤ 720 px */
.pbe details.navm { display: none; }
.pbe details.navm > summary { list-style: none; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.pbe details.navm > summary::-webkit-details-marker { display: none; }
.pbe details.navm .pop { left: 0; right: auto; min-width: 220px; }
.pbe .hdr-sub { background: var(--surface); border-bottom: 1px solid var(--line); }
.pbe .subnav { max-width: var(--maxw); margin: 0 auto; padding: 8px var(--s-4); display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.pbe .subnav a { color: var(--ink-2); text-decoration: none; font-size: var(--fs-14); font-weight: 500; padding: 8px 12px; border-radius: var(--r-pill); white-space: nowrap; }
.pbe .subnav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.pbe main.page { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: var(--s-8) var(--s-4) var(--s-12); }
.pbe .page.narrow { max-width: 720px; }
.pbe .page.centered { display: flex; align-items: center; justify-content: center; padding-top: 72px; }
.pbe .page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-3) var(--s-6); margin-bottom: var(--s-6); }
.pbe .page-head .lede { margin-top: var(--s-2); }
.pbe .ftr { border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-13); line-height: var(--lh-13); }
.pbe .ftr-in { max-width: var(--maxw); margin: 0 auto; padding: var(--s-5) var(--s-4); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); justify-content: space-between; }
.pbe .ftr a { color: var(--ink-3); }

/* ---------- 4. Flow stepper ------------------------------------------------ */
.pbe .steps { display: flex; gap: var(--s-1); list-style: none; padding: 0; margin: 0 0 var(--s-6); overflow: hidden; }
.pbe .steps li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-13); line-height: var(--lh-13); color: var(--ink-3); padding: 6px 10px 6px 6px; border-radius: var(--r-pill); white-space: nowrap; }
.pbe .steps .n { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.pbe .steps li.done .n { background: var(--ok-soft); border-color: transparent; color: var(--ok-text); }
.pbe .steps li.now { color: var(--ink); font-weight: 600; background: var(--surface); box-shadow: var(--shadow-1); }
.pbe .steps li.now .n { background: var(--accent); border-color: var(--accent-edge); color: var(--on-accent); }
.pbe .steps li + li::before { content: ""; width: 14px; height: 1px; background: var(--line-strong); margin-right: 4px; flex: none; }
.pbe .steps-compact { display: none; align-items: center; gap: 10px; margin: 0 0 var(--s-5); font-size: var(--fs-13); color: var(--ink-3); }
.pbe .steps-compact .bar { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.pbe .steps-compact .bar b { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.pbe .steps-compact .bar.s1 b { width: 16%; } .pbe .steps-compact .bar.s2 b { width: 33%; } .pbe .steps-compact .bar.s3 b { width: 50%; } .pbe .steps-compact .bar.s4 b { width: 66%; } .pbe .steps-compact .bar.s5 b { width: 83%; } .pbe .steps-compact .bar.s6 b { width: 100%; }

/* ---------- 5. Cards, layout, notices, pills ------------------------------- */
.pbe .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-5); box-shadow: var(--shadow-1); }
.pbe .card + .card { margin-top: var(--s-4); }
.pbe .card h2, .pbe .card h3 { margin-bottom: var(--s-3); }
.pbe .card h2.mb-1, .pbe .card h3.mb-1 { margin-bottom: var(--s-1); }
.pbe .card h2.mb-0, .pbe .card h3.mb-0 { margin-bottom: 0; }
.pbe .card-roomy { padding: 28px 32px; }
.pbe .card-tight { padding: var(--s-3); }
.pbe .card-flat { box-shadow: none; }
.pbe .card-dashed { border-style: dashed; }
.pbe .card-well { background: var(--surface-2); box-shadow: none; padding: 12px 14px; }
.pbe .card-highlight { border-color: var(--accent-edge, var(--accent)); box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow-1); }
.pbe .card-form { width: 100%; max-width: 440px; padding: 32px; }
.pbe .stack { display: flex; flex-direction: column; gap: var(--s-4); }
.pbe .stack > .card + .card { margin-top: 0; }
.pbe .row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.pbe .row.top { align-items: flex-start; }
.pbe .between { justify-content: space-between; }
.pbe .col { display: flex; flex-direction: column; align-items: stretch; gap: var(--s-3); }
.pbe .grid-2, .pbe .cols, .pbe .cols-rev, .pbe .cols-420, .pbe .cols-360 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.pbe .grid-4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pbe .notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-control); font-size: var(--fs-14); line-height: var(--lh-14); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.pbe .notice .i { width: 18px; height: 18px; margin-top: 1px; }
.pbe .notice.alert { border-color: transparent; background: var(--danger-soft); color: var(--danger-text); }
.pbe .notice.status { border-color: transparent; background: var(--ok-soft); color: var(--ok-text); }
.pbe .notice.info { border-color: transparent; background: var(--accent-soft); color: var(--ink); }
.pbe .notice.info .i { color: var(--accent-text); }
.pbe .notice.block { display: block; }
.pbe .pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-12); font-weight: 600; letter-spacing: .02em; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.pbe .pill.live { background: var(--ok-soft); color: var(--ok-text); }
.pbe .pill.warn { background: var(--danger-soft); color: var(--danger-text); }
.pbe .pill.acc { background: var(--accent-soft); color: var(--accent-text); }
.pbe .pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pbe .pill .i { width: 12px; height: 12px; }

/* ---------- 6. Forms ------------------------------------------------------- */
.pbe .field { display: flex; flex-direction: column; gap: 6px; }
.pbe .field + .field, .pbe .grid-2 + .field, .pbe fieldset + .field, .pbe .field + fieldset, .pbe .grid-2 + fieldset, .pbe fieldset + fieldset, .pbe .check + fieldset, .pbe fieldset + .check { margin-top: var(--s-4); }
.pbe label, .pbe legend { font-size: var(--fs-14); line-height: var(--lh-14); font-weight: 500; color: var(--ink); padding: 0; }
.pbe .hint { font-size: var(--fs-13); line-height: var(--lh-13); color: var(--ink-3); }
.pbe .hint.ok { color: var(--ok-text); display: flex; gap: 6px; align-items: center; }
.pbe .err { font-size: var(--fs-13); line-height: var(--lh-13); color: var(--danger-text); display: flex; gap: 6px; align-items: flex-start; }
.pbe .err .i { width: 14px; height: 14px; margin-top: 2px; }
.pbe input[type="text"], .pbe input[type="email"], .pbe input[type="url"], .pbe input[type="number"], .pbe input[type="search"], .pbe input[type="file"], .pbe select, .pbe textarea, .pbe .input {
  width: 100%; font: var(--fs-16)/var(--lh-16) var(--font); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-control); padding: 10px 12px; min-height: 44px; }
.pbe input[type="file"] { padding: 8px 12px; }
.pbe input::placeholder, .pbe textarea::placeholder { color: var(--ink-3); opacity: 1; }
.pbe input:hover, .pbe select:hover, .pbe textarea:hover { border-color: var(--ink-2); }
.pbe input:focus-visible, .pbe select:focus-visible, .pbe textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.pbe input[aria-invalid="true"], .pbe textarea[aria-invalid="true"] { border-color: var(--danger-text); }
.pbe input:disabled, .pbe select:disabled, .pbe textarea:disabled { background: var(--surface-2); color: var(--ink-3); }
.pbe textarea { resize: vertical; min-height: 120px; }
.pbe textarea.short { min-height: 88px; }
.pbe select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: var(--chevron); background-repeat: no-repeat; background-position: right 12px center; }
.pbe .input.locked { background: var(--surface-2); color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.pbe .input.code { letter-spacing: .3em; font-size: 20px; text-align: center; }
.pbe .addon { display: flex; align-items: stretch; }
.pbe .addon .pre { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r-control) 0 0 var(--r-control); background: var(--surface-2); color: var(--ink-3); font-family: var(--mono); font-size: var(--fs-14); white-space: nowrap; }
.pbe .addon input { border-radius: 0 var(--r-control) var(--r-control) 0; }
.pbe .count { font-size: var(--fs-13); color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.pbe .count.over { color: var(--danger-text); font-weight: 600; }
.pbe .check, .pbe .radio { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface); font-weight: 500; color: var(--ink); min-height: 44px; cursor: pointer; }
.pbe .check:hover, .pbe .radio:hover { border-color: var(--line-strong); }
.pbe .check input, .pbe .radio input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent-text); flex: none; }
.pbe .radio.on, .pbe .check.on { border-color: var(--accent-edge, var(--accent)); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-text); }
.pbe .radio .sub, .pbe .check .sub { display: block; font-weight: 400; color: var(--ink-3); font-size: var(--fs-13); line-height: var(--lh-13); margin-top: 2px; }
.pbe fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.pbe fieldset legend { margin-bottom: 8px; }
.pbe .choices { display: flex; flex-direction: column; gap: 8px; }
.pbe .choices .indent { padding-left: 40px; }
.pbe .inline-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); font-size: var(--fs-14); min-height: 44px; cursor: pointer; }
.pbe .inline-check input { width: 18px; height: 18px; accent-color: var(--accent-text); margin: 0; }
.pbe .swatch-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pbe .swatch-field input[type="color"] { width: 44px; height: 44px; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); cursor: pointer; }
.pbe .swatch-field .hex { font-family: var(--mono); font-size: var(--fs-14); color: var(--ink); }
.pbe .logo-box { display: inline-flex; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-control); background: #FFFFFF; } /* a light plate, as in the generator: the file is shown as uploaded */
.pbe .logo-box img, .pbe .logo-box svg { display: block; max-height: 32px; max-width: 160px; }
.pbe .find { width: 260px; max-width: 100%; min-height: 40px; padding: 6px 12px; }

/* ---------- 7. Buttons ----------------------------------------------------- */
.pbe .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--r-pill); font: 600 var(--fs-14)/1 var(--font); letter-spacing: -0.005em; cursor: pointer; text-decoration: none; white-space: nowrap; border: 1px solid transparent; transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.pbe .btn:active { transform: scale(.985); }
.pbe .btn .i { width: 16px; height: 16px; }
.pbe .btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent-edge); }
.pbe .btn-primary:hover { filter: brightness(1.04); }
.pbe .btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.pbe .btn-secondary:hover { border-color: var(--ink-2); }
.pbe .btn-ghost { background: transparent; color: var(--ink-2); border-color: transparent; padding: 0 12px; }
.pbe .btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.pbe .btn-ghost.left { justify-content: flex-start; padding-left: 0; }
.pbe .btn-danger { background: var(--surface); color: var(--danger-text); border-color: var(--danger-text); }
.pbe .btn-sm { min-height: 36px; padding: 0 14px; font-size: var(--fs-13); }
.pbe .btn-block { width: 100%; }
.pbe .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.pbe summary.btn { list-style: none; display: inline-flex; }
.pbe summary.btn::-webkit-details-marker { display: none; }
.pbe .actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-top: var(--s-6); }
.pbe .actions.tight { margin-top: var(--s-4); }
.pbe .actions.stacked { flex-direction: column; align-items: stretch; }
.pbe .link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pbe summary.disclose { cursor: pointer; color: var(--ink-2); font-weight: 500; font-size: var(--fs-14); line-height: var(--lh-14); }

/* ---------- 8. Lists, tables, definition lists ---------------------------- */
.pbe .dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 0; font-size: var(--fs-14); line-height: var(--lh-14); }
.pbe .dl dt { color: var(--ink-3); margin-top: 10px; }
.pbe .dl dt:first-child { margin-top: 0; }
.pbe .dl dd { color: var(--ink); overflow-wrap: anywhere; }
.pbe .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.pbe table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); line-height: var(--lh-14); }
.pbe th, .pbe td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pbe th { font-weight: 600; color: var(--ink-3); font-size: var(--fs-12); letter-spacing: .06em; text-transform: uppercase; background: var(--surface-2); white-space: nowrap; }
.pbe td { color: var(--ink); }
.pbe tr:last-child td { border-bottom: 0; }
.pbe .list { list-style: none; padding: 0; margin: 0; }
.pbe .list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); padding: 12px 0; border-bottom: 1px solid var(--line); }
.pbe .list li:last-child { border-bottom: 0; }
.pbe .list li.block { display: block; }
.pbe .list .t { color: var(--ink); font-weight: 500; }
.pbe .list .s { color: var(--ink-3); font-size: var(--fs-13); }
.pbe .list .d { flex: 1 1 100%; color: var(--ink-2); font-size: var(--fs-14); }
.pbe .bullets { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: var(--fs-14); line-height: var(--lh-14); }
.pbe .stages { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.pbe .stages.inline { grid-auto-flow: column; grid-auto-columns: max-content; gap: 20px; overflow-x: auto; }
.pbe .stages li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-14); color: var(--ink-3); white-space: nowrap; }
.pbe .stages .d { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pbe .stages .d svg { width: 12px; height: 12px; }
.pbe .stages li.done { color: var(--ink-2); }
.pbe .stages li.done .d { background: var(--ok-soft); border-color: transparent; color: var(--ok-text); }
.pbe .stages li.now { color: var(--ink); font-weight: 600; }
.pbe .stages li.now .d { border-color: var(--accent-text); border-top-color: transparent; animation: pbe-spin 1s linear infinite; }

/* ---------- 9. Copy blocks and code --------------------------------------- */
.pbe .copyblock { border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface-2); overflow: hidden; }
.pbe .copyblock .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.pbe .copyblock .bar h3 { margin: 0; font-size: var(--fs-14); }
.pbe .copyblock pre { margin: 0; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: var(--fs-13); line-height: 20px; color: var(--ink-2); max-height: 160px; overflow: auto; }
.pbe .copyblock pre.prose { font-family: var(--font); font-size: var(--fs-14); line-height: var(--lh-14); }
.pbe .copyblock .foot { padding: 0 14px 10px; }
.pbe .copyblock.span { grid-column: 1 / -1; }
.pbe details.copyblock > summary { cursor: pointer; list-style: none; }
.pbe details.copyblock > summary::-webkit-details-marker { display: none; }

/* ---------- 10. Waiting / progress ---------------------------------------- */
.pbe .wait { display: flex; flex-direction: column; gap: var(--s-4); }
.pbe .track { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; position: relative; }
.pbe .track::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 3px; background: var(--accent); animation: pbe-slide 1.6s var(--ease) infinite; }
.pbe .wait-over { position: absolute; left: 50%; top: 140px; transform: translateX(-50%); width: min(420px, calc(100% - 32px)); box-shadow: var(--shadow-2); }
.pbe .dimmed { opacity: .45; filter: saturate(.6); }
@keyframes pbe-spin { to { transform: rotate(360deg); } }
@keyframes pbe-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) {
  .pbe .stages li.now .d { animation: none; border-top-color: var(--accent-text); }
  .pbe .track::after { animation: none; width: 100%; opacity: .5; }
  .pbe .btn { transition: none; }
}

/* ---------- 11. Preview frame (Try, Brand, Approve-regen) ----------------- */
.pbe .preview { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-1); position: relative; }
.pbe .preview .pbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: var(--fs-13); color: var(--ink-3); }
.pbe .preview .pbar .url { font-family: var(--mono); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.pbe .preview .pbar .right { margin-left: auto; }
.pbe .seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-pill); overflow: hidden; position: relative; }
.pbe .seg label { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; font-size: var(--fs-13); font-weight: 500; color: var(--ink-2); cursor: pointer; background: var(--surface); }
.pbe .seg label .i { width: 14px; height: 14px; }
.pbe .seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pbe .seg label:has(input:checked), .pbe .seg label.on { background: var(--ink); color: var(--bg); }
.pbe .preview .frame { display: block; width: 100%; border: 0; background: var(--bg); min-height: 70vh; }
.pbe .preview .stage { padding: var(--s-6); display: flex; justify-content: center; align-items: flex-start; background: var(--surface-2); min-height: 420px; }
.pbe .phone { width: 360px; max-width: 100%; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-2); }
.pbe .preview .wide { width: 100%; }
/* a generator rendered inline for preview (production: an <iframe class="frame">) */
.pbe .preview .gen, .pbe .phone .gen { width: 100%; }

/* ---------- 12. Tokens sheet helpers (design doc only) -------------------- */
.pbe .swatch { padding: 12px; }
.pbe .swatch.bg { background: var(--bg); } .pbe .swatch.s2 { background: var(--surface-2); } .pbe .swatch.soft { background: var(--accent-soft); }
.pbe .ring-demo { display: inline-block; width: 60px; height: 20px; border-radius: 6px; outline: 2px solid var(--focus); outline-offset: 2px; vertical-align: middle; }
.pbe .space-demo { display: flex; align-items: flex-end; gap: 6px; }
.pbe .space-demo span { background: var(--accent); display: block; }
.pbe .space-demo .s1 { width: 4px; height: 4px; } .pbe .space-demo .s2 { width: 8px; height: 8px; } .pbe .space-demo .s3 { width: 12px; height: 12px; } .pbe .space-demo .s4 { width: 16px; height: 16px; } .pbe .space-demo .s6 { width: 24px; height: 24px; } .pbe .space-demo .s8 { width: 32px; height: 32px; } .pbe .space-demo .s12 { width: 48px; height: 48px; }
.pbe .type-28 { font-size: 28px; line-height: 34px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.pbe .type-22 { font-size: 22px; line-height: 28px; font-weight: 600; color: var(--ink); }
.pbe .type-16 { font-size: 16px; line-height: 24px; } .pbe .type-14 { font-size: 14px; line-height: 20px; }
.pbe .sheet { padding: 32px 36px; display: flex; flex-direction: column; gap: 20px; }
.pbe .pill.on-spark { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent-edge); }

/* ---------- 13. ≥ 960 px: two-column layouts ------------------------------- */
@media (min-width: 960px) {
  .pbe .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pbe .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pbe .cols { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s-6); }
  .pbe .cols-420 { grid-template-columns: minmax(0, 1fr) 420px; gap: var(--s-6); }
  .pbe .cols-360 { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-6); }
  .pbe .cols-rev { grid-template-columns: 400px minmax(0, 1fr); gap: var(--s-6); }
  .pbe .dl { grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; }
  .pbe .dl dt { margin-top: 0; }
}

/* ---------- 14. ≤ 720 px: phone -------------------------------------------- */
@media (max-width: 720px) {
  .pbe h1 { font-size: 24px; line-height: 30px; }
  .pbe .hdr-in { height: 56px; }
  .pbe .nav { display: none; }
  .pbe details.navm { display: block; order: -1; }
  .pbe .brand .long { display: none; }
  .pbe .brand .pill { display: none; }
  .pbe .brand { font-size: 14px; }
  .pbe .theme { padding: 0; width: 36px; }
  .pbe .theme .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pbe details.menu > summary .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pbe details.menu > summary .i-sm { display: none; }
  .pbe details.menu > summary { padding: 0 4px; }
  .pbe main.page { padding: var(--s-5) var(--s-4) var(--s-10); }
  .pbe .page.centered { padding-top: var(--s-5); align-items: stretch; }
  .pbe .card-form { max-width: none; padding: var(--s-4); border: 0; box-shadow: none; background: transparent; }
  .pbe .card { padding: var(--s-4); border-radius: 12px; }
  .pbe .card-roomy { padding: var(--s-4); }
  .pbe .steps { display: none; }
  .pbe .steps-compact { display: flex; }
  .pbe .actions .btn { flex: 1 1 auto; }
  .pbe .page-head { flex-direction: column; align-items: stretch; }
  .pbe .page-head .btn { width: 100%; }
  .pbe .hide-phone { display: none; }
  .pbe .preview .stage { padding: 0; }
  .pbe .phone { border: 0; border-radius: 0; box-shadow: none; }
  .pbe .wait-over { top: 100px; }
  .pbe .addon { flex-wrap: wrap; }
  .pbe .addon .pre { width: 100%; border-right: 1px solid var(--line-strong); border-bottom: 0; border-radius: var(--r-control) var(--r-control) 0 0; padding: 8px 12px; }
  .pbe .addon input { border-radius: 0 0 var(--r-control) var(--r-control); }
}
@media (min-width: 721px) { .pbe .brand .short { display: none; } .pbe .hide-desk { display: none; } }

/* ---------- 15. Container-query twins of §13–14 (same rules; for previews and canvases) ----------- */
@container pbe (min-width: 960px) {
  .pbe .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pbe .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pbe .cols { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s-6); }
  .pbe .cols-420 { grid-template-columns: minmax(0, 1fr) 420px; gap: var(--s-6); }
  .pbe .cols-360 { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-6); }
  .pbe .cols-rev { grid-template-columns: 400px minmax(0, 1fr); gap: var(--s-6); }
  .pbe .dl { grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; }
  .pbe .dl dt { margin-top: 0; }
}
@container pbe (max-width: 720px) {
  .pbe h1 { font-size: 24px; line-height: 30px; }
  .pbe .hdr-in { height: 56px; }
  .pbe .nav { display: none; }
  .pbe details.navm { display: block; order: -1; }
  .pbe .brand .long { display: none; }
  .pbe .brand .pill { display: none; }
  .pbe .brand { font-size: 14px; }
  .pbe .theme { padding: 0; width: 36px; }
  .pbe .theme .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pbe details.menu > summary .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pbe details.menu > summary .i-sm { display: none; }
  .pbe details.menu > summary { padding: 0 4px; }
  .pbe main.page { padding: var(--s-5) var(--s-4) var(--s-10); }
  .pbe .page.centered { padding-top: var(--s-5); align-items: stretch; }
  .pbe .card-form { max-width: none; padding: var(--s-4); border: 0; box-shadow: none; background: transparent; }
  .pbe .card { padding: var(--s-4); border-radius: 12px; }
  .pbe .card-roomy { padding: var(--s-4); }
  .pbe .steps { display: none; }
  .pbe .steps-compact { display: flex; }
  .pbe .actions .btn { flex: 1 1 auto; }
  .pbe .page-head { flex-direction: column; align-items: stretch; }
  .pbe .page-head .btn { width: 100%; }
  .pbe .hide-phone { display: none; }
  .pbe .preview .stage { padding: 0; }
  .pbe .phone { border: 0; border-radius: 0; box-shadow: none; }
  .pbe .wait-over { top: 100px; }
  .pbe .addon { flex-wrap: wrap; }
  .pbe .addon .pre { width: 100%; border-right: 1px solid var(--line-strong); border-bottom: 0; border-radius: var(--r-control) var(--r-control) 0 0; padding: 8px 12px; }
  .pbe .addon input { border-radius: 0 0 var(--r-control) var(--r-control); }
}
@container pbe (min-width: 721px) { .pbe .brand .short { display: none; } .pbe .hide-desk { display: none; } }

/* ---------- 16. PE-03j-e2: the shipped screens' own rules (the boards' inline tweaks, as classes) ----- */
.pbe [hidden] { display: none !important; }
.pbe main.page > * + *, .pbe .flow > * + * { margin-top: var(--s-4); }
.pbe .flow > .field + .field { margin-top: var(--s-4); }
.pbe .stack > * + * { margin-top: 0; }
.pbe p[role="alert"] { padding: 12px 14px; border-radius: var(--r-control); background: var(--danger-soft); color: var(--danger-text); font-size: var(--fs-14); line-height: var(--lh-14); }
.pbe main a.btn-primary, .pbe main a.btn-secondary { text-decoration: none; }
.pbe .list li form, .pbe .actions form { margin: 0; }
.pbe .page-head { margin-bottom: var(--s-4); }
/* the Bench preview's Phone/Desktop switch (CSS only) and its keyboard ring */
.pbe .seg { padding: 0; margin: 0; }
.pbe .seg label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.pbe .preview:has(input[value="phone"]:checked) .frame { width: 360px; max-width: 100%; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.pbe .preview .pbar a { color: var(--ink-2); }
/* the brand screen's preview: two samples of the generator, light and dark */
.pbe .gen-sample { border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; min-height: 0; }
.pbe .gen-sample .g-main { padding: 16px; }
.pbe .gen-sample .g-card { margin-top: 0; }
.pbe .gen-sample .g-prompt { padding: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pbe .gen-sample .g-ftr { margin-top: 0; padding: 12px 16px; }
.pbe .gen-sample .g-sample-link { color: var(--primary-text); text-decoration: underline; text-underline-offset: 3px; }
.pbe .logo-box { align-self: flex-start; }
.pbe .row .btn, .pbe .actions .btn { white-space: normal; text-align: center; max-width: 100%; height: auto; padding-top: 8px; padding-bottom: 8px; line-height: 1.25; }
.pbe .grid-2 > .field + .field, .pbe .flow > input[type="hidden"] + :not(input) { margin-top: 0; }
/* a logo scales down to fit, never cropped: at most 32 px tall and as wide as its box allows, aspect kept */
.pbe .logo-box, .pbe .gen .g-logo, .pbe .gen .g-logo .plate { max-width: 100%; min-width: 0; }
.pbe .logo-box img, .pbe .gen .g-logo img { width: auto; height: auto; max-height: 32px; max-width: min(160px, 100%); object-fit: contain; }

.gen {--font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;--r-control: 8px; --r-card: 14px; --r-pill: 999px;--ease: cubic-bezier(.16,1,.3,1);margin: 0; color: var(--ink-2); background: var(--bg); font: 16px/24px var(--font); -webkit-font-smoothing: antialiased;container-type: inline-size; container-name: gen; min-height: 100%;}.gen *, .gen *::before, .gen *::after { box-sizing: border-box; }.gen h1, .gen h2, .gen p, .gen ol, .gen ul, .gen pre, .gen figure, .gen fieldset { margin: 0; }.gen fieldset { border: 0; padding: 0; min-width: 0; }.gen legend { padding: 0; }.gen a { color: var(--primary-text); text-underline-offset: 3px; }.gen :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }.gen .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }.gen .g-hdr { border-top: 4px solid var(--primary); background: var(--surface); border-bottom: 1px solid var(--line); }.gen .g-hdr-in { max-width: 1120px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 12px; min-height: 56px; }.gen .g-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; text-decoration: none; min-width: 0; }.gen .g-logo img, .gen .g-logo svg { display: block; max-height: 32px; max-width: 160px; width: auto; height: auto; }.gen .g-logo .plate { background: var(--plate); border-radius: 6px; padding: 4px 8px; display: inline-flex; }.gen .g-logo .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }[data-theme="dark"] .gen .logo-light, .gen[data-theme="dark"] .logo-light { display: none; }.gen .logo-dark { display: none; }[data-theme="dark"] .gen .logo-dark, .gen[data-theme="dark"] .logo-dark { display: inline-flex; }@media (prefers-color-scheme: dark) { html:not([data-theme]) .gen .logo-light { display: none; } html:not([data-theme]) .gen .logo-dark { display: inline-flex; } }.gen .g-theme { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; min-width: 36px; padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font: 500 13px/1 var(--font); cursor: pointer; }.gen .g-theme svg { width: 16px; height: 16px; color: var(--primary-text); flex: none; }.gen .g-main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 8px; }.gen h1 { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; }.gen .g-usage { margin-top: 6px; color: var(--ink-2); font-size: 15px; line-height: 22px; white-space: pre-line; }.gen .g-status { font-size: 14px; line-height: 20px; color: var(--ink-2); min-height: 20px; margin: 8px 0 0; }.gen .g-status:empty { display: none; }.gen .g-offline, .gen .g-retired { color: var(--danger-text); font-size: 14px; line-height: 20px; margin-top: 8px; }.gen .g-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 12px; }.gen .g-out, .gen .g-choices { min-width: 0; }.gen .g-history { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface); }.gen .g-history summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px; min-height: 44px; font-weight: 600; font-size: 14px; color: var(--ink); cursor: pointer; }.gen .g-history summary::-webkit-details-marker { display: none; }.gen .g-history summary .n { margin-left: auto; font-weight: 500; color: var(--ink-3); }.gen .g-history summary svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }.gen .g-history summary .chev { margin-left: 0; transition: transform .2s var(--ease); }.gen .g-history[open] summary .chev { transform: rotate(180deg); }.gen .g-history .note { padding: 0 14px 12px; font-size: 13px; line-height: 18px; color: var(--ink-3); }.gen .g-history ol { list-style: none; padding: 0 14px 12px; display: grid; gap: 12px; }.gen .g-history li { border-top: 1px solid var(--line); padding-top: 12px; }.gen .g-history .t { font-size: 14px; line-height: 20px; color: var(--ink-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }.gen .g-history .s { font-size: 13px; color: var(--ink-3); margin-top: 4px; }.gen .g-history .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }.gen .g-history .foot { padding: 0 14px 14px; }.gen .g-copyall { margin-top: 12px; }.gen .g-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-1); overflow: hidden; margin-top: 12px; }.gen .g-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }.gen .g-bar .len { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }.gen .g-bar .len.over { color: var(--danger-text); font-weight: 600; }.gen .g-bar .lbl { font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }.gen pre.g-prompt { padding: 16px 18px; white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/24px var(--font); color: var(--ink); background: var(--surface); margin: 0; }.gen pre.g-prompt.long { font-size: 14px; line-height: 22px; }.gen .g-step { border-top: 1px solid var(--line); }.gen .g-step .g-bar { background: var(--surface-2); }.gen .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); font: 600 14px/1 var(--font); cursor: pointer; border: 1px solid transparent; text-decoration: none; white-space: nowrap; }.gen .btn svg { width: 16px; height: 16px; }.gen .btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary-edge); }.gen .btn-accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent-edge); }.gen .btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }.gen .btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }.gen .btn-text { background: none; border: 0; color: var(--primary-text); font: 600 14px/1 var(--font); padding: 0 6px; min-height: 36px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }.gen .g-chead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }.gen h2 { font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }.gen .g-group { padding: 14px 0; border-bottom: 1px solid var(--line); }.gen .g-group:last-child, .gen .g-input:last-child { border-bottom: 0; }.gen .g-ghead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }.gen label, .gen legend { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); }.gen .keep { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 16px; font-weight: 500; color: var(--ink-2); padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 16px; min-height: 32px; cursor: pointer; text-align: left; }.gen .g-ghead { flex-wrap: wrap; }.gen .keep input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary-text); }.gen .keep:has(input:checked), .gen .keep.on { background: var(--primary-soft); border-color: var(--primary-text); color: var(--ink); }.gen .keep svg { width: 13px; height: 13px; }.gen select, .gen input[type="text"] { width: 100%; font: 16px/24px var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-control); padding: 9px 12px; min-height: 44px; }.gen select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: var(--chevron); background-repeat: no-repeat; background-position: right 12px center; }.gen input::placeholder { color: var(--ink-3); opacity: 1; }.gen .chips { display: flex; flex-wrap: wrap; gap: 8px; }.gen .chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; position: relative; }.gen .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }.gen .chip:has(input:checked), .gen .chip.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary-edge); }.gen .chip:has(input:focus-visible), .gen .chip.focus { outline: 2px solid var(--focus); outline-offset: 2px; }.gen .own { display: flex; gap: 8px; margin-top: 8px; align-items: flex-end; }.gen .own .f { flex: 1; min-width: 0; }.gen .own label { font-size: 13px; color: var(--ink-3); font-weight: 500; display: block; margin-bottom: 4px; }.gen .own .btn { min-height: 44px; }.gen .g-fixed { padding: 12px 0; color: var(--ink-3); font-size: 14px; line-height: 20px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }.gen .g-fixed svg { width: 14px; height: 14px; flex: none; }.gen .g-input { padding: 14px 0; border-bottom: 1px solid var(--line); }.gen .g-input label { display: block; margin-bottom: 6px; }.gen .g-ftr { max-width: 1120px; margin: 24px auto 0; padding: 16px 16px 24px; border-top: 1px solid var(--line); font-size: 13px; line-height: 20px; color: var(--ink-3); }.gen .g-ftr p { margin: 2px 0; }.gen .g-ftr a { color: var(--ink-2); }@container gen (max-width: 480px) {.gen .g-theme { padding: 0; width: 36px; }.gen .g-theme .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }.gen .g-history summary .n .word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }}@container gen (min-width: 900px) {.gen.layout-workbench .g-cols { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; margin-top: 16px; }.gen.layout-workbench .g-out { position: sticky; top: 16px; align-self: start; }}@media (prefers-reduced-motion: reduce) { .gen * { transition: none !important; animation: none !important; } }[hidden]{display:none!important}.gen{display:flex;flex-direction:column}.gen>.g-hdr{order:-1}.gen>.g-main,.gen>.g-ftr{width:100%}.gen .g-logo img.logo-dark{display:none}[data-theme=dark] .gen .g-logo img.logo-dark{display:block}[data-theme=dark] .gen .g-logo img.logo-light{display:none}@media (prefers-color-scheme:dark){html:not([data-theme]) .gen .g-logo img.logo-dark{display:block}html:not([data-theme]) .gen .g-logo img.logo-light{display:none}}
