/* pgkiln builder: an IDE look (dark chrome, icon rail, dense panes), loaded
   only by builder pages after app.css; the runtime never loads it.

   (sprint 105) Design tokens. Everything below draws from these custom
   properties: change a colour, radius or shadow here, not in a rule.
   - neutrals: a warm "stone" scale (--bg, --surface…, --text, --muted, --border)
   - brand: the kiln's ember (--hot for primary actions and the logo, --accent for
     links, focus rings and selections); contrast: --hot on white text 5.2:1,
     --accent ≥ 4.8:1 on every surface, --muted ≥ 5.6:1, in both themes
   - elevation: --shadow-xs … --shadow-lg; radius: --radius-sm / --radius / --radius-lg
   - type: --fs-xs … --fs-xl; motion: --ease and --dur (none under prefers-reduced-motion)
   - code (sprint 108): --ce-* for public/code-editor.js and read-only <pre data-code-view>; every
     syntax colour ≥ 4.5:1 on --ce-bg in both themes (test/e2e/code-editor.test.ts checks it)
   The light set first, the dark set for data-theme="dark" and for "System" when
   the OS prefers dark. The chrome (rail, toolbar, status bar) is dark in both
   themes (the same colours), a shade deeper than the page in the dark one. */

:is(.ide, .ide-login) {
  --rail-w: 56px;
  --bar-h: 48px;
  --page-px: 22px;
  --page-py: 18px;

  /* chrome: the rail, the top toolbar and the status bar */
  --chrome: #13110f;
  --chrome-2: #25221f;
  --chrome-3: #37332f;
  --chrome-text: #f5f4f2;
  --chrome-muted: #aca59f;
  --chrome-border: #2a2623;
  --chrome-glow: rgb(234 88 12 / 16%);

  /* brand: ember */
  --ember-1: #fb923c;
  --ember-2: #ea580c;
  --ember-3: #c2410c;
  --hot: #c2410c;
  --hot-hover: #ad3a0b;
  --hot-text: #ffffff;
  --sel-bg: #fde3d2;
  --sel-text: var(--text);
  --sel-bar: var(--hot);
  --warn: #b7791f;

  /* neutrals */
  --bg: #f6f5f3;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --surface-3: #f1efec;
  --text: #1c1917;
  --muted: #5c5650;
  --border: #e7e4e0;
  --border-strong: #d6d1cb;
  --accent: #b8410c;
  --accent-text: #ffffff;
  --accent-soft: #fdeee4;
  --ring: rgb(194 65 12 / 28%);
  --gold: #b8410c;
  --canvas: #efede9;
  --canvas-dot: #d9d5cf;
  --block: #ffffff;
  --block-head: #f7f5f2;
  --code-bg: #fbfaf8;
  --field-border: var(--border-strong);

  /* code editor (sprint 108, public/code-editor.js): every token colour is at least 4.5:1 on --ce-bg
     (keywords take the ember; the others cool hues so they stay apart) */
  --ce-bg: #fdfcfb;
  --ce-gutter: #f5f3f0;
  --ce-gutter-text: #6b645d;
  --ce-gutter-active: #1c1917;
  --ce-text: #1c1917;
  --ce-kw: #b23a0a;
  --ce-type: #0e6b66;
  --ce-fn: #2457a6;
  --ce-str: #3a7516;
  --ce-num: #8a3ea0;
  --ce-com: #736c66;
  --ce-bind: #b02a5c;
  --ce-qid: #80590a;
  --ce-op: #5c5650;
  --ce-tag: #2457a6;
  --ce-attr: #b23a0a;
  --ce-err: #c0262d;
  --ce-match: rgb(234 88 12 / 16%);
  --ce-match-ring: rgb(194 65 12 / 55%);
  --ce-line: rgb(28 25 23 / 4.5%);
  --ce-select: rgb(234 88 12 / 20%);

  /* shape, elevation, type, motion */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-xs: 0 1px 1px rgb(28 25 23 / 4%);
  --shadow-sm: 0 1px 2px rgb(28 25 23 / 6%), 0 1px 3px rgb(28 25 23 / 4%);
  --shadow-md: 0 2px 4px rgb(28 25 23 / 4%), 0 8px 20px -4px rgb(28 25 23 / 10%);
  --shadow-lg: 0 4px 8px rgb(28 25 23 / 6%), 0 16px 40px -8px rgb(28 25 23 / 22%);
  --shadow: var(--shadow-xs);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, "Noto Sans", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --fs-xs: 11.5px;
  --fs-sm: 12.5px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 140ms;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.ide, .ide-login) {
    --chrome-glow: rgb(234 88 12 / 13%);
    --bg: #181715; --surface: #1f1d1b; --surface-2: #242220; --surface-3: #2d2b28; --text: #edebe8; --muted: #a8a19a;
    --border: #312e2b; --border-strong: #423e39; --accent: #ff9152; --accent-text: #1a0b03; --accent-soft: #3a1f12; --ring: rgb(255 145 82 / 30%); --sel-bg: #4a2816; --sel-bar: #ff9152;
    --gold: #ff9152; --canvas: #151412; --canvas-dot: #2a2825; --block: #222120; --block-head: #292725; --code-bg: #1a1917; --warn: #e0a740;
    --ce-bg: #1a1917; --ce-gutter: #1f1d1b; --ce-gutter-text: #8f8880; --ce-gutter-active: #e9e6e3; --ce-text: #e9e6e3;
    --ce-kw: #ff9152; --ce-type: #5cc8bd; --ce-fn: #8ab4ff; --ce-str: #a5d68a; --ce-num: #d4a8ff; --ce-com: #938b83; --ce-bind: #ff8fb8;
    --ce-qid: #e6c26a; --ce-op: #b8b0a8; --ce-tag: #8ab4ff; --ce-attr: #ff9152; --ce-err: #ff7a70;
    --ce-match: rgb(255 145 82 / 22%); --ce-match-ring: rgb(255 145 82 / 60%); --ce-line: rgb(255 255 255 / 4.5%); --ce-select: rgb(255 145 82 / 28%);
    --shadow-xs: 0 1px 1px rgb(0 0 0 / 30%);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%), inset 0 1px 0 rgb(255 255 255 / 3%);
    --shadow-md: 0 4px 16px -2px rgb(0 0 0 / 50%), inset 0 1px 0 rgb(255 255 255 / 4%);
    --shadow-lg: 0 18px 44px -8px rgb(0 0 0 / 65%), 0 0 0 1px rgb(255 255 255 / 5%);
    --pd-c-region: #7fb4ea; --pd-c-item: #7ccf8c; --pd-c-button: #f0a35e; --pd-c-da: #c49cf0; --pd-c-process: #ee8fbf;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] :is(.ide, .ide-login) {
  --chrome-glow: rgb(234 88 12 / 13%);
  --bg: #181715; --surface: #1f1d1b; --surface-2: #242220; --surface-3: #2d2b28; --text: #edebe8; --muted: #a8a19a;
  --border: #312e2b; --border-strong: #423e39; --accent: #ff9152; --accent-text: #1a0b03; --accent-soft: #3a1f12; --ring: rgb(255 145 82 / 30%); --sel-bg: #4a2816; --sel-bar: #ff9152;
  --gold: #ff9152; --canvas: #151412; --canvas-dot: #2a2825; --block: #222120; --block-head: #292725; --code-bg: #1a1917; --warn: #e0a740;
  --ce-bg: #1a1917; --ce-gutter: #1f1d1b; --ce-gutter-text: #8f8880; --ce-gutter-active: #e9e6e3; --ce-text: #e9e6e3;
  --ce-kw: #ff9152; --ce-type: #5cc8bd; --ce-fn: #8ab4ff; --ce-str: #a5d68a; --ce-num: #d4a8ff; --ce-com: #938b83; --ce-bind: #ff8fb8;
  --ce-qid: #e6c26a; --ce-op: #b8b0a8; --ce-tag: #8ab4ff; --ce-attr: #ff9152; --ce-err: #ff7a70;
  --ce-match: rgb(255 145 82 / 22%); --ce-match-ring: rgb(255 145 82 / 60%); --ce-line: rgb(255 255 255 / 4.5%); --ce-select: rgb(255 145 82 / 28%);
  --shadow-xs: 0 1px 1px rgb(0 0 0 / 30%);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%), inset 0 1px 0 rgb(255 255 255 / 3%);
  --shadow-md: 0 4px 16px -2px rgb(0 0 0 / 50%), inset 0 1px 0 rgb(255 255 255 / 4%);
  --shadow-lg: 0 18px 44px -8px rgb(0 0 0 / 65%), 0 0 0 1px rgb(255 255 255 / 5%);
  --pd-c-region: #7fb4ea; --pd-c-item: #7ccf8c; --pd-c-button: #f0a35e; --pd-c-da: #c49cf0; --pd-c-process: #ee8fbf;
  color-scheme: dark;
}

body.ide {
  margin: 0; min-height: 100vh; min-height: 100dvh; padding-left: var(--rail-w); background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: var(--fs-base); line-height: 1.45;
  font-feature-settings: "cv11", "ss01", "ss03"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
.ide ::selection { background: color-mix(in srgb, var(--accent) 26%, transparent); }
.ide :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.ide .icon { width: 16px; height: 16px; }
.ide h1 { font-size: var(--fs-xl); font-weight: 680; letter-spacing: -0.018em; line-height: 1.25; }
.ide h2 { font-size: var(--fs-md); font-weight: 650; letter-spacing: -0.006em; }
.ide h3 { font-size: var(--fs-base); font-weight: 650; }
.ide code { font-size: 0.92em; }
.ide .small { font-size: 12px; }
.ide .skip-link { z-index: 60; }
.ide { scrollbar-color: var(--border-strong) transparent; }
.ide a { text-underline-offset: 2px; text-decoration-thickness: from-font; }

/* ------------------------------------------------------------ foundations (sprint 105): the shared controls */
.ide .btn {
  min-height: 30px; font-weight: 560; border-color: var(--border-strong); background: var(--surface); box-shadow: var(--shadow-xs);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
}
.ide .btn:hover { background: var(--surface-3); border-color: color-mix(in srgb, var(--text) 22%, var(--border-strong)); }
.ide .btn:active { box-shadow: none; translate: 0 0.5px; }
.ide .btn .icon { width: 15px; height: 15px; }
.ide .btn-run, .ide .btn-hot, .ide-login .btn-hot {
  background: var(--hot); border-color: color-mix(in srgb, var(--hot) 80%, black); color: var(--hot-text);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 16%), 0 1px 2px rgb(124 45 18 / 30%);
}
.ide .btn-run:hover, .ide .btn-hot:hover, .ide-login .btn-hot:hover { background: var(--hot-hover); border-color: color-mix(in srgb, var(--hot-hover) 80%, black); }
.ide .btn-danger { color: var(--danger); }
.ide .btn-danger:hover { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
/* fields: app.css draws their border with var(--field-border); a ring on focus (a field that draws its own
   frame, like the code editor or the property filter, sets box-shadow: none) */
.ide :where(input:not([type=checkbox], [type=radio], [type=color], [type=range], [type=file]), select, textarea) {
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.ide :where(input:not([type=checkbox], [type=radio], [type=color], [type=range], [type=file]), select, textarea):focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring);
}
.ide input::placeholder, .ide textarea::placeholder { color: color-mix(in srgb, var(--muted) 85%, transparent); }
/* selects: one chevron in both themes (img-src allows data: URIs) */
.ide select:not([multiple]):not([size]) {
  appearance: none; -webkit-appearance: none; padding-right: 1.9rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23857d75' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.5rem center; background-size: 14px;
}
.ide input[type=checkbox], .ide input[type=radio] { accent-color: var(--hot); }
.ide .label { color: var(--muted); font-weight: 600; }
.ide .help { color: var(--muted); }
.ide .alert { border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.ide .badge { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.ide .tag { border-radius: 99px; padding: 0.05rem 0.5rem; font-weight: 600; background: var(--surface-3); color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.ide kbd { border-radius: 4px; border-color: var(--border-strong); background: var(--surface); color: var(--muted); }
/* menus: rounded, elevated, rows with a hover background */
.ide .menu-panel { border-radius: var(--radius); border-color: var(--border-strong); box-shadow: var(--shadow-lg); padding: 4px 0; }
.ide .menu-section { padding: 6px 8px; gap: 2px; }
.ide .menu-section > :is(strong, .small) { padding: 2px 8px; }
.ide .menu-links a, .ide .menu-links button { padding: 6px 8px; border-radius: var(--radius-sm); transition: background-color var(--dur) var(--ease); }
.ide .menu-links a:hover, .ide .menu-links button:hover, .ide .menu-links a:focus-visible { background: var(--surface-3); color: var(--text); }
.ide .menu-links .icon { color: var(--muted); }
/* segmented controls */
.ide .segmented { border-color: var(--border-strong); background: var(--surface-2); padding: 2px; gap: 2px; border-radius: var(--radius-sm); }
.ide .segmented button { border-radius: 4px; border: 0; }
.ide .segmented button + button { border-left: 0; }
.ide .segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border-strong); }
/* reports: quiet headers, row hover, headers that stick inside a scrolling box */
.ide .table-wrap { border-radius: var(--radius); border-color: var(--border); background: var(--surface); box-shadow: var(--shadow-xs); }
.ide .report th {
  position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--muted);
  font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0.035em; text-transform: uppercase;
}
.ide .report tbody tr { transition: background-color var(--dur) var(--ease); }
.ide .report tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 50%, var(--surface-2)); }
.ide .report td { font-variant-numeric: tabular-nums; }
.ide .report td.empty, .ide p.empty { color: var(--muted); }

/* links in reports and side lists: no underline until hovered */
.ide .report td a:not(.btn), .ide .sc-links a, .ide .tree a { text-decoration: none; }
.ide .report td a:not(.btn):hover, .ide .sc-links a:hover { text-decoration: underline; }
.ide .report td a:not(.btn) { font-weight: 550; color: var(--text); }
.ide .report td a:not(.btn):hover { color: var(--accent); }
.ide .sc-links a { color: var(--text); }
.ide .sc-links a:hover { color: var(--accent); }
.ide .sc-links a .icon { color: var(--muted); }
/* link groups (.seg: Report / Icons…) as a segmented control */
.ide .seg:not(.col) { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.ide .seg:not(.col) a { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border: 0; border-radius: 4px; color: var(--muted); font-weight: 550; transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.ide .seg:not(.col) a:hover { color: var(--text); }
.ide .seg:not(.col) a[aria-current] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border-strong); }
/* fields in the dark toolbar (search, the designer's page number and page list) */
.ide-bar :is(input:not([type=checkbox]):not([type=radio]), select) { background-color: var(--chrome-2); color: var(--chrome-text); border-color: var(--chrome-3); }
.ide-bar input::placeholder { color: var(--chrome-muted); }
.ide .ide-bar .ide-search input[type=search] {
  height: 30px; padding: 3px 8px 3px 28px; border-radius: var(--radius-sm);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aca59f' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 9px center; background-size: 14px;
}
.ide-bar .ide-search input:hover { border-color: color-mix(in srgb, var(--chrome-text) 25%, var(--chrome-3)); }
.ide-bar :is(input, select):focus-visible { border-color: var(--ember-1); box-shadow: 0 0 0 3px rgb(251 146 60 / 25%); }
/* phones: the designer's crowded toolbar shows the search as its icon until it has the focus */
@media (max-width: 640px) {
  .ide.ide-full .ide-bar .ide-search input[type=search]:not(:focus) { width: 30px; padding-right: 0; color: transparent; }
  .ide-full .ide-bar .ide-search input:not(:focus)::placeholder { color: transparent; }
}

