/* A stable work surface above Pattern Waves. No moving hit targets. */
.app-shell .rail .app-branched-menu button.nav,
.app-shell .rail .app-branched-menu button.nav:hover,
.app-shell .rail .app-branched-menu button.nav.active {
  box-sizing:border-box;border:1px solid transparent;transform:none;
  transition:background-color 160ms ease,color 160ms ease,border-color 160ms ease;
}
.app-shell .rail .app-branched-menu button.nav:hover { color:var(--app-text);background:color-mix(in srgb,var(--app-lime) 7%,var(--app-rail)); }
.app-shell .rail .app-branched-menu button.nav.active { border-color:color-mix(in srgb,var(--app-lime) 26%,var(--app-line));background:color-mix(in srgb,var(--app-lime) 10%,var(--app-rail)); }
.app-shell .rail { background:color-mix(in srgb,var(--app-rail) 95%,transparent); }
.app-shell .workspace-module,.app-shell .home-module-card,.app-shell .module-card { transform:none;transition:background-color 160ms ease,border-color 160ms ease; }
.app-shell .workspace-module:hover,.app-shell .home-module-card:hover,.app-shell .module-card:hover { transform:none;box-shadow:none;border-color:color-mix(in srgb,var(--app-lime) 50%,var(--app-line)); }
.app-shell .workspace-module::before { display:none; }
.app-shell .home-module-card:hover { outline:none; }
.app-shell .workspace-module:focus-visible,.app-shell .home-module-card:focus-visible,.app-shell .module-card:focus-visible { outline:2px solid var(--app-lime);outline-offset:3px; }

