@font-face {
  font-family: "DM Serif Display";
  src: url("/fonts/dm-serif-display-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "DM Serif Display";
  src: url("/fonts/dm-serif-display-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Manrope Variable";
  src: url("/fonts/manrope-latin-ext.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Manrope Variable";
  src: url("/fonts/manrope-latin.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Phosphor";
  src: url("/fonts/phosphor-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

:root {
  --forest-950: #082d20;
  --forest-900: #0d3b2a;
  --forest-800: #145039;
  --forest-700: #1e6848;
  --green-500: #35b874;
  --green-100: #e4f2e7;
  --paper: #f7f5ef;
  --surface: #fffefb;
  --surface-muted: #f0eee7;
  --ink: #15231d;
  --muted: #66726c;
  --line: #dcded7;
  --amber: #744100;
  --amber-soft: #f5e8c9;
  --red: #a63b32;
  --red-soft: #f4deda;
  --blue: #276f98;
  --blue-soft: #dcecf4;
  --shadow: 0 10px 30px rgba(20, 43, 32, .07);
  --sans: "Manrope Variable", Inter, ui-sans-serif, system-ui, sans-serif;
  --serif: "DM Serif Display", Georgia, serif;
}

.auth-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 14% 10%, rgba(190,223,170,.72), transparent 28rem),
    linear-gradient(145deg, #f4f0e5 0%, #e4eadf 55%, #d3dfd3 100%);
}
.auth-shell { box-sizing: border-box; flex: 1 0 auto; width: min(440px, calc(100% - 32px)); margin: 0 auto; padding: 7vh 0 28px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand .brand-symbol { display: block; width: 46px; height: 46px; border-radius: 14px; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.auth-brand small { color: var(--muted); font-size: 10px; }
.auth-card { padding: 30px; border: 1px solid rgba(255,255,255,.8); border-radius: 24px; background: rgba(255,255,255,.84); box-shadow: 0 24px 70px rgba(30,62,46,.16); backdrop-filter: blur(18px); }
.auth-card h1 { margin: 5px 0 0; font-family: var(--serif); font-size: clamp(26px, 7vw, 38px); font-weight: 400; overflow-wrap: break-word; word-break: normal; }
.auth-lead { margin: 10px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.auth-google { position: relative; width: 100%; height: 44px; min-height: 44px; overflow: hidden; }
.auth-google::before {
  align-items: center;
  background: white;
  border: 1px solid #747775;
  border-radius: 4px;
  box-sizing: border-box;
  color: #1f1f1f;
  content: "Zaloguj się przez Google";
  display: flex;
  font-size: 14px;
  font-weight: 600;
  inset: 0;
  justify-content: center;
  position: absolute;
}
.auth-google > div,
.auth-google iframe {
  position: relative;
  z-index: 1;
  width: 100% !important;
  max-width: 100% !important;
  height: 44px !important;
  max-height: 44px !important;
}
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 9px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-form { display: grid; gap: 12px; }
.auth-form[hidden] { display: none; }
.auth-form + .auth-form { margin-top: 16px; }
.auth-form label { color: var(--muted); font-size: 10px; font-weight: 700; }
.auth-form input { width: 100%; min-height: 44px; margin-top: 5px; border: 1px solid var(--line); border-radius: 11px; padding: 12px; background: white; color: var(--ink); font: inherit; box-sizing: border-box; }
.auth-form small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.auth-recovery-toggle { justify-self: end; min-height: 32px; margin-top: -6px; border: 0; padding: 4px 0; background: transparent; color: var(--forest-700); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.auth-recovery-toggle:hover { text-decoration: underline; }
.auth-recovery { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.auth-recovery[hidden] { display: none; }
.auth-recovery h2 { margin: 0 0 8px; font-size: 17px; }
.auth-recovery-lead { margin: 0 0 14px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.auth-status { min-height: 18px; margin: 16px 0 0; color: var(--forest-700); font-size: 10px; line-height: 1.5; }
.auth-status.error { color: #8a2d20; }
.auth-account-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-section-title,
.session-summary h2,
.auth-danger-zone h2 { margin: 22px 0 10px; font-size: 16px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 74px; }
.password-toggle { position: absolute; top: 5px; right: 6px; min-width: 62px; min-height: 44px; border: 0; border-radius: 8px; background: var(--surface-muted); color: var(--forest-900); font-size: 11px; font-weight: 800; }
.session-summary { margin-top: 24px; padding-top: 2px; border-top: 1px solid var(--line); }
.session-summary p,
.auth-danger-zone p { margin: 0 0 13px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.auth-danger-zone { width: 100%; padding: 16px; border: 1px solid #e2b7b0; border-radius: 14px; background: #fff8f6; }
.auth-danger-zone h2 { margin-top: 0; color: var(--red); }
.auth-back { width: 100%; margin-top: 14px; }

.approval-question {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid #b8d3c3;
  border-radius: 14px;
  background: #f2f8f4;
}
.approval-question h2 { margin: 0; font-size: 21px; line-height: 1.35; }
.approval-question > p { margin: 10px 0 16px; color: var(--muted); line-height: 1.6; }
.approval-question .approval-lead { color: var(--ink); font-size: 15px; }
.approval-question dl { display: grid; gap: 8px; margin: 0; }
.approval-question dl div { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 12px; padding-top: 8px; border-top: 1px solid #d8e7dc; }
.approval-question dt { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.approval-question dd { margin: 0; font-size: 13px; line-height: 1.5; }
.approval-technical { margin-top: 16px; padding-top: 12px; border-top: 1px solid #d8e7dc; }
.approval-technical > summary { color: var(--forest-700); cursor: pointer; font-size: 12px; font-weight: 800; }
.approval-technical > dl { margin-top: 10px; }
.approval-technical > a { display: inline-block; margin-top: 12px; color: var(--forest-700); font-size: 13px; font-weight: 800; }

#company-os-chat { min-width: 0; }
.chat-loading {
  display: grid;
  min-height: 420px;
  place-items: center;
  color: var(--muted);
}
.chat-screen {
  display: grid;
  grid-template-columns: 210px minmax(360px,1fr) minmax(250px,320px);
  min-height: min(720px,calc(100vh - 170px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.chat-pane {
  position: static;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.chat-pane::backdrop { background: rgba(3, 24, 16, .58); backdrop-filter: blur(2px); }
.chat-thread-panel, .chat-inspector { min-width: 0; background: #f0f3ec; }
.chat-thread-panel { display: flex; height: 100%; flex-direction: column; border-right: 1px solid var(--line); }
.chat-thread-head, .chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.chat-panel-actions { display: flex; align-items: center; gap: 6px; }
.chat-pane-close, .chat-panel-mobile-head, .chat-mobile-nav { display: none; }
.chat-thread-head span, .chat-toolbar span, .chat-kicker {
  display: block;
  color: var(--forest-700);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.chat-thread-head h2, .chat-toolbar strong {
  display: block;
  margin: 3px 0 0;
  font-family: inherit;
  font-size: 14px;
}
[data-chat-threads] { flex: 1; overflow-y: auto; padding: 10px; }
.chat-thread {
  width: 100%;
  margin-bottom: 6px;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.chat-thread:hover { background: rgba(255,255,255,.65); }
.chat-thread.active { background: var(--forest-900); color: white; }
.chat-thread strong, .chat-thread span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread strong { font-size: 12px; }
.chat-thread span { margin-top: 4px; color: inherit; font-size: 9px; opacity: .68; }
.chat-history-settings {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--forest-700);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}
.chat-history-settings:hover { background: rgba(255,255,255,.6); }
.chat-cost-summary > strong { display: block; margin: 8px 0 5px; font-size: 18px; }
.chat-cost-summary > small { display: block; margin-top: 5px; }
.chat-conversation { display: grid; min-width: 0; grid-template-rows: auto auto auto minmax(0,1fr); }
.chat-toolbar > div:last-child { display: flex; gap: 6px; }
.chat-toolbar .button { min-height: 34px; padding: 8px 10px; font-size: 10px; text-decoration: none; }
.chat-tools-menu > strong {
  display: block;
  padding: 2px 4px 6px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.chat-model-state {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #c7dbcf;
  background: #edf8f0;
}
.chat-model-state[hidden] { display: none; }
.chat-model-state > .ph { color: #98690e; font-size: 20px; }
.chat-model-state strong, .chat-model-state span { display: block; }
.chat-model-state strong { color: var(--forest-900); font-size: 11px; }
.chat-model-state span { margin-top: 2px; color: #46564e; font-size: 9px; line-height: 1.45; }
.chat-model-state a {
  min-height: 36px;
  padding: 9px 10px;
  border: 1px solid #b8d6c3;
  border-radius: 9px;
  background: white;
  color: var(--forest-800);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
#nlux-chat-root { min-width: 0; min-height: 560px; height: 100%; }
#nlux-chat-root > div { height: 100%; }
.chat-inspector { height: 100%; overflow-y: auto; border-left: 1px solid var(--line); padding: 15px; }
.chat-inspector .chat-muted { color: #56625c; }
.chat-inspector-section + .chat-inspector-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.chat-inspector-section > h2 { margin: 0 0 12px; font-family: var(--serif); font-size: 19px; font-weight: 400; }
.chat-ai-explainer > strong { display: block; font-size: 11px; line-height: 1.5; }
.chat-ai-explainer > p,
.chat-ai-explainer > small { display: block; margin: 7px 0 0; color: #56625c; font-size: 10px; line-height: 1.55; }
.chat-ai-explainer > a { display: inline-flex; min-height: 44px; align-items: center; color: var(--forest-700); font-size: 10px; font-weight: 800; }
.chat-muted { color: var(--muted); font-size: 11px; line-height: 1.55; }
.chat-feedback label { display: block; margin: 10px 0 5px; font-size: 10px; font-weight: 800; }
.chat-feedback-comment {
  width: 100%;
  min-height: 70px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 10px;
  line-height: 1.5;
}
.chat-feedback-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin: 8px 0; }
.chat-feedback-actions .button { min-height: 34px; padding: 7px 5px; font-size: 9px; }
.chat-feedback-actions .button.active,
.chat-feedback-actions .button[aria-pressed="true"] {
  border-color: var(--forest-700);
  background: var(--forest-900);
  color: #fff;
}
.chat-source {
  display: block;
  margin-bottom: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}
.chat-source:hover { border-color: var(--forest-700); }
.chat-source strong, .chat-source span { display: block; }
.chat-source strong { font-size: 11px; line-height: 1.4; }
.chat-source span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.chat-source p { display: -webkit-box; margin: 7px 0 0; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.agent-request-card { padding: 14px; border: 1px solid #b8d3c3; border-radius: 14px; background: var(--surface); }
.agent-request-card + .agent-request-card { margin-top: 10px; }
.agent-request-card h3 { margin: 7px 0; font-size: 15px; line-height: 1.4; }
.agent-request-card > p { margin: 0 0 12px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.agent-request-card dl { display: grid; gap: 7px; margin: 0; }
.agent-request-card dl div { padding-top: 7px; border-top: 1px solid var(--line); }
.agent-request-card dt { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.agent-request-card dd { margin: 3px 0 0; font-size: 10px; line-height: 1.45; }
.agent-request-actions { display: grid; gap: 7px; margin-top: 13px; }
.agent-request-actions .button { width: 100%; min-height: 38px; padding: 9px; font-size: 10px; }

* { box-sizing: border-box; }
html { min-width: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
body { min-width: 0; margin: 0; overflow-x: clip; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible { outline: 3px solid #268657; outline-offset: 3px; }
.ph {
  font-family: "Phosphor" !important;
  speak: never;
  font-style: normal;
  font-weight: 400;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  letter-spacing: 0;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.skip-link { position: fixed; left: 12px; top: -70px; z-index: 100; border-radius: 10px; background: white; color: var(--ink); padding: 11px 15px; }
.skip-link:focus { top: 12px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.workspace, main, #app, .today-layout, .today-primary, .activity-section { min-width: 0; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 18px 22px;
  background: var(--forest-950);
  color: white;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px 24px; border-bottom: 1px solid rgba(255,255,255,.11); }
.brand-mark, .mobile-brand > img {
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
}
.brand strong, .brand span { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.02em; }
.brand span { margin-top: 2px; color: #b7c9bf; font-size: 9px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.desktop-nav { display: grid; gap: 4px; padding-top: 20px; }
.nav-group-label { margin: 10px 11px 2px; color: #b7c9bf; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-group-label:first-child { margin-top: 0; }
.nav-item {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  padding: 9px 11px;
  background: transparent;
  color: #aabdb3;
  text-align: left;
  font-size: 13px;
  transition: background .15s ease, color .15s ease;
}
.nav-item .ph { font-size: 19px; }
.nav-item:hover { background: rgba(255,255,255,.06); color: white; }
.nav-item.active { background: #1d5038; color: white; }
.nav-item b, .mobile-tab b {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  background: #e3ad50;
  color: #2b291e;
  font-size: 10px;
}
.system-state { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 16px 10px 0; border-top: 1px solid rgba(255,255,255,.1); }
.system-state strong, .system-state span { display: block; }
.system-state strong { font-size: 12px; }
.system-state div span { margin-top: 2px; color: #b7c9bf; font-size: 10px; }
.pulse-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #42ca7c; box-shadow: 0 0 0 5px rgba(66,202,124,.11); }
.mobile-appbar, .mobile-tabbar, .mobile-only, .mobile-page-heading { display: none; }

.topbar {
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  border-bottom: 1px solid var(--line);
  background: rgba(247,245,239,.94);
}
.eyebrow { margin: 0 0 5px; color: var(--forest-700); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
h1, h2, p { overflow-wrap: anywhere; }
.topbar h1, .mobile-page-heading h1 { margin: 0; font-family: var(--serif); font-weight: 400; }
.topbar h1 { font-size: 32px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.clock { margin-right: 6px; color: var(--muted); font-size: 11px; }
.icon-button, .owner {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
}
.icon-button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 20px; }
.icon-button:hover { background: var(--surface-muted); }
.owner { border: 0; background: var(--ink); color: white; font-family: var(--serif); font-size: 18px; text-decoration: none; }
#notice { margin: 0 42px; }
#notice:not(:empty) { margin-top: 18px; padding: 12px 14px; border: 1px solid #b8d6c3; border-radius: 10px; background: #e7f3eb; color: #1d5738; font-size: 13px; }
#notice.error { border-color: #e2b7b0; background: var(--red-soft); color: var(--red); }
#pwa-update {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 42px 0;
  padding: 10px 12px 10px 14px;
  border: 1px solid #b8d6c3;
  border-radius: 12px;
  background: var(--green-100);
  color: var(--forest-900);
  font-size: 12px;
  line-height: 1.45;
}
#pwa-update strong { display: block; }
#pwa-update .button { flex: 0 0 auto; min-height: 38px; padding: 8px 12px; font-size: 11px; }
#pwa-update[hidden] { display: none; }
#app { width: min(1180px, 100%); padding: 34px 42px 64px; }

.today-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: 22px; align-items: start; }
.today-primary { display: grid; gap: 18px; }
.calm-state {
  display: grid;
  grid-template-columns: 72px minmax(0,1fr);
  gap: 20px;
  align-items: center;
  min-height: 170px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.calm-state.attention { border-color: #e0c18f; background: #fffbf1; }
.attention-link {
  width: 100%;
  color: var(--ink);
  text-align: left;
}
.attention-link:not(:disabled) { cursor: pointer; }
.attention-link:not(:disabled):hover { border-color: #c99e5e; background: #fff8e8; }
.attention-link::after {
  content: "›";
  align-self: center;
  color: var(--forest-700);
  font-size: 30px;
  line-height: 1;
}
.attention-link { grid-template-columns: 72px minmax(0, 1fr) auto; }
.calm-icon, .icon-disc, .activity-icon, .product-icon, .avatar-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
}
.calm-icon { width: 72px; height: 72px; background: var(--green-100); color: var(--forest-700); font-size: 36px; }
.calm-state h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.calm-state p { max-width: 45ch; margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.calm-copy { min-width: 0; }
.calm-title, .calm-detail, .calm-action { display: block; }
.calm-title { font-size: 22px; letter-spacing: -.025em; }
.calm-detail { max-width: 45ch; margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.calm-action { margin-top: 9px; color: var(--forest-700); font-size: 12px; font-weight: 800; }
.attention-actions { display: grid; gap: 16px; }
.attention-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
}
.attention-action:hover { border-color: #b7c8bf; background: #fffefb; }
.attention-action strong, .attention-action small { display: block; }
.attention-action strong { font-size: 17px; }
.attention-action small { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.attention-caret { color: var(--forest-700); font-size: 21px; }
.next-run {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
}
.next-run:hover { border-color: #b7c8bf; }
.section-label { display: block; margin-bottom: 18px; color: var(--forest-700); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.next-run-body { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 16px; align-items: center; }
.icon-disc { width: 58px; height: 58px; background: var(--green-100); color: var(--forest-700); font-size: 28px; }
.icon-disc.small { width: 46px; height: 46px; font-size: 22px; }
.next-run-copy { display: grid; grid-template-columns: auto auto; gap: 5px 16px; min-width: 0; }
.next-run-copy strong { grid-column: 1 / -1; font-size: 17px; }
.next-run-copy span { display: inline-flex; gap: 6px; align-items: center; min-width: 0; color: var(--muted); font-size: 12px; }
.next-caret { color: var(--forest-700); font-size: 21px; }
.next-run-footer { display: flex; align-items: center; gap: 9px; margin: 17px 0 0 74px; color: var(--forest-700); font-size: 12px; font-weight: 700; }
.next-run.unavailable p { margin: 0; color: var(--muted); font-size: 13px; }
.activity-section { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 22px 24px 15px; }
.section-title span { color: var(--forest-700); font-size: 12px; font-weight: 800; }
.section-title h2 { margin: 4px 0 0; font-size: 18px; }
.concurrency-panel {
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}
.concurrency-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.concurrency-metrics div { padding: 16px 20px; border-left: 1px solid var(--line); }
.concurrency-metrics div:first-child { border-left: 0; }
.concurrency-metrics strong, .concurrency-metrics span { display: block; }
.concurrency-metrics strong { font-family: var(--serif); font-size: 24px; font-weight: 400; }
.concurrency-metrics span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.concurrency-note { margin: 0; padding: 14px 20px 16px; color: var(--muted); font-size: 12px; }
.text-button { min-height: 44px; border: 0; background: transparent; color: var(--forest-700); font-size: 12px; font-weight: 800; }
.activity-list { padding: 0 24px 10px; }
.activity-row {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 76px;
  border-top: 1px solid var(--line);
}
.activity-icon { width: 38px; height: 38px; background: var(--green-100); color: var(--forest-700); font-size: 19px; }
.activity-icon.success { background: #359b5d; color: white; }
.activity-icon.warning { background: var(--amber-soft); color: var(--amber); }
.activity-icon.danger { background: var(--red); color: white; }
.activity-icon.info { background: var(--blue); color: white; }
.activity-icon > .ph {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}
.activity-icon.success > .ph { padding: 1px 0 0 2px; }
.activity-row strong, .activity-row span { display: block; }
.activity-row strong { font-size: 13px; }
.activity-row div span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.run-link {
  min-height: 24px;
  border: 0;
  border-radius: 5px;
  padding: 2px 0;
  background: transparent;
  color: var(--forest-700);
  font-size: inherit;
  font-weight: 750;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: #9dbdad;
  text-underline-offset: 3px;
}
.run-link:hover { color: var(--forest-900); text-decoration-color: currentColor; }
.run-link.activity-time { color: var(--muted); font-size: 11px; font-weight: 600; }
.activity-empty { margin: 0 24px 24px; padding: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.signal-strip {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.signal-strip div { padding: 18px 22px; border-left: 1px solid var(--line); }
.signal-strip div:first-child { border-left: 0; }
.signal-strip strong, .signal-strip span { display: block; }
.signal-strip strong { font-family: var(--serif); font-size: 26px; font-weight: 400; }
.signal-strip span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.today-release {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 11px;
}
.today-release span + span { padding-left: 10px; border-left: 1px solid var(--line); }
.today-release strong { color: var(--forest-700); font-weight: 800; }

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow-wrap: normal !important;
  word-break: normal;
}
.badge.green { background: var(--green-100); color: var(--forest-700); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.event-occurrence-badge {
  border: 1px solid #c8dfcf;
  background: #edf6ef;
  color: var(--forest-700);
}
.event-link .event-occurrence-badge {
  display: inline-flex;
  margin: 7px 0 0;
}
.button { min-height: 44px; border: 0; border-radius: 10px; padding: 10px 15px; background: var(--forest-900); color: white; font-size: 12px; font-weight: 800; }
.button.secondary { background: var(--surface-muted); color: var(--ink); }
.button.danger { background: var(--red); }
.button:disabled { cursor: not-allowed; opacity: .55; }
a.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.approval-list, .product-grid { display: grid; gap: 16px; }
.approval-group + .approval-group,
#approval-approved:not(:empty),
#approval-history:not(:empty) { margin-top: 24px; }
.approval { max-width: 900px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.approval-summary {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 7px 16px;
  align-items: center;
  min-height: 76px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}
.approval-summary::-webkit-details-marker { display: none; }
.approval-summary::after { content: "Rozwiń"; grid-column: 2; grid-row: 1 / span 2; color: var(--forest-700); font-size: 12px; font-weight: 800; }
.approval[open] .approval-summary::after { content: "Zwiń"; }
.approval-summary > span { grid-column: 1; }
.approval-summary > strong { grid-column: 1; font-size: 15px; line-height: 1.45; }
.approval-summary > small { grid-column: 1; color: var(--muted); font-size: 12px; }
.approval-body { padding: 0 24px 24px; border-top: 1px solid var(--line); }
.approval-head > div { display: flex; align-items: center; gap: 10px; }
.approval h2 { margin: 18px 0 7px; font-family: var(--serif); font-size: 24px; font-weight: 400; }
.approval p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.approval-preview { margin-top: 20px; border-top: 1px solid var(--line); }
.approval-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 10px;
}
.approval-preview-head > strong { font-size: 12px; }
.approval-price-rows { display: grid; }
.approval-price-row {
  display: grid;
  grid-template-columns: minmax(130px,1fr) repeat(2,minmax(0,1.2fr));
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.45;
}
.approval-price-row > strong { font-size: 13px; }
.approval-price-row > strong em {
  display: inline-block;
  margin-left: 5px;
  color: var(--forest-700);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}
.approval-price-row.unchanged > strong em { color: var(--muted); }
.approval-price-row > span { min-width: 0; overflow-wrap: anywhere; }
.approval-price-row small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.approval-release-meta { display: grid; gap: 8px; margin: 14px 0 0; }
.approval-release-meta div { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 10px; }
.approval-release-meta dt { color: var(--muted); font-size: 12px; }
.approval-release-meta dd { min-width: 0; margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.approval-note { display: grid; gap: 7px; margin-top: 18px; }
.approval-note > span { font-size: 11px; font-weight: 800; }
.approval-note small { color: var(--muted); font-weight: 500; }
.approval-note textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
}
.approval-note textarea:focus-visible { outline: 3px solid var(--green-100); border-color: var(--forest-700); }
.approval-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.approval-actions .button { min-height: 48px; }
.approval-feedback, .approval-progress {
  margin: 14px 0 0;
  padding: 11px 12px;
  border: 1px solid #9dcbb0;
  border-radius: 10px;
  background: #e7f5eb;
  color: #1f5f42;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.approval-feedback.error {
  border-color: #dd9c93;
  background: #fff0ee;
  color: #8d2920;
}
.approval-progress { font-weight: 500; }
.danger-text { color: var(--red) !important; }
.field-help { color: var(--muted); font-size: 12px; line-height: 1.45; }
[aria-invalid="true"] { border-color: var(--red) !important; outline-color: var(--red) !important; }
.code { color: var(--muted); font-family: ui-monospace, monospace; font-size: 10px; overflow-wrap: anywhere; }
.product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.product-card { position: relative; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.product-card > div:first-child { display: flex; gap: 13px; align-items: center; }
.product-icon { width: 42px; height: 42px; background: var(--green-100); color: var(--forest-700); font-size: 21px; }
.product-card h2 { margin: 0; font-size: 17px; }
.product-card h2 + span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.product-card > .badge { position: absolute; top: 22px; right: 22px; }
.product-statuses { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.product-card p { margin: 17px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.product-card p strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 11px; text-transform: uppercase; }
.product-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.product-management { margin-top: 14px; border-top: 1px solid var(--line); }
.product-management > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  cursor: pointer;
  color: var(--forest-700);
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}
.product-management > summary::-webkit-details-marker { display: none; }
.product-management > summary::after { content: "+"; font-size: 20px; font-weight: 500; }
.product-management[open] > summary::after { content: "−"; }
.product-management-body { display: grid; gap: 12px; padding: 2px 0 2px; }
.product-status-form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 10px; }
.product-status-form label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 800; }
.product-status-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.product-status-form .button { min-height: 42px; white-space: nowrap; }
.product-management-note { margin: 0 !important; color: var(--muted); font-size: 10px !important; line-height: 1.5; }
.product-plugin-control { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.product-management-label { color: var(--forest-700); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.data-table { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.data-table caption,
.table-wrap caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; top: 0; z-index: 1; padding: 13px 17px; background: var(--surface-muted); color: var(--muted); text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
td { padding: 15px 17px; border-top: 1px solid var(--line); font-size: 12px; vertical-align: top; }
td strong, td span { display: block; }
td span { margin-top: 3px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.event-urgent td:first-child { border-left: 4px solid var(--red); }
.event-link {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.event-link:hover strong, .event-link:focus-visible strong { color: var(--forest-700); text-decoration: underline; }
.event-link:focus-visible { outline: 3px solid var(--green-100); outline-offset: 4px; border-radius: 4px; }
.empty-state, .placeholder {
  display: grid;
  justify-items: center;
  max-width: 720px;
  padding: 56px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  text-align: center;
}
.empty-state > .ph { color: var(--forest-700); font-size: 44px; }
.empty-state.warning > .ph { color: var(--amber); }
.empty-state h2, .placeholder h2 { margin: 18px 0 6px; font-family: var(--serif); font-size: 24px; font-weight: 400; }
.empty-state p, .placeholder p { max-width: 45ch; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.placeholder .icon-disc { margin-bottom: 2px; }
.loading-list { display: grid; gap: 14px; }
.loading-list div { height: 130px; border-radius: 16px; background: #e7e5dd; animation: breathe 1.2s ease-in-out infinite alternate; }
@keyframes breathe { to { opacity: .52; } }

#run-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: min(86vh, 820px);
  border: 0;
  border-radius: 20px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(5, 23, 16, .28);
}
#run-dialog::backdrop { background: rgba(5, 23, 16, .55); }

#event-dialog {
  width: min(860px, calc(100% - 32px));
  max-height: min(90vh, 900px);
  border: 0;
  border-radius: 22px;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 90px rgba(5, 23, 16, .3);
}
#event-dialog::backdrop { background: rgba(5, 23, 16, .58); }
.event-dialog-head {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 246, 240, .96);
  backdrop-filter: blur(12px);
}
.event-dialog-head .eyebrow { margin: 0 0 4px; }
.event-dialog-head h2 { margin: 0; font-family: var(--serif); font-size: 29px; font-weight: 400; }
#event-dialog-content { padding: 24px 26px 30px; }
.event-dialog-loading, .event-dialog-error, .event-detail-empty {
  padding: 22px;
  border-radius: 13px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
}
.event-dialog-error { background: var(--red-soft); color: var(--red); }
.event-detail-summary {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(177, 216, 194, .42), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow);
}
.event-context-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.event-priority {
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.event-section-label, .event-detail-section-head > span {
  color: var(--forest-700);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.event-section-label { margin: 22px 0 0; }
.event-human-summary h2 {
  max-width: 28ch;
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.14;
}
.event-impact {
  max-width: 62ch;
  margin: 14px 0 0;
  color: #344840;
  font-size: 15px;
  line-height: 1.65;
}
.event-series-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin-top: 16px;
  border: 1px solid #bcd4c5;
  border-radius: 12px;
  padding: 10px 12px;
  background: #edf6ef;
  color: var(--forest-700);
}
.event-series-summary strong { font-size: 12px; white-space: nowrap; }
.event-series-summary span { color: #496157; font-size: 11px; line-height: 1.45; }
.event-last-seen { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.event-decision-panel {
  margin-top: 16px;
  padding: 22px;
  border: 1px solid #bcd4c5;
  border-radius: 17px;
  background: #eaf3ec;
}
.event-next-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.event-next-grid article {
  padding: 17px;
  border: 1px solid rgba(30,104,72,.16);
  border-radius: 13px;
  background: rgba(255,255,255,.68);
}
.event-next-grid span { display: block; color: var(--forest-700); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.event-next-grid strong { display: block; margin-top: 8px; font-size: 13px; line-height: 1.55; }
.event-primary-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.event-action-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.event-progress-head { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 12px; }
.event-progress-head span { color: var(--muted); }
.event-progress { height: 9px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-muted); }
.event-progress span {
  display: block;
  width: var(--event-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--forest-700);
  transition: width .35s ease;
}
.event-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px 0; margin: 0; }
.event-meta div { min-width: 0; padding: 0 14px; border-left: 1px solid var(--line); }
.event-meta div:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
.event-meta dt { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.event-meta dd { margin: 7px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.event-detail-section { margin-top: 28px; }
.event-detail-section-head { margin-bottom: 12px; }
.event-detail-section-head h2 { margin: 4px 0 0; font-size: 17px; }
.event-agent-section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}
.event-review-accordion { display: grid; gap: 0; margin-top: 18px; border-bottom: 1px solid var(--line); }
.event-review-item {
  min-width: 0;
  border-top: 1px solid var(--line);
}
.event-review-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  box-sizing: border-box;
  padding: 11px 0;
  cursor: pointer;
  list-style: none;
}
.event-review-summary::-webkit-details-marker { display: none; }
.event-review-summary > div { min-width: 0; }
.event-review-summary strong { display: block; font-size: 12px; line-height: 1.35; }
.event-review-summary > div > span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.event-review-summary-state { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; }
.event-review-summary-state > .ph { color: var(--muted); font-size: 17px; transition: transform .2s ease; }
.event-review-item[open] .event-review-summary-state > .ph { transform: rotate(180deg); }
.event-review-item:not(.event-review-pending) .event-review-summary:hover strong { color: var(--forest-700); }
.event-review-summary:focus-visible { border-radius: 8px; outline: 3px solid rgba(31,111,82,.24); outline-offset: 2px; }
.event-review-body {
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-muted);
}
.event-review-label { color: var(--forest-700); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.event-review-body > p { margin: 9px 0 0; color: var(--ink); font-size: 12px; line-height: 1.65; }
.event-review-body dl { display: grid; gap: 8px; margin: 15px 0 0; padding-top: 13px; border-top: 1px solid var(--line); }
.event-review-body dl div { display: grid; grid-template-columns: minmax(110px,auto) minmax(0,1fr); gap: 10px; }
.event-review-body dt { color: var(--muted); font-size: 10px; }
.event-review-body dd { margin: 0; font-size: 10px; font-weight: 700; overflow-wrap: anywhere; }
.event-review-answer-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.event-review-answer-form label { grid-column: 1 / -1; font-size: 11px; font-weight: 800; }
.event-review-answer-form textarea {
  width: 100%;
  min-height: 78px;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid #c9cec9;
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}
.event-review-answer-form textarea:focus { border-color: var(--forest-700); outline: 3px solid #d5ecdf; }
.event-review-answer-form .button { align-self: end; }
.event-review-answer-sent { margin-top: 16px; padding: 13px 14px; border: 1px solid #b9d6c5; border-radius: 11px; background: var(--green-100); }
.event-review-answer-sent strong { font-size: 11px; }
.event-review-answer-sent p { margin: 6px 0 0; font-size: 12px; line-height: 1.55; }
.event-review-answer-sent span, .event-review-answer-note { display: block; margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.mail-ignore-card {
  padding: 18px;
  border: 1px solid #e6c982;
  border-radius: 15px;
  background: var(--amber-soft);
}
.mail-ignore-card p { margin: 8px 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.mail-ignore-card .button { margin-top: 8px; }
.event-action-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.event-action-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.event-action-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.event-action-card h3 { margin: 4px 0 0; font-size: 14px; line-height: 1.35; }
.event-action-card p { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.event-action-card > span { color: var(--muted); font-size: 10px; }
.event-action-card > span { display: block; margin-top: 13px; line-height: 1.5; }
.event-action-execution { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.event-action-execution a { color: var(--accent); font-size: 11px; font-weight: 700; }
.event-action-execution .event-action-error { flex-basis: 100%; margin: 0; color: var(--red); }
.event-action-execution .event-action-route-reason { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.event-transition-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.event-transition-list li { position: relative; padding: 3px 0 20px 24px; border-left: 1px solid #bdc9c1; }
.event-transition-list li::before { content: ""; position: absolute; top: 4px; left: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--forest-700); }
.event-transition-list li:last-child { padding-bottom: 0; }
.event-transition-list li > span { color: var(--muted); font-size: 9px; }
.event-transition-list li > strong { display: block; margin-top: 4px; font-size: 12px; }
.event-transition-list li > p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.event-transition-list li.event-detail-empty { border-left: 0; }
.event-transition-list li.event-detail-empty::before { display: none; }
.event-technical {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.event-technical > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  box-sizing: border-box;
  padding: 13px 17px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style-position: inside;
}
.event-technical-content { padding: 4px 18px 20px; border-top: 1px solid var(--line); }
.event-technical-content > section { margin-top: 24px; }
.event-technical-content h3 { margin: 22px 0 10px; font-size: 13px; }
.event-technical-content pre {
  max-height: 320px;
  overflow: auto;
  border-radius: 12px;
  padding: 16px;
  background: #edf1ed;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.action-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: min(88vh, 760px);
  border: 0;
  border-radius: 20px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(5,23,16,.35);
}
.action-dialog::backdrop { background: rgba(5,23,16,.64); }
.action-dialog-card { margin: 0; padding: 26px; }
.action-dialog-head .eyebrow { margin: 0 0 6px; }
.action-dialog-head h2 { margin: 0; font-family: var(--serif); font-size: 29px; font-weight: 400; line-height: 1.18; }
.action-dialog-description { margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.action-dialog-consequence {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px 16px;
  background: var(--surface-muted);
}
.action-dialog-danger .action-dialog-consequence { border-color: #e2bdb8; background: var(--red-soft); }
.action-dialog-consequence strong { font-size: 11px; }
.action-dialog-consequence p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.action-dialog-danger .action-dialog-consequence p { color: #71312b; }
.action-dialog-details { display: grid; gap: 8px; max-height: 290px; margin-top: 18px; overflow: auto; }
.action-dialog-detail { padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-muted); }
.action-dialog-detail strong, .action-dialog-detail small { display: block; }
.action-dialog-detail strong { font-size: 12px; }
.action-dialog-detail small { margin-top: 3px; color: var(--forest-700); font-size: 9px; font-weight: 800; letter-spacing: .03em; overflow-wrap: anywhere; }
.action-dialog-detail p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.action-dialog-fields { display: grid; gap: 14px; margin-top: 18px; }
.action-dialog-field { display: grid; gap: 6px; color: var(--ink); font-size: 11px; font-weight: 800; }
.action-dialog-field input, .action-dialog-field textarea, .action-dialog-field select {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid #cbd0cb;
  border-radius: 10px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
  font: 500 13px/1.45 var(--sans);
}
.action-dialog-field textarea { resize: vertical; }
.action-dialog-field input[readonly], .action-dialog-field textarea[readonly] { background: #edf1ed; font-family: ui-monospace, monospace; }
.action-dialog-field small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.45; }
.action-dialog-field :is(input, textarea, select)[aria-invalid="true"] { border-color: var(--red); outline: 2px solid rgba(166,59,50,.18); }
.action-dialog-error { margin: 12px 0 0; color: var(--red); font-size: 12px; line-height: 1.5; }
.action-dialog-error:empty { display: none; }
.action-dialog-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.action-dialog-links .button { text-decoration: none; }
.action-dialog-occurrences { margin-top: 11px; color: var(--green); font-size: 12px; font-weight: 700; }
.action-dialog-occurrences summary { cursor: pointer; }
.action-dialog-occurrences ul { display: grid; gap: 5px; margin: 9px 0 0; padding-left: 18px; color: var(--ink); font-size: 12px; font-weight: 500; line-height: 1.45; }
.action-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.action-dialog-actions .button { min-width: 120px; }
.action-dialog-fallback {
  position: fixed;
  z-index: 9999;
  inset: 50% auto auto 50%;
  transform: translate(-50%,-50%);
}
.action-dialog-open::before { content: ""; position: fixed; z-index: 9998; inset: 0; background: rgba(5,23,16,.64); }

.schedule-lag-link { display: inline; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.schedule-lag-link:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 3px; }
.schedule-lag-link:hover { text-decoration: underline; }
.schedule-lag-link.danger { color: var(--red); }

.run-dialog-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.run-dialog-head .eyebrow { margin: 0 0 4px; }
.run-dialog-head h2 { margin: 0; font-family: var(--serif); font-size: 28px; font-weight: 400; }
#run-dialog-content { padding: 22px 24px 26px; }
.run-dialog-loading, .run-dialog-error, .run-log-empty {
  padding: 24px;
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
}
.run-dialog-error { background: var(--red-soft); color: var(--red); }
.run-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.run-summary > div { min-width: 0; }
.run-summary > div > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}
.run-summary strong { font-size: 12px; overflow-wrap: anywhere; }
.run-outcome { margin-top: 22px; padding: 16px; border-radius: 12px; background: var(--green-100); }
.run-outcome.error { background: var(--red-soft); color: var(--red); }
.run-outcome > span {
  display: block;
  margin-bottom: 4px;
  color: var(--forest-700);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.run-outcome.error > span { color: inherit; }
.run-outcome h3, .run-log-list > h3 { margin: 0 0 8px; font-size: 14px; }
.run-outcome p { margin: 6px 0 0; font-size: 13px; line-height: 1.55; }
.run-technical pre {
  max-width: 100%;
  margin: 10px 0 0;
  overflow: auto;
  border-radius: 9px;
  padding: 12px;
  background: var(--surface-muted);
  font: 11px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.run-log-list { margin-top: 24px; }
.run-log { padding: 14px 0; border-top: 1px solid var(--line); }
.run-log > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.run-log time { color: var(--muted); font-size: 10px; }
.run-log p { margin: 8px 0 0; font-size: 13px; line-height: 1.55; }
.run-technical {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.run-technical > summary {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 13px 42px 13px 14px;
  cursor: pointer;
  list-style: none;
}
.run-technical > summary::-webkit-details-marker { display: none; }
.run-technical > summary::after {
  position: absolute;
  top: 50%;
  right: 16px;
  content: "+";
  color: var(--forest-700);
  font-size: 20px;
  line-height: 1;
  transform: translateY(-50%);
}
.run-technical[open] > summary::after { content: "−"; }
.run-technical > summary span { color: var(--forest-700); font-size: 12px; font-weight: 800; }
.run-technical > summary small { color: var(--muted); font-size: 10px; }
.run-technical-body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.run-technical-item { padding-top: 14px; }
.run-technical-item + .run-technical-item { margin-top: 14px; border-top: 1px solid var(--line); }
.run-technical-item h4 { margin: 0; font-size: 11px; line-height: 1.45; }
.run-technical-item code { display: block; margin-top: 7px; font-size: 11px; overflow-wrap: anywhere; }

.finance-agent-card {
  display: grid;
  grid-template-columns: 56px minmax(0,1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid #b9d7c7;
  border-radius: 18px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #f2faf5, #fffefb);
  box-shadow: var(--shadow);
}
.finance-agent-icon, .cost-item-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--forest-700);
}
.finance-agent-icon { width: 56px; height: 56px; font-size: 26px; }
.finance-agent-card > div > span { color: var(--forest-700); font-size: 11px; font-weight: 800; }
.finance-agent-card h2 { margin: 3px 0 0; font-size: 19px; }
.finance-agent-card p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.finance-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.finance-stats div { min-width: 0; padding: 15px 18px; border-left: 1px solid var(--line); }
.finance-stats div:first-child { border-left: 0; }
.finance-stats strong, .finance-stats span { display: block; }
.finance-stats strong { font-family: var(--serif); font-size: 25px; font-weight: 400; }
.finance-stats span { margin-top: 3px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.finance-section {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.finance-section > .data-table { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.finance-questions, .cost-items { display: grid; gap: 12px; padding: 0 22px 22px; }
.finance-question {
  border: 1px solid #d9c99f;
  border-radius: 14px;
  padding: 17px;
  background: #fffbf2;
}
.finance-question.high { border-color: #d4ad6b; background: #fff8e8; }
.finance-question-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.finance-question-head > div { min-width: 0; }
.finance-question-head span { color: var(--amber); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.finance-question-head h3 { margin: 5px 0 0; font-size: 14px; line-height: 1.45; }
.pricing-list {
  display: grid;
  gap: 0;
  margin: 15px 0;
  padding: 0;
  list-style: none;
}
.pricing-list li {
  display: grid;
  grid-template-columns: minmax(140px,.8fr) minmax(0,1.2fr);
  gap: 8px 18px;
  min-width: 0;
  padding: 11px 0;
  border-top: 1px solid rgba(124,101,45,.16);
}
.pricing-list strong, .pricing-list span {
  display: block;
  min-width: 0;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.pricing-list span { color: var(--muted); }
.pricing-empty {
  display: grid;
  gap: 4px;
  margin: 15px 0;
  border-radius: 11px;
  padding: 13px;
  background: rgba(255,255,255,.72);
}
.pricing-empty.pending { background: #fff2d5; }
.pricing-empty strong { font-size: 12px; }
.pricing-empty span, .pricing-meta {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.pricing-meta { display: block; }
.finance-answer-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px 12px; margin-top: 15px; }
.finance-answer-form label { grid-column: 1 / -1; color: var(--muted); font-size: 10px; font-weight: 700; }
.finance-answer-form textarea {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  border: 1px solid #c9cec9;
  border-radius: 10px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
}
.finance-answer-form textarea:focus { border-color: var(--forest-700); outline: 3px solid #d5ecdf; }
.finance-answer-form .button { align-self: end; min-height: 44px; }
.finance-answer-sent { margin-top: 14px; border-radius: 10px; padding: 12px; background: rgba(255,255,255,.72); }
.finance-answer-sent strong, .finance-answer-sent span { display: block; font-size: 10px; }
.finance-answer-sent p { margin: 5px 0 8px; font-size: 12px; line-height: 1.5; }
.finance-answer-sent span { color: var(--muted); }
.finance-clear {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 22px 22px;
  border-radius: 13px;
  padding: 16px;
  background: var(--green-100);
  color: var(--forest-700);
}
.finance-clear.muted { background: var(--surface-muted); color: var(--muted); }
.finance-clear > .ph { flex: 0 0 auto; font-size: 28px; }
.finance-clear strong, .finance-clear span { display: block; }
.finance-clear strong { font-size: 13px; }
.finance-clear span { margin-top: 4px; font-size: 10px; line-height: 1.45; }
.cost-items { grid-template-columns: repeat(2,minmax(0,1fr)); }
.cost-item {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
}
.cost-item-icon { width: 40px; height: 40px; font-size: 19px; }
.cost-item > div { min-width: 0; }
.cost-item > div > div { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.cost-item h3 { margin: 0; font-size: 13px; }
.cost-item > div > span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.cost-item > div > strong { display: block; margin-top: 9px; font-size: 11px; line-height: 1.45; }
.cost-item p { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }

.integration-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.local-agent-panel {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.local-agent-head {
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) auto;
  gap: 15px;
  align-items: start;
}
.local-agent-head > div > span {
  color: var(--forest-700);
  font-size: 10px;
  font-weight: 800;
}
.local-agent-head h2 { margin: 3px 0 0; font-size: 20px; }
.local-agent-head p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.local-agent-stats {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  margin: 20px 0 0;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.local-agent-stats div { min-width: 0; padding: 13px 15px; border-left: 1px solid var(--line); }
.local-agent-stats div:first-child { border-left: 0; }
.local-agent-stats dt { color: var(--muted); font-size: 9px; }
.local-agent-stats dd { margin: 5px 0 0; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.local-agent-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 17px; }
.local-agent-command { margin: 14px 0 0; color: var(--muted); font-size: 10px; }
.local-agent-command .badge { margin-left: 5px; }
.integration-head {
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) auto;
  gap: 15px;
  align-items: start;
}
.integration-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--green-100);
  color: var(--forest-700);
  font-size: 26px;
}
.integration-head > div > span { color: var(--forest-700); font-size: 10px; font-weight: 800; }
.integration-head h2 { margin: 3px 0 0; font-size: 20px; }
.integration-head p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.integration-stats {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin: 22px 0 0;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.integration-stats div { min-width: 0; padding: 14px 16px; border-left: 1px solid var(--line); }
.integration-stats div:first-child { border-left: 0; }
.integration-stats dt { color: var(--muted); font-size: 9px; }
.integration-stats dd { margin: 5px 0 0; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.integration-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.chat-configuration-gates { grid-template-columns: repeat(4,minmax(0,1fr)); }
.chat-configuration-note { margin: 12px 0 0; color: #46564e; font-size: 11px; line-height: 1.55; }
.chat-activation-card {
  margin-top: 18px;
  padding: 17px;
  border: 1px solid #e3c77a;
  border-radius: 15px;
  background: #fff7df;
}
.chat-activation-card > span {
  color: #7c5d12;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}
.chat-activation-card h3 { margin: 5px 0 0; font-size: 16px; }
.chat-activation-card p { margin: 8px 0 0; color: #61511e; font-size: 11px; line-height: 1.55; }
.chat-activation-card .button { margin-top: 14px; }
.chat-activation-owner-note { font-weight: 700; }
.supervisor-cadence-card { scroll-margin-top: 22px; }
.supervisor-cadence-form { margin-top: 18px; }
.supervisor-cadence-form fieldset { margin: 0; padding: 0; border: 0; }
.supervisor-cadence-form legend { font-size: 13px; font-weight: 800; }
.supervisor-cadence-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-top: 12px; }
.supervisor-cadence-option { display: grid; gap: 3px; min-height: 92px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.supervisor-cadence-option:has(input:checked) { border-color: var(--green); background: var(--green-pale); box-shadow: inset 0 0 0 1px var(--green); }
.supervisor-cadence-option input { accent-color: var(--green); }
.supervisor-cadence-option strong { font-size: 12px; }
.supervisor-cadence-option small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.supervisor-cadence-form .button { margin-top: 14px; }
.supervisor-cadence-pending { margin-top: 18px; padding: 16px; border: 1px solid #e5cd89; border-radius: 14px; background: #fff7df; }
.supervisor-cadence-pending > span { display: block; color: #7c5d12; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.supervisor-cadence-pending strong { display: block; margin-top: 6px; font-size: 14px; }
.supervisor-cadence-pending p { margin: 7px 0 0; color: #61511e; font-size: 11px; line-height: 1.55; }
.supervisor-cadence-pending .button { margin-top: 13px; }
.chat-provider-key-panel {
  margin-top: 18px;
  border: 1px solid #cfe1d7;
  border-radius: 15px;
  padding: 17px;
  background: #f1f7f3;
}
.chat-provider-key-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}
.chat-provider-key-head span {
  color: var(--forest-700);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}
.chat-provider-key-head h3 { margin: 3px 0 0; font-size: 15px; }
.chat-provider-key-panel > p {
  margin: 10px 0 0;
  color: #46564e;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.chat-provider-key-form {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 15px;
}
.chat-provider-key-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}
.chat-provider-key-form input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  box-sizing: border-box;
  border: 1px solid #b9d2c4;
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.chat-provider-key-form input:focus {
  outline: 3px solid rgb(47 133 90 / 20%);
  border-color: var(--green);
}
.chat-provider-key-form small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.45;
}
.chat-provider-key-form .button { white-space: nowrap; }
.chat-key-change { margin-top: 14px; }
.chat-key-change > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: var(--forest-700);
  font-size: 12px;
  font-weight: 800;
}
.chat-key-change > summary small {
  color: #1f5f42;
  font-size: 11px;
  font-weight: 800;
}
.chat-key-change[open] > summary { margin-bottom: 4px; }
.chat-configuration-help { margin-top: 18px; }
.admin-details.chat-configuration-help > summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 15px;
  font-size: 11px;
  font-weight: 800;
}
.chat-configuration-help > ol {
  margin: 0;
  padding: 14px 18px 16px 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.chat-configuration-help code { color: var(--ink); }
.plugin-manager { margin-top: 18px; }
.plugin-manager .section-title > p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
  padding: 0 22px 22px;
}
.plugin-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: var(--surface-muted);
}
.plugin-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.plugin-card-head > div { min-width: 0; }
.plugin-card-head span { color: var(--forest-700); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.plugin-card h3 { margin: 4px 0 0; font-size: 15px; }
.plugin-card > p { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.plugin-card > .plugin-price {
  border-left: 3px solid var(--green);
  padding-left: 9px;
  color: var(--ink);
}
.plugin-meta { display: grid; gap: 4px; margin-top: 12px; color: var(--muted); font-size: 9px; }
.plugin-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.plugin-links a { color: var(--forest-700); font-size: 10px; font-weight: 800; text-decoration: none; }
.plugin-links a:hover { text-decoration: underline; }
.plugin-actions { margin-top: 14px; }
.tenant-console { display: grid; gap: 16px; }
.tenant-console-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.tenant-tables { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; }
.tenant-console .integration-card { margin: 0; }
.tenant-console select,
.tenant-console input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
}
.artifact-hash {
  margin: 16px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.hash {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 100%;
  vertical-align: middle;
}
.hash-value {
  background: var(--surface-muted);
  border-radius: 7px;
  color: var(--ink);
  font-size: .9em;
  overflow-wrap: anywhere;
  padding: 3px 6px;
}
.hash-copy {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--forest-700);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  min-height: 34px;
  padding: 6px 9px;
}
.hash-copy:hover,
.hash-copy:focus-visible {
  background: var(--surface-muted);
  border-color: var(--forest-700);
}
.hash-copy:disabled { cursor: wait; opacity: .65; }
.table-wrap .hash,
.data-table .hash {
  flex-wrap: nowrap;
  max-width: none;
}
.table-wrap .hash-value,
.data-table .hash-value {
  overflow-wrap: normal;
  white-space: nowrap;
}
.table-wrap .hash-copy,
.data-table .hash-copy {
  flex: 0 0 auto;
  white-space: nowrap;
}
.commercial-plan-card { grid-column: 1 / -1; }
.commercial-usage {
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 16px;
  padding: 16px;
}
.commercial-usage-head {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}
.commercial-usage-head span {
  color: var(--forest-700);
  font-size: 9px;
  font-weight: 800;
}
.commercial-usage-head h4 { font-size: 14px; margin: 4px 0 0; }
.commercial-usage progress {
  accent-color: var(--forest-700);
  display: block;
  height: 12px;
  margin-top: 14px;
  width: 100%;
}
.commercial-usage-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 10px;
  gap: 6px 18px;
  margin-top: 8px;
}
.commercial-overage {
  background: #fff3dc;
  border-left: 3px solid #9a5b00;
  color: #603900;
  font-size: 11px;
  line-height: 1.5;
  margin: 14px 0 0;
  padding: 10px 12px;
}
.commercial-approval-form {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin-top: 16px;
}
.commercial-approval-form .button { justify-self: start; margin-top: 4px; }
.customer-product-onboarding { margin-bottom: 18px; }
.customer-product-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
}
.customer-product-entry > div { min-width: 0; }
.customer-product-entry span { color: var(--forest-700); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.customer-product-entry h2 { margin: 5px 0 0; font-size: 20px; }
.customer-product-entry p { max-width: 58ch; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.customer-product-toggle { flex: 0 0 auto; }
.customer-product-form[hidden] { display: none; }
.customer-product-form {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 18px 22px 22px;
}
.customer-product-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.customer-product-form input,
.customer-product-form select,
.customer-product-form textarea {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.customer-product-form textarea { min-height: 96px; resize: vertical; }
.customer-product-form button { align-self: end; }
.tenant-console select:focus,
.tenant-console input:focus { outline: 3px solid rgb(47 133 90 / 20%); border-color: var(--green); }
.tenant-secret-form,
.tenant-management-form { display: grid; gap: 12px; }
.tenant-management-form { margin-top: 16px; }
.runner-pairing-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.runner-pairing-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 10px;
}
.runner-pairing-list span { color: var(--muted); text-align: right; }
.member-access-form {
  display: grid;
  grid-template-columns: minmax(105px,1fr) minmax(105px,1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 330px;
}
.member-access-form select { min-height: 36px; padding: 6px 8px; font-size: 11px; }
.member-access-form .button { min-height: 36px; padding: 7px 10px; }
.field-label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 750; }
.tenant-tables > div { min-width: 0; }
.tenant-tables .table-wrap { max-width: 100%; overflow-x: auto; }
.tenant-tables h3 { margin: 0 0 10px; }
.tenant-tables td small { display: block; margin-top: 3px; color: var(--muted); }
.member-plugin-access { margin-top: 10px; min-width: 280px; }
.member-plugin-access summary { cursor: pointer; color: var(--green); font-weight: 700; }
.member-plugin-access-form,
.gmail-grant-form { display: grid; gap: 10px; margin-top: 10px; }
.member-plugin-grid { display: grid; gap: 8px; }
.member-plugin-grid label {
  display: grid;
  grid-template-columns: minmax(140px,1fr) minmax(90px,120px);
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.plugin-access-fieldset,
.gmail-grant-form fieldset {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.plugin-access-fieldset label,
.gmail-grant-form fieldset label,
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.domain-list { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.domain-list li { padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.domain-list li > div { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.domain-list code { overflow-wrap: anywhere; }
.gmail-connect-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.gmail-connection-card .plugin-meta { margin-bottom: 12px; }
.mail-handling-rule .plugin-meta { margin: 12px 0; }
.gmail-mailbox-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.gmail-message-list { display: grid; gap: 8px; margin: 0 0 14px; }
.gmail-message {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 6px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.gmail-message div { display: grid; gap: 3px; min-width: 0; }
.gmail-message strong,
.gmail-message span,
.gmail-message p { overflow-wrap: anywhere; }
.gmail-message span,
.gmail-message time { color: var(--muted); font-size: 11px; }
.gmail-message p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.gmail-draft-form { display: grid; gap: 10px; margin: 0 0 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.gmail-draft-form h4,
.gmail-draft-form p { margin: 0; }
.gmail-draft-form p { color: var(--muted); font-size: 11px; }
.gmail-draft-form textarea { resize: vertical; min-height: 100px; }
.plugin-protected { display: inline-flex; align-items: center; gap: 6px; color: var(--forest-700); font-size: 10px; font-weight: 750; }
.pwa-card { margin-bottom: 18px; }
.install-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.offline-page {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
  background: var(--paper);
}
.offline-page main {
  width: min(100%, 430px);
  padding: 42px 32px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
.offline-page img { border-radius: 20px; }
.offline-page .eyebrow { margin: 22px 0 7px; }
.offline-page h1 { margin: 0; font-family: var(--serif); font-size: 34px; }
.offline-page p:not(.eyebrow) { margin: 12px 0 24px; color: var(--muted); line-height: 1.6; }
.dns-verifications { display: grid; gap: 12px; padding: 0 22px 22px; }
.dns-verification {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  border: 1px solid #d9c99f;
  border-radius: 14px;
  padding: 16px;
  background: #fffbf2;
}
.dns-verification > div > span { color: var(--amber); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.dns-verification h3 { margin: 4px 0 0; font-size: 14px; }
.dns-verification dl { grid-column: 1 / -1; display: grid; gap: 9px; margin: 3px 0 0; }
.dns-verification dl div { display: grid; grid-template-columns: 70px minmax(0,1fr); gap: 10px; }
.dns-verification dt { color: var(--muted); font-size: 10px; }
.dns-verification dd { min-width: 0; margin: 0; font-size: 11px; overflow-wrap: anywhere; }

.section-nav,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 254, 251, .96);
}
.section-nav-sticky { position: sticky; top: 8px; z-index: 12; box-shadow: 0 8px 22px rgba(20,43,32,.08); }
.section-nav a,
.filter-bar button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 9px 13px;
  background: transparent;
  color: var(--forest-900);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.section-nav a:hover,
.filter-bar button:hover,
.filter-bar button[aria-pressed="true"] { background: var(--green-100); }
.filter-result { margin: -8px 2px 14px; color: var(--muted); font-size: 12px; }
.schedule-primary { margin-bottom: 20px; }
.schedule-primary > .section-title { padding-left: 2px; padding-right: 2px; }
.admin-details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.admin-details > summary {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  gap: 4px 12px;
  align-items: center;
  min-height: 76px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}
.admin-details > summary::-webkit-details-marker { display: none; }
.admin-details > summary > span { grid-row: 1 / span 2; display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: var(--surface-muted); color: var(--forest-700); font-size: 22px; }
.admin-details > summary strong { font-size: 15px; }
.admin-details > summary small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.admin-details-body { padding: 18px; border-top: 1px solid var(--line); }
.admin-details-body .local-agent-panel { box-shadow: none; }
.role-meta { display: grid; gap: 4px; margin: 10px 0 0; }
.role-meta div { display: flex; gap: 7px; font-size: 11px; }
.role-meta dt { color: var(--muted); }
.role-meta dd { margin: 0; font-weight: 750; }
.finance-agent-status { display: grid; justify-items: end; gap: 7px; }
.finance-agent-status small { color: var(--muted); font-size: 11px; }
.finance-agent-status small .badge { margin-left: 5px; }
.finance-action-section { border-color: #d7b66c; background: #fffcf5; }
.module-start { justify-items: start; text-align: left; }
.module-start > .badge { margin-top: 12px; }
.module-start h2 { margin-top: 14px; }
.module-start-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.audit-clear { justify-items: start; text-align: left; }
.audit-clear dl { display: grid; gap: 8px; width: 100%; max-width: 600px; margin: 18px 0; }
.audit-clear dl div { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.audit-clear dt { color: var(--muted); font-size: 12px; }
.audit-clear dd { margin: 0; font-size: 12px; line-height: 1.5; }
.table-scroll-hint { display: none; margin: 0 0 7px; color: var(--muted); font-size: 12px; }
.table-wrap:focus-visible { border-radius: 10px; }
.chat-tools { position: relative; }
.chat-tools > summary { min-height: 44px; border-radius: 10px; padding: 10px 13px; background: var(--surface-muted); color: var(--ink); font-size: 12px; font-weight: 800; cursor: pointer; list-style: none; }
.chat-tools > summary::-webkit-details-marker { display: none; }
.chat-tools-menu { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; display: grid; gap: 6px; min-width: 210px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.chat-tools-menu .button { width: 100%; justify-content: flex-start; }
.chat-thread-head span,
.chat-toolbar span,
.chat-kicker,
.chat-thread span,
.chat-budget span,
.chat-budget small,
.chat-privacy p,
.chat-privacy a,
.chat-privacy small,
.chat-source span,
.chat-source p,
.agent-request-card > p,
.agent-request-card dt,
.agent-request-card dd,
.product-card h2 + span,
td span,
.finance-stats span,
.cost-item > div > span,
.cost-item > div > strong,
.cost-item p,
.local-agent-head > div > span,
.local-agent-stats dt,
.local-agent-stats dd,
.local-agent-command,
.integration-head > div > span,
.integration-stats dt,
.plugin-card-head span,
.plugin-card > p,
.plugin-meta,
.plugin-protected,
.dns-verification > div > span,
.dns-verification dt,
.dns-verification dd { font-size: 11px; }
.chat-toolbar .button,
.agent-request-actions .button,
.member-access-form .button,
.member-access-form select { min-height: 44px; font-size: 11px; }

@media (max-width: 1040px) and (min-width: 768px) {
  .shell { grid-template-columns: 220px minmax(0,1fr); }
  .sidebar { padding-inline: 13px; }
  .topbar { padding-inline: 28px; }
  #app { padding-inline: 28px; }
  #notice { margin-inline: 28px; }
  .today-layout { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  body { height: var(--app-height, 100dvh); overflow: hidden; background: var(--paper); padding-bottom: 0; }
  body.auth-body {
    height: auto;
    min-height: var(--app-height, 100dvh);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }
  body.auth-body .auth-shell {
    min-height: auto;
    padding: max(20px, 4vh) 0 24px;
    overflow: visible;
  }
  body.auth-body .auth-brand { margin-bottom: 16px; }
  body.auth-body .auth-card { padding: 22px 20px; border-radius: 20px; }
  body.auth-body .auth-card h1 { font-size: 28px; }
  body.auth-body .auth-lead { margin-bottom: 18px; }
  body.auth-body .session-summary .button,
  body.auth-body .auth-danger-zone .button,
  body.auth-body .auth-back { width: 100%; }
  .shell { display: block; height: var(--app-height, 100dvh); min-height: 0; }
  .sidebar, .topbar, .desktop-only { display: none; }
  .mobile-only, .mobile-page-heading { display: block; }
  .workspace {
    display: grid;
    grid-template-rows: auto minmax(0,1fr) auto;
    height: var(--app-height, 100dvh);
    min-height: 0;
  }
  main { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .mobile-appbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 10px 18px;
    background: var(--forest-950);
    color: white;
  }
  .mobile-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .mobile-brand > img { width: 36px; height: 36px; flex-basis: 36px; border-radius: 9px; }
  .mobile-brand strong { min-width: 0; font-size: 17px; letter-spacing: -.025em; white-space: nowrap; }
  .mobile-system { display: flex; align-items: center; gap: 7px; color: #d5e6dc; font-size: 11px; font-weight: 700; white-space: nowrap; }
  .mobile-system .pulse-dot { width: 8px; height: 8px; flex-basis: 8px; box-shadow: none; }
  .icon-button.inverted { border-color: rgba(255,255,255,.2); background: transparent; color: white; }
  #notice { margin: 0 18px; }
  #notice:not(:empty) { margin-top: 16px; }
  #pwa-update { display: grid; gap: 10px; margin: 12px 18px 0; padding: 12px; }
  #pwa-update .button { width: 100%; }
  #app { width: 100%; padding: 0 16px 34px; }
  .mobile-page-heading { padding: 26px 4px 22px; }
  .mobile-page-heading p { display: flex; align-items: center; gap: 6px; margin: 9px 0 0; color: var(--muted); font-size: 13px; text-transform: capitalize; }
  .mobile-page-heading p .ph { font-size: 15px; }
  .mobile-page-heading h1 { font-size: clamp(34px, 10vw, 44px); line-height: 1.02; letter-spacing: -.025em; }
  .mobile-page-heading > span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
  .today-layout { display: block; }
  .today-primary { gap: 14px; }
  .calm-state {
    grid-template-columns: 58px minmax(0,1fr);
    gap: 15px;
    min-height: 0;
    padding: 21px 18px;
    border-radius: 17px;
    box-shadow: none;
  }
  .calm-icon { width: 58px; height: 58px; font-size: 29px; }
  .calm-state h2 { font-size: 18px; }
  .calm-state p { margin-top: 6px; font-size: 13px; line-height: 1.5; }
  .attention-link { grid-template-columns: 58px minmax(0,1fr) auto; }
  .calm-title { font-size: 18px; }
  .calm-detail { margin-top: 6px; font-size: 13px; line-height: 1.5; }
  .attention-link::after { font-size: 26px; }
  .attention-actions { gap: 13px; }
  .attention-action { gap: 13px; padding: 18px; border-radius: 17px; box-shadow: none; }
  .attention-action strong { font-size: 16px; }
  .attention-action small { font-size: 12px; }
  .next-run { padding: 19px 18px; border-radius: 17px; box-shadow: none; }
  .section-label { margin-bottom: 14px; font-size: 15px; letter-spacing: -.01em; }
  .next-run-body { grid-template-columns: 52px minmax(0,1fr) auto; gap: 13px; }
  .icon-disc { width: 52px; height: 52px; font-size: 25px; }
  .next-run-copy { grid-template-columns: 1fr; gap: 4px; }
  .next-run-copy strong { font-size: 16px; line-height: 1.3; }
  .next-run-copy span { font-size: 12px; }
  .next-run-footer { margin: 14px 0 0 65px; flex-wrap: wrap; }
  .activity-section { margin-top: 26px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .section-title { align-items: center; padding: 0 2px 10px; }
  .section-title span { font-size: 16px; letter-spacing: -.015em; }
  .section-title h2 { display: none; }
  .activity-list { padding: 0; }
  .activity-row { position: relative; grid-template-columns: 40px minmax(0,1fr) auto; gap: 12px; min-height: 78px; padding: 5px 2px; border-top: 0; }
  .activity-row:not(:first-child)::after { content: ""; position: absolute; top: 0; right: 0; left: 54px; border-top: 1px solid var(--line); }
  .activity-row:not(:last-child)::before { content: ""; position: absolute; z-index: -1; top: 57px; bottom: -22px; left: 20px; border-left: 1px solid #cad4ce; }
  .activity-row strong { font-size: 14px; line-height: 1.35; }
  .activity-row div span { font-size: 12px; }
  .run-link.activity-time { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; justify-content: flex-end; text-align: right; }
  .activity-empty { margin: 0; padding: 22px 2px; border-top: 1px solid var(--line); }
  .activity-empty strong { color: var(--ink); font-size: 14px; }
  .signal-strip { grid-template-columns: repeat(4,minmax(0,1fr)); margin: 20px 0 0; border-radius: 14px; }
  .signal-strip div { min-width: 0; padding: 14px 8px; text-align: center; }
  .signal-strip strong { font-size: 23px; }
  .signal-strip span { font-size: 9px; overflow-wrap: anywhere; }
  .today-release { justify-content: flex-start; margin-top: 14px; padding: 0 2px; }
  .mobile-tabbar {
    position: static;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    min-height: calc(72px + env(safe-area-inset-bottom));
    padding: 7px 8px max(7px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -8px 28px rgba(20,43,32,.08);
  }
  .mobile-tab {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 56px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
  }
  .mobile-tab .ph { font-size: 25px; }
  .mobile-tab.active { background: var(--forest-900); color: white; }
  .mobile-tab b { position: absolute; top: 4px; right: calc(50% - 25px); }
  .product-grid { grid-template-columns: 1fr; gap: 12px; }
  .product-card { padding: 18px; border-radius: 15px; }
  .product-card > div:first-child { padding-right: 0; }
  .product-card > .badge { top: 18px; right: 18px; }
  .product-links .text-button { flex: 1 1 130px; text-align: left; }
  .product-status-form { grid-template-columns: 1fr; }
  .product-status-form .button { width: 100%; }
  .customer-product-entry { display: grid; gap: 14px; padding: 18px 16px; }
  .customer-product-entry h2 { font-size: 18px; }
  .customer-product-entry p { font-size: 11px; }
  .customer-product-toggle { width: 100%; }
  .customer-product-form { padding: 16px; }
  .mobile-list { display: grid; gap: 12px; }
  .schedule-list { display: grid; }
  .schedule-line {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) minmax(86px,auto);
    gap: 11px;
    align-items: center;
    min-width: 0;
    min-height: 72px;
    padding: 11px 2px;
    border-bottom: 1px solid var(--line);
  }
  .schedule-line:first-child { border-top: 1px solid var(--line); }
  .schedule-line-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--green-100);
    color: var(--forest-700);
    font-size: 19px;
  }
  .schedule-line-copy { min-width: 0; }
  .schedule-line-copy h2 { margin: 0; font-size: 14px; line-height: 1.3; }
  .schedule-line-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
  .schedule-line-copy .schedule-last { margin-top: 6px; }
  .schedule-last .run-link.compact { display: inline-flex; align-items: center; min-height: 44px; color: var(--forest-700); font-size: 10px; }
  .schedule-line-next { min-width: 0; text-align: right; }
  .schedule-line-next strong, .schedule-line-next span { display: block; }
  .schedule-line-next strong { font-size: 12px; line-height: 1.3; }
  .schedule-line-next span { margin-top: 3px; color: var(--forest-700); font-size: 10px; font-weight: 700; }
  .schedule-line-next span.danger { color: var(--red); }
  .role-row, .event-row, .budget-row, .finding-row {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
  }
  .role-row h2, .budget-row h2, .finding-row h2 { margin: 0; font-size: 15px; line-height: 1.35; }
  .event-row {
    display: grid;
    grid-template-columns: 40px minmax(0,1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 16px;
    color: var(--ink);
    font: inherit;
    text-align: left;
  }
  .event-row-copy { display: block; min-width: 0; }
  .event-row-copy > strong { display: block; font-size: 15px; line-height: 1.35; }
  .event-row-copy > span:not(.event-badges) { display: block; margin: 4px 0 9px; color: var(--muted); font-size: 10px; }
  .event-badges { display: flex; flex-wrap: wrap; gap: 6px; }
  .event-caret { color: var(--muted); font-size: 20px; }
  .role-row { position: relative; display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; padding: 16px; }
  .avatar-icon { width: 42px; height: 42px; background: var(--green-100); color: var(--forest-700); font-size: 21px; }
  .role-row > div > span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
  .role-row p { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
  .role-row > .badge { position: absolute; top: 16px; right: 16px; }
  .role-row > div { padding-right: 80px; }
  .role-meta { padding-right: 0; }
  .budget-row, .finding-row { padding: 18px; }
  .budget-row dl { display: grid; gap: 10px; margin: 14px 0; }
  .budget-row dl div { padding-top: 10px; border-top: 1px solid var(--line); }
  .budget-row dt { color: var(--muted); font-size: 10px; }
  .budget-row dd { margin: 4px 0 0; font-size: 12px; }
  .finding-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
  .finding-row > div > span, .finding-row p { color: var(--muted); font-size: 10px; }
  .finding-row h2 { margin-top: 5px; }
  .finding-row p { margin: 8px 0 0; }
  .approval { padding: 0; }
  .approval-summary { grid-template-columns: 1fr; padding: 15px 17px; }
  .approval-summary::after { grid-column: 1; grid-row: auto; justify-self: start; }
  .approval-body { padding: 0 17px 19px; }
  .approval-question dl div { grid-template-columns: 1fr; gap: 4px; }
  .approval-preview-head { align-items: flex-start; }
  .approval-price-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 14px 0;
  }
  .approval-price-row > span {
    padding-left: 12px;
    border-left: 2px solid var(--line);
  }
  .approval-release-meta div { grid-template-columns: 72px minmax(0,1fr); }
  .approval-note textarea { min-height: 76px; font-size: 16px; }
  .approval-actions .button { flex: 1 1 110px; }
  body.chat-view main { overflow: hidden; }
  body.chat-view #app {
    display: grid;
    grid-template-rows: auto minmax(0,1fr);
    height: 100%;
    padding-bottom: 12px;
  }
  body.chat-view .mobile-page-heading { padding: 15px 4px 13px; }
  body.chat-view .mobile-page-heading h1 { font-size: 30px; }
  body.chat-view .mobile-page-heading p { display: none; }
  body.chat-view .mobile-page-heading > span { margin-top: 5px; font-size: 12px; }
  .chat-screen {
    display: block;
    grid-template-columns: 1fr;
    height: 100%;
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 16px;
    box-shadow: none;
  }
  .chat-conversation {
    display: grid;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
  }
  .chat-pane { display: none; }
  .chat-pane[open] {
    position: fixed;
    inset: auto 0 0;
    display: block;
    width: 100%;
    max-width: none;
    max-height: min(82dvh,720px);
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 24px 24px 0 0;
    background: #f0f3ec;
    box-shadow: 0 -18px 55px rgba(3,24,16,.22);
  }
  .chat-thread-panel, .chat-inspector {
    max-height: min(82dvh,720px);
    margin: 0;
    border: 0;
    border-radius: 24px 24px 0 0;
  }
  .chat-thread-panel { min-height: min(68dvh,620px); }
  .chat-inspector { padding: 0 16px max(22px,env(safe-area-inset-bottom)); }
  .chat-panel-mobile-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 -16px 14px;
    padding: 15px 16px 12px;
    border-bottom: 1px solid var(--line);
    background: #f0f3ec;
  }
  .chat-panel-mobile-head span { color: var(--forest-700); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
  .chat-panel-mobile-head h2 {
    display: block;
    margin: 2px 0 0;
    font-family: inherit;
    font-size: 16px;
  }
  .chat-pane-close { display: grid; }
  .chat-thread-head { min-height: 68px; padding: 12px 16px; }
  [data-chat-threads] { flex: 1; overflow-y: auto; padding: 10px 12px; }
  .chat-thread { min-height: 58px; margin-bottom: 7px; padding: 12px 13px; background: rgba(255,255,255,.5); }
  .chat-history-settings { padding: 11px 16px max(14px,env(safe-area-inset-bottom)); }
  .chat-toolbar { min-height: 58px; padding: 9px 11px 9px 14px; }
  .chat-toolbar > div:first-child { min-width: 0; }
  .chat-toolbar > div:first-child span,
  .chat-toolbar > div:first-child strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .chat-toolbar > div:last-child { flex-wrap: wrap; justify-content: flex-end; }
  .chat-tools > summary { width: 46px; min-height: 46px; overflow: hidden; padding: 13px 7px; text-align: center; text-indent: -999px; }
  .chat-tools > summary::after { content: "•••"; display: block; text-indent: 0; letter-spacing: 2px; }
  .chat-tools-menu { position: fixed; z-index: 50; top: auto; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); left: 16px; min-width: 0; }
  .chat-mobile-nav {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfa;
  }
  .chat-mobile-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    min-height: 44px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--forest-900);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
  }
  .chat-mobile-nav .ph { font-size: 18px; }
  .chat-mobile-nav b { display: grid; min-width: 20px; height: 20px; place-items: center; border-radius: 99px; background: var(--green-100); font-size: 10px; }
  .chat-model-state {
    grid-template-columns: auto minmax(0,1fr);
    gap: 7px 10px;
    padding: 10px 12px;
  }
  .chat-model-state > .ph { grid-row: 1 / span 2; }
  .chat-model-state span { font-size: 10px; }
  .chat-model-state a { grid-column: 2; justify-self: start; min-height: 40px; }
  #nlux-chat-root {
    min-height: 0;
    height: 100%;
  }
  .chat-inspector-section { max-width: 680px; margin-inline: auto; }
  .empty-state, .placeholder { padding: 44px 20px; }
  .finance-agent-card {
    grid-template-columns: 48px minmax(0,1fr);
    gap: 13px;
    padding: 17px;
    border-radius: 15px;
    box-shadow: none;
  }
  .finance-agent-icon { width: 48px; height: 48px; font-size: 23px; }
  .finance-agent-card h2 { font-size: 17px; }
  .finance-agent-card > .badge,
  .finance-agent-status { grid-column: 2; justify-self: start; justify-items: start; }
  .finance-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .finance-stats div { border-top: 1px solid var(--line); }
  .finance-stats div:nth-child(-n+2) { border-top: 0; }
  .finance-stats div:nth-child(odd) { border-left: 0; }
  .finance-section { border-radius: 15px; box-shadow: none; }
  .finance-section .section-title { padding: 18px 16px 13px; }
  .finance-section .section-title span { font-size: 11px; }
  .finance-section .section-title h2 { display: block; font-size: 17px; }
  .concurrency-panel { margin: 0 0 16px; border-radius: 14px; }
  .concurrency-panel .section-title { padding: 16px; }
  .concurrency-panel .section-title span { font-size: 11px; }
  .concurrency-panel .section-title h2 { display: block; font-size: 17px; }
  .concurrency-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .concurrency-metrics div { padding: 14px 12px; }
  .concurrency-metrics div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .concurrency-metrics div:nth-child(4) { border-top: 1px solid var(--line); }
  .finance-questions, .cost-items { grid-template-columns: 1fr; padding: 0 14px 14px; }
  .finance-question-head { display: block; }
  .finance-question-head > .badge { margin-top: 10px; }
  .pricing-list { margin: 13px 0; }
  .pricing-list li {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 0;
  }
  .pricing-list strong { font-size: 14px; line-height: 1.4; }
  .pricing-list span { font-size: 12px; line-height: 1.55; }
  .pricing-empty { margin: 13px 0; }
  .finance-answer-form { grid-template-columns: 1fr; }
  .finance-answer-form label { grid-column: auto; }
  .finance-answer-form .button { justify-self: stretch; }
  .finance-clear { margin: 0 14px 14px; }
  .integration-card { padding: 18px; border-radius: 15px; box-shadow: none; }
  .local-agent-panel { padding: 18px; border-radius: 15px; box-shadow: none; }
  .local-agent-head { grid-template-columns: 46px minmax(0,1fr); }
  .local-agent-head > .badge { grid-column: 2; justify-self: start; }
  .local-agent-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .local-agent-stats div { border-top: 1px solid var(--line); }
  .local-agent-stats div:nth-child(-n+2) { border-top: 0; }
  .local-agent-stats div:nth-child(odd) { border-left: 0; }
  .local-agent-actions .button { width: 100%; }
  .integration-head { grid-template-columns: 46px minmax(0,1fr); }
  .integration-icon { width: 46px; height: 46px; font-size: 23px; }
  .integration-head > .badge { grid-column: 2; justify-self: start; }
  .integration-stats { grid-template-columns: 1fr; }
  .integration-stats div { border-top: 1px solid var(--line); border-left: 0; }
  .integration-stats div:first-child { border-top: 0; }
  .integration-actions .button { width: 100%; }
  .chat-activation-card .button { width: 100%; }
  .supervisor-cadence-options { grid-template-columns: 1fr; }
  .supervisor-cadence-form .button, .supervisor-cadence-pending .button { width: 100%; }
  .chat-provider-key-form { grid-template-columns: 1fr; }
  .chat-provider-key-form .button { width: 100%; }
  .plugin-manager .section-title { display: block; }
  .plugin-manager .section-title > p { margin-top: 9px; }
  .plugin-grid { grid-template-columns: 1fr; padding: 0 14px 14px; }
  .plugin-actions .button { width: 100%; }
  .tenant-console-grid,
  .customer-product-form,
  .tenant-tables { grid-template-columns: 1fr; }
  .table-scroll-hint { display: block; }
  .section-nav-sticky { position: static; overflow: visible; flex-wrap: wrap; }
  .section-nav-sticky a { flex: 1 1 100px; justify-content: center; text-align: center; }
  .filter-bar { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .filter-bar button { justify-content: center; padding-inline: 8px; }
  .admin-details-body { padding: 12px; }
  .admin-details-body .local-agent-panel { margin-bottom: 12px; }
  .audit-clear dl div { grid-template-columns: 1fr; gap: 4px; }
  .module-start-actions { display: grid; width: 100%; }
  .module-start-actions .button { width: 100%; }
  .offline-page main { padding: 34px 22px; border-radius: 18px; box-shadow: none; }
  .dns-verifications { padding: 0 14px 14px; }
}

@media (max-width: 520px) {
  #event-dialog {
    width: 100%;
    max-width: none;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
  }
  .event-dialog-head { padding: 18px 17px 14px; }
  .event-dialog-head h2 { font-size: 24px; }
  #event-dialog-content { padding: 18px 17px max(26px, env(safe-area-inset-bottom)); }
  .event-detail-summary { padding: 19px; border-radius: 16px; box-shadow: none; }
  .event-human-summary h2 { font-size: 25px; }
  .event-impact { font-size: 14px; }
  .event-series-summary { display: grid; width: 100%; box-sizing: border-box; gap: 4px; }
  .event-decision-panel, .event-agent-section { padding: 18px; }
  .event-next-grid { grid-template-columns: 1fr; }
  .event-primary-actions { display: grid; }
  .event-primary-actions .button { width: 100%; }
  .event-action-note { font-size: 12px; }
  .event-meta { grid-template-columns: 1fr; gap: 14px; }
  .event-meta div, .event-meta div:nth-child(3n + 1) { padding: 0 0 14px; border: 0; border-bottom: 1px solid var(--line); }
  .event-meta div:last-child { padding-bottom: 0; border-bottom: 0; }
  .event-action-list { grid-template-columns: 1fr; }
  .event-review-summary { align-items: flex-start; }
  .event-review-body dl div { grid-template-columns: 1fr; gap: 4px; }
  .event-review-answer-form { grid-template-columns: 1fr; }
  .event-review-answer-form label { grid-column: auto; }
  .event-review-answer-form .button { width: 100%; }

  .action-dialog {
    width: 100%;
    max-width: none;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
  }
  .action-dialog-card { padding: 22px 18px max(22px, env(safe-area-inset-bottom)); }
  .action-dialog-head h2 { font-size: 26px; }
  .action-dialog-description { font-size: 14px; }
  .action-dialog-actions { display: grid; }
  .action-dialog-actions .button { width: 100%; }
  .action-dialog-actions .secondary { order: 2; }

  #run-dialog {
    width: 100%;
    max-width: none;
    max-height: 88vh;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
  }
  .run-dialog-head { padding: 18px 17px 14px; }
  .run-dialog-head h2 { font-size: 24px; }
  #run-dialog-content { padding: 18px 17px max(24px, env(safe-area-inset-bottom)); }
  .run-summary { grid-template-columns: 1fr; }
  .run-summary .wide { grid-column: auto; }
}

@media (max-width: 370px) {
  .mobile-appbar { grid-template-columns: minmax(0,1fr) auto; }
  .mobile-system { display: none; }
  .mobile-page-heading h1 { font-size: 34px; }
  .calm-state { grid-template-columns: 48px minmax(0,1fr); padding-inline: 15px; }
  .attention-link { grid-template-columns: 48px minmax(0,1fr) auto; }
  .calm-icon { width: 48px; height: 48px; font-size: 24px; }
  .next-run { padding-inline: 15px; }
  .next-run-body { grid-template-columns: 44px minmax(0,1fr) auto; }
  .icon-disc { width: 44px; height: 44px; font-size: 22px; }
  .next-run-footer { margin-left: 57px; }
  .signal-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .signal-strip div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .signal-strip div:nth-child(4) { border-top: 1px solid var(--line); }
}

.operator-subscription-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.operator-subscription {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(170px, 1fr) auto;
  padding: 14px;
}

.operator-subscription strong,
.operator-subscription span {
  display: block;
}

.operator-subscription > div:first-child span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.operator-subscription-state {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.operator-subscription-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  grid-column: 1 / -1;
}

.operator-subscription-actions .button {
  min-height: 40px;
}

@media (max-width: 680px) {
  .operator-subscription {
    grid-template-columns: 1fr;
  }

  .operator-subscription-state {
    justify-content: flex-start;
  }

  .operator-subscription-actions .button {
    flex: 1 1 150px;
  }
}

.analytics-consent-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  box-sizing: border-box;
  flex: 1 0 100%;
  width: min(760px, 100%);
  margin: 16px auto 0;
  padding: 18px;
  color: #173e30;
  background: #f7faf8;
  border: 1px solid rgba(13, 59, 42, .18);
  border-radius: 14px;
}

.analytics-consent-panel:focus {
  outline: none;
}

.analytics-consent-panel strong {
  display: block;
  margin-bottom: 5px;
  font-size: .95rem;
}

.analytics-consent-panel p {
  max-width: 58ch;
  margin: 0;
  font-size: .875rem;
  line-height: 1.55;
}

.analytics-consent-panel a {
  display: inline-block;
  min-height: 44px;
  margin-block: -12px;
  padding-block: 12px;
  color: #0b6746;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analytics-consent-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 10px;
}

.analytics-consent-actions button {
  min-height: 44px;
  padding: 10px 18px;
  font: inherit;
  font-size: .875rem;
  font-weight: 700;
  border: 1px solid #0d3b2a;
  border-radius: 999px;
  cursor: pointer;
}

.analytics-settings-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 4px;
  color: #0d3b2a;
  background: transparent;
  font: inherit;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.analytics-settings-control {
  display: contents;
}

.analytics-reject {
  color: #0d3b2a;
  background: #fff;
}

.analytics-accept {
  color: #fff;
  background: #0d3b2a;
}

.analytics-consent-actions button:focus-visible,
.analytics-settings-link:focus-visible {
  outline: 3px solid #0d3b2a;
  outline-offset: 3px;
}

#settings-privacy .analytics-consent-panel {
  max-width: none;
}

@media (max-width: 640px) {
  .analytics-consent-panel {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .analytics-consent-actions {
    grid-template-columns: 1fr;
  }
}

.auth-legal {
  align-items: center;
  align-self: center;
  background: rgba(255, 255, 255, .76);
  border: 1px solid rgba(13, 59, 42, .12);
  border-radius: 999px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: center;
  margin: 0 16px max(16px, env(safe-area-inset-bottom));
  padding: 9px 16px;
}

.auth-legal a {
  color: var(--forest-900);
  font-size: .78rem;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-body {
  background: #f4f1ea;
  color: #14231c;
  font-family: "Manrope Variable", sans-serif;
  margin: 0;
  min-height: 100vh;
}

.legal-header {
  align-items: center;
  background: #0d3b2a;
  display: flex;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 72px);
}

.legal-brand {
  color: #fff;
  margin: 0;
  text-decoration: none;
}

.legal-brand small {
  color: #b7c9bf;
}

.legal-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: flex-end;
}

.legal-header nav a {
  align-items: center;
  color: rgba(255, 255, 255, .86);
  display: inline-flex;
  font-size: .86rem;
  min-height: 44px;
  padding: 14px 4px;
}

.legal-shell {
  background: #fff;
  border: 1px solid rgba(13, 59, 42, .1);
  border-radius: 24px;
  box-shadow: 0 18px 55px rgba(24, 45, 36, .08);
  margin: clamp(24px, 5vw, 64px) auto;
  max-width: 860px;
  padding: clamp(28px, 6vw, 72px);
  width: calc(100% - 32px);
}

.legal-shell h1 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(2.25rem, 5vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: .98;
  margin: 10px 0 14px;
}

.legal-updated {
  color: #596861;
  font-size: .84rem;
  margin-bottom: 42px;
}

.legal-lead {
  color: #314a3f;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.legal-shell section {
  border-top: 1px solid #e5e8e5;
  margin-top: 34px;
  padding-top: 28px;
}

.legal-shell h2 {
  font-size: 1.24rem;
  letter-spacing: -.015em;
  margin: 0 0 14px;
}

.legal-shell p,
.legal-shell li {
  line-height: 1.72;
}

.legal-shell li + li {
  margin-top: 8px;
}

.legal-shell a {
  color: #0b6746;
}

.legal-shell code {
  background: #edf4ef;
  border-radius: 5px;
  overflow-wrap: anywhere;
  padding: 2px 5px;
}

.legal-shell table {
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  width: 100%;
}

.legal-shell th,
.legal-shell td {
  border-bottom: 1px solid #e5e8e5;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.legal-shell th {
  color: #506159;
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.legal-footer {
  align-items: center;
  color: #596861;
  display: flex;
  flex-wrap: wrap;
  font-size: .8rem;
  gap: 12px 24px;
  justify-content: center;
  padding: 0 20px 40px;
}

.legal-footer a {
  align-items: center;
  color: #0b6746;
  display: inline-flex;
  min-height: 44px;
  padding: 14px 4px;
}

.finance-section progress {
  accent-color: var(--forest-700);
  display: block;
  height: 14px;
  margin: 10px 0 20px;
  width: 100%;
}

.finding-row details {
  margin-top: 10px;
}

.finding-row details summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  padding-block: 11px;
}

.finding-row details li + li {
  margin-top: 6px;
}

@media (max-width: 680px) {
  .legal-header {
    align-items: flex-start;
    gap: 18px;
  }

  .legal-header nav {
    flex-direction: column;
    gap: 8px;
  }

  .legal-shell {
    border-radius: 18px;
    margin-block: 16px 28px;
    padding: 28px 22px 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Simplified owner experience: Today, Ask, Decisions. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.owner-menu { position: relative; }
.owner-menu > summary { cursor: pointer; list-style: none; }
.owner-menu > summary::-webkit-details-marker { display: none; }
.owner-menu-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: min(290px, calc(100vw - 28px));
  max-height: min(72vh, 640px);
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(8,45,32,.18);
  color: var(--ink);
}
.owner-menu-panel > strong { padding: 9px 11px 11px; font-size: 12px; }
.owner-menu-panel > a,
.owner-menu-panel > button,
.owner-menu-advanced > button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  padding: 10px 11px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
}
.owner-menu-panel > a:hover,
.owner-menu-panel > button:hover,
.owner-menu-advanced > button:hover { background: var(--surface-muted); }
.owner-menu-advanced { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.owner-menu-advanced > summary { min-height: 44px; padding: 12px 11px; color: var(--muted); font-size: 12px; font-weight: 750; }

body.today-view .topbar { position: relative; height: 50px; border-bottom: 0; background: transparent; }
body.today-view .topbar > div:first-child { display: none; }
body.today-view .top-actions { position: absolute; top: 16px; right: 42px; margin-left: auto; }
body.today-view #app { padding-top: 16px; }
.today-briefing { width: min(100%, 980px); margin: 0 auto; }
.today-hero { margin: 4px 0 20px; }
.today-hero h1,
.simple-view-heading h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 66px);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1;
}
.today-hero p,
.simple-view-heading p { margin: 14px 0 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.today-decision {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0 28px;
}
.today-priority-label,
.simple-view-heading > span,
.decision-history > div:first-child > span,
.decision-compact > div > span {
  display: block;
  margin-bottom: 15px;
  color: var(--forest-700);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .15em;
}
.today-decision-heading { display: grid; grid-template-columns: 84px minmax(0,1fr); gap: 24px; align-items: start; }
.today-decision-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #dfede2;
  color: var(--forest-700);
  font-size: 34px;
}
.today-decision h2 { margin: 0; font-family: var(--serif); font-size: clamp(30px, 3.2vw, 44px); font-weight: 400; line-height: 1.08; }
.today-price-change { display: flex; flex-wrap: wrap; gap: 11px 28px; margin: 16px 0 10px; }
.today-price-change p { margin: 0; color: var(--muted); font-size: 14px; }
.today-price-change span { display: block; margin-bottom: 2px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.today-price-change strong { color: var(--forest-700); font-size: 19px; }
.today-recommendation { margin: 13px 0 0; color: #36463f; font-size: 15px; line-height: 1.6; }
.today-decision-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin: 30px 0 18px 108px; }
.today-decision-date { display: flex; align-items: center; gap: 7px; margin: 14px 0 0 108px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.today-decision-date .ph { color: var(--forest-700); font-size: 16px; }
.today-decision-facts > div { min-width: 0; padding: 0 18px; border-left: 1px solid var(--line); }
.today-decision-facts > div:first-child { padding-left: 0; border-left: 0; }
.today-decision-facts dt { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.today-decision-facts dt .ph { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: var(--green-100); color: var(--forest-700); font-size: 17px; }
.today-decision-facts dd { margin: 8px 0 0 43px; color: var(--ink); font-size: 15px; line-height: 1.55; }
.today-decision-scope { display: flex; align-items: flex-start; gap: 7px; margin: 0 0 20px 108px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.today-decision-scope .ph { flex: 0 0 auto; color: var(--forest-700); font-size: 15px; }
.today-decision-scope strong { color: var(--ink); }
.today-decision-version { margin: -11px 0 20px 108px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.today-decision-version strong { color: var(--ink); }
.today-decision-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-left: 108px; }
.today-decision-primary { min-width: 360px; min-height: 60px; padding: 16px 22px; font-size: 13px; }
.today-other-decision { position: relative; }
.today-other-decision > summary,
.today-decision-details > summary {
  cursor: pointer;
  min-height: 44px;
  padding: 12px 4px;
  color: var(--forest-700);
  font-size: 14px;
  font-weight: 750;
}
.today-other-decision > summary {
  min-width: 250px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding-inline: 18px;
  color: var(--ink);
  text-align: center;
}
.today-other-decision[open] { flex-basis: 100%; }
.today-other-decision > div { display: grid; gap: 9px; max-width: 620px; padding-top: 8px; }
.today-other-decision textarea { min-height: 92px; }
.today-other-decision > div > div { display: flex; gap: 9px; flex-wrap: wrap; }
.field-error { min-height: 1.4em; margin: 0; color: var(--red); font-size: 11px; }
.approval-feedback:empty { display: none; }
.today-stay-note { display: flex; align-items: center; gap: 7px; margin: 11px 0 0 108px; color: var(--muted); font-size: 14px; }
.today-stay-note .ph { color: var(--forest-700); font-size: 15px; }
.today-decision-details { margin: 13px 0 0 108px; }
.today-decision-details dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 25px; margin: 10px 0; padding: 18px; border-radius: 12px; background: var(--surface-muted); }
.today-decision-details dt { color: var(--muted); font-size: 12px; }
.today-decision-details dd { margin: 4px 0 0; font-size: 14px; line-height: 1.55; }
.today-decision-authority { margin: 20px 0 0 108px; padding: 13px 15px; border-left: 3px solid var(--amber); background: var(--amber-soft); font-size: 14px; }
.today-decision-result,
.today-calm {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px 18px;
  border: 1px solid #b8d6c3;
  border-radius: 14px;
  background: #e7f3eb;
  color: #1d5738;
}
.today-decision-result > .ph,
.today-calm > .ph { font-size: 26px; }
.today-decision-result p,
.today-calm p { margin: 3px 0 0; color: #365d49; font-size: 15px; }
.today-calm { margin-bottom: 34px; padding-block: 24px; }
.today-calm h2 { margin: 0; font-size: 21px; }
.today-secondary-list { margin-top: 24px; }
.today-secondary { border-bottom: 1px solid var(--line); }
.today-secondary:first-child { border-top: 1px solid var(--line); }
.today-secondary > summary {
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) auto 18px;
  gap: 14px;
  align-items: center;
  min-height: 80px;
  padding: 12px 2px;
  cursor: pointer;
  list-style: none;
}
.today-secondary > summary::-webkit-details-marker { display: none; }
.today-secondary-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--green-100); color: var(--forest-700); font-size: 21px; }
.today-secondary-icon.warning { background: var(--amber-soft); color: var(--amber); }
.today-secondary summary strong,
.today-secondary summary small { display: block; }
.today-secondary summary strong { font-family: var(--serif); font-size: 17px; font-weight: 400; }
.today-secondary summary small { margin-top: 4px; color: var(--muted); font-size: 13px; }
.today-secondary summary em { color: var(--forest-700); font-size: 13px; font-style: normal; font-weight: 800; }
.today-secondary[open] > summary > .ph { transform: rotate(90deg); }
.today-secondary-body { display: grid; gap: 10px; margin-left: 60px; padding: 0 0 20px; }
.today-secondary-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.today-secondary-body .button { justify-self: start; }
.today-ask {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 36px;
  padding: 7px 8px 7px 17px;
  border: 1px solid #cfd7d1;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(20,43,32,.05);
}
.today-ask > .ph { color: var(--forest-700); font-size: 20px; }
.today-ask input { min-width: 0; min-height: 46px; border: 0; background: transparent; font-size: 15px; }
.today-ask input:focus { outline: 0; }
.today-ask button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; border: 0; border-radius: 10px; padding: 10px 16px; background: var(--forest-900); color: white; font: inherit; font-size: 14px; font-weight: 800; }
.today-system-status { display: flex; justify-content: center; align-items: center; gap: 9px; margin: 17px 0 0; color: var(--muted); font-size: 12px; }
.today-system-status .pulse-dot { width: 7px; height: 7px; flex-basis: 7px; box-shadow: none; }

.decisions-simple { width: min(100%, 930px); margin: 0 auto; }
.simple-view-heading { margin-bottom: 42px; }
.simple-view-heading h1 { font-size: clamp(40px, 4vw, 58px); }
.decisions-active > h2,
.decision-history h2 { margin: 0 0 16px; font-size: 20px; }
.decisions-active { display: grid; gap: 16px; margin-bottom: 46px; }
.decision-selection { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; padding: 14px 0; border-block: 1px solid var(--line); color: var(--ink); font-size: 14px; }
.decision-selection label, .decision-checkbox { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.decision-selection input, .decision-checkbox input { width: 18px; height: 18px; accent-color: var(--forest-700); }
.decision-selection p { flex-basis: 100%; margin: -3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.decision-selectable { position: relative; }
.decision-checkbox { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.decisions-active .today-decision { margin-top: -10px; }
.decision-compact { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.decision-compact h2 { margin: 0; font-size: 17px; }
.decision-compact p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.decision-compact > div > span { margin-bottom: 7px; }
.decision-history { outline: 0; }
.decision-history-item { border-top: 1px solid var(--line); }
.decision-history-item:last-of-type { border-bottom: 1px solid var(--line); }
.decision-history-item > summary { display: flex; justify-content: space-between; gap: 18px; align-items: center; min-height: 72px; padding: 13px 2px; cursor: pointer; }
.decision-history-item summary strong,
.decision-history-item summary small { display: block; }
.decision-history-item summary small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.decision-history-item > div { padding: 0 2px 20px; }
.decision-history-item dl { display: grid; gap: 8px; margin: 0; }
.decision-history-item dl div { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 12px; }
.decision-history-item dt { color: var(--muted); font-size: 11px; }
.decision-history-item dd { margin: 0; font-size: 12px; }
.decision-history-empty { padding: 28px 0; border-block: 1px solid var(--line); }
.decision-history-empty p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }

body.chat-view .chat-screen { grid-template-columns: minmax(0,1fr); }
body.chat-view .chat-pane { display: none; }
body.chat-view .chat-pane[open] {
  position: fixed;
  z-index: 90;
  inset: 50% auto auto 50%;
  display: block;
  width: min(420px, calc(100vw - 32px));
  max-width: none;
  max-height: min(78vh, 720px);
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(3,24,16,.28);
}
body.chat-view .chat-pane::backdrop { background: rgba(8,24,17,.42); }
body.chat-view .chat-thread-panel,
body.chat-view .chat-inspector { max-height: min(78vh, 720px); }
body.chat-view .chat-pane-close,
body.chat-view .chat-panel-mobile-head { display: flex; }
.chat-toolbar-actions { display: flex; align-items: center; gap: 6px; }
.chat-toolbar-actions > .button { min-height: 38px; padding: 8px 10px; }

@media (max-width: 900px) {
  .today-decision-facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 767px) {
  .mobile-appbar { display: flex; }
  .mobile-tabbar { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .owner-menu-mobile .owner-menu-panel { position: fixed; top: 66px; right: 12px; }
  .owner-menu-mobile > .owner { border: 1px solid rgba(255,255,255,.28); background: transparent; }
  body.today-view .mobile-page-heading { display: none; }
  body.today-view #app { padding-top: 23px; }
  #app { padding-inline: 18px; }
  .today-hero { margin: 0 0 14px; }
  .today-hero h1 { font-size: clamp(34px, 9.8vw, 42px); line-height: 1; }
  .today-hero p { margin-top: 12px; font-size: 14px; }
  .today-decision { padding: 12px 0 20px; }
  .today-priority-label { margin-bottom: 10px; }
  .today-decision-heading { grid-template-columns: 46px minmax(0,1fr); gap: 13px; }
  .today-decision-icon { width: 46px; height: 46px; font-size: 22px; }
  .today-decision h2 { font-size: clamp(25px, 7vw, 30px); }
  .today-price-change { display: grid; grid-template-columns: 1fr; gap: 9px; }
  .today-recommendation { font-size: 13px; }
  .today-decision-facts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; margin: 18px 0 19px; }
  .today-decision-facts > div,
  .today-decision-facts > div:nth-child(3) { padding: 10px 0; border-top: 1px solid var(--line); border-left: 0; }
  .today-decision-facts > div:first-child { grid-column: 1 / -1; }
  .today-decision-facts > div:nth-child(2) { padding-right: 12px; border-right: 1px solid var(--line); }
  .today-decision-facts > div:nth-child(3) { padding-left: 12px; }
  .today-decision-facts > div { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 8px; align-items: center; }
  .today-decision-facts dt { display: block; font-size: 0; }
  .today-decision-facts dt .ph { width: 38px; height: 38px; font-size: 18px; }
  .today-decision-facts dd { margin: 0; }
  .today-decision-scope { margin: 0 0 16px; }
  .today-decision-date { margin-left: 0; }
  .today-decision-version { margin: -8px 0 14px; }
  .today-decision-actions { display: grid; margin-left: 0; }
  .today-decision-primary { width: 100%; min-width: 0; min-height: 54px; }
  .today-other-decision { width: 100%; }
  .today-other-decision > summary { min-width: 0; border: 0; color: var(--forest-700); }
  .today-stay-note,
  .today-decision-details,
  .today-decision-authority { margin-left: 0; }
  .today-decision-details dl { grid-template-columns: 1fr; }
  .today-secondary > summary { grid-template-columns: 42px minmax(0,1fr) 16px; gap: 11px; }
  .today-secondary summary em { display: none; }
  .today-secondary-icon { width: 42px; height: 42px; }
  .today-secondary-body { margin-left: 0; }
  .today-ask { grid-template-columns: 20px minmax(0,1fr) 44px; margin-top: 28px; padding: 9px 10px 9px 13px; }
  .today-ask button { display: inline-flex; justify-content: center; width: 44px; padding: 0; font-size: 0; }
  .today-ask button .ph { font-size: 18px; }
  .simple-view-heading { margin: 4px 0 32px; }
  .simple-view-heading h1 { font-size: 40px; }
  .decision-compact { align-items: flex-start; flex-direction: column; }
  .decision-history-item dl div { grid-template-columns: 1fr; gap: 3px; }
  body.chat-view .chat-pane[open] {
    inset: auto 0 0;
    width: 100%;
    max-height: min(82dvh,720px);
    transform: none;
    border-radius: 24px 24px 0 0;
  }
  .chat-toolbar-actions > .button { min-width: 44px; padding-inline: 8px; font-size: 10px; }
}

@media (min-width: 380px) and (max-width: 767px) {
  .today-hero h1 { white-space: nowrap; }
}

/* Mobile PWA polish: calm status, thumb-friendly sheets and semantic emphasis. */
:root {
  --surface-raised: #fffefb;
  --focus-ring: rgba(31, 111, 82, .3);
  --mobile-gutter: 18px;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.mobile-system {
  min-width: 0;
  max-width: 132px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: #d5e6dc;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.mobile-system strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-system[data-state="attention"] {
  border-color: rgba(243, 194, 87, .5);
  color: #ffe8ad;
}
.mobile-system[data-state="loading"] { color: #c7d7ce; }
.mobile-system .pulse-dot { width: 7px; height: 7px; flex-basis: 7px; box-shadow: none; }
.mobile-system .pulse-dot[data-state="attention"] { background: #f1bd53; }
.mobile-system .pulse-dot[data-state="loading"] { background: #b8c8bf; }
.mobile-system .pulse-dot[data-state="preview"] { background: #8ed3af; }

.today-decision-scope {
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--green-100);
  color: #3f5f4d;
}
.today-decision-primary {
  transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease;
  box-shadow: 0 8px 18px rgba(8, 45, 32, .12);
}
.today-decision-primary:hover { box-shadow: 0 10px 24px rgba(8, 45, 32, .18); }
.today-decision-primary:active { transform: translateY(1px); }

@media (max-width: 767px) {
  .mobile-appbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    min-height: calc(64px + env(safe-area-inset-top));
    padding: max(10px, env(safe-area-inset-top)) var(--mobile-gutter) 10px;
  }
  .mobile-brand { gap: 9px; }
  .mobile-brand strong { font-size: 16px; }
  .mobile-system { justify-self: end; }
  .owner-menu-mobile .owner-menu-panel {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: calc(74px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    max-height: min(70dvh, 560px);
    padding: 12px;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(8, 45, 32, .26);
    animation: mobile-sheet-in .18s ease-out both;
  }
  .owner-menu-panel > strong { padding: 9px 12px 12px; font-size: 13px; }
  .owner-menu-panel > a,
  .owner-menu-panel > button,
  .owner-menu-advanced > button { min-height: 48px; border-radius: 12px; padding-inline: 12px; font-size: 14px; }
  .owner-menu-advanced > summary { min-height: 48px; padding: 13px 12px; font-size: 13px; }
  .today-decision-scope { margin-right: 0; margin-left: 0; }
  .today-ask { box-shadow: 0 10px 26px rgba(20,43,32,.08); }
  .mobile-tabbar {
    min-height: calc(74px + env(safe-area-inset-bottom));
    padding: 7px 10px max(8px, env(safe-area-inset-bottom));
    box-shadow: 0 -10px 32px rgba(20,43,32,.1);
  }
  .mobile-tab { min-height: 56px; border-radius: 16px; }
  .mobile-tab .ph { font-size: 24px; }
  .mobile-tab.active { box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
}

@keyframes mobile-sheet-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .owner-menu-mobile .owner-menu-panel { animation: none; }
  .today-decision-primary { transition: none; }
}

/* Account is an authenticated surface, so it keeps the same primary mobile wayfinding. */
@media (max-width: 767px) {
  body.account-body {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  body.account-body .auth-mobile-tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: calc(74px + env(safe-area-inset-bottom));
    padding: 7px 10px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -10px 32px rgba(20,43,32,.1);
  }

  body.account-body .auth-mobile-tabbar .mobile-tab {
    text-decoration: none;
  }
}

/* Mobile content contract: every section reads top-to-bottom before its cards. */
@media (max-width: 767px) {
  .section-title,
  .finance-section > .section-title,
  .concurrency-panel > .section-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 8px;
  }

  .section-title > div,
  .section-title > p {
    min-width: 0;
  }

  .section-title > p {
    max-width: none;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
  }

  .section-title > .button,
  .section-title > .text-button {
    justify-self: start;
    max-width: 100%;
  }

  .gmail-connect-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }

  .gmail-connect-actions .button,
  .gmail-mailbox-actions .button {
    width: 100%;
  }

  .integration-head > div {
    min-width: 0;
  }

  .integration-head h2,
  .integration-head h3,
  .integration-head p {
    overflow-wrap: anywhere;
  }

  .member-access-form,
  .member-plugin-access,
  .member-plugin-grid label {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .member-access-form {
    grid-template-columns: 1fr;
  }

  .member-access-form .button,
  .member-plugin-access-form .button,
  .gmail-grant-form .button {
    width: 100%;
  }

  .member-plugin-grid label {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .tenant-console-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tenant-console-grid > *,
  .tenant-console .integration-card,
  .tenant-console select,
  .tenant-console input {
    min-width: 0;
    max-width: 100%;
  }

  .filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .filter-bar button {
    justify-content: flex-start;
    min-width: 0;
    text-align: left;
  }

  .event-series-summary strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 370px) {
  /* Keep the brand and account control reachable when the viewport is narrow. */
  .mobile-appbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .mobile-system {
    display: flex;
    width: 10px;
    max-width: 10px;
    min-height: 32px;
    padding: 0;
    border: 0;
    gap: 0;
    justify-content: center;
  }

  .mobile-system strong {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (min-width: 371px) and (max-width: 430px) {
  .mobile-appbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .mobile-system {
    max-width: 96px;
    padding-inline: 7px;
    font-size: 9px;
  }

  .signal-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .today-hero h1 {
    white-space: normal;
    text-wrap: balance;
  }

  .schedule-line {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .schedule-line-next {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .today-decision-facts {
    grid-template-columns: 1fr;
  }

  .today-decision-facts > div,
  .today-decision-facts > div:nth-child(2),
  .today-decision-facts > div:nth-child(3) {
    padding: 10px 0;
    border-right: 0;
  }

  .today-decision-facts > div:first-child {
    grid-column: auto;
  }
}
