:root {
  color-scheme: light;
  --ink: #172031;
  --muted: #515e70;
  --line: #dfe5ec;
  --surface: #f5f7fa;
  --blue: #005ac9;
  --blue-hover: #0049a8;
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: #fff; color: var(--ink); }
main { flex: 1; min-width: 0; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
::selection { background: #d8e8ff; color: var(--ink); }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; }
h3 { font-size: 1.22rem; }
p { line-height: 1.58; }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .88em; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }

.skip-link { position: absolute; inset: 8px auto auto 8px; z-index: 2; padding: 10px 15px; background: #fff; border-radius: 8px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.header { border-bottom: 1px solid var(--line); }
.header-inner, .foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.header-inner { min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; font-size: 1.16rem; letter-spacing: -.035em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.mark { width: 31px; height: 31px; display: inline-grid; place-items: center; flex: none; background: #182336; border-radius: 9px; }
.mark img { display: block; width: 17px; height: auto; }
.header nav, .foot nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 32px); font-size: .875rem; }
.header nav a, .foot nav a { color: var(--muted); }
.header nav .nav-cta { color: var(--ink); font-weight: 650; border: 1px solid var(--line); padding: 8px 15px; border-radius: 100px; }
.header nav .nav-cta:hover { background: var(--surface); text-decoration: none; }

.hero { background: #eef3f9; border-bottom: 1px solid #e2e9f2; }
.hero-inner { min-height: 540px; display: grid; grid-template-columns: 1fr 1.07fr; align-items: center; gap: clamp(38px, 6.2vw, 96px); padding-block: clamp(64px, 8vw, 110px); }
.hero-copy, .product { min-width: 0; }
.kicker { color: var(--blue); font-weight: 700; font-size: .92rem; margin-bottom: 16px; }
.hero h1 { font-size: clamp(3.55rem, 7.4vw, 6.6rem); line-height: 1.01; letter-spacing: -.06em; font-weight: 740; }
.hero h1 span { color: var(--blue); }
.intro { color: var(--muted); font-size: 1.0625rem; }
.hero .intro { margin-top: 23px; max-width: 38ch; font-size: clamp(1.05rem, 1.55vw, 1.24rem); }
.actions, .bot-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.actions { margin-top: 27px; }
.button {
  display: inline-flex; justify-content: center; align-items: center; padding: 11px 19px; min-height: 44px; max-width: 100%;
  border: 1px solid transparent; border-radius: 100px; background: var(--blue); color: #fff;
  font: inherit; font-size: .92rem; font-weight: 650; line-height: 1.25; text-align: center; cursor: pointer;
}
.button:hover { background: var(--blue-hover); text-decoration: none; }
.button.secondary { background: #fff; border-color: #ccd6e2; color: var(--ink); }
.button.secondary:hover { background: var(--surface); }
.button.small { min-height: 38px; padding: 8px 13px; font-size: .83rem; }
.text-link { display: inline-block; margin-top: 12px; font-weight: 650; }

.product figcaption { margin-bottom: 10px; padding-inline: 4px; color: var(--muted); font-size: .8rem; }
.product-window { overflow: hidden; border: 1px solid #d4dfeb; border-radius: 24px; background: #fff; box-shadow: 0 17px 42px #24395314; }
.product-bar { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.product-bar .mark { width: 24px; height: 24px; border-radius: 6px; }
.product-bar .mark img { width: 13px; }
.product-bar > span:last-child { margin-inline-start: auto; color: var(--muted); font-size: .75rem; }
.product-content { padding: clamp(18px, 3.2vw, 31px); }
.product-heading, .product-instance, .bot-heading, .list-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.product-heading { margin-bottom: 19px; }
.product-heading h2 { font-size: clamp(1.45rem, 2.75vw, 2rem); }
.product-heading > span, .list-heading > span { color: var(--muted); font-size: .82rem; }
.product-instance { padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.product-name, .bot-name { display: flex; align-items: center; min-width: 0; gap: 11px; }
.product-name strong { display: block; font-size: .875rem; }
.product-name small { display: block; margin-top: 4px; color: var(--muted); font-size: .75rem; }
.product-name .mark, .bot-name .mark { width: 38px; height: 38px; border-radius: 10px; background: #234368; }
.product-data, .bot-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.product-data > div, .bot-detail > div { min-width: 0; background: var(--surface); border-radius: 12px; padding: 14px; }
.product-data span, .bot-detail dt { display: block; margin-bottom: 5px; color: var(--muted); font-size: .76rem; line-height: 1.35; }
.product-data strong, .bot-detail dd { font-weight: 670; }

.section { padding-block: clamp(55px, 8vw, 104px); }
.section-heading { max-width: 650px; }
.section-heading h2, .final-cta h2 { font-size: clamp(2.1rem, 4.7vw, 3.75rem); letter-spacing: -.06em; }
.section-heading p { margin-top: 13px; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }
.features article { min-width: 0; background: var(--surface); border-radius: var(--radius); padding: clamp(22px, 3.6vw, 36px); }
.features p, .steps p { color: var(--muted); margin-top: 10px; }
.setup { background: var(--surface); border-block: 1px solid #e8edf2; }
.setup-grid { display: grid; grid-template-columns: .82fr 1fr; gap: clamp(24px, 8vw, 112px); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 20px 0 20px 52px; border-bottom: 1px solid var(--line); }
.steps li:first-child { padding-top: 0; }
.steps li:last-child { padding-bottom: 0; border: 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #cbd9ec; border-radius: 50%; color: var(--blue); background: #fff; font-size: .85rem; font-weight: 700; }
.final-cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: clamp(50px, 6vw, 78px); }
.final-cta h2 { font-size: clamp(1.8rem, 3.9vw, 2.9rem); }

.account { width: 100%; max-width: none; min-height: calc(100vh - 145px); display: grid; place-items: center; padding: clamp(38px, 7vw, 90px) 20px; background: var(--surface); }
.auth-card { width: min(100%, 490px); border: 1px solid var(--line); border-radius: 26px; background: #fff; padding: clamp(24px, 5vw, 46px); }
.auth-heading { text-align: center; margin-bottom: 26px; }
.auth-heading .mark { width: 44px; height: 44px; border-radius: 13px; margin-bottom: 18px; }
.auth-heading .mark img { width: 23px; }
.auth-card h1, .workspace h1, .policy h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.06em; }
.auth-card .intro, .workspace .intro, .policy .intro { margin-top: 9px; }
form { display: grid; gap: 13px; min-width: 0; }
form > .button { justify-self: start; }
.auth-card form > .button { justify-self: stretch; margin-top: 4px; }
label { display: grid; gap: 7px; color: var(--ink); font-weight: 650; font-size: .88rem; }
input, select { width: 100%; min-width: 0; border: 1px solid #bbc8d8; border-radius: 10px; background: #fff; color: var(--ink); padding: 11px 12px; min-height: 45px; font: inherit; font-size: 1rem; font-weight: 400; }
input::placeholder { color: #627083; }
.account-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 11px 18px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .87rem; }
.notice { padding: 12px 15px; background: #edf5ff; border: 1px solid #c6daf4; border-radius: 11px; color: #1d426d; margin-bottom: 16px; overflow-wrap: anywhere; }
.notice a { text-decoration: underline; font-weight: 650; }
.notice.warning { background: #fff4e9; border-color: #ebd4bb; color: #723c13; }
.message-actions { display: flex; justify-content: center; }

body:has(.workspace) main { background: var(--surface); }
.workspace { padding-block: clamp(34px, 6vw, 72px); }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 30px; }
.workspace-heading > div { min-width: 0; }
.workspace-heading p, .bot-name > div { overflow-wrap: anywhere; }
.workspace-nav { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 24px; }
.workspace-nav a { padding: 8px 13px; border-radius: 100px; color: var(--muted); font-size: .9rem; font-weight: 650; }
.workspace-nav a[aria-current="page"] { background: #e4efff; color: var(--blue); }
.workspace-list { list-style: none; padding: 0; margin: 0; }
.workspace-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding-block: 14px; }
.workspace-list li + li { border-top: 1px solid var(--line); }
.workspace-list li:first-child { padding-top: 0; }
.workspace-list li:last-child { padding-bottom: 0; }
.workspace-list li > div { display: grid; gap: 5px; overflow-wrap: anywhere; }
.workspace-list li > div + div { text-align: right; }
.workspace-list span { color: var(--muted); font-size: .85rem; }
.bot-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(125px, .52fr); gap: 10px; }
.bot-filters[hidden], .bot-card[hidden], [data-no-results][hidden] { display: none; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.workspace-column, .instances { display: grid; gap: 14px; min-width: 0; }
.workspace-column { align-content: start; }
.list-heading { padding-inline: 2px; }
.list-heading h2, .panel h2 { font-size: 1.28rem; }
.panel, .bot-card { padding: clamp(19px, 3vw, 26px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; min-width: 0; }
.panel p { color: var(--muted); margin-top: 8px; }
.panel form { margin-top: 14px; }
.panel .helper { margin-top: 0; }
.empty { padding-block: 29px; }
.bot-heading { align-items: flex-start; }
.bot-heading p { color: var(--muted); font-size: .85rem; margin-top: 5px; }
.pill { flex: none; border-radius: 100px; background: #edf0f5; color: #425168; padding: 5px 9px; font-size: .73rem; font-weight: 700; white-space: nowrap; }
.pill.online, .pill[data-status="online"] { background: #e7f5ed; color: #17603e; }
.pill[data-status="error"], .pill[data-status="expired"] { background: #fcece9; color: #8e2c24; }
.pill[data-status="starting"], .pill[data-status="queued"] { background: #eaf3ff; color: #23568f; }
.bot-detail { margin-top: 17px; }
.workspace-summary { margin-bottom: 24px; }
.workspace-summary > div { background: #fff; border: 1px solid var(--line); }
.wizard { max-width: 650px; }
.manual-install, .settings-panel { margin-top: 16px; }
.status-history { margin-top: 16px; }
.panel textarea { width: 100%; resize: vertical; padding: 10px; border: 1px solid #bbc8d8; border-radius: 10px; font: inherit; }
.message-preview { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.message-preview h3 { font-size: 1rem; }
.message-preview-author { margin-top: 12px; display: flex; align-items: center; gap: 8px; }
.message-preview-author .mark { width: 24px; height: 24px; }
.message-preview [data-message-output] { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.bot-actions { margin-block: 15px; gap: 7px; }
.compact { flex: none; }
details { border-top: 1px solid var(--line); }
summary { padding-block: 12px; cursor: pointer; font-weight: 650; font-size: .89rem; }
details:last-child > summary { padding-bottom: 0; }
details form { margin: 9px 0 4px; }
.helper { color: var(--muted); font-size: .85rem; }
.pairing { margin-top: 15px; }
.copy-code { display: block; background: var(--surface); padding: 10px; border-radius: 8px; overflow-wrap: anywhere; margin-block: 10px; }
.policy { max-width: 730px; }
.policy section { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 25px; }
.policy section p { color: var(--muted); margin-top: 9px; overflow-wrap: anywhere; }

footer { border-top: 1px solid var(--line); }
.foot { min-height: 78px; padding-block: 16px; color: var(--muted); font-size: .83rem; flex-wrap: wrap; }

@media (max-width: 850px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .product { width: min(100%, 560px); }
  .workspace-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 36px); }
  .account { width: 100%; }
  .features, .setup-grid, .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .final-cta { align-items: flex-start; flex-direction: column; }
  .foot > span { order: 1; width: 100%; }
  .hero-inner { padding-block: 48px; }
}
@media (max-width: 400px) {
  .header-inner { flex-wrap: wrap; gap: 10px; padding-block: 10px; }
  .header nav { flex-wrap: wrap; gap: 8px 12px; }
  .product-name .mark { display: none; }
  .product-instance { padding: 11px; }
  .bot-heading { flex-wrap: wrap; }
  .workspace-heading { align-items: flex-start; }
  .bot-filters { grid-template-columns: 1fr; }
}

/* Bot update and module settings */
.bot-badges { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.update-available, .release-state { background: #edf3fc; color: #214e85; }
.release-banner, .release-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.release-versions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.release-versions > div { padding: 12px 14px; background: var(--surface); border-radius: 10px; }
.release-versions dt { color: var(--muted); font-size: .82rem; }
.release-versions dd { margin-top: 4px; font-weight: 650; }
.release-notes { margin-top: 14px; }
.release-notes ul { padding-inline-start: 21px; color: var(--muted); line-height: 1.5; }
.release-notes li + li { margin-top: 6px; }
.release-panel .release-feedback { padding: 10px 13px; border-radius: 8px; background: var(--surface); color: var(--ink); }
.release-feedback[data-tone="error"] { background: #fff0ec; color: #862d22; }
.release-panel button:disabled { opacity: .65; cursor: default; }
.module-group { border: 0; padding: 0; margin: 14px 0 0; min-inline-size: 0; }
.module-group legend { width: 100%; padding: 0 0 9px; font-size: .95rem; font-weight: 700; }
.module-rows { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.module-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(145px, .65fr); align-items: center; gap: 12px; padding: 11px 13px; }
.module-row + .module-row { border-top: 1px solid var(--line); }
.module-row select { min-height: 41px; padding: 7px 10px; font-size: .88rem; }
.module-panel form > button { margin-top: 8px; }
@media (max-width: 520px) {
  .module-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .bot-badges { justify-content: flex-start; }
}

.activity-totals { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 20px; }
.activity-totals > div { background: #fff; border: 1px solid var(--line); }
.console-filter { margin-top: 12px; }
.console-filter[hidden], [data-console-list] [hidden] { display: none; }

.action-confirm { display: flex; align-items: center; gap: 8px; }
.action-confirm input { width: 18px; min-height: 18px; margin: 0; flex: none; }
[data-console-list] details form { margin-bottom: 12px; }

.ticket-field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.ticket-fields { display: grid; gap: 12px; }
.ticket-fields .ticket-color { width: 80px; padding: 5px; }
.ticket-preview { margin-bottom: 18px; border-inline-start-width: 4px; }
.message-preview [data-ticket-preview-opening], .ticket-preview p { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 560px) { .ticket-field-grid { grid-template-columns: minmax(0,1fr); } }