/* ------------------------------------------------------------ icon rail */
.ide-rail {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--rail-w);
  display: flex; flex-direction: column; align-items: stretch; padding: 10px 0;
  background: var(--chrome); color: var(--chrome-text); border-right: 1px solid var(--chrome-border);
  background-image: radial-gradient(120px 90px at 50% 0, var(--chrome-glow), transparent 70%);
}
/* the brand mark: an ember flame on a glowing tile */
.rail-logo {
  display: grid; place-items: center; width: 36px; height: 36px; margin: 0 auto 14px; border-radius: 10px;
  background: linear-gradient(150deg, var(--ember-1), var(--ember-2) 55%, var(--ember-3)); color: #fff; text-decoration: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 30%), 0 0 0 1px rgb(0 0 0 / 25%), 0 4px 14px -2px rgb(234 88 12 / 55%);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.rail-logo:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / 30%), 0 0 0 1px rgb(0 0 0 / 25%), 0 6px 20px -2px rgb(234 88 12 / 75%); transform: translateY(-1px); }
.rail-logo .icon, .signin-logo .icon { width: 22px; height: 22px; }
.rail-list { list-style: none; margin: 0; padding: 0 8px; display: flex; flex-direction: column; gap: 4px; }
.rail-bottom { margin-top: auto; }
.rail-link {
  position: relative; display: grid; place-items: center; height: 40px; border-radius: var(--radius); color: var(--chrome-muted); text-decoration: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.rail-link .icon { width: 20px; height: 20px; stroke-width: 1.75; }
.rail-link:hover { color: var(--chrome-text); background: var(--chrome-2); }
.rail-link[aria-current] { color: var(--ember-1); background: color-mix(in srgb, var(--ember-2) 16%, var(--chrome-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ember-2) 28%, transparent); }
.rail-link[aria-current]::before { content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ember-2); }
.rail-label {
  position: absolute; left: calc(100% + 12px); top: 50%; transform: translate(-4px, -50%); z-index: 2;
  padding: 4px 9px; border-radius: var(--radius-sm); background: #0c0b0a; color: #f5f4f2; font-size: 12px; font-weight: 550; white-space: nowrap;
  box-shadow: 0 6px 18px rgb(0 0 0 / 35%), 0 0 0 1px rgb(255 255 255 / 8%);
  opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.rail-link:hover .rail-label, .rail-link:focus-visible .rail-label { opacity: 1; transform: translate(0, -50%); }
.rail-user { display: flex; justify-content: center; padding: 6px 0 2px; }
.rail-avatar {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  background: linear-gradient(150deg, #57534e, #292524); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 0 0 1px var(--chrome-3); transition: box-shadow var(--dur) var(--ease);
}
.rail-avatar:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 0 0 2px var(--ember-2); }
.rail-user .menu-panel { position: fixed; left: calc(var(--rail-w) + 8px); top: auto; bottom: 8px; min-width: 260px; font-size: 13px; }
.rail-user .menu-section > strong { font-size: 13.5px; }
.ide-theme { margin: 0; }
.ide-theme button { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 12.5px; padding: 0.3rem 0.6rem; min-height: 30px; }
.ide-theme .icon { width: 14px; height: 14px; }
.rail-user .menu-links form { margin: 0; }
/* workspace switcher in the account menu (064) */
.ws-switch { display: flex; flex-direction: column; gap: 2px; margin: 0.35rem 0 0; }
.ws-switch button { display: flex; align-items: center; gap: 0.45rem; width: 100%; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; font-size: 13px; padding: 0.35rem 0.5rem; min-height: 32px; cursor: pointer; text-align: left; }
.ws-switch button:hover { background: var(--surface-3); }
.ws-switch button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ws-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ws-switch .icon { width: 14px; height: 14px; flex: none; }

/* ------------------------------------------------------------ top toolbar */
.ide-main { min-width: 0; }
.ide-bar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 6px;
  height: var(--bar-h); padding: 0 10px 0 8px; background: var(--chrome); color: var(--chrome-text);
  border-bottom: 1px solid var(--chrome-border);
  background-image: linear-gradient(90deg, var(--chrome-glow), transparent 32%);
}
.ide-back { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-sm); color: var(--chrome-muted); flex: none; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.ide-back:hover { background: var(--chrome-2); color: var(--chrome-text); }
.ide-back .icon { width: 18px; height: 18px; }
.ide-crumbs { flex: 1 1 auto; min-width: 0; }
.ide-crumbs:first-child { padding-left: 8px; }
.ide-crumbs ol { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; min-width: 0; white-space: nowrap; }
.ide-crumbs li { min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 0 3 auto; }
.ide-crumbs li:last-child { flex-shrink: 1; }
.ide-crumbs li + li::before { content: "/"; padding: 0 0.6em; color: var(--chrome-muted); opacity: 0.5; }
.ide-crumbs a { color: var(--chrome-muted); text-decoration: none; border-radius: 4px; transition: color var(--dur) var(--ease); }
.ide-crumbs a:hover { color: var(--chrome-text); text-decoration: underline; }
.ide-crumbs [aria-current] { color: var(--chrome-text); font-weight: 600; }
.ide-tools { display: flex; align-items: center; flex: none; min-width: 0; }
.tb-group { display: flex; align-items: center; gap: 2px; padding: 0 6px; }
.tb-group + .tb-group { border-left: 1px solid var(--chrome-border); }
.tb-form { display: inline-flex; align-items: center; margin: 0; }
.tb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 32px; height: 32px; padding: 0 6px;
  border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: inherit; font: inherit; font-size: 12.5px;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.tb-btn:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.tb-btn:disabled, .tb-btn[aria-disabled="true"] { opacity: 0.38; cursor: default; background: none; }
.tb-btn .icon { width: 18px; height: 18px; }
.tb-btn .tb-caret { width: 12px; height: 12px; margin-left: -2px; }
.tb-text { padding: 0 8px; }
.tb-text .icon { width: 15px; height: 15px; }
.tb-menu { display: inline-flex; }
.tb-menu > summary { list-style: none; }
.tb-menu .menu-panel { top: calc(100% + 6px); }
.ide-bar .menu-panel { font-size: 13px; }
.pd-goto select {
  height: 30px; width: auto; max-width: 13rem; padding: 0 0.4rem; font-size: 12.5px;
  background-color: var(--chrome-2); color: var(--chrome-text); border: 1px solid var(--chrome-3); border-radius: var(--radius-sm);
}
.js .pd-goto-go { display: none; }
.ide .btn-sm { padding: 0.28rem 0.7rem; font-size: 12.5px; gap: 0.3rem; }
.ide-bar .btn { border-radius: var(--radius-sm); height: 32px; }
.ide .tb-save { background: var(--chrome-2); border-color: var(--chrome-3); color: var(--chrome-text); box-shadow: none; }
.ide .tb-save:hover { background: var(--chrome-3); border-color: var(--chrome-3); }
.tb-save.is-dirty { border-color: var(--hot); box-shadow: inset 0 0 0 1px var(--hot); }
.tb-main { gap: 6px; }

/* ------------------------------------------------------------ messages */
.ide-alerts { padding: 10px 18px 0; }
.ide-alerts .alert { padding: 0.5rem 2rem 0.5rem 0.85rem; margin-bottom: 8px; font-size: 13px; border-radius: var(--radius); }
.ide-full .ide-alerts { padding: 6px 8px 0; background: var(--bg); }
.ide-full .ide-alerts .alert { margin-bottom: 6px; }

/* ------------------------------------------------------------ document pages (app home, shared components, SQL Workshop…) */
.ide .ide-page { max-width: 1680px; margin: 0 auto; padding: var(--page-py) var(--page-px) 48px; }
.ide .region-standard, .ide .region-collapsible { border-radius: var(--radius-lg); border-color: var(--border); box-shadow: var(--shadow-sm); }
.ide .region-header { min-height: 42px; padding: 0.45rem 1rem; background: transparent; border-bottom-color: var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.ide .region-header h2 { font-size: 13.5px; font-weight: 650; letter-spacing: -0.005em; min-width: 0; overflow-wrap: anywhere; }
.ide .region-body { padding: 1rem; }
.ide .region-footer { background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.ide .btn { font-size: 13px; padding: 0.34rem 0.8rem; border-radius: var(--radius-sm); }
.ide input:not([type=checkbox]):not([type=radio]), .ide select, .ide textarea { padding: 0.36rem 0.6rem; border-radius: var(--radius-sm); font-size: 13px; }
.ide textarea.code { font-size: 12.5px; background: var(--code-bg); }
.ide .label { font-size: 12.5px; }
.ide .form-grid { gap: 0.7rem 1rem; }
.ide table.report { font-size: 13px; }
.ide .report th, .ide .report td { padding: 0.42rem 0.7rem; }
.ide .report th { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.ide .columns { gap: 1rem; margin-top: 1rem; }
.ide .title-row { margin-bottom: 1rem; }
.ide .tile, .ide .app-card, .ide .stat { border-radius: var(--radius-lg); border-color: var(--border); box-shadow: var(--shadow-xs); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.ide :is(a.tile, a.stat, .app-card):hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.ide .tile { padding: 0.9rem; }
.ide .tile .tile-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent); }
.ide .tiles { gap: 0.75rem; margin-bottom: 1rem; }
.ide .app-cards { gap: 0.75rem; }
.ide .app-card { padding: 0.8rem; gap: 0.5rem; }
.ide .app-card .app-icon { width: 38px; height: 38px; border-radius: 6px; }
.ide fieldset.prop-group > legend { font-size: 11.5px; }

/* application header with its tabs */
.ide-head { margin: calc(-1 * var(--page-py)) calc(-1 * var(--page-px)) var(--page-py); padding: 16px var(--page-px) 0; background: var(--surface); border-bottom: 1px solid var(--border); background-image: linear-gradient(180deg, var(--surface-2), var(--surface) 70%); }
.ide-head-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.ide-head-title > div:not(.buttons) { min-width: 0; }
.ide-head-title h1 { overflow-wrap: anywhere; }
.ide-app-icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none;
  background: linear-gradient(150deg, var(--ember-2), var(--ember-3)); color: #fff; font-weight: 750; font-size: 17px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 25%), var(--shadow-sm);
}
.ide-head-actions { margin-left: auto; }
.ide-tabs { display: flex; gap: 4px; margin-top: 12px; overflow-x: auto; scrollbar-width: thin; }
.ide-page > .ide-tabs { margin-top: 0; border-bottom: 1px solid var(--border); }
/* (sprint 163) regions and two-column rows stacked on a page always have a gap between them (pages used to rely on
   an explicit .u-spacer, and the ones without one let a region touch the one above); not the regions side by side in a
   grid, which have the grid's gap; :where() keeps it weaker than any page's own margin rule */
:where(.ide-page :is(.region, .columns, :has(> .region)) + :is(.region, .columns, :has(> .region)):not(:is(.columns, .qs-columns, .vec-columns, .ws-cols, .wh-top, [class*="grid"]) > *)) { margin-top: 1rem; }
.ide-tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px 9px; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; border-radius: var(--radius-sm) var(--radius-sm) 0 0; white-space: nowrap; font-weight: 550;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.ide-tab:hover { color: var(--text); background: var(--surface-3); }
.ide-tab[aria-current] { color: var(--text); border-bottom-color: var(--hot); }
.ide-tab[aria-current] .icon { color: var(--accent); }
.ide-tab .icon { width: 15px; height: 15px; }

/* ------------------------------------------------------------ generic tabs (builder.js turns [data-tabs] into tabs) */
.tablist { display: flex; align-items: stretch; gap: 0; padding: 0 6px; background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; flex: none; }
.tablist [role=tab] {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px 7px; border: 0; border-bottom: 2px solid transparent;
  background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tablist [role=tab]:hover { color: var(--text); }
.tablist [role=tab][aria-selected="true"] .icon { color: var(--accent); }
.tablist [role=tab][aria-selected="true"] { color: var(--text); border-bottom-color: var(--hot); }
.tablist [role=tab]:focus-visible { outline-offset: -2px; }
.tabs-on > .tab-panel > .tab-title { display: none; }
.tab-title { display: flex; align-items: center; gap: 6px; margin: 0; padding: 8px 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border-bottom: 1px solid var(--border); }
.pd-tabs-icons > .tablist [role=tab] { padding: 9px 12px 8px; }
.pd-tabs-icons > .tablist [role=tab] .icon { width: 18px; height: 18px; }
.pd-tabs-icons > .tablist [role=tab] span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pd-tabs-icons > .tablist [role=tab] span.tab-flag { position: static; width: auto; height: auto; clip: auto; }

/* ------------------------------------------------------------ page designer: three panes */
.pd { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--surface); }
.pd-pane { min-width: 0; background: var(--surface); }
.pd-center { background: var(--canvas); }
@media (min-width: 1024px) {
  .pd { grid-template-columns: 236px minmax(0, 1fr) 310px; }
  .pd-left { border-right: 1px solid var(--border); }
  .pd-right { border-left: 1px solid var(--border); }
  .pd > .tab-panel > .pd-pane-title { display: none; }
  /* with script the designer fills the window and each pane scrolls on its own */
  .js .ide-full .ide-main { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
  /* (UX-2) the work area is the containing block and clips: nothing inside (a screen-reader heading placed
     absolutely, a pane's overflow) can make the page itself scroll */
  .js .ide-full .ide-work { flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden; }
  .js .ide-full .pd { height: 100%; min-height: 0; }
  .js .pd-pane { min-height: 0; overflow: auto; }
  .js .pd-center { display: flex; flex-direction: column; overflow: hidden; }
  .js .pd-center > .pd-tabs { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .js .pd-tabs-center > .tab-panel { flex: 1 1 auto; min-height: 0; overflow: auto; }
  .js .pd-tabs-center > #pd-c-layout { display: flex; flex-direction: column; overflow: hidden; }
  .js .pd-canvas { flex: 1 1 auto; min-height: 0; overflow: auto; }
  .js .pd-gallery { flex: none; height: 32%; min-height: 140px; max-height: 280px; overflow: auto; }
  body.pd-max .pd { grid-template-columns: 0 minmax(0, 1fr) 0; }
  body.pd-max .pd-left, body.pd-max .pd-right { visibility: hidden; border: 0; }
  /* (sprint 210, AX-5) two panes: the tree and the layout share the left column (Tree | Layout), the properties the right */
  body.pd-two .pd { grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto minmax(0, 1fr); }
  body.pd-two .pd-twobar { display: flex; grid-column: 1; grid-row: 1; border-right: 1px solid var(--border); }
  body.pd-two .pd-left, body.pd-two .pd-center { grid-column: 1; grid-row: 2; border-right: 1px solid var(--border); }
  body.pd-two .pd-right { grid-column: 2; grid-row: 1 / span 2; }
  body.pd-two:not(.pd-two-layout) .pd-center { display: none; }
  body.pd-two.pd-two-layout .pd-left { display: none; }
  body.pd-two.pd-max .pd { grid-template-columns: minmax(0, 1fr) 0; }
  body.pd-two.pd-max .pd-twobar, body.pd-two.pd-max .pd-left { display: none; }
  body.pd-two.pd-max .pd-center { display: flex; grid-row: 1 / span 2; }
}
.pd-twobar { display: none; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.pd-twobar [role=tab] { flex: 1 1 0; padding: 7px 10px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.pd-twobar [role=tab][aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.pd-panes-switch { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pd-panes-switch[hidden] { display: none; }
.pd-panes-switch [aria-pressed=true] { font-weight: 600; }
@media (max-width: 1023px) { .pd-panes-switch { display: none; } }
@media (min-width: 1280px) {
  .pd { grid-template-columns: 264px minmax(0, 1fr) 350px; }
}
@media (min-width: 1440px) {
  .pd { grid-template-columns: 300px minmax(0, 1fr) 400px; }
}
/* phones and portrait tablets: one pane at a time (tabs) with script, stacked without */
@media (max-width: 1023px) {
  .pd > .tablist { position: sticky; top: var(--bar-h); z-index: 5; justify-content: stretch; padding: 0; }
  .pd > .tablist [role=tab] { flex: 1 1 0; justify-content: center; padding: 10px 6px 9px; }
  .pd > .tab-panel > .pd-pane-title { font-size: 12px; background: var(--surface-2); }
  .pd-pane + .pd-pane { border-top: 1px solid var(--border); }
  .pd-canvas { min-height: 260px; }
  .pd-gallery { border-top: 1px solid var(--border); }
}

/* ------------------------------------------------------------ component tree */
.pd-treebar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px 6px; border-bottom: 1px solid var(--border); }
.pd-treebar .tb-btn { height: 28px; color: var(--accent); }
.pd-tree, .pd-tree ul { list-style: none; margin: 0; padding: 0; }
.pd-tree { padding: 6px 4px 18px; }
.pd-tree ul { padding-left: 14px; }
.pd-node {
  position: relative; display: flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 6px 2px 20px;
  border-radius: var(--radius-sm); color: var(--text); text-decoration: none; white-space: nowrap;
}
.pd-node .icon { width: 16px; height: 16px; color: var(--muted); }
a.pd-node:hover { background: var(--surface-3); }
/* (UX-12) the name keeps its room: the type gives way first (the icon tells it, the tooltip names it) */
.pd-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.pd-note { margin-left: auto; padding-left: 8px; max-width: 45%; min-width: 0; flex: 0 1000 auto; overflow: hidden; text-overflow: clip; white-space: nowrap; color: var(--muted); font-size: 11.5px; }
.pd-folder { color: var(--muted); font-weight: 600; cursor: default; }
.pd-tag { display: inline-flex; }
.pd-tag .icon { width: 13px; height: 13px; color: var(--warn); }
.pd-node[aria-current], .pd-node[aria-selected="true"] { background: var(--sel-bg); color: var(--sel-text); box-shadow: inset 2px 0 0 var(--sel-bar); font-weight: 600; }
.pd-empty { padding: 2px 6px 2px 20px; color: var(--muted); font-style: italic; font-size: 12px; }
/* twisties (builder.js marks nodes with children) */
.pd-node.has-kids::before {
  content: ""; position: absolute; left: 7px; top: 50%; width: 5px; height: 5px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; opacity: 0.75;
  transform: translateY(-70%) rotate(45deg); transition: transform 0.12s;
}
.pd-node.has-kids[aria-expanded="false"]::before { transform: translateY(-50%) rotate(-45deg); }
.js .pd-tree li[data-collapsed] > ul { display: none; }
.pd-tree [role=treeitem]:focus-visible { outline-offset: -2px; }

/* ------------------------------------------------------------ layout canvas */
.pd-canvas-bar { display: flex; align-items: center; gap: 2px; min-height: 36px; padding: 2px 8px; background: var(--surface); border-bottom: 1px solid var(--border); color: var(--text); flex: none; }
/* (sprint 207, AX-4) the keyboard hint lives in the Help tab; the bar keeps a ? that opens it */
.pd-canvas-help { margin-left: auto; }
.pd-canvas {
  --zoom: 1; padding: 14px; font-size: calc(13px * var(--zoom)); background-color: var(--canvas);
  background-image: radial-gradient(var(--canvas-dot) 1px, transparent 1.2px); background-size: 16px 16px;
}
.pd-page-label { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--muted); font-size: 0.92em; font-weight: 600; }
.pd-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: start; }
.pd-span-1 { grid-column: span 1; } .pd-span-2 { grid-column: span 2; } .pd-span-3 { grid-column: span 3; }
.pd-span-4 { grid-column: span 4; } .pd-span-5 { grid-column: span 5; } .pd-span-6 { grid-column: span 6; }
.pd-span-7 { grid-column: span 7; } .pd-span-8 { grid-column: span 8; } .pd-span-9 { grid-column: span 9; }
.pd-span-10 { grid-column: span 10; } .pd-span-11 { grid-column: span 11; } .pd-span-12 { grid-column: span 12; }
.pd-region { position: relative; min-width: 0; background: var(--block); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.pd-region:hover { border-color: color-mix(in srgb, var(--hot) 55%, var(--border)); box-shadow: var(--shadow-sm); }
.pd-region.is-selected { border-color: var(--hot); box-shadow: 0 0 0 1px var(--hot), 0 0 0 4px var(--ring); }
.pd-region-head {
  display: flex; align-items: center; gap: 4px; min-height: 2.3em; padding: 0.2em 0.45em 0.2em 0.2em;
  background: var(--block-head); border-bottom: 1px solid var(--border); border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}
.js .pd-region-head { cursor: grab; }
.pd-region.is-selected > .pd-region-head { background: var(--sel-bg); color: var(--sel-text); }
.pd-region.is-selected > .pd-region-head :is(.pd-region-meta, .pd-grip) { color: var(--sel-text); }
.pd-grip { display: none; color: var(--muted); }
.js .pd-grip { display: inline-flex; }
.pd-grip .icon { width: 1.1em; height: 1.1em; }
.pd-region-link { display: flex; align-items: center; gap: 0.4em; flex: 1 1 auto; min-width: 0; color: inherit; text-decoration: none; font-weight: 650; }
.pd-region-link .icon { width: 1.25em; height: 1.25em; flex: none; }
.pd-region-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-region-meta { flex: none; color: var(--muted); font-size: 0.82em; font-variant-numeric: tabular-nums; }
.pd-region-body { display: flex; flex-direction: column; gap: 0.45em; padding: 0.45em; }
.pd-region-type { color: var(--muted); font-size: 0.76em; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; }
.pd-region-src { display: block; padding: 0; background: none; color: var(--muted); font-size: 0.8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-slot { display: flex; flex-direction: column; gap: 0.3em; min-height: 2em; padding: 0.3em; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); }
.pd-slot-button { flex-direction: row; flex-wrap: wrap; }
.pd-slot-hint { align-self: center; padding: 0.15em 0.3em; color: var(--muted); font-size: 0.74em; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }
.pd-chip {
  display: flex; align-items: center; gap: 0.4em; min-width: 0; padding: 0.25em 0.45em;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; font-size: 0.92em;
  transition: border-color var(--dur) var(--ease);
}
.js .pd-chip { cursor: grab; }
.pd-chip:hover { border-color: var(--hot); }
.pd-chip .icon { width: 1.15em; height: 1.15em; color: var(--muted); }
.pd-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-chip small { margin-left: auto; padding-left: 0.4em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-family: var(--mono); font-size: 0.78em; }
.pd-chip-button { max-width: 100%; font-size: 0.78em; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.pd-chip-button.is-hot { background: var(--hot); border-color: var(--hot); color: var(--hot-text); }
.pd-chip.is-selected { outline: 2px solid var(--hot); outline-offset: 0; }
.pd-resize { display: none; position: absolute; top: 0; right: -5px; width: 9px; height: 100%; cursor: ew-resize; z-index: 1; }
.js .pd-resize { display: block; }
.pd-resize::after { content: ""; position: absolute; top: 25%; bottom: 25%; left: 3px; width: 3px; border-radius: 2px; background: var(--hot); opacity: 0; transition: opacity 0.12s; }
.pd-region:hover > .pd-resize::after, .pd-region.is-resizing > .pd-resize::after { opacity: 0.8; }
.pd-grid-end { grid-column: 1 / -1; padding: 0.55em; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 55%, transparent); transition: border-color var(--dur) var(--ease); }
.pd-grid-end:hover { border-color: var(--accent); }
.pd-grid-end a { display: inline-flex; align-items: center; gap: 0.35em; color: var(--muted); text-decoration: none; font-size: 0.9em; }
.pd-grid-end a:hover { color: var(--accent); }
.pd-pagelevel { display: grid; gap: 0.4em; margin-top: 12px; padding: 0.5em; border: 1px dashed var(--border); border-radius: 4px; }
.pd-pagelevel-title { color: var(--muted); font-size: 0.76em; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; }
/* dragging */
.is-dragging { opacity: 0.4; }
.pd-drop-on { background: color-mix(in srgb, var(--hot) 10%, transparent); border-color: var(--hot) !important; }
.pd-drop-before { position: relative; }
.pd-region.pd-drop-before::before { content: ""; position: absolute; left: -6px; top: -2px; bottom: -2px; width: 3px; border-radius: 2px; background: var(--hot); }
.pd-slot-item > .pd-chip.pd-drop-before { box-shadow: 0 -3px 0 var(--hot); }
.pd-slot-button > .pd-chip.pd-drop-before { box-shadow: -3px 0 0 var(--hot); }
.pd-drop-end > .pd-grid-end, .pd-slot.pd-drop-end { box-shadow: inset 0 -3px 0 var(--hot); }
.pd-busy { opacity: 0.6; pointer-events: none; }
.pd-toast { position: fixed; right: 12px; bottom: 12px; z-index: 50; max-width: min(420px, calc(100vw - 24px)); padding: 0.5rem 0.8rem; border-radius: 4px; background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); }

/* ------------------------------------------------------------ gallery */
.pd-gallery { background: var(--surface); border-top: 1px solid var(--border); }
.pd-gallery .tablist { position: sticky; top: 0; z-index: 1; }
.pd-gallery-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 8px; margin: 0; padding: 8px; list-style: none; }
.pd-gal { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 8px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; transition: background-color var(--dur) var(--ease); }
.js .pd-gal { cursor: grab; }
.pd-gal:hover { background: var(--surface-3); }
.pd-gal:hover .icon { color: var(--accent); }
.pd-gal .icon { width: 22px; height: 22px; color: var(--muted); stroke-width: 1.5; }
.pd-gal span { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }

/* ------------------------------------------------------------ help and search tabs */
.pd-help, .pd-search { padding: 12px 16px; max-width: 60rem; }
.pd-help h3 { margin: 0.5rem 0 0.4rem; }
.pd-help p, .pd-help li { margin: 0 0 0.5rem; }
.pd-help ul { padding-left: 1.2rem; }
kbd { display: inline-block; padding: 0 0.35em; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 3px; background: var(--surface-2); font: 11.5px var(--mono); }
.pd-search .label { display: block; margin-bottom: 0.3rem; }
.pd-search .u-row { gap: 0.4rem !important; }

/* ------------------------------------------------------------ property editor */
.pe-head { position: sticky; top: 0; z-index: 3; display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; background: var(--surface); border-bottom: 1px solid var(--border); }
.pe-title { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 650; }
.pe-title span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-title .icon { color: var(--muted); }
.pe-filter-row { display: flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--field-border, var(--border)); border-radius: var(--radius-sm); background: var(--surface-2); }
.pe-filter-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.pe-filter-row .icon { color: var(--muted); }
.ide .pe-filter-row input.pe-filter { border: 0; background: transparent; padding: 5px 0; outline: none; box-shadow: none; }
.pe-arrange { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.pe-arrange-label { margin-right: 4px; color: var(--muted); font-size: 11.5px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; }
.pe-arrange-form { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.pe-arrange .tb-btn { height: 28px; min-width: 28px; }
.pe-arrange .tb-btn:not(:disabled) { border-color: var(--border); background: var(--surface); }
.ide .pe-arrange select { width: auto; max-width: 11rem; height: 28px; padding: 0 0.35rem; }
.pe-span { min-width: 3.2em; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.pe { padding-bottom: 28px; }
.pe .tablist { position: sticky; top: var(--pe-head-h, 0px); z-index: 2; }
.pe > p, .pe .used-in, .pe .danger-zone, .pe .tab-panel > p, .pe .tab-panel > h3, .pe .tab-panel > .alert, .pe .tab-panel > .table-wrap { margin-left: 10px; margin-right: 10px; }
.pe .used-in { margin-top: 1rem; }
.pe .danger-zone { margin-top: 0.75rem; }
.pe form > .buttons { margin: 0; padding: 8px 10px; }
.pe .tab-panel > h3 { margin-top: 0.75rem !important; margin-bottom: 0.2rem; }
.pe fieldset.prop-group { margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--border); min-width: 0; }
.pe fieldset.prop-group:first-of-type { padding-top: 0; }
.pe fieldset.prop-group > legend {
  float: left; width: 100%; display: flex; align-items: center; gap: 6px; margin: 0; padding: 7px 10px;
  color: var(--text); font-size: 12.5px; font-weight: 700; letter-spacing: 0; text-transform: none;
}
.pe fieldset.prop-group > legend + * { clear: both; }
.pe-toggle { display: inline-flex; align-items: center; gap: 6px; width: 100%; margin: -7px -10px; padding: 7px 10px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; box-sizing: content-box; }
.pe-toggle::before { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-25%) rotate(45deg); transition: transform 0.12s; margin: 0 3px 0 1px; }
.pe-toggle[aria-expanded="false"]::before { transform: rotate(-45deg); }
.pe-toggle:hover { background: var(--surface-2); }
.pe fieldset.is-collapsed > :not(legend) { display: none; }
.pe .form-grid { display: block; padding: 0 10px 8px; }
.pe fieldset.prop-group > p { margin: 0 10px 6px; }
.pe .field { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); align-items: center; column-gap: 8px; row-gap: 2px; padding: 3px 0; }
.pe .field > * { grid-column: 2; }
.pe .field > .label { grid-column: 1; grid-row: 1; margin: 0; color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.pe .field > .label[aria-hidden] { min-height: 1px; }
.pe .field > :is(input, select, textarea) { width: 100%; min-width: 0; }
.pe .field > .help {
  font-size: 11.5px; line-height: 1.35; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1;
}
.pe .field:hover > .help, .pe .field:focus-within > .help { display: block; }
.pe .field[data-wide], .pe .field:has(> textarea) { grid-template-columns: minmax(0, 1fr); }
.pe .field[data-wide] > *, .pe .field:has(> textarea) > * { grid-column: 1; grid-row: auto; }
.pe .field.pe-hit > .label { color: var(--accent); }
.pe textarea.code { min-height: 5.5em; resize: vertical; font-size: 12px; line-height: 1.45; background: var(--code-bg); }
.pe .table-wrap { margin: 0 10px 8px; }
.pe .report-reflow td { white-space: normal; }
.pe .used-in h3 { font-size: 12.5px; }
.pe-empty-filter { margin: 10px; color: var(--muted); }

/* ------------------------------------------------------------ sign-in */
.ide-login { background: linear-gradient(180deg, var(--chrome) 0 40%, var(--bg) 40%); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
.signin-body.ide-login { display: block; background: var(--bg); }
.signin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; max-width: none; min-height: 100vh; min-height: 100dvh; margin: 0; padding: 0; }
.signin-hero {
  display: flex; flex-direction: column; justify-content: flex-start; gap: 0.75rem; padding: 3rem;
  color: var(--chrome-text); background-color: var(--chrome);
  /* the kiln's glow rising from the bottom, over a faint grid */
  background-image: radial-gradient(70% 55% at 30% 105%, rgb(234 88 12 / 38%), rgb(194 65 12 / 10%) 55%, transparent 80%),
                    linear-gradient(rgb(255 255 255 / 0.03) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 0.03) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
}
.signin-logo {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; margin-bottom: 2rem; color: #fff;
  background: linear-gradient(150deg, var(--ember-1), var(--ember-2) 55%, var(--ember-3));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 30%), 0 8px 26px -4px rgb(234 88 12 / 60%);
}
.signin-logo .icon { width: 28px; height: 28px; }
.signin-title { margin: 0; font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 750; letter-spacing: -0.03em; color: var(--chrome-text); }
.signin-tagline { margin: 0; font-size: 1.2rem; color: var(--chrome-muted); max-width: 30ch; }
.signin-foot { margin: auto 0 0; font-size: 0.85rem; color: var(--chrome-muted); }
.signin-panel { display: grid; place-items: center; padding: 2rem 1rem; background: var(--surface); }
.signin-form { display: flex; flex-direction: column; gap: 0.85rem; width: 100%; max-width: 420px; }
.signin-form h2 { margin: 0; font-size: 1.5rem; letter-spacing: -0.02em; }
.signin-form .field { margin: 0; }
.signin-input { display: flex; align-items: center; gap: 0.6rem; padding: 0 0.75rem; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-xs); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.signin-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.signin-input > .icon { flex: none; width: 18px; height: 18px; color: var(--muted); }
.ide-login .signin-input input { flex: 1; width: auto; min-width: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 0.7rem 0; font-size: 1rem; color: var(--text); outline: none; }
.signin-reveal { flex: none; border: 0; background: none; color: var(--accent); cursor: pointer; font-size: 0.85rem; padding: 0.25rem; }
.signin-remember { font-size: 0.9rem; }
.signin-submit { padding: 0.75rem; font-size: 1rem; border-radius: var(--radius); }
[data-passkey-status]:empty { display: none; }
/* (sprint 129) linked identities, builder sign-in */
.plain-list { list-style: none; padding: 0; margin: .25rem 0 .75rem; }
.plain-list li { padding: .2rem 0; }
.signin-idp { display: flex; align-items: center; justify-content: center; gap: .5rem; text-decoration: none; }
.signin-hint { margin: 0; text-align: center; }
.signin-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.signin-actions a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--gold); text-decoration: none; }
.signin-actions a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .signin { grid-template-columns: 1fr; }
  .signin-hero { padding: 1.25rem 1rem; gap: 0.25rem; }
  .signin-logo { margin-bottom: 0.5rem; width: 36px; height: 36px; font-size: 15px; }
  .signin-tagline { font-size: 1rem; }
  .signin-foot { display: none; }
  .signin-panel { place-items: start center; }
}

