/* hipaaform.ai — application styles (loaded after base.css) */
/* notices, badges */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; font-size: 14px; border: 1px solid; margin-bottom: 16px; }
.notice .icon { margin-top: 2px; }
.notice-info { background: var(--primary-50); border-color: var(--primary-100); color: #1E3A8A; }
.notice-ok { background: var(--mint-50); border-color: var(--mint-200); color: var(--ink); }
.notice-error { background: var(--danger-50); border-color: #FECDCA; color: #912018; }
.notice-warn { background: var(--warn-50); border-color: #FEDF89; color: #7A2E0E; }
.notice-block { flex-direction: column; gap: 10px; }
.notice a { color: inherit; text-decoration: underline; }
.copy-row { display: flex; gap: 8px; width: 100%; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600; text-transform: capitalize; white-space: nowrap; vertical-align: 2px; }
.badge-neutral { background: var(--line-2); color: var(--ink-2); }
.badge-ok { background: var(--mint-50); color: var(--ink); }
.badge-warn { background: var(--warn-50); color: var(--warn); }
.badge-info { background: var(--primary-50); color: var(--primary-600); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--muted); }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.status-pill.is-live { background: var(--mint-50); color: var(--ink); }
.status-pill.is-live::before { background: var(--mint); box-shadow: 0 0 0 3px rgba(63, 224, 181, .22); }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }
.source-chip { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--line-2); color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; display: flex; gap: 8px; align-items: center; box-shadow: var(--shadow-lg); z-index: 100; animation: toast-in .25s ease; max-width: calc(100vw - 32px); }
.toast .icon { color: #3FE0B5; }
.toast-error .icon { color: #FDA29B; }
.toast.is-leaving { opacity: 0; transition: opacity .4s; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* shell */
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.has-support-bar .sidebar { top: 40px; height: calc(100vh - 40px); }
.sidebar-logo { padding: 0 8px; display: block; }
.sidebar-tag { margin: 14px 8px 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.sidebar-org { margin: 14px 8px 0; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; flex: 1; min-height: 0; overflow-y: auto; }
.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-heading { padding: 0 10px; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.nav-link { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 9px; color: var(--ink-2); font-weight: 500; font-size: 14px; text-decoration: none !important; }
.nav-link .icon { color: var(--faint); }
.nav-link:hover { background: var(--bg); }
.nav-link.is-active { background: var(--primary-50); color: var(--primary-600); }
.nav-link.is-active .icon { color: var(--primary); }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.thread { display: grid; gap: 12px; }
.msg { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.msg-staff { background: var(--primary-50); border-color: var(--primary-100); }
.msg-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.msg-head strong { color: var(--ink); }
.msg p { margin: 0; }
.sidebar-support { margin-top: 12px; flex: none; }
.sidebar-support.is-active { border-color: var(--primary); color: var(--primary-600); background: var(--primary-50); }
.sidebar-support + .sidebar-foot { margin-top: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-50); color: var(--primary-600); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-meta strong { font-size: 13px; font-weight: 600; }
.user-meta small { font-size: 12px; color: var(--muted); }
.user-meta strong, .user-meta small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { padding: 32px 40px 64px; max-width: 1240px; width: 100%; margin: 0 auto; }
.support-bar { position: sticky; top: 0; z-index: 60; height: 40px; background: #7A2E0E; color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; padding: 0 16px; }
.support-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-sub { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex: none; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.back-link:hover { color: var(--ink); text-decoration: none; }

/* cards + tables */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 20px; overflow: hidden; }
.card-pad { padding: 22px; overflow: visible; }
.card-pad > h2 { margin-bottom: 14px; }
.card-pad.stack > h2 { margin-bottom: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-empty { padding: 22px 20px; color: var(--muted); }
.narrow { max-width: 620px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 20px; background: #FAFBFD; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 20px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.actions { text-align: right; white-space: nowrap; }
.table td.actions form { display: inline-block; margin-left: 4px; }
.table td.wrap { max-width: 320px; }
.table tr:has(.row-link) { cursor: pointer; }
.table tr:has(.row-link):hover td { background: #FAFBFD; }
.row-link { color: var(--ink); }
.row-link:hover { text-decoration: none; }
.dot-col { width: 28px; padding-right: 0 !important; }
.dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.is-unread td { font-weight: 600; }
.is-unread .source-chip { font-weight: 500; }
.chev { width: 36px; color: var(--faint); text-align: right; }
.card:has(.table) { overflow-x: auto; }
.inline-form { display: grid; grid-template-columns: 1fr 1.2fr 130px auto; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); background: #FAFBFD; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.pager span:last-child { display: flex; gap: 8px; }

.empty { text-align: center; padding: 56px 24px; }
.empty-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; margin: 0 auto 14px; }
.empty h3 { font-size: 16px; }
.empty p { color: var(--muted); max-width: 400px; margin: 6px auto 18px; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar-count { flex: 1; }
.search { position: relative; width: 320px; max-width: 100%; }
.search .icon { position: absolute; left: 11px; top: 11px; color: var(--faint); }
.search .input { padding-left: 34px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 2px; }
.stat > span { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat strong { font-size: 28px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat strong.stat-sm { font-size: 20px; line-height: 1.68; }
.stat small { font-size: 12px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bar svg { display: block; width: 100%; height: 100%; }
.bar rect { fill: var(--primary); }
.bar rect.is-zero { fill: var(--line); }
.bar:hover rect { fill: var(--primary-600); }
.bars-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv-stack { grid-template-columns: 1fr; gap: 0; }
.kv-stack dt { font-size: 12px; font-weight: 600; margin-top: 10px; }
.kv-stack dt:first-child { margin-top: 0; }
.kv-stack dd { font-size: 14px; }
.kv-title { margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }

/* menus */
.menu { position: relative; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover, .menu[open] summary { background: var(--line-2); color: var(--ink); }
.menu-list { position: absolute; right: 0; bottom: calc(100% + 6px); min-width: 190px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 20; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink); border-radius: 8px; cursor: pointer; text-decoration: none; text-align: left; }
.menu-list a:hover, .menu-list button:hover { background: var(--bg); }
.menu-list .danger { color: var(--danger); }
.menu-list button:disabled { opacity: .45; pointer-events: none; }

/* forms list */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: box-shadow .18s, border-color .18s, transform .18s; }
.form-card:hover { box-shadow: var(--shadow); border-color: #CFD8E6; transform: translateY(-1px); }
.form-card-main { padding: 18px 18px 14px; color: inherit; text-decoration: none !important; display: block; flex: 1; }
.form-card-top { display: flex; justify-content: space-between; margin-bottom: 12px; }
.form-card h3 { font-size: 16px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 0; }
.form-card-stats dt { font-size: 12px; color: var(--muted); font-weight: 500; }
.form-card-stats dd { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.form-card-actions { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-top: 1px solid var(--line-2); }
.form-card-actions > a { display: inline-flex; gap: 6px; align-items: center; padding: 5px 9px; border-radius: 8px; color: var(--ink-2); font-size: 13px; font-weight: 500; text-decoration: none; }
.form-card-actions > a:hover { background: var(--bg); }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.template-card { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm); transition: box-shadow .18s, border-color .18s, transform .18s; }
.template-card:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 91, 234, .12), var(--shadow); transform: translateY(-1px); }
.template-card strong { font-size: 16px; }
.template-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; margin-bottom: 8px; }
.template-go { margin-top: 10px; color: var(--primary); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }

/* auth */
.auth-body { background: radial-gradient(900px 500px at 50% -10%, #E3EBFF 0%, rgba(227, 235, 255, 0) 70%), var(--bg); }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; gap: 20px; }
.auth-card { width: 100%; max-width: 408px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 24px; }
.auth-card > .muted { margin: 6px 0 20px; }
.auth-foot { color: var(--muted); font-size: 14px; }
.auth-secure { color: #5B6B7F; font-size: 12px; display: flex; align-items: center; gap: 6px; text-align: center; }

/* workspace (per-form screens) */
.workspace { background: var(--bg); }
.ws-bar { position: sticky; top: 0; z-index: 50; height: 58px; background: var(--surface); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; padding: 0 14px; gap: 16px; }
.has-support-bar .ws-bar { top: 40px; }
.ws-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ws-name { font: inherit; font-weight: 600; font-size: 15px; border: 1px solid transparent; background: transparent; padding: 6px 8px; border-radius: 8px; color: var(--ink); min-width: 60px; width: 240px; flex: 0 1 auto; text-overflow: ellipsis; }
.ws-name:not([readonly]):hover { border-color: var(--line); }
.ws-name:not([readonly]):focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 91, 234, .16); background: #fff; }
.ws-name[readonly] { cursor: default; outline: 0; }
.save-state { font-size: 12px; color: var(--faint); white-space: nowrap; }
.save-state.is-saved { color: var(--ink); }
.save-state.is-error { color: var(--danger); }
.tabs { display: flex; gap: 2px; background: var(--bg); padding: 4px; border-radius: 12px; }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none !important; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.tab.is-active .icon { color: var(--primary); }
.tab .nav-badge { margin-left: 2px; }
.ws-right { display: flex; justify-content: flex-end; gap: 8px; }
.ws-main { max-width: 920px; margin: 0 auto; padding: 28px 24px 80px; }
.ws-main-wide { max-width: 1180px; }

.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.share-grid .card { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.share-head { display: flex; gap: 14px; align-items: flex-start; }
.share-head > div { flex: 1; min-width: 0; }
.share-head h2 { margin-bottom: 2px; }
.share-icon { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; }
.share-icon.wp { background: #E7F1F7; color: #21759B; }
/* A service's own mark sits on white with a hairline, so its colours read as they do on the service. */
.share-icon.share-brand { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.share-icon.share-brands { width: auto; padding: 0 10px; display: flex; gap: 8px; }
.works-with { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.works-with > span:first-child { margin-right: 2px; }
.works-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font-weight: 600; color: var(--ink-2); }
@media (max-width: 640px) { .share-icon.share-brands { width: 42px; height: auto; padding: 9px 0; flex-direction: column; gap: 7px; } }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 16px; }
.steps li { counter-increment: step; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-left: 34px; position: relative; font-size: 14px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.code-block { position: relative; width: 100%; }
.code { width: 100%; font-family: var(--mono); font-size: 12px; line-height: 1.6; background: #0C1B2A; color: #D7E3F4; border: 0; border-radius: 10px; padding: 12px 14px 46px; resize: none; display: block; white-space: pre-wrap; overflow-wrap: anywhere; field-sizing: content; min-height: 0; }
.code:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.code-block .btn { position: absolute; bottom: 8px; right: 8px; }
details.more summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 13px; }
details.more[open] summary { margin-bottom: 10px; }
details.more .muted { margin-top: 8px; }
.choice-cards { border: 0; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.choice-card { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.choice-card:has(input:checked) { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 1px var(--primary); }
.choice-card input { margin-top: 3px; accent-color: var(--primary); }
.choice-card div { display: flex; flex-direction: column; gap: 3px; }
.share-head + .field, .share-head + .notice { margin-top: 16px; }
.card-pad > .field + .field { margin-top: 14px; }
.card-pad form > p { margin-bottom: 10px; }
.card-pad form > .field { margin-bottom: 10px; }
.sticky-actions { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; }
.sticky-actions .btn { box-shadow: var(--shadow-lg); }

.sub-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.answers { margin: 0; }
.answers > div { padding: 14px 0; border-top: 1px solid var(--line-2); display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px; }
.answers dt { color: var(--muted); font-size: 14px; }
.answers dd { margin: 0; font-size: 14px; font-weight: 500; }
.signature-img { max-width: 320px; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: block; }

/* builder */
.builder-page { overflow: hidden; height: 100vh; }
.builder { display: grid; grid-template-columns: 232px minmax(0, 1fr) 324px; height: calc(100vh - 58px); }
.has-support-bar .builder { height: calc(100vh - 98px); }
.palette, .inspector { background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.palette { border-right: 1px solid var(--line); }
.inspector { border-left: 1px solid var(--line); }
.palette-scroll, .insp-scroll { overflow-y: auto; padding: 16px 14px 24px; flex: 1; }
.palette-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; margin: 16px 6px 8px; }
.palette-title:first-child { margin-top: 2px; }
.palette-list { display: flex; flex-direction: column; gap: 4px; }
.palette-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 1px solid transparent; border-radius: 10px; background: transparent; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: grab; text-align: left; }
.palette-item:hover { background: var(--bg); border-color: var(--line); }
.palette-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex: none; }
.palette-tip { margin: 20px 6px 0; font-size: 12px; color: var(--faint); line-height: 1.9; }
.canvas-wrap { overflow-y: auto; padding: 32px 28px 120px; background-color: var(--bg); background-image: radial-gradient(#DCE2EC 1px, transparent 1px); background-size: 18px 18px; }
.canvas { max-width: 680px; margin: 0 auto; }
.b-card { transition: box-shadow .15s; }
.b-card .hf-header.is-empty { display: none; }
.b-list { min-height: 80px; }
.b-item { position: relative; grid-column: 1 / -1; padding: 10px 12px; margin: -4px -12px; border-radius: 12px; border: 1.500px solid transparent; cursor: pointer; background: transparent; }
.b-item.hf-half { grid-column: span 1; }
.b-item .hf-field { grid-column: auto; margin: 0; }
.b-item:hover { background: rgba(47, 91, 234, .04); border-color: var(--primary-100); }
.b-item.is-selected { border-color: var(--primary); background: rgba(47, 91, 234, .05); box-shadow: 0 0 0 3px rgba(47, 91, 234, .12); }
.b-item:focus-visible { outline: 0; border-color: var(--primary); }
.b-grip { position: absolute; left: -9px; top: 50%; transform: translateY(-50%); width: 18px; height: 28px; border-radius: 6px; background: #fff; border: 1px solid var(--line); color: var(--faint); display: none; place-items: center; cursor: grab; box-shadow: var(--shadow-sm); }
.b-item:hover .b-grip, .b-item.is-selected .b-grip { display: grid; }
.b-tools { position: absolute; right: 8px; top: -14px; display: none; align-items: center; gap: 2px; background: var(--ink); color: #fff; border-radius: 8px; padding: 2px 3px 2px 9px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow); z-index: 3; }
.b-item:hover .b-tools, .b-item.is-selected .b-tools { display: flex; }
.b-item:hover:not(.is-selected) .b-tools { opacity: .85; }
.b-type { margin-right: 4px; white-space: nowrap; }
.b-tool { width: 24px; height: 24px; display: grid; place-items: center; background: transparent; border: 0; color: #C5D0E0; border-radius: 6px; cursor: pointer; }
.b-tool:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.b-tool-danger:hover { background: var(--danger); }
.b-chip { display: inline-flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, .16); border-radius: 5px; padding: 1px 6px; font-size: 11px; white-space: nowrap; }
.b-hidden { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); border: 1px dashed #C5CFDD; border-radius: 10px; padding: 9px 12px; background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(12, 27, 42, .025) 8px 16px); }
.b-hidden strong { color: var(--ink-2); }
.b-hidden .b-chip { background: var(--line-2); color: var(--ink-2); font-family: var(--mono); margin-left: auto; }
.b-empty { grid-column: 1 / -1; border: 1.500px dashed #C5CFDD; border-radius: 14px; padding: 36px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.b-empty strong { color: var(--ink); font-size: 15px; }
.b-empty-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; margin-bottom: 8px; }
.b-card .hf-footer { opacity: .96; }
.b-card .hf-submit { pointer-events: none; }
.drag-ghost { opacity: .35; }
.b-list > .palette-item.drag-ghost, .b-list > .palette-item { grid-column: 1 / -1; opacity: 1; border: 1.500px dashed var(--primary); background: var(--primary-50); color: var(--primary-600); border-radius: 12px; padding: 10px 12px; }
.sortable-fallback { box-shadow: var(--shadow-lg) !important; background: #fff !important; border-radius: 12px; opacity: .95 !important; }
.sortable-fallback .b-tools, .sortable-fallback .b-grip { display: none !important; }

.insp-head { display: flex; align-items: center; gap: 10px; padding: 0 2px 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.insp-head div { display: flex; flex-direction: column; line-height: 1.3; }
.insp-head small { color: var(--muted); font-size: 12px; }
.insp-section { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; margin: 22px 2px 12px; }
.insp-head + .insp-section { margin-top: 4px; }
.insp-scroll > .field, .insp-scroll > .toggle-row, .insp-scroll > .logic { margin-bottom: 14px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; }
.toggle-row > span:first-child { display: flex; flex-direction: column; }
.toggle-row strong { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.toggle-row small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: transparent; height: 30px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented button.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; position: relative; }
.swatch.is-active { box-shadow: 0 0 0 2px var(--ink); }
.swatch-custom { background: conic-gradient(#f43f5e, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #f43f5e); overflow: hidden; }
.color-input { position: absolute; inset: -6px; width: 44px; height: 44px; opacity: 0; cursor: pointer; }
.logic { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #FAFBFD; }
.logic-rule { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.logic-word { font-size: 12px; font-weight: 600; color: var(--muted); }
.insp-actions { display: flex; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.insp-note { display: flex; gap: 8px; margin-top: 22px; padding: 12px; border-radius: 10px; background: var(--mint-50); color: var(--ink); font-size: 12px; line-height: 1.5; }
.insp-note .icon { margin-top: 2px; }

@media (max-width: 1100px) {
  .builder { grid-template-columns: 200px minmax(0, 1fr) 290px; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .ws-name { width: 150px; }
  .ws-bar .save-state { display: none; }
}
/* The menu wrapper only exists for phones; on wider screens its children lay out as before. */
.sidebar-menu { display: contents; }
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  /* Phones: a bar with the logo, the organisation and a menu button; the menu opens below it with full labels. */
  .sidebar { position: sticky; top: 0; z-index: 40; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 12px 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-logo { padding: 0; }
  .sidebar-logo .logo-word { display: none; }
  .sidebar-tag, .sidebar-org { margin: 0; flex: 1; min-width: 0; font-size: 14px; }
  .sidebar-org { color: var(--ink); }
  .menu-toggle { display: inline-grid; margin-left: auto; width: 40px; height: 40px; color: var(--ink); }
  .menu-toggle .icon:last-child, .sidebar.is-open .menu-toggle .icon:first-child { display: none; }
  .sidebar.is-open .menu-toggle .icon:last-child { display: block; }
  .sidebar-menu { display: none; flex: 0 0 100%; flex-direction: column; max-height: calc(100vh - 62px); overflow-y: auto; padding: 8px 0 6px; }
  .sidebar.is-open .sidebar-menu { display: flex; }
  .sidebar.is-open { box-shadow: 0 24px 40px -24px rgba(12, 27, 42, .35); }
  .nav { margin-top: 4px; overflow: visible; flex: none; gap: 14px; }
  .nav-link { height: 42px; font-size: 15px; }
  .sidebar-help { margin: 12px 0 0; }
  .sidebar-support { margin-top: 8px; }
  .sidebar-foot { margin-top: 12px; }
  /* Content never makes the page wider than the screen: wide tables scroll inside their card. */
  .main { min-width: 0; }
  .card { overflow-x: auto; }
  .table th, .table td { padding-left: 14px; padding-right: 14px; }
  .card-head { flex-wrap: wrap; padding: 14px 16px; }
  .card-head > * { min-width: 0; }
  .main { padding: 20px 16px 48px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .grid-2, .share-grid, .inline-form { grid-template-columns: 1fr; }
  .ws-bar { grid-template-columns: 1fr auto; height: auto; padding: 8px 10px; row-gap: 8px; }
  .tabs { grid-row: 2; grid-column: 1 / -1; overflow-x: auto; }
  .ws-name { width: 120px; }
  .builder-page { overflow: auto; height: auto; }
  .builder { grid-template-columns: 1fr; height: auto; }
  .palette-list { flex-direction: row; flex-wrap: wrap; }
  .palette-item { width: auto; }
  .palette-tip { display: none; }
  .canvas-wrap { padding: 20px 14px 40px; }
  .inspector { border-left: 0; border-top: 1px solid var(--line); }
  .answers > div { grid-template-columns: 1fr; gap: 4px; }
  .toolbar { flex-wrap: wrap; }
}
@media print {
  .ws-bar, .toolbar, .support-bar, .sidebar, .toast { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
  .cols { grid-template-columns: minmax(0, 1fr); }
}

/* two-factor authentication */
.otp-input { font-family: var(--mono); font-size: 20px; letter-spacing: .32em; text-align: center; height: 46px; max-width: 220px; }
.auth-card .otp-input { max-width: none; }
.otp-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qr-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr { width: 176px; height: 176px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; flex: none; }
.qr svg { display: block; width: 100%; height: 100%; }
.qr-manual { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.qr-manual code { font-size: 14px; padding: 8px 10px; letter-spacing: .04em; overflow-wrap: anywhere; }
.recovery-codes { font-family: var(--mono); font-size: 15px; line-height: 1.9; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 14px 0 18px; columns: 2; column-gap: 32px; }
.steps li > span { max-width: 100%; }

/* help pages */
.help-body { background: var(--bg); }
.help-nav { display: flex; justify-content: space-between; align-items: center; max-width: 760px; margin: 0 auto; padding: 22px 20px 0; }
.help { max-width: 760px; margin: 0 auto; padding: 32px 20px 72px; font-size: 16px; line-height: 1.6; }
.help h1 { font-size: 32px; letter-spacing: -.03em; margin: 12px 0 10px; }
.help-lede { font-size: 18px; color: var(--ink-2); margin-bottom: 24px; }
.help .card h2 { font-size: 18px; margin-bottom: 14px; }
.help-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.help .steps li { font-size: 16px; }
.help-faq { margin: 0; }
.help-faq dt { font-weight: 600; margin-top: 16px; }
.help-faq dt:first-child { margin-top: 0; }
.help-faq dd { margin: 4px 0 0; color: var(--ink-2); }
.help-faq dd a { text-decoration: underline; }
.help .auth-secure { justify-content: center; margin-top: 8px; }

/* BAA */
.card-body { padding: 20px; }
.agreement-editor { font-family: var(--mono); font-size: 13px; line-height: 1.6; min-height: 420px; }
.placeholders { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.placeholders code { cursor: help; }
.onboard { display: flex; gap: 16px; align-items: center; background: linear-gradient(100deg, var(--primary-50), #fff 70%); border: 1px solid var(--primary-100); border-radius: 14px; padding: 16px 18px; margin-bottom: 20px; }
.onboard > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.onboard-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.doc-card { max-width: 860px; padding: 40px 48px; }
.doc-scroll { max-height: 62vh; overflow-y: auto; }
.agreement { font-family: Georgia, 'Times New Roman', serif; font-size: 16px; line-height: 1.65; color: #111827; }
.agreement h1 { font-family: var(--font); font-size: 24px; text-align: center; margin-bottom: 24px; }
.agreement h2 { font-family: var(--font); font-size: 16px; margin: 26px 0 8px; }
.agreement h3 { font-family: var(--font); font-size: 14px; margin: 18px 0 6px; }
.agreement p { margin: 0 0 12px; }
.agreement ul { margin: 0 0 12px; padding-left: 22px; }
.agreement li { margin-bottom: 6px; }
.sig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 36px; font-family: var(--font); font-size: 14px; break-inside: avoid; }
.sig-party { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sig-name { font-weight: 600; min-height: 22px; }
.sig-line { height: 84px; border-bottom: 1.5px solid #111827; display: flex; align-items: flex-end; margin: 6px 0 10px; }
.sig-line img { max-height: 78px; max-width: 100%; display: block; }
.sig-pending { color: var(--faint); font-size: 12px; padding-bottom: 6px; }
.sig-block dl { display: grid; grid-template-columns: 52px 1fr; gap: 3px 10px; margin: 0; }
.sig-block dt { color: var(--muted); }
.sig-block dd { margin: 0; }
.sig-cert { margin-top: 32px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #FAFBFD; font-family: var(--font); font-size: 12px; break-inside: avoid; }
.sig-cert dl { display: grid; grid-template-columns: 140px 1fr; gap: 3px 12px; margin: 10px 0; }
.sig-cert dt { color: var(--muted); }
.sig-cert dd { margin: 0; min-width: 0; }
.sig-cert p { color: var(--muted); margin: 0; }
.sign-card { max-width: 860px; }
.sign-widget { display: flex; flex-direction: column; gap: 10px; }
.sign-modes { max-width: 220px; }
.sign-typed { border: 1px solid #D5DCE6; border-radius: 10px; background: #FBFCFE; min-height: 150px; display: grid; place-items: center; padding: 8px; }
.sign-typed canvas { max-width: 100%; height: auto; }
.sign-current { display: flex; flex-direction: column; gap: 4px; }
.sign-current img { max-height: 70px; max-width: 100%; align-self: flex-start; border-bottom: 1px solid var(--line); }
.field-error { color: #B42318; font-size: 13px; font-weight: 500; margin: 0; }
.nav-badge:has(+ *), .nav-link .nav-badge { }
/* HIPAA badge */
.auth-wrap .hipaa-badge { color: var(--muted); transform: scale(.86); }
@media (max-width: 860px) { .sig-grid { grid-template-columns: 1fr; } .doc-card { padding: 24px 18px; } .onboard { flex-direction: column; align-items: flex-start; } }
@media print {
  .no-print, .page-head .page-actions, .back-link, .onboard { display: none !important; }
  .shell { display: block; } .main { padding: 0; max-width: none; }
  .doc-card { border: 0; box-shadow: none; padding: 0; max-width: none; max-height: none; overflow: visible; }
}
.sign-typed[hidden], .hf-sig[hidden] { display: none; }

/* agreement typography */
.doc-card { max-width: 820px; padding: 48px 56px; margin-left: auto; margin-right: auto; }
.doc-scroll { max-height: none; overflow: visible; }
.agreement { font-family: Georgia, 'Times New Roman', serif; font-size: 16px; line-height: 1.7; color: #111827; }
.agreement h1 { font-family: var(--font); font-size: 24px; text-align: center; margin: 0 0 28px; letter-spacing: .01em; text-transform: uppercase; }
.agreement h2 { font-family: var(--font); font-size: 15px; margin: 30px 0 12px; text-transform: uppercase; letter-spacing: .03em; }
.agreement p { margin: 0 0 14px; text-align: left; }
.agreement .clause { padding-left: 3.4em; position: relative; }
.agreement .clause-n { position: absolute; left: 0; font-family: var(--font); font-weight: 600; font-size: 14px; top: .15em; }
.agreement .clause-3 { margin-left: 3.4em; padding-left: 4em; }
.agreement .clause-4 { margin-left: 7.4em; padding-left: 4.6em; }
.legal-name { background: #FFF7D6; border-radius: 3px; padding: 0 2px; }
.sig-grid { align-items: start; }
.sig-live { background: var(--primary-50); border: 1.5px solid var(--primary); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 90px; }
.sig-live .sig-party { display: flex; align-items: center; gap: 8px; color: var(--primary-600); }
.sig-live .input { background: #fff; }
.sig-live dl { grid-template-columns: 44px 1fr; }
.sig-live .sign-typed, .sig-live .hf-sig { background: #fff; }
.sign-typed { min-height: 120px; }
.sign-modes { max-width: 260px; }
.sign-consent { margin-top: 28px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #FAFBFD; font-size: 15px; }
.sign-consent input { width: 18px; height: 18px; }
.sign-intro { display: flex; align-items: center; gap: 16px; max-width: 820px; margin: 0 auto 16px; }
.sign-steps { list-style: none; display: flex; gap: 22px; padding: 0; margin: 0; flex: 1; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.sign-steps li { display: flex; align-items: center; gap: 8px; }
.sign-steps b { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; display: grid; place-items: center; flex: none; }
.sign-bar { position: sticky; bottom: 0; z-index: 20; max-width: 820px; margin: 0 auto; display: flex; align-items: center; gap: 16px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; padding: 12px 16px; box-shadow: 0 -8px 28px -14px rgba(12, 27, 42, .28); }
.sign-checks { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; flex-wrap: wrap; flex: 1; }
.sign-checks li { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--line-2); border-radius: 99px; padding: 4px 10px 4px 8px; }
.sign-checks li .icon { opacity: .3; }
.sign-checks li.is-done { background: var(--mint-50); color: var(--ink); }
.sign-checks li.is-done .icon { opacity: 1; }
.sign-bar:not(.is-ready) .btn-primary { opacity: .55; }
.app-baa .notice, .main > .notice { max-width: 820px; margin-left: auto; margin-right: auto; }
@media (max-width: 860px) { .doc-card { padding: 24px 18px; } .agreement .clause { padding-left: 2.8em; } .agreement .clause-3 { margin-left: 1.2em; } .sign-as, .sign-intro .btn { display: none; } .sign-bar { flex-wrap: wrap; } }
@media print { .sign-bar, .sign-intro { display: none !important; } .legal-name { background: none; } }
/* Printed agreement: portrait by default, numbered pages. Scoped with a named page so other printouts keep their own layout. */
@page agreement {
  size: portrait;
  margin: 20mm 18mm 22mm;
  @bottom-center { content: "Page " counter(page) " of " counter(pages); font-family: Helvetica, Arial, sans-serif; font-size: 9pt; color: #55657A; }
}
@media print {
  .main:has(.agreement) { page: agreement; }
  .agreement { font-size: 11pt; line-height: 1.55; }
  .agreement h2 { break-after: avoid; }
  .agreement .clause { orphans: 3; widows: 3; }
  .sig-grid, .sig-block, .sig-cert { break-inside: avoid; }
}

/* third-party integration acknowledgment */
.ack { margin-top: 14px; }
.ack-ask { border: 1px solid #FEDF89; background: var(--warn-50); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; color: #7A2E0E; }
.ack-ask[hidden] { display: none; }
.ack-ask > strong { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.ack-ask .check { font-size: 14px; line-height: 1.55; color: var(--ink); }
.ack-record { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink); background: var(--mint-50); border: 1px solid var(--mint-200); border-radius: 10px; padding: 10px 12px; }
.ack-record .icon { margin-top: 2px; }
.choice-card .ack { cursor: default; }
.ack-record[hidden] { display: none; }
.choice-cards:not(:has(input[value=answers]:checked)) + .ack { display: none; }
/* The confirmation only appears once the integration it belongs to is switched on. */
.card:not(:has([name=webhook_enabled]:checked)) .ack-webhook,
.card:not(:has([name=chat_enabled]:checked)) .ack-chat,
.card:not(:has([name=notify_enabled]:checked)) .ack-email_answers { display: none; }

/* typed-confirmation dialog */
.modal { border: 0; border-radius: 16px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); color: var(--ink); }
.modal::backdrop { background: rgba(12, 27, 42, .45); backdrop-filter: blur(2px); }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-body h2 { font-size: 18px; }
.modal-body .btn-danger:disabled { opacity: .4; }
.modal .field > span { display: block; }

/* Billing */
.stats-3 { grid-template-columns: repeat(3, 1fr); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan.is-current { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.plan-price { font-size: 20px; font-weight: 600; letter-spacing: -.02em; min-height: 30px; flex: 1; }
@media (max-width: 800px) { .plans { grid-template-columns: 1fr; } }

/* Business details on the BAA */
.org-box { background: var(--primary-50); border: 1.5px solid var(--primary); border-radius: 14px; padding: 20px; margin-bottom: 36px; display: flex; flex-direction: column; gap: 14px; font-family: var(--font); }
.org-box h2 { margin: 0; }
.org-box > p { margin: -8px 0 0; }
.org-box .input { background: #fff; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.sig-detail { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.biz-list { display: grid; grid-template-columns: 96px 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.biz-list dt { color: var(--muted); }
.biz-list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-3 > :first-child { grid-column: 1 / -1; } }

/* Customer page sections (superadmin) */
.subtabs { display: flex; gap: 4px; padding: 5px; margin: 0 0 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); overflow-x: auto; scrollbar-width: none; }
.subtab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none !important; transition: background .12s, color .12s; }
.subtab .icon { color: var(--faint); }
.subtab:hover { color: var(--ink); background: var(--bg); }
.subtab:hover .icon { color: var(--ink-2); }
.subtab.is-active { color: #fff; background: var(--primary); box-shadow: 0 1px 2px rgba(47, 91, 234, .35), 0 4px 12px rgba(47, 91, 234, .22); }
.subtab.is-active .icon { color: #fff; }
.subtab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.subtab-dot { width: 8px; height: 8px; border-radius: 50%; background: #F79009; box-shadow: 0 0 0 3px rgba(247, 144, 9, .18); }
.subtab.is-active .subtab-dot { background: #FFD08A; box-shadow: none; }
.form-actions .form-hint { margin-right: auto; text-align: left; }
.card-danger { border-color: #FECDCA; }
.card-danger h2 { color: #B42318; }
.col-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.col-side > .card { margin: 0; }
td.actions { white-space: nowrap; }

/* Bulk selection */
.table .check-col { width: 36px; padding-right: 0; }
.table .check-col input { width: 16px; height: 16px; accent-color: var(--primary); }
/* Support access confirmation */
.card .ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.card .ticks li { display: flex; gap: 9px; align-items: flex-start; }
.card .ticks .icon { color: var(--primary); margin-top: 2px; flex: none; }

/* Builder: validation, scores and multi-rule logic */
.insp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.insp-pair .field { margin: 0; }
.check-list { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; max-height: 220px; overflow: auto; }
.check-list .check { font-size: 14px; }
.logic > .segmented { margin-top: 12px; }
.logic > .btn { margin-top: 12px; }
.logic-rule { position: relative; padding-top: 2px; }
.logic-rule + .logic-rule { border-top: 1px dashed var(--line); padding-top: 12px; }
.logic-remove { position: absolute; right: 0; top: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 6px; }
.logic-remove:hover { color: var(--danger); background: var(--danger-50); }
.b-item .hf-calc-private .hf-calc { border: 1px dashed #C5CFDD; background: transparent; }

/* Answers with structure */
.answer-table { border-collapse: collapse; font-size: 14px; width: 100%; }
.answer-table td { padding: 5px 12px 5px 0; vertical-align: top; border-bottom: 1px solid var(--line-2); }
.answer-table tr:last-child td { border-bottom: 0; }
.answer-table td:first-child { color: var(--muted); width: 42%; }
.file-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.file-list li { display: flex; gap: 14px; align-items: center; }
.file-list li + li { padding-top: 8px; border-top: 1px solid var(--line-2); }
.file-thumb { flex: none; display: block; width: 120px; height: 90px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-meta { display: grid; gap: 4px; min-width: 0; }
.file-name { font-weight: 600; overflow-wrap: anywhere; }
.file-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.file-list a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.score-pill { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.score-pill small { font-weight: 500; font-size: 12px; color: var(--muted); }

/* Filter chips */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13px; font-weight: 500; text-decoration: none; }
.chip:hover { border-color: #B8C2D0; color: var(--ink); }
.chip.is-active { background: var(--primary-50); border-color: var(--primary); color: var(--primary-600); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.tags li { background: var(--primary-50); color: var(--primary-600); padding: 2px 9px; border-radius: 6px; font-size: 13px; }
/* Submission notes */
.nowrap { white-space: nowrap; }
.notes { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; gap: 12px; }
.notes li { padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 14px; }
.notes p { margin: 4px 0 0; }
.note-meta { display: flex; gap: 8px; align-items: baseline; color: var(--muted); font-size: 12px; }
.note-meta strong { color: var(--ink); font-size: 13px; }
.note-meta form { margin-left: auto; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; text-decoration: underline; }
.link-btn:hover { color: var(--danger); }
.sub-head h2 .badge { vertical-align: 2px; margin-left: 6px; }
@media print { .no-print { display: none !important; } }

/* Insights */
.section-title { font-size: 16px; margin: 12px 0 0; }
.chart { display: block; width: 100%; height: auto; margin-top: 8px; }
.chart-grid { stroke: var(--line-2); stroke-width: 1; }
.chart-tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-end { fill: var(--ink-2); font-size: 12px; font-weight: 600; }
.chart-hit { fill: transparent; }
.chart-hit:hover { fill: rgba(12, 27, 42, .05); }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.legend { list-style: none; display: flex; gap: 16px; padding: 0; margin: 0; font-size: 13px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend svg { width: 10px; height: 10px; flex: none; }
.insight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 20px 0; }
.insight-grid > .card { margin: 0; }
.rank { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.rank li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.rank-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-track { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.rank-track svg { display: block; width: 100%; height: 100%; }
.rank-track rect { fill: var(--primary); }
.rank-value { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.rank-value small { color: var(--muted); font-weight: 500; margin-left: 2px; }
@media (max-width: 1000px) { .insight-grid { grid-template-columns: 1fr; } }

/* Connectors: settings and the confirmation only appear once the connector is switched on */
.connector:has(.switch input:not(:checked)) > :not(.share-head) { display: none; }

/* AI form assistant */
.ai-spark { flex: none; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), #7C3AED); color: #fff; display: grid; place-items: center; }
.ai-start { padding: 22px; margin-bottom: 26px; display: grid; gap: 14px; border-color: var(--primary-100); background: linear-gradient(180deg, #F7F9FF, #fff 70%); }
.ai-start-head { display: flex; gap: 14px; align-items: flex-start; }
.ai-start-head h2 { font-size: 18px; }
.ai-start-head p { margin-top: 2px; }
.ai-start textarea { font-size: 15px; }
.ai-start-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.ai-start-row .field { flex: 1; min-width: 220px; }
.ai-start-row .field i { font-style: normal; font-weight: 500; }
.ai-start-note { display: flex; gap: 6px; align-items: center; }
.ai-start-note .icon { color: var(--mint); }
.ai-start [hidden], .ai-bar [hidden] { display: none; }
.ai-start.is-busy textarea, .ai-start.is-busy input { opacity: .6; pointer-events: none; }
.builder .canvas-wrap { position: relative; }
.ai-bar { position: sticky; bottom: -100px; z-index: 5; max-width: 680px; margin: 28px auto 0; background: #fff; border: 1px solid var(--primary-100); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 10px; display: grid; gap: 8px; }
.ai-form { display: flex; align-items: center; gap: 8px; }
.ai-input { flex: 1; min-width: 0; height: 38px; border: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); outline: 0; }
.ai-input::placeholder { color: var(--faint); }
.ai-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(47, 91, 234, .12), var(--shadow-lg); }
.ai-note { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; padding: 9px 12px; border-radius: 10px; background: var(--primary-50); color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.ai-note.is-error { background: var(--danger-50); color: #912018; }
.ai-site { display: flex; gap: 8px; }
.ai-foot { display: flex; justify-content: space-between; gap: 12px; padding: 0 4px; font-size: 12px; color: var(--muted); }
.ai-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--primary); cursor: pointer; white-space: nowrap; }
.ai-link:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .ai-progress-track i { transition: none; animation: none; } }

/* "Send a test" on integrations */
.test-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.test-row small { flex: 1 1 100%; font-size: 12px; }
.test-result { font-size: 14px; font-weight: 500; line-height: 1.45; flex: 1; min-width: 200px; }
.test-result.is-ok { color: var(--ink); }
.test-result.is-error { color: #B42318; }
.test-result:empty { display: none; }

/* AI assistant progress */
.ai-progress { display: grid !important; grid-template-columns: 1fr; justify-content: stretch; gap: 8px; }
#ai-start-progress.ai-progress { padding: 12px 14px; border-radius: 12px; background: var(--primary-50); }
.ai-progress-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.ai-progress-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.ai-progress-track { height: 6px; border-radius: 99px; background: rgba(47, 91, 234, .16); overflow: hidden; }
.ai-progress-track i { display: block; height: 100%; width: 4%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #7C3AED, var(--primary)); background-size: 200% 100%; transition: width .3s linear; animation: ai-flow 1.6s linear infinite; }
@keyframes ai-flow { to { background-position: -200% 0; } }

.sidebar-help { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); border-radius: 9px; }
.sidebar-help:hover { background: rgba(12, 27, 42, .05); text-decoration: none; color: var(--ink); }
.sidebar-help .icon { color: var(--muted); }

/* Builder: theme controls */
.insp-more { margin: 4px 0 14px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: #FAFBFD; }
.insp-more > summary { cursor: pointer; padding: 11px 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.insp-more[open] { padding-bottom: 12px; }
.insp-more > .field, .insp-more > .insp-pair { margin-bottom: 14px; }
.theme-rows { display: grid; gap: 8px; }
.theme-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.theme-row .swatch { flex: none; }
.theme-swatch { position: relative; overflow: hidden; border: 1px solid var(--line); }
.theme-label { flex: 1; min-width: 0; }
.theme-value { color: var(--muted); font-family: var(--mono); font-size: 12px; }

/* AI agents onboarding */
.assistants { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 14px 20px 4px; }
.assistant { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; background: #fff; }
.assistant:hover { border-color: #B8C2D0; }
.assistant.is-active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--primary-50); }
.assistant span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.assistant strong { font-size: 14px; }
.assistant small { color: var(--muted); font-size: 12px; }
.brand-mark { flex: none; }
.brand-text { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
.prompt-form { max-width: 420px; margin-bottom: 12px; }
.prompt-title { font-size: 14px; margin: 16px 0 8px; }
.card-accent { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }

/* Share tab: installation check */
.check-result { margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-size: 14px; background: var(--bg); }
.check-result.is-ok { background: var(--mint-50); color: var(--ink); }
.check-result.is-warn { background: var(--warn-50); color: #7A2E0E; }
.check-result ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }

/* Submissions: form filter beside the search box */
form.toolbar { flex-wrap: wrap; }
form.toolbar .search { position: relative; }
.form-filter { width: auto; max-width: 320px; min-width: 180px; }
@media (max-width: 640px) { form.toolbar .search, .form-filter { flex: 1 1 100%; max-width: none; } }
.theme-note { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-2); background: var(--primary-50); border-radius: 8px; padding: 8px 10px; }
.theme-note[hidden] { display: none; }

/* Payments */
.ticks-plain { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 9px; font-size: 14px; color: var(--ink-2); }
.ticks-plain li { display: flex; gap: 9px; align-items: flex-start; }
.ticks-plain .icon { flex: none; margin-top: 2px; color: var(--mint); }
.pay-line { display: flex; align-items: center; gap: 10px; font-size: 18px; margin: 4px 0 8px; }
/* Devices: pairing a tablet or phone with the kiosk app */
.pair-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; max-width: 880px; margin-bottom: 16px; }
.pair-step { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pair-step h2 { margin: 0; }
.pair-step p { margin: 0; max-width: 320px; }
.pair-num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.pair-qr { width: 220px; height: 220px; padding: 10px; border: 1px solid var(--line-2); border-radius: 16px; background: #fff; margin: 6px 0; }
.pair-qr svg { display: block; width: 100%; height: 100%; }
.pair-key { font-size: 20px; font-weight: 600; letter-spacing: .08em; padding: 8px 16px; border-radius: 10px; background: var(--line-2); color: var(--ink); user-select: all; }
.pair-code { display: flex; gap: 8px; margin: 14px 0 6px; }
.pair-code span { width: 46px; height: 60px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; display: grid; place-items: center; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); box-shadow: var(--shadow-sm); }
.pair-code span:nth-child(3) { margin-right: 10px; }
.pair-wait { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.pair-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); animation: pair-pulse 1.4s ease-in-out infinite; }
@keyframes pair-pulse { 50% { opacity: .25; transform: scale(.8); } }
.steps-list { margin: 12px 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }
.device-steps { max-width: 880px; }
@media (prefers-reduced-motion: reduce) { .pair-dot { animation: none; } }

/* Test & health: go-live checklist and test results */
.check-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.check-step { display: flex; gap: 12px; align-items: flex-start; }
.check-step > div { display: grid; gap: 2px; }
.check-mark { flex: none; width: 26px; height: 26px; border-radius: 99px; display: grid; place-items: center; background: var(--line-2); color: var(--muted); }
.check-step.is-done .check-mark { background: #DDF5E7; color: #12703F; }
.result-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }

/* Version history */
.ver-link { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.ver-link:hover, .ver-link.is-active { border-color: var(--primary); color: var(--primary-600); background: var(--primary-50); text-decoration: none; }
.vh-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.vh-list { padding: 6px; position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
.vh-list ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.vh-list a { display: flex; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.vh-list a:hover { background: var(--bg); text-decoration: none; }
.vh-list a.is-active { background: var(--primary-50); box-shadow: inset 3px 0 0 var(--primary); }
.vh-num { flex: none; min-width: 34px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vh-meta { display: grid; gap: 2px; min-width: 0; }
.vh-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vh-sum { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.vh-meta small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.vh-meta small strong { color: var(--ink-2); font-weight: 600; }
.vh-main { display: grid; gap: 16px; min-width: 0; }
.vh-head { display: grid; gap: 14px; }
.vh-compare { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.vh-compare h2 { margin: 0; font-size: 20px; }
.vh-against label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.vh-against .input { height: 36px; min-width: 200px; }
.vh-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.vh-actions form { margin: 0; }
.vh-counts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.vh-counts li { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.vh-counts .is-added { background: #ECFDF3; border-color: #ABEFC6; color: #05603A; }
.vh-counts .is-removed { background: #FEF3F2; border-color: #FECDCA; color: #B42318; }
.vh-counts .is-changed { background: #FFFAEB; border-color: #FEDF89; color: #93370D; }
.vh-counts .is-moved, .vh-counts .is-same { color: var(--muted); }
.vh-note { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 14px; color: var(--ink-2); }
.vh-note .icon { color: var(--primary); flex: none; }
.vh-note a, .vh-foot a { text-decoration: underline; text-underline-offset: 2px; }
.vh-h { font-size: 15px; margin: 0 0 12px; }
.vh-qs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vh-q { border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px; padding: 12px 14px; background: #fff; }
.vh-q.is-added { border-left-color: #079455; background: #F6FEF9; }
.vh-q.is-removed { border-left-color: #D92D20; background: #FFFBFA; }
.vh-q.is-removed strong { text-decoration: line-through; text-decoration-color: rgba(180, 35, 24, .5); }
.vh-q.is-changed { border-left-color: #DC6803; }
.vh-q.is-moved { border-left-color: #8592A6; }
.vh-q-head { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.vh-q-head strong { font-size: 15px; overflow-wrap: anywhere; }
.vh-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; }
.is-added .vh-tag { background: #DCFAE6; color: #05603A; }
.is-removed .vh-tag { background: #FEE4E2; color: #B42318; }
.is-changed .vh-tag { background: #FEF0C7; color: #93370D; }
.is-moved .vh-tag { background: var(--line-2); color: var(--ink-2); }
.vh-type { font-size: 12px; color: var(--muted); }
.vh-q .vh-table { margin-top: 10px; }
.vh-table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.vh-table th, .vh-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.vh-table thead th { border-top: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.vh-table thead th:first-child, .vh-table tbody th { width: 26%; }
.vh-table tbody th { font-weight: 600; color: var(--ink-2); }
.vh-before { background: #FFFBFA; color: #55160C; }
.vh-after { background: #F6FEF9; color: #053321; }
.vh-val { display: inline-flex; align-items: center; gap: 6px; white-space: pre-wrap; }
.vh-none { color: var(--muted); }
.vh-swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(12, 27, 42, .2); flex: none; overflow: hidden; }
.vh-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.vh-chips li { font-size: 13px; padding: 1px 8px; border-radius: 6px; background: rgba(12, 27, 42, .05); }
.vh-chips .is-in { background: #DCFAE6; color: #05603A; font-weight: 600; }
.vh-chips .is-out { background: #FEE4E2; color: #B42318; text-decoration: line-through; }
.vh-code summary { cursor: pointer; }
.vh-code pre { margin: 6px 0 0; max-height: 220px; overflow: auto; font-size: 12px; background: rgba(12, 27, 42, .04); padding: 8px; border-radius: 6px; white-space: pre-wrap; }
.vh-unchanged { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.vh-unchanged summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.vh-unchanged ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.vh-empty { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 40px 24px; }
.vh-empty p { max-width: 520px; }
.vh-foot { margin: 0; }
.vh-older { color: #93370D; }
@media (max-width: 980px) {
  .vh-grid { grid-template-columns: 1fr; }
  .vh-list { position: static; max-height: 280px; }
  .vh-table thead th:first-child, .vh-table tbody th { width: 30%; }
}

/* Unpublished changes */
.status-pill.is-pending { background: #FFFAEB; color: #93370D; border: 1px solid #FEDF89; }
.status-pill[hidden], #publish-changes[hidden] { display: none; }
.vh-review { max-width: 1040px; }
#publish-form { display: flex; gap: 8px; margin: 0; }
.ws-right .btn, .ws-left .status-pill, .ver-link { white-space: nowrap; flex: none; }
/* With changes waiting the bar has one more button: the preview keeps only its icon until there is room. */
@media (max-width: 1500px) { .ws-bar:has(#publish-changes:not([hidden])) .ws-right > a.btn-secondary { font-size: 0; gap: 0; padding-left: 11px; padding-right: 11px; } }
/* Laptop widths: the tabs drop their icons so the form's name, status and actions keep their room. */
@media (max-width: 1440px) { .ws-bar .tabs .tab .icon { display: none; } .ws-bar .tabs .tab { padding-left: 11px; padding-right: 11px; } }
@media (max-width: 1280px) and (min-width: 861px) { .ws-bar:has(#publish-changes:not([hidden])) #publish-form button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .ws-bar:has(#publish-changes:not([hidden])) #publish-form button { padding-left: 11px; padding-right: 11px; gap: 0; } .ws-name { min-width: 40px; } .ws-bar { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 10px; } .ws-bar #changes-pill { display: none; } .ws-bar .tabs .tab { padding-left: 8px; padding-right: 8px; } }
@media (max-width: 1080px) and (min-width: 861px) { .ws-bar .status-pill.is-live { font-size: 0; gap: 0; padding: 0 8px; } }

/* Assistants */
.steps-list { margin: 10px 0 12px; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }
.field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.handoff-box { border: 1px solid var(--primary-100); background: var(--primary-50); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.handoff-box dl { margin: 8px 0 0; }
.agent-tabs { margin: 4px 0 18px; }
.agent-tabs .chip { gap: 6px; }

/* Phones: a table becomes a list of small cards, one per row, each value labelled with its column. */
@media (max-width: 640px) {
  .table.is-stacked, .table.is-stacked tbody, .table.is-stacked tr, .table.is-stacked td { display: block; width: 100%; }
  .table.is-stacked thead { display: none; }
  .table.is-stacked tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table.is-stacked tbody tr:last-child { border-bottom: 0; }
  .table.is-stacked td { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 5px 0; border: 0; text-align: right; max-width: none; white-space: normal; overflow-wrap: anywhere; }
  .table.is-stacked td:empty { display: none; }
  .table.is-stacked td[data-label]::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); }
  /* The first cell names the row, so it stands on its own like a heading. */
  .table.is-stacked td:first-child { display: block; text-align: left; padding-top: 0; }
  .table.is-stacked td:first-child::before { display: none; }
  .table.is-stacked td.check-col { display: inline-block; width: auto; padding: 0 10px 0 0; }
  .table.is-stacked td.check-col + td { display: inline-block; width: calc(100% - 36px); }
  .table.is-stacked td.actions { justify-content: flex-start; flex-wrap: wrap; gap: 6px; padding-top: 10px; text-align: left; }
  .table.is-stacked td.actions::before { display: none; }
  .table.is-stacked td.actions form { margin: 0; }
  .table.is-stacked td .input { max-width: 160px; }
  /* Submissions: the unread dot sits in the card's corner and the row arrow is not needed. */
  .table.is-stacked tr { position: relative; }
  .table.is-stacked td.dot-col { position: absolute; top: 14px; right: 16px; width: auto; padding: 0 !important; }
  .table.is-stacked td.dot-col:has(.dot) + td { padding-right: 18px; }
  .table.is-stacked td.dot-col + td { display: flex; text-align: right; padding-top: 0; }
  .table.is-stacked td.dot-col + td::before { display: block; }
  .table.is-stacked td.chev { display: none; }
}

/* Passkeys: the sign-in alternative and the list under Account */
.passkey-signin[hidden], .passkey-add[hidden], [data-passkey-error][hidden], [data-passkey-unsupported][hidden] { display: none !important; }
.passkey-signin { margin-top: 18px; display: grid; gap: 14px; }
.or { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.passkey-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.passkey-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #FAFBFD; }
.passkey-list li > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.passkey-list form { margin: 0; }
.passkey-icon { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--mint); color: var(--ink); }
.passkey-add { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.passkey-both { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 12px; }
.passkey-both .check { align-items: flex-start; }
.passkey-both .badge { margin-left: 4px; vertical-align: 1px; }
.passkey-both-confirm { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.passkey-both-confirm .field { flex: 1 1 220px; margin: 0; }
.badge.badge-plain { text-transform: none; }

/* Admin plans: one field per plan, side by side; stacked on a phone. */
.plan-limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .plan-limits { grid-template-columns: 1fr; } }
/* A totals row at the end of a table. */
.table tr.row-total { background: var(--bg); }
.table tr.row-total td { font-weight: 600; }
@media (min-width: 641px) { .table tr.row-total td { border-top: 1px solid var(--line); } }
.table td.no-wrap { white-space: nowrap; }

/* Billing: where the workspace stands, this month's use, and the plans */
.bill-summary { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.bill-plan, .bill-usage { padding: 24px 26px; display: flex; flex-direction: column; gap: 8px; }
.bill-usage { border-left: 1px solid var(--line); background: #FAFBFD; gap: 16px; }
.bill-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.bill-plan h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.bill-price { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.bill-price small, .bill-option-price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.bill-date { color: var(--ink-2); }
.bill-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bill-actions form { margin: 0; }
.usage { display: grid; gap: 6px; }
.usage { gap: 10px; }
.usage-figure { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 15px; }
.usage-figure strong { font-size: 32px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.usage-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.usage-bar { height: 8px !important; }
.usage.is-near .usage-figure strong { color: var(--warn); }
.usage.is-over .usage-figure strong { color: var(--danger); }
.usage-bar { --bar: var(--primary); appearance: none; display: block; width: 100%; height: 6px; border: 0; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.usage-bar::-webkit-progress-bar { background: var(--line-2); border-radius: 99px; }
.usage-bar::-webkit-progress-value { background: var(--bar); border-radius: 99px; }
.usage-bar::-moz-progress-bar { background: var(--bar); border-radius: 99px; }
.usage.is-near .usage-bar { --bar: #F79009; }
.usage.is-over .usage-bar { --bar: var(--danger); }
.bill-plans-section { margin-top: 32px; scroll-margin-top: 80px; }
.bill-section-head { margin-bottom: 16px; }
.bill-section-head h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.bill-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bill-option { position: relative; margin: 0; padding: 22px; display: flex; flex-direction: column; gap: 6px; overflow: visible; }
.bill-option h3 { font-size: 17px; font-weight: 700; }
.bill-option-price { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 8px; }
.bill-option-volume { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-2); margin-bottom: 12px; }
.bill-option-volume .icon { color: var(--primary); }
.bill-option > :last-child { margin-top: auto; }
.bill-option.is-current { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.bill-flag { position: absolute; top: -11px; left: 18px; height: 22px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 99px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 600; }
.bill-compare { margin-top: 12px; }
.bill-compare a { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.bill-facts { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bill-facts li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.5; }
.bill-facts .icon { flex: none; margin-top: 2px; color: var(--mint); }
.bill-facts strong { color: var(--ink-2); }
@media (max-width: 900px) {
  .bill-summary, .bill-plans, .bill-facts { grid-template-columns: minmax(0, 1fr); }
  .bill-usage { border-left: 0; border-top: 1px solid var(--line); }
  .bill-plans { gap: 20px; }
}
.bill-option-price.is-custom { font-size: 20px; line-height: 1.6; }
.bill-invoices { margin-top: 32px; scroll-margin-top: 80px; }
.bill-invoices .card { margin: 0; }
.bill-invoices td.actions .btn { margin-left: 4px; }
