:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #211a31;
  background: #faf8f6;
  font-synthesis: none;
  --ink: #211a31;
  --muted: #675d74;
  --purple: #49327b;
  --purple-hover: #36225f;
  --lilac: #eee7fa;
  --mist: #f7f3fb;
  --line: #e6e0ea;
  --white: #fff;
  --green: #1b6c54;
  --green-bg: #e3f3eb;
  --focus: #7751c2;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-inline-size: 0; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .56; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 20;
  inset-block-start: .75rem;
  inset-inline-start: .75rem;
  padding: .7rem 1rem;
  border-radius: .65rem;
  color: white;
  background: var(--purple);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  min-block-size: 3rem;
  padding: .65rem 1rem;
  border: 1px solid transparent;
  border-radius: .7rem;
  font-size: .9rem;
  line-height: 1.2;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.button-small { min-block-size: 2.5rem; padding: .5rem .78rem; font-size: .83rem; }
.button-primary { color: white; background: var(--purple); }
.button-primary:hover:not(:disabled) { background: var(--purple-hover); }
.button-outline { border-color: #d9d0e2; color: var(--ink); background: var(--white); }
.button-outline:hover:not(:disabled) { border-color: #bdb0cc; background: #fcf9ff; }
.button-plain { color: var(--muted); background: transparent; }
.button-plain:hover:not(:disabled) { color: var(--purple); background: var(--mist); }
.button-danger { color: #fff; background: #8d3347; }
.button-danger:hover:not(:disabled) { background: #732539; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.2rem;
  font-weight: 770;
  letter-spacing: -.045em;
  text-decoration: none;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: .6rem;
  color: white;
  background: var(--purple);
}
.brand-mark::before {
  content: "";
  width: 50%;
  height: 37%;
  border: .1rem solid currentColor;
  border-radius: .3rem .3rem .3rem .075rem;
  transform: translateY(-4%);
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 13%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
}
.status-dot { display: inline-block; flex: 0 0 auto; width: .5rem; height: .5rem; border-radius: 50%; background: #2f9d73; }
.nav-link { color: #554964; text-decoration: none; font-size: .9rem; font-weight: 650; }
.nav-link:hover { color: var(--purple); text-decoration: underline; text-underline-offset: .25rem; }
.page-width { width: min(100% - 5rem, 77rem); margin-inline: auto; }

/* Public site */
.public-header, .public-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.public-header { min-block-size: 5rem; border-bottom: 1px solid #e8e0e9; }
.public-header nav { display: flex; align-items: center; gap: clamp(.85rem, 2.7vw, 2.2rem); }
.public-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.public-header .button-outline { background: transparent; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 3vw, 3rem);
  align-items: center;
  padding-block: clamp(3.2rem, 6vw, 5.5rem) clamp(2.4rem, 6vw, 5rem);
}
.hero-kicker { display: flex; align-items: center; gap: .55rem; color: var(--purple); font-size: .86rem; font-weight: 730; }
.hero-kicker .status-dot { background: #956ad9; }
.hero h1 {
  margin-block: 1.1rem 1.25rem;
  color: #271b39;
  font-size: clamp(2.65rem, 1.4rem + 3.6vw, 5rem);
  line-height: .99;
  letter-spacing: -.075em;
  font-weight: 770;
}
.hero h1 span { color: #6b48a8; }
.hero-description { max-inline-size: 31rem; color: var(--muted); font-size: clamp(1rem, .84rem + .55vw, 1.16rem); line-height: 1.62; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.3rem; margin-top: 1.65rem; }
.hero-button { min-block-size: 3.2rem; padding-inline: 1.1rem; }
.hero-button span { font-size: 1.06em; padding-inline-start: .2rem; }
.product-figure { min-inline-size: 0; }
.product-stage {
  position: relative;
  inline-size: 100%;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.42;
  min-block-size: 20rem;
  border-radius: 1.7rem;
  border: 1px solid #e6dbf4;
  background: radial-gradient(ellipse at 14% 8%, #f4ebff 0, transparent 56%), linear-gradient(136deg, #ede3fa 0%, #e1d2f2 59%, #e9d8ef 100%);
}
.product-stage::before {
  content: "";
  position: absolute;
  width: 89%;
  aspect-ratio: 1;
  inset: 22% -31% auto auto;
  border: 1px solid #fff8;
  border-radius: 50%;
  box-shadow: 0 0 0 2rem #fff2, 0 0 0 4rem #fff2;
  z-index: -1;
}
.product-window {
  position: absolute;
  inset: 11% 12% auto 7%;
  overflow: hidden;
  border: 1px solid #f8f5ff;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 .9rem 2.5rem #4c2f762b;
}
.product-topline, .product-thread-heading { display: flex; align-items: center; gap: .55rem; }
.product-topline { justify-content: space-between; border-bottom: 1px solid #ede8f0; padding: .7rem 1.05rem; }
.product-brand, .product-online { display: flex; align-items: center; gap: .42rem; font-size: .68rem; font-weight: 760; }
.product-brand .brand-mark, .product-widget .brand-mark { width: 1.32rem; height: 1.32rem; border-radius: .33rem; }
.product-brand .brand-mark::before, .product-widget .brand-mark::before { border-width: 1px; }
.product-online { color: #386956; font-size: .63rem; }
.product-online .status-dot { width: .33rem; height: .33rem; }
.product-inbox { display: grid; grid-template-columns: minmax(6rem, .7fr) minmax(0, 1.3fr); }
.product-list { display: grid; align-content: start; gap: .28rem; padding: .95rem .58rem .8rem; border-right: 1px solid #eeeaf1; }
.product-list > strong { margin: 0 0 .38rem .27rem; font-size: .88rem; letter-spacing: -.03em; }
.product-ticket { display: flex; align-items: center; gap: .4rem; padding: .47rem .38rem; border-radius: .5rem; color: #373043; }
.product-ticket.selected { background: #f1e9fe; }
.product-ticket b, .product-thread-heading b { display: block; font-size: .64rem; }
.product-ticket small, .product-thread-heading small { display: block; margin-top: .16rem; color: #746982; font-size: .56rem; line-height: 1.1; }
.sample-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 1.43rem; height: 1.43rem; border-radius: .43rem; background: #e5d5fa; color: #5f398e; font-size: .64rem; font-weight: 740; }
.sample-teal { color: #3a655e; background: #deeee8; }
.sample-sand { color: #80582e; background: #f8ead8; }
.product-thread { display: grid; align-content: start; gap: .7rem; padding: .91rem .9rem .78rem; }
.product-thread-heading { min-block-size: 1.55rem; margin-bottom: .15rem; }
.sample-open { margin-inline-start: auto; border-radius: 2rem; padding: .2rem .42rem; color: #267356; background: #e7f5ed; font-size: .54rem; font-weight: 700; }
.sample-message {
  justify-self: start;
  width: fit-content;
  max-width: 94%;
  padding: .44rem .6rem;
  border-radius: .56rem .56rem .56rem .12rem;
  background: #f1eef4;
  color: #44394e;
  font-size: .62rem;
  line-height: 1.35;
}
.sample-message-out { justify-self: end; border-radius: .56rem .56rem .12rem .56rem; color: #4e3572; background: #eae0f9; }
.sample-reply, .sample-widget-input { display: flex; justify-content: space-between; align-items: center; border: 1px solid #ece7f1; border-radius: .48rem; padding: .34rem .48rem; color: #877b91; font-size: .61rem; }
.sample-reply span, .sample-widget-input span { display: grid; place-items: center; border-radius: .35rem; color: #fff; background: var(--purple); width: 1.24rem; height: 1.24rem; }
.product-widget {
  position: absolute;
  inset: auto 6.5% 7% auto;
  width: 46%;
  min-width: 9.75rem;
  overflow: hidden;
  border: 1px solid #fff7;
  border-radius: .85rem;
  background: #fff;
  box-shadow: 0 .6rem 2rem #3b216138;
}
.product-widget-bar { display: flex; align-items: center; gap: .55rem; padding: .72rem .75rem; background: #4f337e; color: white; }
.product-widget-bar .brand-mark { background: #ffffff24; }
.product-widget-bar strong, .product-widget-bar small { display: block; }
.product-widget-bar strong { font-size: .72rem; }
.product-widget-bar small { margin-top: .11rem; color: #e7d9f5; font-size: .56rem; }
.product-widget-body { display: grid; gap: .45rem; padding: .62rem .69rem; }
.product-figure figcaption { margin-top: .65rem; text-align: center; color: #6b5d72; font-size: .73rem; }
.how-section { padding-block: 1.6rem 3.9rem; }
.how-heading { margin-bottom: 1.3rem; }
.how-heading h2 { font-size: clamp(1.5rem, 1.16rem + 1.25vw, 2.2rem); letter-spacing: -.05em; }
.how-heading p { margin-top: .45rem; color: var(--muted); font-size: .96rem; }
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.how-card { padding: clamp(1rem, 2.15vw, 1.5rem); border: 1px solid #e8e0eb; border-radius: 1rem; background: #fffdfd; }
.how-card h3 { font-size: 1rem; margin-block: .84rem .4rem; letter-spacing: -.023em; }
.how-card p { color: var(--muted); font-size: .9rem; line-height: 1.55; }
.feature-icon { display: inline-grid; place-items: center; width: 2.05rem; height: 2.05rem; border-radius: .62rem; background: #f1e8f9; color: #5b3d87; font-size: .74rem; font-weight: 800; position: relative; }
.feature-link::before, .feature-link::after { content: ""; position: absolute; inline-size: .62rem; block-size: .43rem; border: 1.5px solid currentColor; border-radius: .3rem; transform: rotate(-42deg) translateX(-.2rem); }
.feature-link::after { transform: rotate(-42deg) translateX(.2rem); }
.feature-code { background: #f5e9f0; color: #813867; }
.feature-message { background: #e6f1ec; color: #356b5b; }
.feature-message::before { content: ""; width: .85rem; height: .64rem; border: 1.5px solid currentColor; border-radius: .19rem .19rem .19rem .04rem; }
.public-footer { min-block-size: 5rem; border-top: 1px solid #e8e0e9; }

/* Workspace */
.app-page { background: #f7f6f9; }
.app-header {
  min-block-size: 4.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .55rem clamp(1rem, 3vw, 2.2rem);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.account { position: relative; min-inline-size: 0; font-size: .88rem; font-weight: 650; }
.account-summary { display: flex; align-items: center; gap: .52rem; min-block-size: 2.7rem; padding: .3rem .48rem; border: 1px solid var(--line); border-radius: .6rem; background: #fff; list-style: none; cursor: pointer; }
.account-summary::-webkit-details-marker { display: none; }
.account-summary:hover { background: var(--mist); }
.account-menu { position: absolute; z-index: 5; inset-block-start: calc(100% + .45rem); inset-inline-end: 0; display: grid; min-inline-size: 11rem; padding: .3rem; border: 1px solid var(--line); border-radius: .7rem; background: #fff; box-shadow: 0 .65rem 1.65rem #3c265624; }
.account:not([open]) .account-menu { display: none; }
.account-menu .button { justify-content: flex-start; }
.account-menu #disconnect-telegram { color: #812d42; }
#account-name { overflow: hidden; text-overflow: ellipsis; max-inline-size: 18ch; white-space: nowrap; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 2.25rem; height: 2.25rem; border-radius: .7rem; background: #eae0fa; color: #573e7e; font-size: .88rem; font-weight: 760; }
.avatar-account { width: 1.95rem; height: 1.95rem; font-size: .73rem; background: #efebf5; }
.gate { display: grid; place-items: center; min-block-size: calc(100dvh - 4.4rem); padding: 1.25rem; background: radial-gradient(ellipse at 50% 15%, #f0e7fa, #f7f6f9 64%); }
.gate-card { width: min(100%, 28rem); border: 1px solid var(--line); border-radius: 1.3rem; padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: 0 1.1rem 3rem #52356e12; background: #fff; }
.gate-icon { width: 2.6rem; height: 2.6rem; border-radius: .8rem; margin-bottom: .95rem; }
.gate-card h1, .workspace-empty h1, .panel-header h1 { font-size: clamp(1.85rem, 1.4rem + 1vw, 2.45rem); letter-spacing: -.065em; font-weight: 750; line-height: 1.08; }
.gate-card p, .workspace-empty p { margin-block: .68rem 1.2rem; color: var(--muted); font-size: .98rem; line-height: 1.58; }
.telegram-consent { padding: .84rem .9rem .89rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--mist); }
.gate-card .telegram-consent p { margin: 0; font-size: .83rem; line-height: 1.55; }
.telegram-consent .checkbox-row { align-items: flex-start; }
.telegram-consent .checkbox-row input { flex: 0 0 auto; margin-block-start: .13rem; }
.telegram-consent label { line-height: 1.45; }
.auth-actions, .settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .7rem; }
.auth-actions { margin-top: .8rem; }
#telegram-login-flow { display: grid; gap: .75rem; }
#telegram-login-flow > button { justify-self: start; }
#telegram-qr-stage { padding: .85rem; text-align: center; border: 1px solid var(--line); border-radius: .72rem; background: var(--mist); }
#telegram-qr-stage img { display: block; inline-size: min(100%, 13rem); block-size: auto; margin-inline: auto; border: .42rem solid white; border-radius: .5rem; background: #fff; }
.gate-card #telegram-qr-stage p { margin: .63rem 0 0; font-size: .85rem; line-height: 1.5; }
.password-field { display: flex; align-items: center; gap: .45rem; }
.password-field input { flex: 1 1 0; }
.gate-card #telegram-password-hint { margin: .34rem 0 .65rem; font-size: .82rem; }
.desk-layout { display: grid; grid-template-columns: 14.75rem minmax(0, 1fr); min-block-size: calc(100dvh - 4.4rem); }
.desk-sidebar { display: flex; flex-direction: column; gap: 1.25rem; padding: 1.3rem .95rem; border-right: 1px solid var(--line); background: #fbfafc; }
.workspace-picker { display: grid; gap: .42rem; }
.workspace-picker label { font-size: .73rem; color: var(--muted); font-weight: 720; }
.workspace-picker select { width: 100%; padding-inline: .62rem 1.55rem; text-overflow: ellipsis; font-size: .87rem; font-weight: 650; }
.desk-nav, .sidebar-actions { display: grid; gap: .3rem; }
.desk-nav-button { display: flex; gap: .65rem; align-items: center; min-height: 2.75rem; width: 100%; padding: .5rem .7rem; border: 1px solid transparent; border-radius: .65rem; background: transparent; color: #5b5168; text-align: start; font-size: .9rem; font-weight: 680; }
.desk-nav-button:hover { background: #f4effa; color: var(--purple); }
.desk-nav-button[aria-current="page"] { background: #ece4f7; color: var(--purple); }
.nav-icon { display: inline-block; position: relative; width: .95rem; height: .85rem; flex: 0 0 auto; }
.nav-inbox { border: 1.5px solid currentColor; border-radius: .29rem; }
.nav-inbox::after { content: ""; position: absolute; inset: .2rem .19rem auto; height: 1.5px; background: currentColor; }
.nav-settings { border: 1.5px solid currentColor; border-radius: 50%; width: .85rem; }
.nav-settings::after { content: ""; position: absolute; inset: 32%; border-radius: 50%; background: currentColor; }
.sidebar-actions { padding-top: .78rem; border-top: 1px solid var(--line); }
.sidebar-status { display: flex; align-items: center; gap: .5rem; margin-top: auto; padding: .73rem .65rem; color: #4f465c; background: #f4f1f7; border-radius: .65rem; font-size: .8rem; font-weight: 625; }
.sidebar-status[data-online="false"] .status-dot { background: #887e92; }
.desk-content { min-inline-size: 0; padding: clamp(1rem, 2.5vw, 2rem); }
.desk-panel { max-inline-size: 98rem; margin-inline: auto; }
.workspace-empty { display: grid; align-content: center; justify-items: center; text-align: center; min-block-size: 60dvh; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-block-size: 3rem; margin-block: .25rem 1.25rem; }
.panel-header p { color: var(--muted); font-size: .92rem; line-height: 1.4; margin-top: .33rem; }
.status-tag { display: inline-flex; align-items: center; flex: 0 0 auto; max-inline-size: min(12rem, 43vw); border-radius: 1rem; padding: .37rem .66rem; background: #f0edf3; color: #5d5268; font-size: .72rem; font-weight: 720; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-tag[data-tone="open"], .status-tag[data-tone="connected"] { background: var(--green-bg); color: var(--green); }
.status-tag[data-tone="pending"] { background: #f9eee6; color: #744323; }
.setup-prompt { display: flex; align-items: center; justify-content: space-between; gap: .9rem; margin-bottom: .9rem; padding: .75rem 1rem; border-radius: .8rem; border: 1px solid #e5d6f5; background: #f5ecfd; color: #432a66; }
.setup-prompt strong { font-size: .875rem; }
.setup-prompt p { margin-top: .19rem; color: #665577; font-size: .81rem; line-height: 1.35; }
.inbox-layout { display: grid; grid-template-columns: minmax(13.6rem, .78fr) minmax(0, 1.65fr); min-block-size: min(40rem, calc(100dvh - 12rem)); min-height: 26rem; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; background: #fff; }
.inbox-list { min-inline-size: 0; border-right: 1px solid var(--line); }
.inbox-list-header { padding: 1.07rem .9rem .83rem; border-bottom: 1px solid var(--line); }
.inbox-list-header h2, .thread-header h2, .settings-card h2 { margin: 0; font-size: 1.02rem; font-weight: 750; letter-spacing: -.02em; }
.filter-group { display: flex; flex-wrap: wrap; gap: .26rem; margin-top: .6rem; }
.filter-group button { padding: .41rem .67rem; min-block-size: 2.1rem; border: none; border-radius: .55rem; color: #61556b; font-size: .76rem; font-weight: 650; background: none; }
.filter-group button:hover { background: var(--mist); }
.filter-group button[aria-pressed="true"] { color: var(--purple); background: #eee5fa; }
.conversation-list, .message-list, .moderator-list { margin: 0; padding: 0; list-style: none; }
.conversation-list { max-block-size: min(45rem, 70dvh); overflow-y: auto; }
.conversation-item { width: 100%; min-inline-size: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: .64rem; padding: .76rem .81rem; min-block-size: 4rem; color: var(--ink); text-align: start; border: none; border-bottom: 1px solid #f0ecf2; background: white; }
.conversation-item:hover, .conversation-item[aria-current="true"] { background: #f6f0fb; }
.conversation-item:focus-visible { outline-offset: -3px; }
.conversation-text { min-inline-size: 0; }
.conversation-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .42rem; }
.conversation-name, .conversation-preview, .conversation-assignee { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.conversation-name { font-size: .86rem; font-weight: 720; }
.conversation-time { color: #6f627a; font-size: .66rem; white-space: nowrap; }
.conversation-preview { color: var(--muted); margin-top: .2rem; font-size: .76rem; }
.conversation-assignee { color: #6a527e; margin-top: .22rem; font-size: .69rem; font-weight: 610; }
.list-empty { padding: .95rem 1rem; color: #716677; font-size: .85rem; }
.thread-panel { min-inline-size: 0; display: grid; min-block-size: 100%; }
.thread-empty { align-self: center; display: grid; justify-items: center; gap: .55rem; padding: 2rem 1rem; color: var(--muted); text-align: center; line-height: 1.5; }
.thread-empty h2 { color: var(--ink); font-size: 1.16rem; letter-spacing: -.03em; }
.thread-empty p { font-size: .86rem; }
.empty-illustration { width: 3.3rem; height: 3.3rem; display: grid; place-items: center; border-radius: 1rem; margin: 0 0 .35rem; color: #7653aa; background: #f1eafa; }
.empty-illustration::before { content: ""; width: 1.55rem; height: 1.14rem; border: 2px solid currentColor; border-radius: .4rem .4rem .4rem .08rem; }
.thread { display: flex; flex-direction: column; min-inline-size: 0; }
.thread-header { min-block-size: 4.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .56rem; padding: .7rem .85rem; border-bottom: 1px solid var(--line); }
.thread-person { min-width: 0; margin-right: auto; overflow-wrap: anywhere; }
.thread-person p { margin-top: .2rem; font-size: .73rem; color: var(--muted); }
.thread-back { display: none; }
.thread-delivery { padding: .53rem .86rem; background: #f9eee6; color: #744323; font-size: .76rem; line-height: 1.42; }
.message-list { flex: 1 1 auto; display: flex; flex-direction: column; gap: .7rem; padding: 1rem; min-block-size: 12rem; max-block-size: min(39rem, 55dvh); overflow: auto; }
.message-list:empty { min-block-size: 0; }
.message-entry { display: flex; flex-direction: column; align-items: flex-start; gap: .24rem; }
.message-entry.outbound { align-items: flex-end; }
.message-meta { color: #6f627a; font-size: .69rem; overflow-wrap: anywhere; }
.message-body { padding: .62rem .72rem; max-inline-size: min(93%, 42rem); background: #f2eef5; border-radius: .68rem .68rem .68rem .15rem; color: #352d3d; font-size: .88rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-entry.outbound .message-body { color: #422864; background: #ede2f9; border-radius: .68rem .68rem .15rem .68rem; }
.composer { display: grid; gap: .48rem; margin-top: auto; padding: .8rem .85rem; border-top: 1px solid var(--line); }
.composer > p { color: #6b5e77; font-size: .78rem; min-height: 1em; }
.composer > button { justify-self: start; }
.reply-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .42rem .7rem; margin-top: .54rem; }
.attach-action { position: relative; display: inline-flex; align-items: center; flex-wrap: wrap; gap: .32rem .5rem; }
.attach-action input[type="file"] { position: absolute; width: 1px; min-block-size: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.attach-action label { cursor: pointer; }
.attach-action input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 3px; }
.attach-action input:disabled + label { opacity: .56; cursor: not-allowed; }
.attach-action > span { color: var(--muted); font-size: .72rem; }
.reply-file { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .5rem; padding: .42rem .55rem; border: 1px solid var(--line); border-radius: .58rem; background: var(--mist); }
.file-details { display: grid; gap: .15rem; min-inline-size: 0; overflow-wrap: anywhere; }
.file-details strong { font-size: .81rem; font-weight: 690; }
.file-details > span { color: var(--muted); font-size: .72rem; }
.reply-upload { display: grid; gap: .26rem; margin-top: .56rem; }
.reply-upload p { color: var(--muted); font-size: .77rem; }
.reply-upload progress { inline-size: 100%; accent-color: var(--purple); }
.message-with-file { display: grid; gap: .52rem; }
.message-file { display: grid; min-inline-size: 0; gap: .42rem; }
.message-file img, .message-file video { display: block; width: min(100%, 19rem); height: auto; max-block-size: 15rem; border-radius: .55rem; background: #231c35; object-fit: contain; }
.message-file audio { width: min(100%, 19rem); min-inline-size: min(13rem, 100%); }
.message-file-link { display: flex; align-items: center; justify-content: space-between; min-inline-size: 0; gap: .56rem; padding: .52rem .62rem; border: 1px solid #d9cbe5; border-radius: .5rem; background: #fffc; color: var(--purple); text-decoration: none; white-space: normal; }
.message-file-link:hover strong { text-decoration: underline; }
.message-file-link > span { align-self: center; font-size: .9rem; }
.reply-name-settings { display: grid; gap: .35rem; margin-block: .85rem .75rem; padding-block-start: .8rem; border-block-start: 1px solid var(--line); }
.reply-name-settings p { margin-block: 0; }
#reply-fixed-settings label { margin-bottom: .3rem; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.settings-card { min-inline-size: 0; min-block-size: 11rem; padding: 1.15rem; border: 1px solid var(--line); border-radius: .91rem; background: #fff; }
.settings-card h2 { margin-bottom: .55rem; }
.settings-card p { color: var(--muted); font-size: .85rem; line-height: 1.5; overflow-wrap: anywhere; }
.settings-card > p { margin-bottom: .7rem; }
.settings-card .button { white-space: normal; }
.settings-callout { margin-top: .7rem; padding: .75rem; border-radius: .65rem; background: var(--mist); }
.settings-callout p { margin-bottom: .5rem; }
.member-check h3 { margin-bottom: .33rem; font-size: .92rem; letter-spacing: -.02em; }
.member-check ol { margin: .35rem 0 .75rem; padding-inline-start: 1.2rem; color: var(--muted); font-size: .82rem; line-height: 1.5; overflow-wrap: anywhere; }
.member-check li + li { margin-block-start: .24rem; }
#embed-code { background: #faf8fc; font-family: ui-monospace, Consolas, monospace; font-size: max(.83rem, 1em); line-height: 1.4; overflow-wrap: anywhere; margin-bottom: .6rem; }
.moderator-list { margin-block: .35rem .7rem; }
.moderator-item { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; min-block-size: 2.35rem; }
.moderator-item .avatar { width: 1.62rem; height: 1.62rem; font-size: .67rem; border-radius: .5rem; }
.moderator-item strong { font-size: .82rem; font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.moderator-item .status-tag { margin-left: auto; }
.moderator-item .button { color: #812d42; min-block-size: 2rem; }
.app-notice { position: fixed; z-index: 8; right: .9rem; bottom: .9rem; max-width: min(25rem, calc(100% - 1.8rem)); padding: .65rem .84rem; border: 1px solid #dac9ea; border-radius: .65rem; color: #42305c; background: #f8f4ff; box-shadow: 0 .55rem 1.9rem #341d5325; font-size: .86rem; line-height: 1.42; overflow-wrap: anywhere; pointer-events: none; }
.app-notice[data-kind="error"] { border-color: #ecc4cc; color: #7c2739; background: #fff3f5; }

label { display: block; color: #4a3b56; font-size: .83rem; font-weight: 690; }
form > label { margin-bottom: .32rem; }
form > label:not(:first-child) { margin-top: .65rem; }
input:not([type="checkbox"]), textarea, select { min-inline-size: 0; min-block-size: 3rem; padding: .59rem .68rem; border: 1px solid #cfc4d9; border-radius: .56rem; width: 100%; background: white; color: var(--ink); font-size: max(1rem, 1em); }
input:disabled, textarea:disabled { color: #62596c; background: #f5f2f7; opacity: 1; }
textarea { resize: vertical; }
.field-hint { margin: .32rem 0 .67rem; }
.field-optional { color: #766984; font-weight: 500; }
.checkbox-row { display: flex; gap: .48rem; align-items: center; margin-top: .8rem; }
input[type="checkbox"] { accent-color: var(--purple); width: 1.1rem; height: 1.1rem; }
dialog { width: min(28rem, 100% - 2rem); padding: 1.15rem 1.3rem; border: 1px solid #e4d9eb; border-radius: 1rem; color: var(--ink); background: white; box-shadow: 0 1.1rem 3.5rem #25163b37; }
dialog::backdrop { background: #21172f67; }
dialog h2 { margin-bottom: .84rem; font-size: 1.4rem; letter-spacing: -.045em; }
dialog p { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.dialog-actions { margin-top: 1rem; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }
.dialog-error { color: #8a2c43; font-size: .84rem; margin-top: .55rem; overflow-wrap: anywhere; }

@media (max-width: 66rem) {
  .page-width { width: min(100% - 3rem, 77rem); }
  .product-window { inset-inline: 5% 9%; }
  .product-widget { inset-inline-end: 5%; }
}

@media (max-width: 52rem) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero h1 { max-inline-size: 13ch; }
  .desktop-break { display: none; }
  .product-figure { width: min(100%, 37rem); justify-self: center; }
  .desk-layout { grid-template-columns: 11.5rem minmax(0, 1fr); }
  .desk-sidebar { padding-inline: .65rem; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 43rem) {
  .how-grid { grid-template-columns: 1fr; }
  .desk-layout { grid-template-columns: 1fr; }
  .desk-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .51rem .64rem; padding-block: .62rem; border-right: none; border-bottom: 1px solid var(--line); }
  .desk-nav { grid-auto-flow: column; }
  .desk-nav-button { padding: .4rem .55rem; }
  .sidebar-actions { display: flex; flex-wrap: wrap; gap: .23rem; padding: 0; border: none; }
  .sidebar-status { margin-top: 0; align-self: center; font-size: .73rem; padding: .52rem; }
  .inbox-layout { grid-template-columns: minmax(0, 1fr); min-height: 23rem; }
  .inbox-list { border-right: none; }
  .inbox-layout .thread-panel { display: none; }
  .inbox-layout.has-thread .inbox-list { display: none; }
  .inbox-layout.has-thread .thread-panel { display: grid; }
  .thread-back { display: inline-flex; }
  .conversation-list { max-block-size: none; }
}

@media (max-width: 30rem) {
  .page-width { width: calc(100% - 2rem); }
  .public-header { min-block-size: 4rem; }
  .public-header .nav-link { display: none; }
  .wordmark { font-size: 1.04rem; }
  .wordmark .brand-mark { width: 1.72rem; height: 1.72rem; border-radius: .5rem; }
  .hero { padding-block: 2.8rem 1.4rem; }
  .hero-actions { gap: .75rem .9rem; }
  .product-stage { min-block-size: 16.2rem; border-radius: 1.08rem; }
  .product-topline { padding-inline: .59rem; }
  .product-list { padding-inline: .3rem; }
  .product-thread { padding-inline: .4rem; }
  .product-ticket { gap: .26rem; }
  .product-widget { inset-block-end: 4%; }
  #account-name { max-inline-size: 12ch; }
  .desk-sidebar .nav-icon { display: none; }
  .setup-prompt { align-items: flex-start; flex-direction: column; }
}

@media (pointer: coarse) {
  .button, .desk-nav-button, .filter-group button { min-block-size: 3rem; }
}