/* ------------------------------------------------------------ small screens */
/* ------------------------------------------------------------ status bar (every builder page, like APEX's footer) */
.ide-main { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.ide-main > .ide-page { flex: 1 0 auto; width: 100%; }
.ide-status {
  position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 18px; flex: none;
  min-height: 28px; padding: 0 14px; background: var(--chrome); color: var(--chrome-muted); border-top: 1px solid var(--chrome-border);
  font-size: 11.5px; white-space: nowrap; overflow: hidden;
}
.ide-status > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ide-status .icon { width: 14px; height: 14px; flex: none; }
.ide-status-version { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.ide-status-version::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ember-1); box-shadow: 0 0 6px var(--ember-2); }

/* ------------------------------------------------------------ App Builder home (tiles, applications, side column) */
.ab-home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.ab-main { min-width: 0; }
.ab-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.ab-tiles-wrap { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ab-tile {
  position: relative; display: grid; grid-template-columns: auto; align-content: start; gap: 4px; min-height: 132px; padding: 16px 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); text-decoration: none;
  box-shadow: var(--shadow-sm); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.ab-tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ab-tile-icon {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.ab-tile:hover .ab-tile-icon { background: var(--hot); color: var(--hot-text); }
.ab-tile-icon .icon { width: 20px; height: 20px; }
.ab-tile strong { font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; }
.ab-tile > span:last-child { color: var(--muted); font-size: 13px; }

.ab-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.ab-search { position: relative; flex: 0 1 260px; min-width: 160px; }
.ab-search .icon { position: absolute; left: 9px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.ab-search input[type=search] { width: 100%; height: 34px; padding-left: 32px !important; background: var(--surface); }
.ab-views { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.ab-views .tb-btn { height: 28px; width: 36px; min-width: 0; border-radius: 4px; color: var(--muted); }
.ab-views .tb-btn[aria-current] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border-strong); }
.ab-menu > summary { display: inline-flex; align-items: center; gap: 4px; height: 34px; list-style: none; }
.ab-menu > summary::-webkit-details-marker { display: none; }
.ab-menu > summary .icon { width: 14px; height: 14px; rotate: 90deg; }
.ab-menu .menu-section a[aria-current] { font-weight: 700; }
.ab-count { margin-left: auto; font-size: 12.5px; }
.ab-create { height: 34px; display: inline-flex; align-items: center; }

.ide .ab-table { background: var(--surface); position: relative; } /* keeps the .sr-only labels inside its scroll area */
.ide table.ab-apps th { padding: 10px 12px; }
.ide table.ab-apps th a { color: inherit; }
.ide table.ab-apps td { padding: 9px 12px; height: 56px; }
.ide table.ab-apps tbody tr:hover { background: var(--surface-2); }
.ab-sorted { margin-left: 4px; }
.ide table.ab-apps th.num { text-align: right; }
.ab-name a { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-weight: 650; text-decoration: none; }
.ab-name a:hover { color: var(--accent); }
.ab-name a:hover span { text-decoration: underline; }
.ab-name .app-icon, .ab-card .app-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: #fff; font-weight: 750; flex: none; box-shadow: inset 0 1px 0 rgb(255 255 255 / 22%), var(--shadow-xs); }
.ab-actions-col { text-align: right; }
.ab-actions { text-align: right; white-space: nowrap; }
.ab-actions .tb-btn, .ab-card-actions .tb-btn { color: var(--text); }
.ab-actions .tb-btn:hover, .ab-card-actions .tb-btn:hover { background: var(--surface-3); }
.ab-empty { padding: 40px 28px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }

.ab-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.ab-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.ab-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.ab-card-main { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; min-width: 0; }
.ab-card-main:hover strong { color: var(--accent); }
.ab-card-main > span:last-child { display: grid; min-width: 0; }
.ab-card-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-card-main small { color: var(--muted); }
.ab-card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12.5px; }
.ab-card-actions { display: flex; justify-content: flex-end; gap: 2px; margin-top: auto; }

.ab-side { padding: 4px 2px 0; }
.ab-side section { padding: 12px 0; border-top: 1px solid var(--border); }
.ab-side h2 { margin: 0 0 8px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ab-side p { margin: 0 0 6px; color: var(--muted); }
.ab-side a { color: var(--accent); text-decoration: none; }
.ab-side a:hover { text-decoration: underline; }
.ab-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ab-tasks a { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -8px; padding: 5px 8px; border-radius: var(--radius-sm); color: var(--text); transition: background-color var(--dur) var(--ease); }
.ab-side .ab-tasks a:hover { background: var(--surface-3); text-decoration: none; }
.ab-tasks a:hover .icon { color: var(--accent); }
.ab-tasks .icon { width: 14px; height: 14px; color: var(--muted); }
.ab-narrow { max-width: 900px; }
.ab-narrow > h1 { margin-top: 4px; }
.ab-narrow .buttons { justify-content: flex-end; }

@media (min-width: 1280px) {
  /* the side column runs along the right edge, as in APEX */
  .ide .ide-page:has(> .ab-home) { max-width: none; }
  .ab-home { grid-template-columns: minmax(0, 1fr) 288px; margin: calc(-1 * var(--page-py)) calc(-1 * var(--page-px)) -48px 0; min-height: calc(100vh - var(--bar-h) - 28px); }
  .ab-main { padding: var(--page-py) var(--page-px) 48px 0; }
  .ab-side { padding: 18px 20px 24px; background: var(--surface); border-left: 1px solid var(--border); }
  .ab-side section:first-child { border-top: 0; padding-top: 0; }
}
@media (max-width: 1023px) {
  .ab-tiles:not(.ab-tiles-wrap) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ab-tile { min-height: 0; }
  .ab-side { margin-top: 18px; }
  /* tablets: no alias and sign-in columns */
  .ide table.ab-apps :is(th, td):is(:nth-child(3), :nth-child(6)) { display: none; }
}
@media (max-width: 640px) {
  /* two by two, title only */
  .ab-tiles:not(.ab-tiles-wrap) { gap: 8px; margin-bottom: 12px; }
  .ab-tiles:not(.ab-tiles-wrap) .ab-tile { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; padding: 10px; }
  .ab-tiles:not(.ab-tiles-wrap) .ab-tile-icon { width: 34px; height: 34px; margin-bottom: 0; }
  .ab-tiles:not(.ab-tiles-wrap) .ab-tile strong { font-size: 13.5px; line-height: 1.25; }
  .ab-tiles:not(.ab-tiles-wrap) .ab-tile > span:last-child { display: none; }
  .ab-tiles-wrap .ab-tile { min-height: 0; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; padding: 10px 12px; }
  .ab-tiles-wrap .ab-tile-icon { grid-row: span 2; width: 34px; height: 34px; margin-bottom: 0; }
  .ab-search { flex: 1 1 100%; }
  .ab-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ab-create { margin-left: auto; }
  /* the report becomes compact: id, name and actions */
  .ide table.ab-apps :is(th, td):nth-child(n+3):not(:last-child) { display: none; }
  .ide table.ab-apps td { height: 52px; padding: 8px; }
  .ide-status { gap: 12px; }
  .ide-status > span:nth-child(3) { display: none; }
}

@media (max-width: 640px) {
  .ide { --rail-w: 44px; --bar-h: 46px; }
  .ide { --page-px: 12px; --page-py: 12px; }
  .ide .ide-page { padding-bottom: 40px; }
  .ide-head { padding-top: 12px; }
  .ide-head-actions { margin-left: 0; width: 100%; }
  .rail-list { padding: 0 5px; }
  .rail-link { height: 38px; }
  .rail-link[aria-current]::before { left: -5px; }
  .rail-link .icon { width: 19px; height: 19px; }
  .rail-logo { width: 32px; height: 32px; border-radius: 9px; }
  .rail-logo .icon { width: 19px; height: 19px; }
  .ide-bar { gap: 2px; padding: 0 4px; }
  .ide-crumbs li:not(:last-child) { display: none; }
  .ide-crumbs li:last-child::before { content: none; }
  .tb-group { padding: 0 2px; }
  .tb-undo, .pd-pagenav .pd-goto, .tb-btn .tb-caret { display: none; }
  .tb-main .btn span { display: none; }
  .tb-main .btn { padding: 0 0.5rem; }
  .pd-canvas { padding: 8px; }
  .pd-grid { gap: 6px; }
  /* regions keep their place but never get narrower than half the canvas */
  .pd-grid > .pd-region { grid-column: span 12; }
  .pe .field { grid-template-columns: minmax(0, 1fr); }
  .pe .field > * { grid-column: 1; grid-row: auto; }
  .pe .field > .label { grid-row: auto; }
  .rail-user .menu-panel { left: 0.5rem; right: 0.5rem; }
}
@media (min-width: 641px) and (max-width: 1023px) {
  /* the designer's toolbar needs the room: only the current page in the breadcrumb */
  .ide-full .ide-crumbs li:not(:last-child) { display: none; }
  .ide-full .ide-crumbs li:last-child::before { content: none; }
  .pd-grid > :is(.pd-span-1, .pd-span-2, .pd-span-3) { grid-column: span 4; }
  .tb-undo { display: none; }
}
@media (pointer: coarse) {
  .tb-btn { min-width: 40px; height: 40px; }
  .pd-node { min-height: 40px; }
  .pd-gal { min-height: 44px; }
  .rail-link { height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .ide *, .ide *::before, .ide *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  body.ide { padding-left: 0; }
  .ide-rail, .ide-bar, .ide-status { display: none !important; }
}

/* ---------------------------------------------------------------- SQL Workshop: scripts, Quick SQL, query builder */
.tag-ok { background: var(--success-soft); color: var(--success); }
.alert-note { background: var(--surface-2); color: var(--text); }
.script-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.script-result { border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; min-width: 0; }
.script-result-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.script-sql summary { cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.script-sql summary code { font-size: 0.82rem; }
.script-sql pre.source { max-height: 20rem; overflow: auto; }
.script-result .alert { margin: 6px 0 0; }
.script-result .table-wrap { margin-top: 6px; }
.qs-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.qs-columns textarea { width: 100%; }
pre.ddl { max-height: 36rem; overflow: auto; }
.qb-joins { list-style: none; margin: 0; padding: 0; }
.qb-joins select { max-width: 100%; }
.qb-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 4px 12px; }
.qb-cond { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 2fr); gap: 6px; margin-bottom: 6px; }
/* (0.31) the canvas: without script the tables wrap; builder.js places them (.qb-free) and draws the joins */
.qb-canvas { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.qb-canvas.qb-free { display: block; position: relative; overflow: auto; min-height: 16rem; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--bg); }
.qb-free .qb-table { position: absolute; }
.qb-table { position: relative; width: 16rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.qb-table.qb-dragging { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); z-index: 2; }
.qb-table-head { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.qb-move { min-width: 24px; min-height: 24px; padding: 0; border: 0; background: none; color: var(--muted); cursor: grab; touch-action: none; }
.qb-cols { list-style: none; margin: 0; padding: 4px 0; max-height: 18rem; overflow: auto; }
.qb-col { display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; align-items: center; gap: 4px; padding: 1px 8px; }
.qb-col .check { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-col .qb-type { display: none; }
.qb-col select { max-width: 6.5rem; font-size: 0.8rem; padding: 1px 2px; }
.qb-col.qb-target { background: var(--accent); color: var(--accent-text); }
.qb-link { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: crosshair; touch-action: none; }
.qb-link::before { content: ''; display: block; width: 10px; height: 10px; margin: auto; border-radius: 50%; border: 2px solid var(--accent); }
.qb-lines { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.qb-lines path { fill: none; stroke: var(--accent); stroke-width: 2; }
.qb-lines path.qb-custom { stroke-dasharray: 6 4; }
.qb-lines path.qb-drawing { stroke: var(--hot); }
.qb-inline { display: inline-flex; }
.qb-eq { align-self: center; text-align: center; }
@media (max-width: 1023px) {
  .qs-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .qb-cond { grid-template-columns: minmax(0, 1fr); }
}
/* ---------- locks, developer comments, supporting objects ---------- */
.lock-state { display: flex; align-items: center; gap: 0.4rem; }
.lock-tag { display: inline-flex; align-items: center; gap: 0.3rem; }
.dev-comments { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.dev-comments li { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem 0.75rem; }
.dev-comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.dev-comment-body { margin: 0.3rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pd-lock { display: flex; align-items: center; gap: 0.4rem; margin: 0.5rem; }
.support-results { padding-left: 1.4rem; display: flex; flex-direction: column; gap: 0.75rem; }
.support-results li.failed > div { color: var(--danger); }
.support-results pre.source { max-height: 200px; margin-top: 0.3rem; white-space: pre-wrap; overflow-wrap: anywhere; }
details.support-script { margin: 0.3rem 0; }
details.support-script pre.source { margin-top: 0.4rem; white-space: pre-wrap; overflow-wrap: anywhere; }
/* SQL Workshop → Unload Data */
.unload-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.unload-pick select { flex: 1 1 14rem; min-width: 0; max-width: 32rem; }
.unload-formats { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }

/* Create → From a file: the proposed columns (src/builder/appfromfile.ts) */
.ff-cols select { min-width: 7.5rem; }
.ff-cols input { min-width: 10rem; }
.ff-cols .ff-sample { max-width: 20rem; overflow-wrap: anywhere; }
/* debug messages (src/builder/diagnostics.ts) */
.debug-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 0.82rem; }
.debug-log .debug-slowest td { background: var(--warning-soft); }

/* Theme Roller (src/builder/themeroller.ts) and template options in the property editor */
.ide input[type=color].swatch { width: 2rem; min-height: 1.4rem; padding: 0; vertical-align: middle; }
.ide .options-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.ide .options-field code { font-size: 0.75em; }

/* (sprint 34) working copies: differences and conflicts */
pre.diff { max-height: 32rem; overflow: auto; background: var(--code-bg); padding: 0.6rem; font-size: 0.82rem; white-space: pre; }
pre.diff .diff-add { color: var(--success, #1a7f37); }
pre.diff .diff-del { color: var(--danger, #cf222e); }
/* (sprint 56) SQL Workshop → Schema Comparison */
.compare-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.compare-list summary { cursor: pointer; overflow-wrap: anywhere; }
tr.row-conflict > td:first-child { border-left: 3px solid var(--warn); }
.badge.badge-warn { background: var(--warning-soft); color: var(--text); }
.publish-buttons .btn { white-space: normal; overflow-wrap: anywhere; max-width: 100%; text-align: left; }
/* (sprint 35) create application from existing tables: the list of tables and views */
.aw-tables { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.aw-tables li { overflow-wrap: anywhere; }
.aw-tables small { display: block; margin-left: 1.6rem; }
.ff-fks { list-style: none; padding: 0; display: grid; gap: .35rem; overflow-wrap: anywhere; }

/* (sprint 35) SQL Workshop → Sample Data (src/builder/sampledata.ts): one row per column that wraps on phones */
.sd-cols { display: flex; flex-direction: column; gap: 0.5rem; }
.prop-group.sd-table { margin-top: 1.5rem; }
.sd-col { display: grid; grid-template-columns: minmax(10rem, 1.2fr) minmax(10rem, 1fr) minmax(10rem, 1.4fr) 8.5rem; gap: 0.4rem 0.75rem; align-items: start; padding: 0.4rem 0; border-top: 1px solid var(--border); }
.sd-col-name { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.sd-col select, .sd-col input { width: 100%; min-width: 0; }
.sd-col-nulls { display: flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.sd-col .sd-col-nulls input { width: 5rem; flex: none; }
.sd-rows input { max-width: 10rem; }
.sd-saved { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; overflow-wrap: anywhere; }
.sd-help-list { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0.5rem 0 0; overflow-wrap: anywhere; }
.sd-help-list dd { margin: 0; }
@media (max-width: 760px) {
  .sd-col { grid-template-columns: 1fr 1fr; }
  .sd-col-name { grid-column: 1 / -1; }
  .sd-help-list { grid-template-columns: 1fr; }
  .sd-help-list dd { margin-bottom: 0.4rem; }
}
@media (max-width: 420px) {
  .sd-col { grid-template-columns: 1fr; }
}

/* (sprint 36) AI services: long service and application names wrap */
.ai-name { overflow-wrap: anywhere; min-width: 0; }

/* App Builder AI (src/builder/ai-builder.ts) */
.ai-tables { columns: 14rem; padding-left: 1.1rem; overflow-wrap: anywhere; }
.ai-tables a[aria-current] { font-weight: 600; }
.ai-answer { overflow-wrap: anywhere; }
.ai-answer pre, .ai-answer code { white-space: pre-wrap; }
button.is-busy { opacity: 0.7; cursor: progress; }

/* Blueprints (src/builder/blueprints.ts) */
.bp-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0; }
.bp-facts dd { margin: 0; overflow-wrap: anywhere; }
.bp-sql { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.85rem; max-height: 30rem; overflow-y: auto; }

/* Theme Roller live preview (themeroller.ts, builder.js): the application's light look, whatever the builder theme */
.tr-preview { --bg: #f3f4f6; --surface: #ffffff; --surface-2: #f6f7f9; --surface-3: #eceef2; --text: #1b2330; --muted: #5e6a7a; --border: #dfe3e8;
  --accent: #0b63c5; --accent-text: #ffffff; --accent-soft: #e7f0fb; --header: #13294b; --header-text: #eef2f8; --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --font-size: 15px; --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 1px 3px rgb(16 24 40 / 6%);
  --field-border: var(--border); color-scheme: light; margin-bottom: 1rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--bg); color: var(--text); font: var(--font-size)/1.5 var(--font); }
.tr-preview-iris { --bg: #ffffff; --surface-2: #f7f6f5; --surface-3: #efedeb; --text: #1f1c1a; --muted: #645e59; --border: #e2dfdc;
  --accent: #2b62c4; --accent-soft: #e9f0fb; --header: #3a3632; --header-text: #f7f5f3; --radius: 4px; --shadow: none;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
.tr-preview-iris .tr-preview-header { box-shadow: inset 0 3px 0 var(--accent); }
.tr-preview-iris .btn-hot { background: #2f2b28; border-color: #2f2b28; color: #fff; }
.tr-preview-lavender { --bg: #f6f6fb; --surface-2: #f8f8fc; --surface-3: #eeeef6; --text: #1d1b2e; --muted: #5f5d75; --border: #e3e2ef;
  --accent: #5146d8; --accent-soft: #eeedfd; --header: #1e1a4d; --header-text: #f1f0ff; --radius: 12px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; --shadow: 0 1px 2px rgb(30 27 75 / 5%), 0 2px 8px rgb(30 27 75 / 6%); }
.tr-preview-header { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 1rem; background: var(--header); color: var(--header-text); font-weight: 700; }
.tr-preview-header .icon { width: 1.1em; height: 1.1em; }
.tr-preview-body { padding: 1rem; }
.tr-preview .region { margin: 0; }
.tr-preview a { color: var(--accent); }
.tr-preview input { background: var(--surface); color: var(--text); border-color: var(--border); }
.tr-preview .btn { background: var(--surface); color: var(--text); border-color: var(--border); border-radius: calc(var(--radius) * 0.75); font: inherit; }
.tr-preview .btn-hot { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.tr-preview-lavender .btn-hot { border-radius: 999px; }
/* (sprint 117) the preview's menu: current page, its parent, and the Pillar Light / Dark appearances */
.tr-preview { --nav-bg: var(--surface); --nav-text: var(--text); --nav-active: var(--accent-soft); --nav-current: var(--accent); }
.tr-preview-iris { --nav-bg: #2f2b28; --nav-text: #ece8e4; --nav-active: #4a443f; --nav-current: #ffffff; }
.tr-preview-main { display: grid; grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr); }
.tr-preview-nav, .tr-preview-nav ul { list-style: none; margin: 0; padding: 0; }
.tr-preview-nav { padding: 0.5rem; background: var(--nav-bg); color: var(--nav-text); border-inline-end: 1px solid var(--border); font-size: 0.85rem; }
.tr-preview-nav ul { margin-inline-start: 0.9rem; padding-inline-start: 0.3rem; border-inline-start: 1px solid color-mix(in srgb, var(--nav-current) 55%, transparent); }
.tr-preview-nav span { display: flex; align-items: center; gap: 0.4rem; }
.tr-preview-nav li > span { padding: 0.3rem 0.5rem; border-radius: 6px; border-inline-start: 3px solid transparent; }
.tr-preview-nav .icon { width: 1em; height: 1em; }
.tr-preview-nav .tr-nav-parent { font-weight: 600; }
.tr-preview-nav .tr-nav-parent .icon { color: var(--nav-current); }
.tr-preview-nav .tr-nav-current { background: var(--nav-active); color: var(--nav-current); font-weight: 600; border-inline-start-color: var(--accent); }
.tr-preview[data-appearance^="pillar"] .tr-preview-header { box-shadow: inset 0 4px 0 var(--strip, var(--accent)); }
.tr-preview[data-appearance^="pillar"] .tr-preview-nav li > span { border-radius: 999px; }
.tr-preview[data-appearance^="pillar"] .tr-nav-current { background: var(--accent); color: var(--accent-text); border-inline-start-color: transparent; }
.tr-preview[data-appearance="pillar_light"] { --header: var(--surface-2); --header-text: var(--text); --nav-bg: var(--surface-2); --nav-text: var(--text); --nav-current: var(--accent); }
.tr-preview[data-appearance="pillar_light"] .tr-preview-header { border-bottom: 1px solid var(--border); }
.tr-preview[data-appearance="pillar_dark"] { --nav-bg: var(--header); --nav-text: var(--header-text); --nav-current: var(--header-text); }
.tr-preview[data-appearance="pillar_dark"] .tr-preview-nav { border-inline-end-color: transparent; }
@media (max-width: 640px) {
  .tr-preview-main { grid-template-columns: minmax(0, 1fr); }
  .tr-preview-nav { border-inline-end: 0; border-bottom: 1px solid var(--border); }
}

/* icon picker (forms.ts iconPicker) */
.icon-picker > summary { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 34px; padding: 0.3rem 0.6rem; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; list-style: none; background: var(--surface); }
.icon-picker > summary::-webkit-details-marker { display: none; }
.icon-picker > summary::after { content: "▾"; color: var(--muted); margin-left: 0.25rem; }
.icon-picker[open] > summary { border-color: var(--accent); }
.icon-picker-panel { margin-top: 0.4rem; padding: 0.5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); }
.icon-picker-panel input[type="search"] { width: 100%; margin-bottom: 0.5rem; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr)); gap: 4px; max-height: 18rem; overflow: auto; margin: 0; padding: 0; border: 0; }
.icon-choice { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0.35rem 0.2rem; border: 1px solid transparent; border-radius: 6px; cursor: pointer; text-align: center; }
.icon-choice:hover { background: var(--surface-3); }
.icon-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.icon-more { margin-top: 0.5rem; }
.icon-more-legend { grid-column: 1 / -1; padding: 0; font-weight: 600; font-size: 0.85rem; }
.icon-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft, var(--surface-3)); }
.icon-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.icon-choice .icon { width: 20px; height: 20px; }
.icon-none { font-size: 18px; line-height: 20px; color: var(--muted); }
.icon-name { font-size: 10.5px; color: var(--muted); overflow-wrap: anywhere; line-height: 1.2; }

/* Mail services: one provider's settings in groups, at a readable width */
.mail-form-page { max-width: 960px; }
.mail-service-form .prop-group { margin: 0 0 16px; }
details.prop-group-more { border: 1px solid var(--border); border-radius: 4px; padding: 8px 12px; margin: 0 0 16px; }
details.prop-group-more > summary { cursor: pointer; font-weight: 600; }
details.prop-group-more[open] > summary { margin-bottom: 8px; }
.provider-switch { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 16px; }
.provider-switch .field { margin: 0; min-width: min(100%, 280px); }
.mail-check-buttons { margin: 4px 0 14px; }
.mail-check-result:not(:empty) { margin-top: 8px; }
/* (sprint 59) Page Designer: the help pane under the properties */
.pe-help { border-top: 1px solid var(--border); margin-top: 0.75rem; padding: 0.5rem 0.75rem; }
.pe-help summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 0.35rem; }
.pe-help-body { padding-top: 0.4rem; overflow-wrap: anywhere; }
.pe-help-body h3 { font-size: 0.95rem; margin: 0 0 0.3rem; }
.pe-help-body p { margin: 0 0 0.4rem; }

/* ------------------------------------------------------------ environment banner, workspace message (091), Administration menu */
.ide-banner { padding: 3px 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; }
.ide-banner-red { background: #b42318; color: #fff; }
.ide-banner-orange { background: #c4520f; color: #fff; }
.ide-banner-yellow { background: #e6b400; color: #1e1d1b; }
.ide-banner-green { background: #2f7d32; color: #fff; }
.ide-banner-teal { background: #0e7a74; color: #fff; }
.ide-banner-blue { background: #1a5f99; color: #fff; }
.ide-banner-purple { background: #6941c6; color: #fff; }
.ide-banner-gray { background: #5e5a54; color: #fff; }
.ab-message { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 12px; }
.ab-message p { margin: 0.15rem 0 0; white-space: pre-line; }
.rail-admin { padding: 0; }
.rail-admin > summary { list-style: none; cursor: pointer; width: 100%; }
.rail-admin > summary::-webkit-details-marker { display: none; }
.rail-admin .menu-panel { bottom: 56px; }
.rail-admin .menu-links strong { padding: 2px 0 4px; }
.ide .alert-info { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }

/* ------------------------------------------------------------ SQL Workshop home (sprint 61) */
.sw-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sw-recents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.sw-recent { min-width: 0; border-left: 1px solid var(--border); }
.sw-recent:first-child { border-left: 0; }
.sw-recent h2 { margin: 0; padding: 10px 12px; font-size: 13.5px; border-bottom: 1px solid var(--border); }
.sw-recent ul { list-style: none; margin: 0; padding: 0; max-height: 440px; overflow-y: auto; }
.sw-recent li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-bottom: 1px solid var(--border); }
.sw-recent li a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); text-decoration: none; }
.sw-recent li a:hover { text-decoration: underline; }
.sw-recent li .muted { flex: none; font-size: 12px; }
.sw-recent > p { padding: 0 12px; }
.sw-schema { display: flex; gap: 6px; }
.sw-schema select { flex: 1; min-width: 0; }
@media (max-width: 1100px) { .sw-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); } .sw-recents { grid-template-columns: 1fr; } .sw-recent { border-left: 0; border-top: 1px solid var(--border); } .sw-recent:first-child { border-top: 0; } }

/* ------------------------------------------------------------ App Gallery (sprint 61) */
.gal-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.gal-search { flex: 1 1 320px; }
.gal-tabs { display: inline-flex; }
.gal-tabs a { padding: 6px 12px; text-decoration: none; color: var(--text); border: 1px solid var(--border); background: var(--surface); }
.gal-tabs a + a { border-left: 0; }
.gal-tabs a:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.gal-tabs a:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.gal-tabs a[aria-current] { background: var(--surface-3); font-weight: 650; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.gal-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.gal-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.gal-head { display: flex; gap: 12px; align-items: center; }
.gal-head h2 { margin: 0; font-size: 15px; }
.gal-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-lg); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent); }
.gal-icon .icon { width: 26px; height: 26px; }
.gal-card > p { margin: 0; flex: 1; line-height: 1.5; }
.gal-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.gal-foot form { margin: 0; }
.ab-group select { min-width: 140px; }

/* (sprint 73) the Create Application wizard on one page */
.create-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.5rem; margin: 0.75rem 0 1rem; }
.create-source { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.7rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow-xs); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.create-source:hover, .create-source:focus-visible { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-md); }
.create-source .icon { color: var(--accent); margin-top: 0.15rem; }
.create-source span { display: grid; gap: 0.1rem; min-width: 0; overflow-wrap: anywhere; }
.create-app .region + form, .create-app form .region { margin-top: 1rem; }
/* (sprint 196) the short Create screen: the name and Create, the other ways to start under it */
.create-quick .aw-quick .buttons { margin-top: 0.75rem; }
.create-quick .aw-summary { margin: 0.75rem 0 0; }
.create-quick .create-more { font-size: 1rem; margin: 1.5rem 0 0; }
.aw-pages { list-style: none; margin: 0 0 0.5rem; padding: 0; display: grid; gap: 0.4rem; }
.aw-pages li { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(12rem, 16rem); gap: 0.15rem 0.75rem; align-items: center; padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
.aw-pages li > small, .aw-pages li > .muted:last-child { grid-column: 1 / -1; }
.aw-page-kind { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 560px) { .aw-pages li { grid-template-columns: 1fr; } }
.aw-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 1rem; }
.aw-advanced > summary { cursor: pointer; list-style: none; }
.aw-advanced > summary::-webkit-details-marker { display: none; }
.aw-advanced .region-body { padding: 1rem; }
/* the overlay while a long form (Create application) is being processed */
.progress-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgb(0 0 0 / 35%); }
.progress-box { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.progress-spinner { width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--hot); animation: progress-spin 0.8s linear infinite; }
@keyframes progress-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .progress-spinner { animation: none; } }

/* (sprint 74) the default-password warning: dismissible; a dot on the avatar */
.alert-dismissible { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.alert-dismissible form { margin: 0; }
.rail-avatar.has-dot { position: relative; }
.rail-avatar.has-dot::after { content: ""; position: absolute; top: 2px; right: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger, #c23028); box-shadow: 0 0 0 2px var(--chrome, #1c1917); }
.weak-note { color: var(--danger, #c23028) !important; }

/* (sprint 74) Shared Components: groups of component types with counts; a list per type */
.sc-head, .sc-list-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sc-list-head h1 { margin: 0; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; align-items: start; }
.sc-group .region-header h2 { display: flex; align-items: center; gap: 0.5rem; }
.sc-links { list-style: none; margin: 0; padding: 0.4rem 0; }
.sc-links li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.32rem 1rem; }
.sc-links li:hover { background: var(--surface-2); }
.sc-group .region-header h2 .icon { color: var(--accent); }
.sc-links a { overflow-wrap: anywhere; min-width: 0; }
.sc-count { font-size: 0.78rem; font-weight: 600; color: var(--muted); background: var(--surface-3); border-radius: 99px; padding: 0.05rem 0.5rem; }

/* (sprint 74) application Settings in tabs */
.settings-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid var(--border); margin: 0 0 1rem; }
.settings-tabs a { padding: 0.5rem 0.85rem; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 550; transition: color var(--dur) var(--ease); }
.settings-tabs a:hover { color: var(--text); }
.settings-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--hot); }
.settings-body { display: grid; gap: 1rem; min-width: 0; }
.settings-form { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); } /* (sprint 186) its column shrinks on a phone: a long option or a role name never widens the page */
/* (sprint 198, NX-U3) the right rail: below 1280 px one column as before (the rail's section links hidden, the checklist
   under the form on Security only); from 1280 px the form gets the window's width and the rail sticks beside it */
.settings-layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); max-width: 64rem; }
.settings-rail { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.settings-rail-nav { display: none; }
.settings-layout:not([data-current-tab="security"]) .settings-rail-checklist { display: none; }
.settings-body :is(.region, h3, [id]) { scroll-margin-top: calc(var(--bar-h) + 1rem); }
@media (min-width: 1280px) {
  .settings-layout { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: 1.5rem; align-items: start; }
  .settings-rail { position: sticky; top: calc(var(--bar-h) + 1rem); max-height: calc(100vh - var(--bar-h) - 2rem - 29px); overflow-y: auto; }
  .settings-rail-nav:not([hidden]) { display: block; }
  .settings-layout:not([data-current-tab="security"]) .settings-rail-checklist:not([hidden]) { display: block; }
  .settings-rail-nav ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
  .settings-rail-nav a { display: block; padding: 0.2rem 0.75rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 13px; }
  .settings-rail-nav a:hover { color: var(--text); }
  .settings-rail-nav a[aria-current] { color: var(--text); border-left-color: var(--hot); font-weight: 600; }
  .settings-rail-title { margin: 0 0 0.35rem; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
  .settings-rail .region-body { padding: 0.75rem 1rem; }
  .settings-rail .region-header { min-height: 0; padding: 0.4rem 1rem; }
  .settings-rail .checklist { font-size: 13px; gap: 0.25rem; line-height: 1.35; padding-left: 0; list-style: none; }
  /* two columns of sections (Sign-in) and of check boxes */
  .st-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; align-items: start; }
  .st-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 0 1rem; }
  .st-checks > :is(.help, p) { grid-column: 1 / -1; }
  /* (sprint 198) Create application: the regions in two columns, the footer across both */
  .create-app:not(.create-quick) { max-width: 88rem; }
  .create-app .aw-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
  .create-app .aw-form > :not(.region) { grid-column: 1 / -1; }
  .create-app .aw-form > .region { margin-top: 0; }
}

/* (sprint 74) the application home: search, view and Create page above the pages; Tasks on the right */
.app-home { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .app-home { grid-template-columns: 1fr; } }
.app-home-main { display: grid; gap: 1rem; min-width: 0; }
.pages-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.pages-bar .search { flex: 1 1 16rem; margin: 0; }
.pages-bar .search input { flex: 1; min-width: 0; }
.view-toggle a { display: inline-flex; align-items: center; gap: 0.3rem; }
.page-icons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.6rem; }
.page-icon { display: grid; gap: 0.15rem; padding: 0.75rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; overflow-wrap: anywhere; box-shadow: var(--shadow-xs); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.page-icon:hover, .page-icon:focus-visible { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-md); }
.page-icon-no { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.app-tasks .sc-links a { display: inline-flex; align-items: center; gap: 0.45rem; }
/* (sprint 197, NX-U4) the side column: Tasks, then the application lock and comments */
.app-side { display: grid; gap: 1rem; min-width: 0; align-content: start; }
.app-side .region { margin: 0; }
.app-side .lock-panel .search { flex-wrap: wrap; } /* the note above Lock the application in the narrow column */
.app-side .lock-panel .search input { flex: 1 1 100%; min-width: 0; }
/* (sprint 203, AX-6) Recently edited pages in the side column, under Tasks */
.app-recent .sc-links li { flex-wrap: wrap; gap: 0 0.5rem; }
.app-recent .sc-links a { display: inline-flex; align-items: center; gap: 0.45rem; }
/* (sprint 203, AX-7) Shared Components → Templates: where each template is used */
.tpl-uses summary { cursor: pointer; }
.tpl-uses ul { margin: 0.35rem 0 0; padding-left: 1.1rem; }
.tpl-table td:first-child { min-width: 9rem; }
/* (sprint 193, NX-F3) the Pages report: filters with counts, the column chooser (kept per developer), the alias */
.pages-filters { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: flex-end; margin: 0 0 0.75rem; }
.pages-filters .field { margin: 0; flex: 1 1 7rem; max-width: 12rem; min-width: 0; }
.pages-filters select { width: 100%; max-width: 100%; }
.pages-filters-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-left: auto; }
.pages-columns > summary { display: inline-flex; align-items: center; gap: 0.35rem; }
.pages-columns .menu-panel { inset-inline-start: auto; inset-inline-end: 0; min-width: 15rem; max-width: calc(100vw - var(--rail-w, 56px) - 32px); padding: 0.5rem 0.75rem; }
/* on a phone it stays a dropdown beside the rail (not app.css's bottom sheet, which the rail would cover) */
.ide details.pages-columns[open] > .menu-panel { position: absolute; top: calc(100% + 6px); bottom: auto; left: auto; right: 0; min-width: min(15rem, calc(100vw - var(--rail-w, 56px) - 32px)); }
/* on a phone the button can wrap to the left edge, where a right-aligned panel leaves the screen: keep it in the flow */
@media (max-width: 640px) {
  .ide details.pages-columns[open] { flex-basis: 100%; }
  .ide details.pages-columns[open] > .menu-panel { position: static; min-width: 0; max-width: none; width: 100%; margin-top: 6px; }
}
.pages-columns fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.pages-columns .check { display: flex; gap: 0.4rem; align-items: center; margin: 0; }
.pages-columns .buttons { margin-top: 0.5rem; }
.pages-report code.page-alias { white-space: nowrap; }
.pages-report .nowrap { white-space: nowrap; }

/* (sprint 75) SQL Workshop: main tools as tabs and a More menu (no horizontal scrolling); the Object Browser */
.sw-tabs { overflow: visible; flex-wrap: wrap; }
.sw-more { position: relative; }
.sw-more > summary { list-style: none; cursor: pointer; }
.sw-more > summary::-webkit-details-marker { display: none; }
.sw-more .menu-panel a[aria-current] { font-weight: 600; }
.ob-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.ob-schema { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.ob-schema .label { margin: 0; }
.ob-create > summary { list-style: none; }
.ob-create > summary::-webkit-details-marker { display: none; }
.ob-filter { padding: 0.5rem; }
.ob-filter input { width: 100%; }
.ob-folder > summary { display: flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.6rem; cursor: pointer; font-weight: 600; list-style: none; }
.ob-folder > summary::-webkit-details-marker { display: none; }
.ob-folder > summary .kind { margin-left: auto; }
.ob-folder .tree { padding-left: 0.75rem; }
.ob-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.5rem; margin-bottom: 0.75rem; }
.ob-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; overflow-wrap: anywhere; }
.ob-actions { display: grid; gap: 0.6rem; margin-top: 1rem; }
.ob-action { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.ob-action input:not([type=checkbox]) { width: 10rem; }

/* (sprint 77) the page template's display positions and a region's button positions on the layout */
.pd-zone { display: grid; gap: 0.3em; margin-bottom: 10px; }
.pd-zone-label { color: var(--muted); font-size: 0.74em; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }
.pd-zone-label small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.pd-zone.is-empty .pd-grid-end { padding: 0.3em; }
.pd-columns { display: grid; gap: 10px; align-items: start; }
.pd-columns > .pd-zone { margin-bottom: 0; min-width: 0; }
.pd-columns:has(> .pd-zone-left) { grid-template-columns: minmax(9rem, 1fr) 3fr; }
.pd-columns:has(> .pd-zone-right) { grid-template-columns: 3fr minmax(9rem, 1fr); }
.pd-columns:has(> .pd-zone-left):has(> .pd-zone-right) { grid-template-columns: minmax(9rem, 1fr) 3fr minmax(9rem, 1fr); }
.pd-columns + .pd-zone { margin-top: 10px; }
.pd-zone-left .pd-grid > .pd-region, .pd-zone-right .pd-grid > .pd-region { grid-column: 1 / -1; }
.pd-slots { display: flex; flex-wrap: wrap; gap: 0.3em; }
.pd-slots-bottom > [data-slot="next"] { margin-left: auto; }
.pd-slots:empty { display: none; }
.pd-slot-spare { display: none; min-height: 1.6em; }
/* (sprint 207, AX-4) empty slots show while something can drop there, and always on a maximized layout */
.pd-dragging-button .pd-slot-spare, body.pd-max .pd-slot-spare { display: flex; }
body:not(.pd-max) .pd-canvas:not(.pd-dragging-button) .pd-slots:not(:has(> .pd-slot:not(.pd-slot-spare))) { display: none; }
@media (max-width: 640px) { .pd-canvas .pd-columns:has(> .pd-zone) { grid-template-columns: minmax(0, 1fr); } }
/* (172) a region's sub regions: a grid of their own inside it */
.pd-sub { display: grid; gap: 0.3em; padding: 0.35em; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--canvas) 60%, transparent); }
.pd-sub-label { color: var(--muted); font-size: 0.74em; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }
.pd-sub-label small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.pd-subgrid > .pd-grid-end { padding: 0.3em; }
/* (sprint 207, AX-4) the Sub regions slot of a region that is not a container: while a region is dragged (not into
   itself, nor a region that holds sub regions: one level of nesting) and on a maximized layout */