.app-shell .module-section-cards {
  display:block;margin:20px 0 24px;padding:0;border:1px solid var(--app-line);
  border-radius:16px;background:var(--app-surface);overflow:clip;
  box-shadow:0 6px 24px #00000012;scroll-margin-top:90px;
}
.app-shell .module-section-cards::before,.app-shell .module-section-card::before { display:none; }
.module-flow-meta { display:flex;justify-content:space-between;align-items:center;gap:16px;padding:13px 20px;border-bottom:1px solid var(--app-line);color:var(--app-muted);font:500 11px/1.5 var(--sans); }
.module-flow-meta>span:last-child { font-variant-numeric:tabular-nums;color:var(--app-lime); }
.module-step-track { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:8px; }
.app-shell .module-section-card {
  position:relative;display:flex;align-items:flex-start;gap:10px;min-width:0;min-height:91px;padding:16px 12px;
  border:1px solid transparent;border-radius:10px;background:transparent;color:var(--app-muted);
  appearance:none;transform:none;outline:none;box-shadow:none;
  transition:background-color 160ms ease,border-color 160ms ease,color 160ms ease;
}
.app-shell .module-section-card:hover { transform:none;border-color:var(--app-line);background:var(--app-surface-raised); }
.app-shell .module-section-card.active,.app-shell .module-section-card.active:hover { border-color:color-mix(in srgb,var(--app-lime) 40%,var(--app-line));background:color-mix(in srgb,var(--app-lime) 10%,var(--app-surface)); }
.app-shell .module-section-card::after { content:'';position:absolute;left:12px;right:12px;bottom:0;height:2px;border-radius:2px;background:var(--app-lime);opacity:0;transition:opacity 160ms ease; }
.app-shell .module-section-card.active::after { opacity:1; }
.app-shell .module-section-card:focus-visible { outline:2px solid var(--app-lime);outline-offset:-3px; }
.module-step-number { display:grid;place-items:center;flex:0 0 24px;height:24px;border:1px solid var(--app-line);border-radius:7px;color:var(--app-muted);font:500 10px/1 var(--mono);font-variant-numeric:tabular-nums; }
.module-section-card.active .module-step-number { color:var(--app-lime);border-color:color-mix(in srgb,var(--app-lime) 40%,var(--app-line)); }
.app-shell .module-section-copy { flex:1;min-width:0;overflow-wrap:normal; }
.app-shell .module-section-copy b { font:600 12px/1.45 var(--sans);margin-top:3px; }
.app-shell .module-section-copy small { margin-top:7px;color:var(--app-muted);font:400 10px/1.5 var(--sans); }
.app-shell .module-section-card .module-section-icon { position:absolute;right:12px;bottom:12px;width:14px;height:14px;color:var(--app-muted);background:none;border-radius:0;opacity:.5;transform:none;transition:color 160ms ease; }
.app-shell .module-section-icon svg.ui-icon { width:14px;height:14px; }
.app-shell .module-section-card.active .module-section-icon { color:var(--app-lime);opacity:.85; }
.app-shell .module-section-card:last-child { grid-column:auto; }
.app-shell.module-sections-enhanced #module-new-task,.module-sections-enhanced .app-shell #module-new-task { border:1px solid var(--app-line);border-radius:16px;background:var(--app-surface);box-shadow:0 6px 24px #0000000a; }
.module-sections-enhanced .module-form { gap:24px;padding:28px; }
.module-sections-enhanced .module-form .module-step { background:transparent; }
.module-sections-enhanced .module-form .module-step>h2:first-child { font-size:18px;line-height:1.5; }
.module-sections-enhanced .module-form .module-step>h2:first-child { margin-top:0; }
.module-sections-enhanced .module-form .module-section-region>.module-step { border:0;padding:0; }
.module-sections-enhanced .module-section-task-settings>.module-section-region:not(.module-section-hidden)~.module-section-region:not(.module-section-hidden) { margin-top:24px; }
.module-sections-enhanced .mailing-chain { display:grid;gap:22px;margin-top:22px; }
.module-sections-enhanced .mailing-step { display:grid;gap:18px;padding:22px; }
.module-sections-enhanced #m-message-settings { display:grid;gap:22px; }
.module-sections-enhanced #m-message-ai-settings { display:grid;gap:18px; }
.module-sections-enhanced #m-message-ai-settings[hidden] { display:none!important; }
.app-shell .module-section-pager {
  display:flex;align-items:center;justify-content:space-between;gap:18px;margin:24px 0;padding:18px 20px;
  border:1px solid var(--app-line);border-radius:14px;background:var(--app-surface);
}
.module-pager-caption { color:var(--app-muted);font-size:12px;line-height:1.5;text-align:center; }
.app-shell .module-section-pager .btn { flex:0 0 auto;min-width:112px;gap:8px;transform:none;box-shadow:none; }
.app-shell .module-section-pager .btn:hover,.app-shell .module-section-pager .btn:active { transform:none; }
.app-shell .module-section-pager .btn:hover { filter:none; }
.app-shell .module-section-pager .btn::before { display:none; }
.module-section-pager .btn:disabled { opacity:.35;cursor:default; }
.commenting-flow .module-content>.panel { border-radius:16px; }
.commenting-flow [data-commenting-step="channels"] .commenting-actor-section { display:none; }
.commenting-flow[data-commenting-step="channels"] .commenting-actor-section { display:none; }
.commenting-flow .commenting-launch { display:grid;gap:24px;padding:28px; }
.commenting-launch h2 { margin:8px 0 12px; }
.commenting-launch p { margin:0;line-height:1.75; }
.module-launch-review { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px; }
.module-launch-review>div { display:grid;gap:12px;padding:18px;border:1px solid var(--app-line);border-radius:12px;background:var(--app-input); }
.module-launch-review small { color:var(--app-muted);font-size:11px;line-height:1.5; }
.module-launch-review b { font-size:18px;line-height:1.4; }
/* Keep the waves in the margins and away from headings and form text. */
body:has(.module-section-cards) .app-pattern-bg[data-ready="true"] canvas { opacity:.16; }
body:has(.module-section-cards) .app-pattern-bg::before { opacity:.2; }
body:has(.module-section-cards) .app-pattern-bg[data-ready="true"]::before { opacity:0; }
.app-shell .workspace-content:has(>.module-section-cards)>.page-head { padding:24px;border:1px solid var(--app-line);border-radius:16px;background:var(--app-surface); }
.app-shell .commenting-flow>.module-heading { padding:24px;border:1px solid var(--app-line);border-radius:16px;background:var(--app-surface); }
.app-shell .commenting-flow>.module-heading h1 { margin-top:0; }
.app-shell .commenting-flow>.module-heading p { margin-bottom:0; }
@media(min-width:981px) { .app-shell .workspace:has(.module-section-cards) { padding-inline:clamp(22px,3vw,52px); } }
@media(max-width:1200px) {
  .app-shell .module-section-card { flex-direction:column;gap:8px;min-height:112px;padding:12px; }
  .app-shell .module-section-copy b { margin:0; }
  .app-shell .module-section-copy small { margin-top:5px; }
}
@media(max-width:700px) {
  .module-flow-meta { padding:12px 16px; }
  .module-step-track { display:flex;gap:4px;padding:6px; }
  .app-shell .module-section-card { flex:1;align-items:center;justify-content:start;gap:8px;min-height:94px;padding:10px 3px;text-align:center;border-radius:8px; }
  .app-shell .module-section-copy b { font-size:10px;line-height:1.4;overflow-wrap:anywhere; }
  .app-shell .module-section-copy small,.app-shell .module-section-card .module-section-icon { display:none; }
  .module-step-number { flex-basis:auto;width:24px; }
  .module-sections-enhanced .module-form { padding:20px;gap:20px; }
  .app-shell .module-section-pager { padding:14px;gap:10px;flex-wrap:wrap; }
  .module-pager-caption { flex:1 1 100%;order:-1;font-size:11px; }
  .app-shell .module-section-pager .btn { min-width:100px; }
  .module-launch-review { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .commenting-flow .commenting-launch { padding:20px; }
}
@media(prefers-reduced-motion:reduce) { .app-shell .module-section-card,.app-shell .rail .app-branched-menu button.nav,.app-shell .home-module-card,.app-shell .workspace-module,.app-shell .module-card { transition:none; } }

/* Workspace chrome shares one gutter: the full-width bar cannot stop short. */
.app-shell .workspace { --workspace-gutter:clamp(20px,2.4vw,36px);padding-inline:var(--workspace-gutter);padding-top:0; }
.app-shell .workspace>.app-topbar { margin-inline:calc(-1 * var(--workspace-gutter));padding-inline:var(--workspace-gutter);border-radius:0; }
.app-shell .workspace-content { padding-top:20px; }
.app-shell .rail>a.app-brand,.app-shell .rail>a.app-brand:hover {
  display:inline-flex;align-items:center;justify-content:flex-start;gap:5px;
  width:fit-content;max-width:100%;min-height:32px;align-self:flex-start;justify-self:start;
  border:0;background:none;box-shadow:none;transform:none;text-decoration:none;
}
.app-shell .rail>a.app-brand>span { color:var(--app-text);transition:color 160ms ease; }
.app-shell .rail>a.app-brand:hover>span { color:var(--app-lime); }
.app-shell .rail>a.app-brand:focus-visible { outline:2px solid var(--app-lime);outline-offset:3px;border-radius:5px; }
@media(min-width:981px) { .app-shell .workspace:has(.module-section-cards) { --workspace-gutter:clamp(22px,3vw,52px);padding-inline:var(--workspace-gutter); } }
@media(max-width:700px) { .app-shell .workspace { --workspace-gutter:16px; } .app-shell .workspace-content { padding-top:16px; } }
@media(prefers-reduced-motion:reduce) { .app-shell .rail>a.app-brand>span { transition:none; } }