.pd-sub-spare { display: none; }
.pd-dragging-region .pd-sub-spare, body.pd-max .pd-sub-spare { display: grid; }
.pd-canvas.pd-dragging-holder .pd-sub-spare, .pd-canvas .pd-region.is-dragging .pd-sub-spare { display: none; }
.pd-tree li[data-slot] > .pd-folder .pd-label { font-weight: 500; }

/* (sprint 77) the rendering tree's context menu, the Copy to other page dialog, component colours */
.pd-menu { position: fixed; z-index: 60; min-width: 13rem; padding: 4px; background: var(--surface, #fff); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: 13px; }
.pd-menu [role=menuitem] { display: block; width: 100%; padding: 0.35rem 0.6rem; border: 0; border-radius: 4px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pd-menu [role=menuitem]:is(:hover, :focus-visible) { background: var(--sel-bg); color: var(--sel-text); outline: none; }
.pd-menu [role=menuitem].is-danger { color: var(--danger); }
.pd-menu [role=separator] { height: 1px; margin: 4px 2px; background: var(--border); }
.pd-dialog { width: min(28rem, calc(100vw - 32px)); padding: 1rem 1.1rem; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); background: var(--surface, #fff); color: var(--text); }
.pd-dialog::backdrop { background: rgb(0 0 0 / 0.35); }
.pd-dialog h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.pd-dialog-buttons { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.pd-node[data-kind="region"] .icon { color: var(--pd-c-region, #2f6fb3); }
.pd-node[data-kind="item"] .icon { color: var(--pd-c-item, #2e8540); }
.pd-node[data-kind="button"] .icon { color: var(--pd-c-button, #b4570f); }
.pd-node[data-kind="dynamic_action"] .icon { color: var(--pd-c-da, #8a4fbf); }
.pd-node[data-kind="process"] .icon, .pd-node[data-kind="computation"] .icon { color: var(--pd-c-process, #a23b72); }

/* (sprint 77) the property editor: Common / All, Go to group, the Template Options button; the page number */
.pe-more { display: contents; }
.pe-show-common [data-more] { display: none; }
.pe-show-common fieldset.pe-group-more { display: none; }
.pe-view { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 8px 6px; }
.pe-view .segmented { margin-top: 0; }
.pe-view .segmented button { font-size: 12px; padding: 2px 8px; min-height: 0; }
.pe-goto { font-size: 12px; max-width: 12rem; }
.pe-options-open .btn { justify-self: start; }
.pd-goto-no input { width: 5.5em; font-variant-numeric: tabular-nums; }
/* on narrower screens the previous / next arrows and the page list do it */
@media (max-width: 1279px) { .pd-goto-no { display: none; } }

/* (sprint 89, SQL-4) the Object Browser: a table's tabs on one row with More, and the Columns toolbar */
.ob-tabs { flex-wrap: nowrap; align-items: stretch; }
.ob-tabs > a { white-space: nowrap; }
.ob-more { position: relative; }
.ob-more > summary { display: flex; align-items: center; gap: 0.25rem; height: 100%; padding: 0.5rem 0.85rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.ob-more > summary:hover, .ob-more[open] > summary { color: var(--text); }
.ob-more .menu-panel { right: 0; left: auto; min-width: 12rem; }
.ob-more .icon { width: 0.9rem; height: 0.9rem; }
.ob-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.ob-tool { position: relative; }
.ob-tool > summary { list-style: none; }
.ob-tool .menu-panel { left: 0; min-width: 18rem; padding: 0.75rem; }
.ob-tool .ob-action { flex-direction: column; align-items: stretch; }
.ob-tool .ob-action input:not([type=checkbox]), .ob-tool .ob-action select { width: 100%; }
.ob-toolbar-note { font-size: 0.85rem; }
@media (max-width: 640px) { .ob-tabs { overflow-x: auto; } .ob-tool .menu-panel { min-width: min(18rem, 90vw); } }

/* (sprint 90, PD-4) a commented-out component in the tree (APEX: Comment Out): struck through and muted */
.pd-node[data-commented] .pd-label { text-decoration: line-through; color: var(--muted); }

/* (sprint 99, DA-13) Administration → Database Users */
.dbu-stats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; }
.dbu-stats a.stat { color: inherit; text-decoration: none; }
.dbu-stats a.stat:hover, .dbu-stats a.stat:focus-visible { border-color: var(--accent); }
.dbu-stats a.stat[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); }
.dbu-search { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.dbu-search input { flex: 1 1 12rem; max-width: 24rem; }
.dbu-members { max-height: 16rem; overflow: auto; }
.dbu-schemas .te-c { text-align: center; width: 1%; white-space: nowrap; }
.dbu-sql { white-space: pre-wrap; overflow-wrap: anywhere; }
/* (sprint 119) a table's Security: roles × columns and masks */
.ds-section { margin-block: 1.25rem; }
.ds-section h2 { display: flex; align-items: center; gap: 0.4rem; }
.ds-table .ds-cell .check { display: flex; white-space: nowrap; margin: 0; }
.ds-table .ds-c { text-align: center; width: 1%; }
.ds-table th code { white-space: nowrap; }
.ds .source { white-space: pre-wrap; overflow-wrap: anywhere; }
.dbu-list td { white-space: normal; overflow: visible; max-width: 24rem; }
.dbu-list td .tag { margin: 0.1rem 0; }
.dbu-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 0; }
.dbu-facts dt { color: var(--muted); }
.dbu-facts dd { margin: 0; min-width: 0; }
@media (max-width: 640px) {
  .dbu-facts { grid-template-columns: 1fr; } .dbu-facts dd { margin-bottom: 0.4rem; }
  .dbu-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dbu-stats a.stat { padding: 0.5rem 0.7rem; } .dbu-stats .stat b { font-size: 1.15rem; }
}
/* (sprint 100) RESTful Services: examples wrap instead of scrolling sideways */
pre.wrap-pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* (sprint 103) SQL Workshop › Schema Export / Import */
.dp-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.3rem 1rem; margin: 0 0 1rem; }
.dp-facts dt { color: var(--muted); }
.dp-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.dp-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.2rem 1rem; margin: 0.5rem 0; }
.dp-log { max-height: 32rem; }
/* (sprint 101, DA-12) SQL Workshop › Scheduling */
.cron-list td, .cron-runs-table td { overflow-wrap: anywhere; }
.cron-cmd { display: inline-block; max-width: 40ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.cron-wide { grid-column: 1 / -1; }
.cron-inline { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.cron-inline select { min-width: 0; max-width: 100%; flex: 1 1 12rem; }
.cron-fields { border: 1px solid var(--border); border-radius: 6px; padding: 0.6rem 0.8rem; margin: 0.8rem 0; min-width: 0; }
.cron-field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.6rem; }
.cron-field-grid input { width: 100%; font-family: var(--mono, monospace); }
.cron-preview { border-left: 3px solid var(--accent); padding: 0.4rem 0.8rem; margin: 0.6rem 0; background: var(--accent-soft); border-radius: 0 4px 4px 0; }
.cron-runs { margin: 0.25rem 0 0; padding-left: 1.4rem; font-variant-numeric: tabular-nums; }
.cron-error { color: var(--danger); }
.cron-sql { white-space: pre-wrap; overflow-wrap: anywhere; }
/* (sprint 102) SQL Monitor: refresh controls, session actions, bars in Top SQL */
.sm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.sm-live.is-paused .sm-updated::after { content: " · paused"; }
.sm-actions { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.sm-action { margin: 0; }
.sm-sessions tr.is-blocked td { background: var(--warning-soft); }
.sm-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.sm-filter input[type=search] { flex: 1 1 12rem; min-width: 0; }
.sm-top th a { color: inherit; text-decoration: none; white-space: nowrap; }
.sm-top th[aria-sort] a { text-decoration: underline; }
.sm-barcell { white-space: nowrap; }
.sm-bar { display: inline-block; width: 4.5rem; height: 0.5rem; margin-right: 0.4rem; vertical-align: middle; }
.sm-bar-track { fill: var(--border); }
.sm-bar-fill { fill: var(--accent); }
/* a statement's text is clipped to 1000 characters on the server: no scroll box inside the table */
.sm-top .sql-text { max-height: none; overflow: visible; }
.sm-sql { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 20rem; overflow: auto; }
@media (max-width: 640px) { .sm-bar { width: 3rem; } }

/* (sprint 104) SQL Workshop › RESTful Services › Modules: the module's tree beside the page */
.rm-layout { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.rm-layout > .region, .rm-main > .region { margin-top: 0; }
.rm-main { display: grid; gap: 1rem; min-width: 0; }
.rm-tree .tree code { font-size: 0.75rem; min-width: 3.4rem; }
@media (max-width: 760px) { .rm-layout { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ page polish (sprint 108): Object Browser, wizards, SQL Monitor */
/* Object Browser: the tree in the builder's type scale, the selected object with the ember bar */
.ob-folder .tree { font-size: var(--fs-base); }
.ob-folder .tree a { padding-block: 0.28rem; }
.ob-folder .tree a[aria-current="page"] { background: var(--sel-bg); color: var(--sel-text); box-shadow: inset 2px 0 0 var(--sel-bar); font-weight: 600; }
.ob-folder > summary { border-radius: var(--radius-sm); }
.ob-folder > summary:hover { background: var(--surface-3); }
.ob-folder > summary .icon { color: var(--muted); }
/* wizards: the icon picker looks like a select; a colour field is a swatch, not a bar */
.ide .icon-picker > summary { border-color: var(--field-border); border-radius: var(--radius-sm); box-shadow: var(--shadow-xs); transition: border-color var(--dur) var(--ease); }
.ide .icon-picker > summary:hover { border-color: color-mix(in srgb, var(--text) 22%, var(--border-strong)); }
.ide .icon-picker > summary::after {
  content: ""; width: 14px; height: 14px; margin-left: 0.15rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23857d75' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.ide .icon-picker[open] > summary { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.ide .icon-picker-panel { border-color: var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-md); background: var(--surface); }
.ide .field input[type=color]:not(.swatch) {
  width: 4.5rem; height: 34px; min-height: 0; padding: 3px; cursor: pointer;
  border: 1px solid var(--field-border); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-xs);
}
.ide .field input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.ide .field input[type=color]::-webkit-color-swatch { border: 0; border-radius: 4px; }
.ide .field input[type=color]::-moz-color-swatch { border: 0; border-radius: 4px; }
/* SQL Monitor: the refresh controls on one row */
.sm-toolbar:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.25rem 0 0.75rem; }
.sm-toolbar select { width: auto; }
.sm-toolbar [aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }

/* (sprint 109, WS-1) the Workspace home (/builder/home) */
.wh-title { margin: 0 0 14px; font-size: var(--fs-xl); overflow-wrap: anywhere; }
.wh-summary h2, .wh-top-head h2 { margin: 0 0 10px; }
.wh-stats a.stat { color: inherit; text-decoration: none; }
.wh-stats a.stat:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.wh-stats a.stat span { color: var(--accent); }
.wh-stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.wh-top-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.wh-top-head h2 { margin: 0; }
.wh-timeframe { display: inline-flex; }
.wh-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin: 10px 0 20px; }
.wh-top > .region { margin: 0; min-width: 0; }
.wh-message { margin-bottom: 16px; }
.wh-message-text { margin: 0 0 8px; white-space: pre-line; overflow-wrap: anywhere; }
.wh-edit > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.wh-edit > summary::-webkit-details-marker { display: none; }
.wh-edit[open] > summary { margin-bottom: 10px; }
.wh-release { display: flex; gap: 0.6rem; align-items: flex-start; }
.wh-release p { margin: 0.2rem 0 0; overflow-wrap: anywhere; }
.wh-release-form { margin-top: 10px; }
@media (max-width: 640px) {
  .wh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .wh-stats .stat { padding: 0.6rem 0.75rem; }
  .wh-stats .stat b { font-size: 1.2rem; }
}

/* (sprint 110) App Builder → Data Reporter: datasets */
.dataset-checks { display: flex; flex-direction: column; gap: 0.35rem; margin: 0.25rem 0 0.5rem; overflow-wrap: anywhere; }
.dataset-filter { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.4rem; }
.dataset-filter > select, .dataset-filter > input { flex: 1 1 10rem; min-width: 0; }
.dataset-columns input { min-width: 0; width: 100%; }
.dataset-page pre.code { white-space: pre-wrap; overflow-wrap: anywhere; }
.dataset-schema { flex-wrap: wrap; }
.dataset-schema > select { flex: 1 1 10rem; min-width: 0; }

/* (sprint 113) Team Development: issues, board, labels, milestones, templates */
.team-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 8px; }
.team-head h1 { margin: 0; font-size: var(--fs-xl); }
.team-head .team-counts { margin: 0; flex: 1 1 200px; }
.team-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 1024px) { .team-layout { grid-template-columns: minmax(0, 1fr) 280px; } }
.team-main { min-width: 0; }
.team-side { min-width: 0; }
.team-side section { padding: 10px 0; border-top: 1px solid var(--border); }
.team-side section:first-child { border-top: 0; padding-top: 0; }
.team-side h2 { margin: 0 0 6px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.team-side p, .team-side li { overflow-wrap: anywhere; }
.team-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px 12px; align-items: end; margin-bottom: 10px; }
.team-filters .field { margin: 0; min-width: 0; }
.team-filters select, .team-filters input { width: 100%; min-width: 0; }
.team-filters .buttons { margin: 0; }
.team-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.team-issue { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); min-width: 0; }
.team-issue.is-closed { opacity: 0.8; }
.team-issue-title { display: flex; gap: 6px; align-items: baseline; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.team-issue-title .icon { flex: none; width: 15px; height: 15px; color: var(--hot); align-self: center; }
.team-issue.is-closed .team-issue-title .icon { color: var(--success, #2f7d32); }
.team-issue-title a { min-width: 0; }
.team-labels { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.team-issue-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; overflow-wrap: anywhere; }
.team-issue-meta span { display: inline-flex; gap: 4px; align-items: center; min-width: 0; }
.team-issue-meta .icon { width: 13px; height: 13px; flex: none; }
.team-label { display: inline-block; max-width: 100%; padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.team-label-red { background: #b42318; color: #fff; }
.team-label-orange { background: #c4520f; color: #fff; }
.team-label-yellow { background: #e6b400; color: #1e1d1b; }
.team-label-green { background: #2f7d32; color: #fff; }
.team-label-teal { background: #0e7a74; color: #fff; }
.team-label-blue { background: #1a5f99; color: #fff; }
.team-label-purple { background: #6941c6; color: #fff; }
.team-label-gray { background: #5e5a54; color: #fff; }
.team-board-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.team-board-filters { margin-bottom: 10px; }
.team-board-filters > summary { cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.team-board-filters[open] > summary { margin-bottom: 8px; }
.team-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; align-items: start; }
.team-col { min-width: 0; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.team-col-head { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; font-size: var(--fs-sm, 0.9rem); overflow-wrap: anywhere; }
.team-move { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.team-move select { flex: 1 1 120px; min-width: 0; }
.team-status { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; margin-right: 6px; }
.team-status-open { background: var(--accent-soft); color: var(--text); }
.team-status-closed { background: var(--surface-3); color: var(--muted); }
.team-issue-h { margin: 0 0 4px; font-size: var(--fs-lg, 1.2rem); overflow-wrap: anywhere; }
.team-md { overflow-wrap: anywhere; min-width: 0; }
.team-md pre { overflow-x: auto; max-width: 100%; }
.team-body { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.mention { font-weight: 600; color: var(--accent); }
.team-timeline { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.team-comment { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); min-width: 0; }
.team-comment-head { margin-bottom: 4px; overflow-wrap: anywhere; }
.team-event { display: flex; gap: 6px; align-items: flex-start; overflow-wrap: anywhere; min-width: 0; }
.team-event .icon { flex: none; width: 13px; height: 13px; margin-top: 3px; }
.team-response-pick, .team-template-pick, .team-save-view { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; margin-bottom: 8px; }
.team-response-pick .field, .team-template-pick .field { margin: 0; min-width: 0; flex: 1 1 200px; }
.team-save-view input { flex: 1 1 140px; min-width: 0; }
.team-edit { margin-top: 16px; }
.team-edit > summary { list-style: none; }
.team-edit[open] > summary { margin-bottom: 10px; }
.team-fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; margin: 8px 0; min-width: 0; }
.team-check-group { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin-bottom: 4px; }
.team-check-group > .small { flex-basis: 100%; }
.team-label-list, .team-template-list, .team-milestones, .team-views, .team-mentions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.team-label-list li, .team-template-list li, .team-views li, .team-mentions li { overflow-wrap: anywhere; min-width: 0; }
.team-views li { display: flex; gap: 6px; justify-content: space-between; align-items: center; }
.team-views a[aria-current] { font-weight: 700; }
.team-inline-edit { margin-top: 4px; }
.team-inline-edit[open] { padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.team-milestone { padding: 8px 0; border-bottom: 1px solid var(--border); }
.team-milestone-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; overflow-wrap: anywhere; }
.team-milestone-head .icon { width: 14px; height: 14px; margin-right: 4px; }
.team-progress { width: 100%; max-width: 360px; height: 8px; }
.team-page-issues { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 6px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--warning-soft); overflow-wrap: anywhere; }
.team-page-issues .icon { flex: none; width: 14px; height: 14px; margin-top: 2px; }
.wh-team-n { margin-left: auto; padding-left: 8px; }
.feedback-issue { margin: 4px 0; }

/* (116) App Builder list: updated by, working copies and the application lock (WS-12) */
.ab-name .ab-lock { display: inline-flex; vertical-align: middle; margin-left: 8px; color: var(--muted); }
.ab-name .ab-lock .icon { width: 15px; height: 15px; }
.ab-by { overflow-wrap: anywhere; }
.ab-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ab-card-badges .tag { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; text-decoration: none; }
.ab-card-badges .tag .icon { width: 13px; height: 13px; flex: none; }
/* (sprint 118) Administration → Mail queue, Network access */
.mail-queue-filters { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; margin-bottom: 12px; }
.mail-queue-filters .field { min-width: 0; flex: 1 1 160px; max-width: 260px; }
.mail-queue-stats { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.mail-queue-stats .stat b { font-size: 1.3rem; }
.stat.stat-bad b { color: var(--danger); }
.inline-form { display: inline; margin: 0; }
.mail-failures .buttons { flex-wrap: wrap; gap: 6px; }
.mail-answer { overflow-wrap: anywhere; font-family: var(--font-mono, monospace); font-size: 0.85em; }
.host-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.host-list code { overflow-wrap: anywhere; }
/* Regions (and a table before one) stacked in a block container keep 1rem between them; grids that space their
   regions with a gap reset it below. */
:where(.ide :is(.region, .table-wrap)) + :where(.region) { margin-top: 1rem; }
.sc-grid > .region, .qs-columns > .region { margin-top: 0; }
:where(.ide td) > .btn + .btn { margin-inline-start: 0.25rem; }
.role-chip + .role-chip { margin-inline-start: 0.3rem; }

/* (sprint 120) App Gallery: four tabs with their counts; two by two on a phone */
.gal-count { display: inline-block; min-width: 1.5em; padding: 0 5px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
.gal-tabs a[aria-current] .gal-count { background: var(--surface); color: var(--text); }
@media (max-width: 600px) {
  .gal-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .gal-tabs a { text-align: center; border-radius: 0; }
  .gal-tabs a:first-child { border-radius: var(--radius) 0 0 0; }
  .gal-tabs a:nth-child(2) { border-radius: 0 var(--radius) 0 0; }
  .gal-tabs a:nth-child(3) { border-left: 1px solid var(--border); border-top: 0; border-radius: 0 0 0 var(--radius); }
  .gal-tabs a:last-child { border-top: 0; border-radius: 0 0 var(--radius) 0; }
}

/* ---------------------------------------------------------------- (sprint 121) builder language: status bar menu, sign-in links */
.ide-status .ide-lang { flex: none; }
.ide-status .ide-lang > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: inherit; padding: 2px 4px; border-radius: 4px; }
.ide-status .ide-lang > summary:hover, .ide-status .ide-lang[open] > summary { color: var(--chrome-text); background: rgb(255 255 255 / 8%); }
.ide-status .ide-lang > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* the status bar clips (overflow: hidden): the menu opens fixed, above it */
.ide-status .ide-lang .menu-panel { position: fixed; top: auto; bottom: 34px; left: auto; right: auto; min-width: 200px; font-size: 13px; white-space: normal; }
.ide-lang-form button { width: 100%; }
.ide-lang-form button[aria-current="true"] { font-weight: 600; }
.ide-lang-form .icon, .ide-lang-pad { width: 1em; height: 1em; flex: none; display: inline-block; }
.signin-langs ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1rem; margin: 0; padding: 0.75rem 0 0; list-style: none; font-size: 0.85rem; }
.signin-langs a { color: var(--muted); text-decoration: none; }
.signin-langs a:hover { color: var(--accent); text-decoration: underline; }
.signin-langs a[aria-current="true"] { color: var(--text); font-weight: 600; }
@media (max-width: 640px) { .ide-status .ide-lang .menu-panel { left: 0.5rem; right: 0.5rem; min-width: 0; } }
/* long compound words of other languages (Workspace-Dienstprogramme) wrap instead of widening a phone's page */
.ab-tile > *, .stat span { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }

/* (sprint 126) Security: two-factor sign-in */
.mfa-qr { margin: .5rem 0 1rem; }
.mfa-qr svg { width: 200px; max-width: 100%; height: auto; background: #fff; padding: 8px; border-radius: 6px; }
.mfa-secret { word-break: break-all; font-size: .95em; letter-spacing: .05em; }
.mfa-steps { padding-left: 1.25rem; }
.mfa-codes { columns: 2; column-gap: 2rem; padding-left: 1.5rem; font-size: 1.05em; }
@media (max-width: 480px) { .mfa-codes { columns: 1; } }
/* (sprint 194) builder tokens: the new token in a field with a Copy button, the example, the scopes */
.token-copy { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.token-copy .token-value { flex: 1 1 18rem; min-width: 0; font-family: var(--mono, ui-monospace, monospace); font-size: .9em; }
pre.code-sample { background: var(--code-bg); padding: .6rem; font-size: .85rem; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.token-scopes { border: 0; padding: 0; margin: 0 0 .75rem; min-width: 0; }
.token-scopes .check { display: block; margin: .25rem 0; }

/* Settings → Sign-in: a checkbox under a grid of fields gets room, and long help stays readable */
.settings-panel[data-tab="signin"] .form-grid + .field { margin-top: 0.75rem; }
.settings-panel[data-tab="signin"] .field > .help,
.settings-panel[data-tab="signin"] p.small { max-width: 75ch; }
.settings-panel[data-tab="signin"] h3:not(:first-child) { margin-top: 1.5rem; }

/* (sprint 134, SEC-5) The CJK builder languages: Inter has no Chinese, Japanese or Korean glyphs, so each language
   names its own system fonts before the generic family (a Japanese font for Chinese text shows the wrong glyph
   shapes for some characters, and the other way round). The language menu and the sign-in links show each name in
   its own fonts. Korean wraps at spaces like Latin text rather than between any two syllables. */
:is(.ide, .ide-login):lang(zh-CN), :is(.ide-lang-form, .signin-langs) :lang(zh-CN) {
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif; }
:is(.ide, .ide-login):lang(zh-TW), :is(.ide-lang-form, .signin-langs) :lang(zh-TW) {
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", "Source Han Sans TC", sans-serif; }
:is(.ide, .ide-login):lang(ja), :is(.ide-lang-form, .signin-langs) :lang(ja) {
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", "Source Han Sans JP", sans-serif; }
:is(.ide, .ide-login):lang(ko), :is(.ide-lang-form, .signin-langs) :lang(ko) {
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", "Source Han Sans KR", sans-serif; }
:is(.ide-lang-form, .signin-langs) [lang] { font-family: var(--font); }
:is(.ide, .ide-login):lang(ko) { word-break: keep-all; overflow-wrap: break-word; }

/* (sprint 136) a button inside an alert (e.g. Add vector column without pgvector) wraps on a phone instead of overflowing */
.alert .btn { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }

/* (sprint 137, AP-3) Create page: the grid of page types with small previews, the features, the type's step */
.cp-tabs { margin-bottom: 0.9rem; flex-wrap: wrap; }
.cp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.75rem; }
/* (sprint 197, NX-U4) Create page's quick forms (from a table, blank page) above the grid */
.ide .cp-quick { margin: 0 0 1rem; }
.cp-quick-form { min-width: 0; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.cp-quick-form h3 { margin: 0 0 0.25rem; }
.cp-quick-form .buttons { margin-bottom: 0; }
.cp-grid > li { min-width: 0; }
.cp-type { display: flex; flex-direction: column; gap: 0.35rem; height: 100%; padding: 0.6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
a.cp-type:hover, a.cp-type:focus-visible { border-color: var(--accent); }
.cp-type b { font-size: 0.95rem; }
.cp-type small { color: var(--muted); line-height: 1.35; }
.cp-type .tag { align-self: flex-start; }
.cp-done { opacity: 0.6; }
.cp-preview { display: block; border-radius: var(--radius-sm); background: var(--surface-2); padding: 4px; }
.cp-preview-lg { max-width: 16rem; }
.cp-svg { display: block; width: 100%; height: auto; }
.cp-svg .pv-line { fill: var(--border-strong); }
.cp-svg .pv-soft { fill: color-mix(in srgb, var(--accent) 28%, var(--surface)); }
.cp-svg .pv-acc { fill: var(--accent); }
.cp-svg .pv-bg { fill: var(--surface); }
.cp-svg .pv-frame { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1; }
.cp-svg .pv-stroke { fill: none; stroke: var(--border-strong); stroke-width: 1.5; }
.cp-feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft, var(--surface-2)); color: var(--accent); }
.cp-step { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; margin-bottom: 0.75rem; }
.cp-step > .cp-preview { flex: 0 1 12rem; }
.cp-step > p { flex: 1 1 14rem; margin: 0; }
.cp-adds { padding-inline-start: 1.2rem; overflow-wrap: anywhere; }

/* (sprint 138, AP-5) an application's Utilities: filters, the dashboard figures, object dependencies, icons, UI defaults */
.util-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 0.75rem; margin-bottom: 0.75rem; }
.util-filters .field { margin: 0; min-width: 0; flex: 1 1 9rem; }
.util-filters .buttons { margin: 0; }
.util-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.75rem; margin: 0; }
.util-stats div { border: 1px solid var(--border); border-radius: var(--radius-sm, 6px); padding: 0.5rem 0.75rem; }
.util-stats dt { color: var(--muted); font-size: 0.8rem; }
.util-stats dd { margin: 0; font-size: 1.4rem; font-weight: 650; }
.util-sum code, .util-history td, .dep-table td { overflow-wrap: anywhere; }
.util-sum code { word-break: break-all; }
.tag-success { background: var(--success-soft); color: var(--success); }
.dep-problem td:first-child, .dep-missing { color: var(--danger); }
.dep-list { margin: 0.25rem 0 0; padding-left: 1rem; }
.dep-list a { display: inline-flex; gap: 0.3rem; align-items: center; }
.util-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.util-icons .icon-tile { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.6rem 0.25rem; border: 1px solid var(--border); border-radius: var(--radius-sm, 6px); text-align: center; }
.util-icons code { font-size: 0.75rem; overflow-wrap: anywhere; }
.ui-defaults :is(input, select, textarea) { width: 100%; min-width: 7rem; }
.util-upgrade + .util-upgrade { margin-top: 1rem; }

/* (sprint 139, AP-6) OpenTelemetry */
.otel-problem { color: var(--danger); overflow-wrap: anywhere; }

/* (sprint 163) an application's REST API page: status pills under the intro, the New client form behind a button */
.api-intro { max-width: 80ch; margin: 0 0 0.6rem; }
.api-status { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.api-status li { display: inline-block; border: 1px solid var(--border); border-radius: 14px; padding: 3px 12px; font-size: 0.875rem; overflow-wrap: anywhere; }
.api-status li.is-ok > span:first-child { color: var(--success); }
.api-status li.is-bad { border-color: var(--danger); }
.api-status li.is-bad > span:first-child { color: var(--danger); font-weight: 700; }
.api-top { align-items: start; }
.api-top form > .field + .field { margin-top: 0.9rem; }
.api-sub { font-size: 0.95rem; margin: 1.25rem 0 0.5rem; }
.api-new > summary { list-style: none; display: inline-flex; }
.api-new > summary::-webkit-details-marker { display: none; }
.api-new[open] > summary { margin-bottom: 0.75rem; }
.api-new-body { border-top: 1px solid var(--border); padding-top: 0.75rem; }
.api-client-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.api-client-actions select { width: auto; min-height: 0; padding-block: 0.2rem; font-size: 0.8125rem; }
.api-client-actions .inline-form { display: flex; gap: 6px; align-items: center; }
.api-clients td.actions { text-align: end; }

/* (UX-2) Page Designer on a short window: the gallery folded to its tabs (builder.js), Save at hand */
@media (min-width: 1024px) {
  .js .pd-gallery.is-folded { height: auto; min-height: 0; overflow: hidden; }
  .js .pd-gallery.is-folded .tab-panel { display: none; }
}
.tb-save.is-dirty { position: relative; }
.tb-save.is-dirty::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--hot); }
#pd-p-props .component-form > .buttons { position: sticky; bottom: 0; z-index: 1; margin: 0; padding: 8px 0; background: var(--surface); border-top: 1px solid var(--border); }
.pd-note.is-cut { display: none; }

/* (UX-3) the rail with labels next to its icons (the toggle at its bottom, kept in the session) */
.rail-toggle { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; }
@media (min-width: 900px) {
  .ide.rail-labels { --rail-w: 196px; }
  .rail-labels .rail-list { padding: 0 10px; }
  .rail-labels .rail-link { display: flex; justify-content: flex-start; gap: 12px; padding: 0 12px; }
  .rail-labels .rail-link .rail-label { position: static; opacity: 1; transform: none; padding: 0; background: none; color: inherit;
    box-shadow: none; font-size: 13.5px; font-weight: 500; pointer-events: auto; }
  .rail-labels .rail-logo { margin-left: 18px; }
  .rail-labels .rail-user { justify-content: flex-start; padding-left: 14px; }
}

/* (UX-4) Administration: the workspace utilities in sections of compact tiles, with a filter (builder.js) */
.adm { max-width: 1180px; }
.adm .title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.adm-filter input { width: min(320px, 100%); }
.adm-lede { max-width: 75ch; }
.adm-section { margin-top: 22px; }
.adm-section h2 { font-size: 15px; margin: 0 0 8px; color: var(--text-2, var(--muted)); text-transform: none; }
.adm-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 8px; }
.adm-tile { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); text-decoration: none; transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.adm-tile:hover, .adm-tile:focus-visible { border-color: var(--hot); background: var(--surface-2); }
.adm-tile-head { display: flex; align-items: center; gap: 8px; }
.adm-tile-head .icon { width: 16px; height: 16px; color: var(--hot); flex: none; }
.adm-tile-text { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.adm-reports { columns: 2 260px; }

/* (UX-5) a builder page's header: one heading, one primary (accent) action, secondary actions and a ⋯ menu */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 16px; }
.page-head h1 { margin: 0; font-size: 22px; }
.page-head-sub { margin: 2px 0 0; }
.page-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.page-head-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.page-head-actions .icon { width: 15px; height: 15px; }
/* (UX-13) the Workspace home's "Needs attention" list for administrators, above the tools */
.wh-attention { display: block; margin: 0 0 16px; }
.wh-attention h2 { margin: 0 0 4px; font-size: 14px; }
.wh-attention ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wh-attention .icon { width: 15px; height: 15px; vertical-align: -2px; }
/* (UX-6) deleting an application or a page: apart from everyday actions, the name typed to confirm */
.danger-box { margin-top: 24px; padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border)); border-radius: 8px; background: var(--danger-soft); }
.danger-box h2 { margin: 0 0 4px; font-size: 15px; color: var(--danger); }
.danger-box p { margin: 0 0 8px; }
.danger-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.danger-form .field { margin: 0; flex: 1 1 14rem; max-width: 22rem; }
.menu-section .danger-form { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
/* (UX-7) Create application: Create always in reach, with a one-line summary */
.aw-footer { position: sticky; bottom: 29px; z-index: 15; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin-top: 16px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.aw-footer .buttons { margin: 0; }
.aw-summary { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.aw-schema-row { align-items: end; }
.aw-schema-row .buttons { margin: 0 0 1rem; }
/* (UX-10) Page not found inside the builder */
.nf-page h1 { margin-top: 8px; }
.nf-search { margin: 12px 0 16px; max-width: 32rem; }
.nf-page h2 { font-size: 14px; margin: 12px 0 4px; }
/* (UX-8) builder reports at laptop width, one rule for all (opt in with .rep-fit): low-value columns (.col-low, under 1150 px of table width) give
   way first, long text wraps (.col-wrap), and the Actions column (.col-actions) stays on screen at the right */
.table-wrap.rep-fit { container-type: inline-size; }
@container (max-width: 1150px) { .rep-fit .report .col-low { display: none; } }
.ide .report td.col-wrap { white-space: normal; min-width: 12rem; overflow-wrap: anywhere; }
.ide .report .col-actions { position: sticky; right: 0; background: var(--surface); box-shadow: inset 1px 0 0 var(--border); }
.ide .report th.col-actions { background: var(--surface-2); }
/* (UX-8) a side drawer opened from the page header (details.drawer): Create account on Users */
.drawer { display: inline-block; }
.drawer > summary { list-style: none; cursor: pointer; }
.drawer > summary::-webkit-details-marker { display: none; }
.drawer-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(26rem, 100vw); overflow-y: auto; padding: 16px 18px 24px;
  background: var(--surface); color: var(--text); border-left: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); text-align: left; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.drawer-head h2 { margin: 0; font-size: 16px; }
.drawer-panel .buttons { justify-content: flex-end; }
.gal-version { margin-left: 4px; font-variant-numeric: tabular-nums; }

/* (sprint 182) Import → From Oracle APEX: the import report */
.apx-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.apx-notes { margin: 0; padding-left: 1.1em; }
.apx-notes li { overflow-wrap: anywhere; }
.apx details { margin-top: 12px; }
.apx details > summary { cursor: pointer; font-weight: 600; }

/* (sprint 185, NX-S1) the SQL Workshop on the Owner connection: a red chip under the tabs, with the way back */
.sw-owner-chip { display: flex; align-items: center; gap: 8px; margin: -0.5rem 0 1rem; padding: 4px 10px; border-radius: 999px; width: fit-content; max-width: 100%;
  background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); font-size: 13px; font-weight: 600; }
.sw-owner-chip .icon { flex: none; }
/* on a phone the text and the button wrap instead of widening the page */
.sw-owner-chip { flex-wrap: wrap; box-sizing: border-box; }
.sw-owner-chip > span { min-width: 0; overflow-wrap: anywhere; }
.sw-owner-chip .btn { white-space: normal; max-width: 100%; }
@media (max-width: 600px) { .sw-owner-chip { border-radius: 12px; } }

/* (sprint 186) the hint after a refusal by row level security: its form stacks, so it fits a phone */
.rls-hint .rls-owner .field input { width: 100%; min-width: 0; box-sizing: border-box; }
.settings-form select, .settings-form input { max-width: 100%; min-width: 0; }
.settings-form code, .checklist code, #make-role .btn { overflow-wrap: anywhere; white-space: normal; }
/* (sprint 206, AX-5) a page as text (page-utilities.ts): each file's path wraps on a phone */
.pdu-file h3 { margin: 1rem 0 0.3rem; font-size: 0.9rem; }
.pdu-file h3 code { overflow-wrap: anywhere; }

/* (sprint 205, AX-1) the Page Designer's column properties: what the column is, and the chooser for several columns */
.pd-colinfo { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.3rem 1rem; margin: 0; }
.pd-colinfo dt { color: var(--muted); }
.pd-colinfo dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.pd-colpick { margin-top: 12px; }
.pd-colpick > summary { cursor: pointer; font-weight: 600; }
.pd-colpick fieldset { border: 0; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.pd-colpick code { overflow-wrap: anywhere; }
.pd-tree .pd-node[data-col] .pd-label { font-family: var(--mono, ui-monospace, monospace); font-size: 12px; }

/* (sprint 231, AX-13) App Builder report: the Lock column (locked: the lock and who holds it; else an open lock) */
.ab-lock-cell .ab-lock { display: inline-flex; align-items: center; gap: 4px; }
.ab-lock-cell .ab-unlocked { display: inline-flex; color: var(--muted); opacity: 0.6; }
.ab-lock-cell .icon { width: 15px; height: 15px; flex: none; }
