:root {
  --ui-font: "Instrument Sans", Helvetica, Arial, sans-serif;
  --chat-width: 540px;
  --sidebar-width: 264px;
  --topbar-height: 48px;
  --gold: #f4a51c;
  --gold-strong: #e8940f;
  --ink: #111111;
  --muted: rgba(17, 17, 17, 0.56);
  --line: rgba(17, 17, 17, 0.12);
  --line-strong: rgba(17, 17, 17, 0.2);
  --surface: #ffffff;
  --surface-subtle: #fafafa;
  --canvas: #f8f8f6;
  --lavender: #a8aff0;
  --shadow-soft: rgba(20, 20, 20, 0.09) 0 18px 44px;
  --shadow-control: rgba(20, 20, 20, 0.08) 0 8px 24px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--ui-font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[data-plume-onboarding="open"] {
  --sidebar-width: 0px;
}

body.onboarding-open,
body:has(#onboarding:not([hidden])) {
  --sidebar-width: 0px;
}

html[data-plume-onboarding="open"] .app-sidebar,
html[data-plume-onboarding="open"] .sidebar-reveal,
html[data-plume-onboarding="open"] .mobile-switcher,
html[data-plume-onboarding="open"] .dv-whatsapp-float,
body.onboarding-open .app-sidebar,
body.onboarding-open .sidebar-reveal,
body.onboarding-open .mobile-switcher,
body.onboarding-open .dv-whatsapp-float,
body:has(#onboarding:not([hidden])) .app-sidebar,
body:has(#onboarding:not([hidden])) .sidebar-reveal,
body:has(#onboarding:not([hidden])) .mobile-switcher,
body:has(#onboarding:not([hidden])) .dv-whatsapp-float {
  display: none !important;
}

button,
input,
textarea {
  font: inherit;
}

button {
  appearance: none;
  -webkit-appearance: none;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 110;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-right: 1px solid rgba(17, 17, 17, 0.09);
  background: #fbfbfa;
  color: #111111;
  font-family: var(--ui-font);
  box-shadow: none;
  backdrop-filter: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 2px 2px 8px;
}

.sidebar-collapse,
.sidebar-reveal {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.sidebar-collapse:hover,
.sidebar-reveal:hover {
  border-color: rgba(17, 17, 17, 0.18);
  background: #f4f4f3;
  transform: none;
  box-shadow: none;
}

.sidebar-collapse svg,
.sidebar-reveal svg {
  width: 18px;
  height: 18px;
}

.sidebar-reveal {
  position: fixed;
  left: 10px;
  top: 7px;
  z-index: 115;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
}

body.sidebar-collapsed .sidebar-reveal {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

body.sidebar-collapsed .app-sidebar {
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(-1 * var(--sidebar-width) - 12px));
}

.sidebar-brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111111;
  box-shadow: none;
}

.sidebar-brand-mark img {
  width: 27px;
  height: 27px;
  object-fit: contain;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-brand strong {
  color: #111111;
  font-size: 17px;
  line-height: 1.05;
  font-weight: 750;
  letter-spacing: 0;
}

.sidebar-brand small {
  display: none;
}

.sidebar-primary,
.sidebar-nav button,
.sidebar-document {
  width: 100%;
  border: 0;
  font-family: var(--ui-font);
  cursor: pointer;
}

.sidebar-primary {
  height: 40px;
  border-radius: 9px;
  background: #111111;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.sidebar-primary:hover {
  background: #000000;
  transform: none;
  box-shadow: none;
}

.sidebar-primary svg,
.sidebar-nav svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.sidebar-nav {
  --sidebar-active-y: 0px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 11px;
  background: #ffffff;
  box-shadow: none;
  isolation: isolate;
  overflow: hidden;
}

.sidebar-nav::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 3px;
  left: 3px;
  right: 3px;
  height: 36px;
  border-radius: 8px;
  background: #f0f0ef;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 18px -16px rgba(17, 17, 17, 0.38);
  transform: translate3d(0, var(--sidebar-active-y), 0);
  transition:
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms ease;
  pointer-events: none;
}

.sidebar-nav[data-active-section="library"] {
  --sidebar-active-y: 38px;
}

.sidebar-nav[data-active-section="none"]::before {
  opacity: 0;
}

.sidebar-nav button,
.sidebar-settings-bottom {
  position: relative;
  z-index: 1;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  color: rgba(17, 17, 17, 0.58);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 120ms ease, color 120ms ease;
}

.sidebar-settings-bottom {
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: #ffffff;
  margin-top: -4px;
}

.sidebar-nav button:hover,
.sidebar-settings-bottom:hover {
  background: rgba(17, 17, 17, 0.04);
  color: #111111;
  transform: none;
}

.sidebar-nav button.active,
.sidebar-settings-bottom.active {
  background: transparent;
  color: #111111;
  box-shadow: none;
}

.sidebar-settings-bottom.active {
  background: #f0f0ef;
}

.sidebar-nav button.active:hover {
  background: transparent;
}

.sidebar-settings-bottom.active:hover {
  background: #f0f0ef;
}

.sidebar-nav button.active::before {
  display: none;
}

.sidebar-section {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 9px;
}

.sidebar-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 3px;
  color: rgba(17, 17, 17, 0.45);
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-section-head strong {
  min-width: 24px;
  border-radius: 999px;
  background: #eeeeed;
  color: rgba(17, 17, 17, 0.56);
  padding: 5px 8px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0;
}

.sidebar-documents {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  padding: 1px 1px 8px;
}

.sidebar-document {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #111111;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 7px 9px;
  text-align: left;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.sidebar-document:hover,
.sidebar-document.active {
  border-color: transparent;
  background: #f2f2f1;
  box-shadow: none;
}

.sidebar-document:hover {
  transform: none;
}

.sidebar-document.active {
  border-color: transparent;
  box-shadow: none;
}

.sidebar-document-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.sidebar-document strong,
.sidebar-document small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-document strong {
  color: #111111;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 650;
}

.sidebar-document small,
.sidebar-document em {
  color: rgba(17, 17, 17, 0.46);
  font-size: 10px;
  line-height: 1.1;
  font-style: normal;
  font-weight: 600;
}

.sidebar-document em {
  grid-column: 1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sidebar-empty {
  margin: 0;
  border: 1px dashed rgba(17, 17, 17, 0.13);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
  padding: 14px;
  color: rgba(17, 17, 17, 0.52);
  font-size: 12px;
  line-height: 1.4;
}

.sidebar-account-wrap {
  position: relative;
}

.sidebar-account {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 12px;
  background: #ffffff;
  color: #111111;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 15px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  text-align: left;
  font-family: var(--ui-font);
  cursor: pointer;
  box-shadow: none;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.sidebar-account:hover,
.sidebar-account[aria-expanded="true"] {
  border-color: rgba(17, 17, 17, 0.14);
  background: #f4f4f3;
}

.sidebar-account-picture {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #111111;
  object-fit: cover;
  display: block;
}

.sidebar-account-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.sidebar-account-copy strong,
.sidebar-account-copy span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-copy strong {
  color: #111111;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 750;
}

.sidebar-account-copy span {
  color: rgba(17, 17, 17, 0.52);
  font-size: 10px;
  line-height: 1.15;
  font-weight: 650;
}

.sidebar-account-chevron {
  width: 15px;
  height: 15px;
  color: rgba(17, 17, 17, 0.46);
  transition: transform 140ms ease;
}

.sidebar-account[aria-expanded="true"] .sidebar-account-chevron {
  transform: rotate(180deg);
}

.sidebar-account-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 140;
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 12px;
  background: #ffffff;
  box-shadow:
    0 18px 42px -28px rgba(17, 17, 17, 0.5),
    0 1px 2px rgba(17, 17, 17, 0.06);
}

.sidebar-account-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(17, 17, 17, 0.72);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 9px;
  text-align: left;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.sidebar-account-menu button:hover {
  background: #f3f3f2;
  color: #111111;
}

.sidebar-account-menu button.active {
  background: #f0f0ef;
  color: #111111;
}

.sidebar-account-menu svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.language-picker-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 92px);
  z-index: 180;
  width: min(360px, calc(100vw - 24px));
  max-height: min(340px, calc(100vh - 132px));
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(17, 17, 17, 0.13);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: rgba(17, 17, 17, 0.16) 0 20px 46px -16px, rgba(17, 17, 17, 0.08) 0 2px 8px;
}

.language-picker-popover::after {
  content: "";
  position: absolute;
  left: 54px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid rgba(17, 17, 17, 0.13);
  border-bottom: 1px solid rgba(17, 17, 17, 0.13);
  background: #ffffff;
  transform: rotate(45deg);
}

.language-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.language-picker-option {
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: rgba(17, 17, 17, 0.74);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 6px 4px;
  text-align: center;
  font-family: var(--ui-font);
  cursor: pointer;
}

.language-picker-option:hover {
  border-color: rgba(17, 17, 17, 0.22);
  background: #f7f7f6;
  color: #111111;
}

.language-picker-option.active {
  border-color: rgba(17, 17, 17, 0.28);
  background: #f0f0ef;
  color: #111111;
}

.language-picker-option span {
  font-size: 17px;
  line-height: 1;
}

.language-picker-option strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.05;
  font-weight: 720;
  letter-spacing: 0;
}

.sidebar-pricing {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(224, 104, 18, 0.54);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 46%),
    linear-gradient(180deg, #ffc247 0%, #ff9f1c 54%, #f97316 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(145, 62, 10, 0.16);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -1px 0 rgba(145, 62, 10, 0.14);
  transition: filter 120ms ease, transform 120ms ease, box-shadow 140ms ease;
}

.sidebar-pricing:hover {
  filter: saturate(1.06) brightness(1.02);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    inset 0 -1px 0 rgba(145, 62, 10, 0.16);
}

.sidebar-pricing svg {
  width: 15px;
  height: 15px;
}

.topbar {
  position: fixed;
  inset: 0 0 auto var(--sidebar-width);
  z-index: 100;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

body.documents-full-open .topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}

body.documents-full-open .document-name,
body.documents-full-open .top-actions {
  display: none !important;
}

.topbar .brand {
  display: none;
}

.mobile-toolbar-hint {
  display: none;
}

body.sidebar-collapsed .topbar {
  left: 0;
}

body.sidebar-collapsed .topbar .brand {
  display: flex;
  width: auto;
  min-width: 180px;
  margin-left: 52px;
  gap: 8px;
}

body.sidebar-collapsed .document-name {
  width: min(420px, calc(100vw - 620px));
}

body.sidebar-collapsed .workspace,
body.sidebar-collapsed .documents-panel,
body.sidebar-collapsed .documents-scrim,
body.sidebar-collapsed .onboarding,
body.sidebar-collapsed .resize-shield {
  left: 0;
}

@media (min-width: 761px) {
  body.sidebar-collapsed .brand .icon-button {
    display: none;
  }
}

.brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 420px;
  height: 36px;
  margin-left: 10px;
  gap: 12px;
  font-family: var(--ui-font);
  font-size: 23px;
  line-height: 1;
  font-weight: 700;
}

.brand-logo {
  width: 25px;
  height: 25px;
  object-fit: contain;
  flex: 0 0 auto;
}

.icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: inline-grid;
  place-items: center;
  position: relative;
  padding: 0;
  color: #111111;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: #fafafa;
  transform: translateY(-1px);
}

.icon-button svg {
  width: 17px;
  height: 17px;
  display: block;
}

.document-name {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  flex: 0 1 420px;
  width: min(420px, calc(100vw - var(--sidebar-width) - 520px));
  min-width: 230px;
  height: 32px;
  margin-left: 14px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-family: var(--ui-font);
  font-size: 14px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.document-name:focus {
  border-color: rgba(244, 165, 28, 0.62);
  box-shadow: 0 0 0 3px rgba(244, 165, 28, 0.13);
  background: #ffffff;
}

.top-actions {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 10px;
  height: 36px;
}

.view-mode-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  padding: 3px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: rgba(17, 17, 17, 0.055) 0 8px 20px;
}

.view-mode-switcher button {
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(17, 17, 17, 0.62);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 9px;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.view-mode-switcher svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.view-mode-switcher button:hover {
  background: rgba(17, 17, 17, 0.06);
  color: #111111;
}

.view-mode-switcher button.active {
  background: #111111;
  color: #ffffff;
}

.pricing-top-button {
  height: 34px;
  border: 1px solid rgba(224, 104, 18, 0.54);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 46%),
    linear-gradient(180deg, #ffc247 0%, #ff9f1c 54%, #f97316 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(145, 62, 10, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -1px 0 rgba(145, 62, 10, 0.14);
  transition: filter 120ms ease, transform 120ms ease, box-shadow 140ms ease;
}

.pricing-top-button svg {
  width: 15px;
  height: 15px;
}

.pricing-top-button:hover {
  transform: translateY(-1px);
  filter: saturate(1.06) brightness(1.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    inset 0 -1px 0 rgba(145, 62, 10, 0.16);
}

.top-login-button {
  height: 34px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 10px;
  background: #ffffff;
  color: #111111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.top-login-button:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 17, 17, 0.2);
  background: #f7f7f5;
}

.download-button {
  width: 118px;
  height: 34px;
  border-radius: 10px;
  border: 0;
  background: #111111;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: rgba(0, 0, 0, 0.15) 0 10px 20px, inset rgba(255, 255, 255, 0.08) 0 1px 0;
  transition: background-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.download-button:hover {
  background: #000000;
  transform: translateY(-1px);
  box-shadow: rgba(0, 0, 0, 0.18) 0 10px 22px;
}

.download-button[aria-expanded="true"] {
  background: #000000;
  box-shadow: rgba(0, 0, 0, 0.2) 0 10px 22px;
}

.page-settings-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #111111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: rgba(17, 17, 17, 0.055) 0 8px 20px;
  transition: background-color 120ms ease, transform 120ms ease, border-color 120ms ease;
}

.page-settings-button svg {
  width: 17px;
  height: 17px;
}

.page-settings-button:hover,
.page-settings-button[aria-expanded="true"] {
  transform: translateY(-1px);
  border-color: rgba(17, 17, 17, 0.18);
  background: #ffffff;
}

.download-button:focus-visible,
.page-settings-button:focus-visible,
.pricing-top-button:focus-visible,
.top-login-button:focus-visible,
.sidebar-pricing:focus-visible,
.sidebar-account:focus-visible,
.sidebar-account-menu button:focus-visible,
.view-mode-switcher button:focus-visible,
.sidebar-collapse:focus-visible,
.sidebar-reveal:focus-visible,
.sidebar-primary:focus-visible,
.sidebar-nav button:focus-visible,
.sidebar-document:focus-visible,
.text-button:focus-visible,
.download-action:focus-visible,
.small-tool:focus-visible,
.suggestion:focus-visible,
.pill:focus-visible,
.template-chip:focus-visible,
.template-action:focus-visible,
.send-button:focus-visible,
.send-mode-button:focus-visible,
.send-mode-menu button:focus-visible,
.role-card:focus-visible,
.specialty-step button:focus-visible,
.mobile-switcher button:focus-visible {
  outline: 2px solid rgba(255, 177, 42, 0.7);
  outline-offset: 2px;
}

.documents-full-button:focus-visible,
.documents-full-actions button:focus-visible,
.full-document-card:focus-visible,
.history-row button:focus-visible {
  outline: 2px solid rgba(255, 177, 42, 0.7);
  outline-offset: 2px;
}

.send-button {
  --send-top: #ffb13a;
  --send-mid: #ff9a1c;
  --send-bottom: #f37314;
  --send-border: rgba(224, 104, 18, 0.5);
  --send-shadow: rgba(249, 115, 22, 0.6);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 124px;
  height: 32px;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid var(--send-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 48%),
    linear-gradient(180deg, var(--send-top) 0%, var(--send-mid) 55%, var(--send-bottom) 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(145, 62, 10, 0.18);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 -1px 0 rgba(145, 62, 10, 0.18),
    0 6px 16px -10px var(--send-shadow),
    0 1px 2px rgba(145, 62, 10, 0.14);
  transition: background-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.send-button[data-active-mode="write"] {
  --send-top: #ffb13a;
  --send-mid: #ff9a1c;
  --send-bottom: #f37314;
  --send-border: rgba(224, 104, 18, 0.5);
  --send-shadow: rgba(249, 115, 22, 0.6);
}

.send-button[data-active-mode="rewrite"] {
  --send-top: #60a5fa;
  --send-mid: #2563eb;
  --send-bottom: #1d4ed8;
  --send-border: rgba(37, 99, 235, 0.48);
  --send-shadow: rgba(37, 99, 235, 0.58);
}

.send-button[data-active-mode="style"] {
  --send-top: #a78bfa;
  --send-mid: #7c3aed;
  --send-bottom: #6d28d9;
  --send-border: rgba(124, 58, 237, 0.48);
  --send-shadow: rgba(124, 58, 237, 0.58);
}

.send-button[data-active-mode="talk"] {
  --send-top: #34d399;
  --send-mid: #059669;
  --send-bottom: #047857;
  --send-border: rgba(5, 150, 105, 0.48);
  --send-shadow: rgba(5, 150, 105, 0.58);
}

.send-button[data-pro-locked] {
  --send-top: #111111;
  --send-mid: #111111;
  --send-bottom: #111111;
  --send-border: rgba(17, 17, 17, 0.78);
  --send-shadow: rgba(17, 17, 17, 0.44);
}

.send-cluster {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
}

.send-mode {
  position: relative;
  display: none;
  flex: 0 0 auto;
  order: 1;
  margin-right: -9px;
}

.send-mode-button {
  --mode-accent: #111111;
  --mode-bg: #ffffff;
  --mode-soft: #f7f7f5;
  height: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--mode-accent) 30%, transparent);
  border-radius: 999px 0 0 999px;
  background-color: var(--mode-bg);
  background-image: linear-gradient(180deg, #ffffff 0%, var(--mode-bg) 100%);
  color: color-mix(in srgb, var(--mode-accent) 86%, #111111);
  padding: 0 10px 0 12px;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 8px 18px -18px var(--mode-accent);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.send-mode-button:hover,
.send-mode-button[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--mode-accent) 42%, transparent);
  background: var(--mode-soft);
  color: color-mix(in srgb, var(--mode-accent) 92%, #111111);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 10px 22px -18px var(--mode-accent);
}

.send-mode-button svg {
  width: 13px;
  height: 13px;
}

.send-mode-button #sendModeLabel {
  display: inline-flex;
  align-items: center;
}

.send-mode-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  width: 188px;
  padding: 5px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: rgba(0, 0, 0, 0.14) 0 14px 32px -12px, rgba(0, 0, 0, 0.06) 0 2px 8px;
}

.send-mode-menu button {
  --mode-accent: #111111;
  --mode-bg: #f3f3f1;
  width: 100%;
  height: 34px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: color-mix(in srgb, var(--mode-accent) 82%, #111111);
  padding: 0 8px 0 10px;
  font-family: var(--ui-font);
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}

.send-mode-menu button:hover,
.send-mode-menu button[aria-checked="true"] {
  background: var(--mode-bg);
}

.send-mode-menu button[aria-checked="true"] {
  color: color-mix(in srgb, var(--mode-accent) 92%, #111111);
  font-weight: 750;
}

.send-mode-menu button::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--mode-accent) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mode-accent) 9%, transparent);
}

.send-mode-menu button[aria-checked="true"]::before {
  background: var(--mode-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mode-accent) 16%, transparent);
}

.send-mode-menu [data-send-mode="write"],
.send-mode-button[data-active-mode="write"] {
  --mode-accent: #f97316;
  --mode-bg: #fff4e8;
  --mode-soft: #fff7ed;
}

.send-mode-menu [data-send-mode="rewrite"],
.send-mode-button[data-active-mode="rewrite"] {
  --mode-accent: #2563eb;
  --mode-bg: #eff6ff;
  --mode-soft: #f3f7ff;
}

.send-mode-menu [data-send-mode="rewrite"][data-pro-locked] {
  --mode-accent: #111111;
  --mode-bg: #f1f1ef;
  --mode-soft: #f7f7f5;
}

.send-mode-button[data-pro-locked] {
  --mode-accent: #111111;
  --mode-bg: #111111;
  --mode-soft: #111111;
  min-width: 214px;
  background-image: none;
  color: #ffffff;
  box-shadow: none;
}

.send-mode-button[data-pro-locked]:hover,
.send-mode-button[data-pro-locked][aria-expanded="true"] {
  background: #111111;
  color: #ffffff;
  box-shadow: none;
}

.send-mode-button[data-pro-locked] #sendModeLabel {
  font-size: 12px;
  font-weight: 800;
}

.send-mode-menu [data-send-mode="style"],
.send-mode-button[data-active-mode="style"] {
  --mode-accent: #7c3aed;
  --mode-bg: #f5f3ff;
  --mode-soft: #faf8ff;
}

.send-mode-menu [data-send-mode="talk"],
.send-mode-button[data-active-mode="talk"] {
  --mode-accent: #059669;
  --mode-bg: #ecfdf5;
  --mode-soft: #f0fdf4;
}

.send-mode-info {
  position: relative;
  margin-left: auto;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--mode-accent, #111111) 28%, transparent);
  border-radius: 50%;
  color: color-mix(in srgb, var(--mode-accent, #111111) 70%, #111111);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.send-mode-info::after {
  content: attr(data-info);
  position: absolute;
  right: -4px;
  bottom: calc(100% + 8px);
  z-index: 45;
  width: 224px;
  padding: 8px 10px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.96);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  box-shadow: rgba(0, 0, 0, 0.18) 0 12px 26px -12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.send-mode-info::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: calc(100% + 3px);
  z-index: 46;
  width: 8px;
  height: 8px;
  background: rgba(17, 17, 17, 0.96);
  opacity: 0;
  pointer-events: none;
  transform: rotate(45deg) translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.send-mode-info:hover::after,
.send-mode-info:hover::before {
  opacity: 1;
  transform: translateY(0);
}

.send-mode-info:hover::before {
  transform: rotate(45deg) translateY(0);
}

.send-button:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(145, 62, 10, 0.18),
    0 10px 22px -10px var(--send-shadow),
    0 1px 2px rgba(145, 62, 10, 0.16);
}

.send-button {
  order: 2;
  z-index: 2;
  border-radius: 999px;
}

.send-cluster:hover .send-button,
.send-cluster:hover .send-mode-button {
  transform: translateY(-1px);
}

.send-button:active {
  transform: translateY(0) scale(0.99);
}

.send-button:disabled {
  opacity: 0.46;
  filter: saturate(0.72);
  cursor: default;
  pointer-events: none;
}

body.is-streaming .send-button {
  opacity: 1;
  filter: none;
  cursor: pointer;
  pointer-events: auto;
}

body.is-streaming .send-button:hover {
  transform: translateY(-1px);
}

.send-button > span:not(.button-shimmer),
.send-button > svg {
  position: relative;
  z-index: 1;
}

.send-button .button-shimmer {
  position: absolute;
  top: -22px;
  left: -72px;
  z-index: 0;
  width: 58px;
  height: 96px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  filter: blur(4px);
  opacity: 0.55;
  transform: rotate(14deg);
  animation: buttonShimmer 1.6s ease-in-out infinite;
  pointer-events: none;
}

.send-button .send-label {
  white-space: nowrap;
}

.send-button svg {
  width: 16px;
  height: 16px;
}

body.chat-started .send-button,
body.document-has-content .send-button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
}

body.chat-started .send-button svg,
body.document-has-content .send-button svg {
  width: 17px;
  height: 17px;
}

body.chat-started .send-button .send-label,
body.chat-started .send-button .button-shimmer,
body.document-has-content .send-button .send-label,
body.document-has-content .send-button .button-shimmer {
  display: none;
}

body.chat-started .send-mode,
body.document-has-content .send-mode {
  display: block;
}

body.chat-started .send-mode-button,
body.document-has-content .send-mode-button {
  width: auto;
  min-width: 78px;
  height: 36px;
  min-height: 36px;
  justify-content: center;
  gap: 5px;
  padding: 0 10px 0 11px;
}

body.chat-started .send-mode-button #sendModeLabel,
body.document-has-content .send-mode-button #sendModeLabel {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
}

body.chat-started .send-mode-button svg,
body.document-has-content .send-mode-button svg {
  width: 15px;
  height: 15px;
}

body.chat-started .send-cluster,
body.document-has-content .send-cluster {
  gap: 0;
}

@keyframes buttonShimmer {
  0% {
    transform: translateX(0) rotate(14deg);
  }
  60%,
  100% {
    transform: translateX(260px) rotate(14deg);
  }
}

.pricing-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 17, 17, 0.48);
  backdrop-filter: none;
}

.pricing-modal.is-mandatory {
  z-index: 10000;
}

.pricing-modal[hidden] {
  display: none;
}

.pricing-dialog {
  position: relative;
  width: min(628px, calc(100vw - 32px));
  height: min(1200px, calc(100vh - 36px));
  max-height: min(1200px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: none;
  font-family: var(--ui-font);
  color: #111111;
}

.overdue-payment-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 17, 17, 0.52);
}

.overdue-payment-modal[hidden] {
  display: none;
}

.overdue-payment-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 18px;
  background: #ffffff;
  color: #111111;
  padding: 32px;
  font-family: var(--ui-font);
  display: grid;
  gap: 14px;
}

.overdue-payment-dialog p {
  margin: 0;
  color: rgba(17, 17, 17, 0.48);
  font-size: 12px;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overdue-payment-dialog h2 {
  margin: 0;
  max-width: 430px;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 0.96;
  font-weight: 860;
  letter-spacing: 0;
}

.overdue-payment-dialog > span {
  color: rgba(17, 17, 17, 0.62);
  font-size: 17px;
  line-height: 1.4;
  font-weight: 650;
}

.overdue-payment-button {
  min-height: 54px;
  margin-top: 8px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 12px;
  background: #111111;
  color: #ffffff;
  font-size: 17px;
  font-weight: 820;
  font-family: var(--ui-font);
  cursor: pointer;
}

.overdue-payment-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.overdue-payment-dialog small {
  color: rgba(17, 17, 17, 0.48);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}

.pricing-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #111111;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.pricing-close svg {
  width: 17px;
  height: 17px;
}

.pricing-modal.is-mandatory .pricing-close {
  display: none;
}

.pricing-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px 0;
  background: #ffffff;
}

.pricing-head h2 {
  margin: 0;
  padding-right: 44px;
  font-size: 25px;
  line-height: 1.12;
  font-weight: 820;
  letter-spacing: 0;
}

.pricing-billing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
  width: min(100%, 480px);
  max-width: 100%;
  margin-top: 14px;
  padding: 4px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 15px;
  background: #f2f2f0;
  box-shadow: inset 0 1px 0 rgba(17, 17, 17, 0.03);
}

.pricing-billing button {
  height: 38px;
  min-width: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(17, 17, 17, 0.58);
  padding: 0 10px;
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 780;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.pricing-billing button.active {
  background: #ffffff;
  color: #111111;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.12), 0 12px 24px rgba(17, 17, 17, 0.06);
}

.pricing-billing button span {
  line-height: 1;
  color: inherit;
}

.pricing-billing small {
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 10.5px;
  line-height: 1;
  font-weight: 760;
  white-space: nowrap;
  color: #137333;
  background: #dcfce7;
}

.pricing-billing button[data-pricing-billing="monthly"] small {
  color: #9a4f00;
  background: #fff1cf;
}

.pricing-billing button.active small {
  filter: saturate(1.08);
}

.pricing-billing small[hidden] {
  display: none;
}

.pricing-plans {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.pricing-plan {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  padding: 14px 18px;
  text-align: left;
  font-family: var(--ui-font);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.pricing-plan:hover {
  border-color: rgba(17, 17, 17, 0.24);
  transform: translateY(-1px);
}

.pricing-plan.active {
  border-color: rgba(249, 115, 22, 0.7);
  background: #fff7ed;
}

.pricing-plan > span {
  grid-column: 1;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 850;
}

.pricing-plan strong {
  grid-column: 1;
  font-size: 23px;
  line-height: 1.25;
  font-weight: 850;
}

.pricing-plan em {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  position: relative;
  display: inline-flex;
  width: max-content;
  color: rgba(17, 17, 17, 0.52);
  font-size: 15px;
  line-height: 1.2;
  font-style: normal;
  text-decoration: none;
}

.pricing-plan em::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: 52%;
  height: 1.7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.82;
  transform: rotate(-11deg);
  transform-origin: center;
  pointer-events: none;
}

.pricing-price {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pricing-price .price-currency {
  font-size: 0.68em;
  line-height: 1;
  transform: translateY(-0.28em);
}

.pricing-price .price-currency-code {
  margin-right: 4px;
  font-size: 0.52em;
  letter-spacing: 0.02em;
  transform: none;
}

.pricing-price .price-currency-after {
  margin-left: 2px;
  transform: none;
}

.pricing-price .price-main {
  font-size: 1em;
  line-height: 1;
}

.pricing-price .price-cents {
  font-size: 0.52em;
  line-height: 1;
  transform: translateY(-0.32em);
}

.pricing-price .price-suffix {
  margin-left: 2px;
  color: rgba(17, 17, 17, 0.58);
  font-size: 0.56em;
  line-height: 1;
  font-weight: 760;
}

.pricing-price-compare .price-currency,
.pricing-price-compare .price-cents {
  font-size: 0.72em;
}

.pricing-discount {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 10px 0 12px;
  border-radius: 10px;
  background: #dcfce7;
  padding: 10px 12px;
  color: #111111;
  font-size: 14px;
  font-weight: 500;
}

.pricing-discount strong {
  font-weight: 850;
}

.pricing-flag {
  width: 16px;
  height: 16px;
  display: inline-block;
  object-fit: contain;
}

.pricing-compare {
  --pricing-first-col: calc(100% - 260px);
  --pricing-plan-col: 130px;
  position: relative;
  display: grid;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
  isolation: isolate;
}

.pricing-compare::before {
  content: "";
  position: absolute;
  top: 1px;
  bottom: 0;
  left: var(--pricing-first-col);
  width: var(--pricing-plan-col);
  border-radius: 11px;
  background: rgba(255, 184, 76, 0.16);
  transform: translateX(var(--pricing-highlight-x, 0));
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 160ms ease;
  z-index: 0;
}

.pricing-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 130px;
  gap: 0;
  min-height: 34px;
  align-items: center;
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
  color: #111111;
  font-size: 13.5px;
  line-height: 1.25;
}

.pricing-row > * {
  position: relative;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  transition: color 160ms ease;
}

.pricing-row span {
  color: rgba(17, 17, 17, 0.64);
  font-weight: 700;
}

.pricing-row b,
.pricing-row strong {
  color: #111111;
  font-size: 13.5px;
  font-weight: 850;
  justify-content: center;
  text-align: center;
}

.pricing-row-head {
  min-height: 38px;
  color: #111111;
}

.pricing-row-head > * {
  min-height: 38px;
}

.pricing-modal[data-selected-plan="plus"] .pricing-row > :nth-child(2),
.pricing-modal[data-selected-plan="pro"] .pricing-row > :nth-child(3) {
  color: #b65e00;
}

.pricing-modal[data-selected-plan="pro"] .pricing-compare {
  --pricing-highlight-x: var(--pricing-plan-col);
}

.pricing-modal[data-selected-plan="plus"] .pricing-row-head > :nth-child(2),
.pricing-modal[data-selected-plan="pro"] .pricing-row-head > :nth-child(3) {
  color: #b65e00;
}

.pricing-footer {
  flex: 0 0 auto;
  position: static;
  bottom: 0;
  display: grid;
  gap: 8px;
  padding: 0 28px 18px;
  border-top: 0;
  background: #ffffff;
}

.pricing-start-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 178px;
  min-height: 42px;
  border: 1px solid rgba(224, 104, 18, 0.54);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 42%),
    linear-gradient(180deg, #ffc247 0%, #ff9f1c 52%, #f97316 100%);
  color: #ffffff;
  padding: 0 22px;
  font-family: var(--ui-font);
  font-size: 15px;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(145, 62, 10, 0.16);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(145, 62, 10, 0.16);
  transition: transform 120ms ease, box-shadow 180ms ease;
}

.pricing-start-button:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -1px 0 rgba(145, 62, 10, 0.16);
}

.pricing-social-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: rgba(17, 17, 17, 0.42);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.pricing-social-divider::before,
.pricing-social-divider::after {
  content: "";
  height: 1px;
  background: rgba(17, 17, 17, 0.1);
}

.pricing-social-title {
  margin: 0;
  color: #111111;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  text-align: center;
}

.pricing-social-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.pricing-social-button {
  min-height: 34px;
  border: 1px solid rgba(17, 17, 17, 0.72);
  border-radius: 9px;
  padding: 0 10px;
  background: #111111;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--ui-font);
  font-size: 11.5px;
  line-height: 1.15;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.pricing-social-button:hover {
  transform: translateY(-1px);
  background: #1b1b1b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.pricing-social-icon {
  width: 14px;
  height: 14px;
  display: block;
  filter: brightness(0) invert(1);
}

.pricing-start-button:focus-visible,
.pricing-social-button:focus-visible,
.pricing-close:focus-visible,
.pricing-billing button:focus-visible,
.pricing-plan:focus-visible {
  outline: 2px solid rgba(255, 177, 42, 0.72);
  outline-offset: 2px;
}

.pricing-start-button > span:not(.button-shimmer) {
  position: relative;
  z-index: 1;
}

.pricing-footer p {
  margin: 0;
  color: rgba(17, 17, 17, 0.48);
  font-size: 10.5px;
  line-height: 1.35;
  text-align: center;
}

.pricing-footer .pricing-footnote,
.simple-pricing-hero .simple-pricing-renewal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  color: #080808;
  font-size: 11.5px;
  line-height: 1.25;
  font-weight: 820;
  text-align: center;
}

.pricing-footer .pricing-footnote::before,
.simple-pricing-hero .simple-pricing-renewal::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.simple-pricing-offer[hidden] {
  display: none;
}

.pricing-modal.pricing-simple-999 .pricing-dialog {
  width: min(560px, calc(100vw - 32px));
  height: auto;
  max-height: min(760px, calc(100vh - 36px));
}

.pricing-modal.pricing-simple-999 .pricing-scroll {
  padding-bottom: 14px;
}

.pricing-modal.pricing-simple-999 .pricing-billing,
.pricing-modal.pricing-simple-999 .pricing-plans,
.pricing-modal.pricing-simple-999 .pricing-discount,
.pricing-modal.pricing-simple-999 .pricing-compare,
.pricing-modal.pricing-simple-999 .pricing-social-divider,
.pricing-modal.pricing-simple-999 .pricing-social-title,
.pricing-modal.pricing-simple-999 .pricing-social-actions {
  display: none;
}

.pricing-modal.pricing-simple-999 .pricing-head h2 {
  font-size: 24px;
}

.simple-pricing-offer {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.simple-pricing-hero {
  display: grid;
  gap: 11px;
  border: 1px solid rgba(17, 17, 17, 0.11);
  border-radius: 16px;
  background: #fbfaf7;
  padding: 18px;
}

.simple-pricing-hero p,
.simple-pricing-users {
  margin: 0;
}

.simple-pricing-hero p {
  color: rgba(17, 17, 17, 0.52);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.simple-pricing-hero h3 {
  margin: 0;
  color: #111111;
  font-size: 28px;
  line-height: 1.04;
  font-weight: 880;
  letter-spacing: 0;
}

.simple-pricing-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.simple-pricing-price strong {
  color: #111111;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.simple-pricing-price span {
  color: rgba(17, 17, 17, 0.62);
  font-size: 14px;
  font-weight: 780;
}

.simple-pricing-price em {
  position: relative;
  margin-left: auto;
  color: rgba(17, 17, 17, 0.48);
  font-size: 15px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 760;
}

.simple-pricing-price em::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: 52%;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.76;
  transform: rotate(-10deg);
}

.simple-pricing-hero small {
  color: #080808;
  font-size: 11.5px;
  line-height: 1.25;
  font-weight: 820;
}

.simple-pricing-users {
  border-radius: 12px;
  background: #eefdf3;
  color: #0f6f36;
  padding: 10px 12px;
  text-align: center;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 820;
}

.simple-pricing-benefits {
  display: grid;
  gap: 8px;
}

.simple-pricing-benefits div {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 38px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 11px;
}

.simple-pricing-benefits img {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.simple-pricing-benefits span {
  color: rgba(17, 17, 17, 0.78);
  font-size: 13.5px;
  line-height: 1.35;
  font-weight: 690;
}

.social-free-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 17, 17, 0.42);
}

.social-free-modal[hidden] {
  display: none;
}

.social-free-dialog {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 20px;
  background: #ffffff;
  padding: 0;
  overflow: auto;
  color: #111111;
  font-family: var(--ui-font);
}

.social-free-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 10px;
  background: #ffffff;
  color: #111111;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.social-free-close svg {
  width: 17px;
  height: 17px;
}

.social-free-head {
  display: grid;
  gap: 7px;
  padding: 34px 34px 18px;
  padding-right: 78px;
}

.social-free-head p {
  margin: 0;
  color: rgba(17, 17, 17, 0.48);
  font-size: 12px;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.social-free-head h2 {
  margin: 0;
  color: #111111;
  font-size: 30px;
  line-height: 1.16;
  font-weight: 850;
  letter-spacing: 0;
}

.social-free-head span {
  color: rgba(17, 17, 17, 0.62);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
}

.social-free-status {
  margin: 0;
  padding: 0 34px 14px;
  color: rgba(17, 17, 17, 0.58);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}

.social-free-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 2px 34px 34px;
  flex: 0 0 auto;
}

.social-free-link {
  min-height: 0;
  width: min(360px, 100%);
  height: 52px;
  align-self: center;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 10px;
  color: #ffffff;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--ui-font);
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.social-free-link:disabled {
  cursor: default;
  opacity: 0.82;
}

.social-free-link.is-linked {
  background: #108a43 !important;
  border-color: rgba(16, 138, 67, 0.48) !important;
}

.social-free-icon {
  width: 19px;
  height: 19px;
  display: block;
  filter: brightness(0) invert(1);
}

.social-free-modal[data-platform="tiktok"] .social-free-link {
  background: #111111;
  border-color: rgba(17, 17, 17, 0.72);
}

.social-free-modal[data-platform="reels"] .social-free-link {
  background: #c13584;
  border-color: rgba(193, 53, 132, 0.42);
}

.social-free-modal[data-platform="shorts"] .social-free-link {
  background: #ff0033;
  border-color: rgba(201, 0, 34, 0.42);
}

.social-free-qr {
  order: -1;
  width: min(260px, 72vw);
  height: min(260px, 72vw);
  align-self: center;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(90deg, #111111 12px, transparent 12px 23px, #111111 23px 35px, transparent 35px),
    linear-gradient(#111111 12px, transparent 12px 23px, #111111 23px 35px, transparent 35px),
    #ffffff;
  background-size: 35px 35px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 64px;
  padding: 16px;
}

.social-free-qr-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 64px;
}

.social-free-qr-placeholder span {
  border: 6px solid #111111;
  background: #ffffff;
}

.social-free-qr.has-real-qr {
  padding: 10px;
  display: grid;
  place-items: center;
  grid-template-columns: 1fr;
  gap: 0;
  background: #ffffff;
}

.social-free-qr.has-real-qr img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.social-free-qr.is-linked {
  border-color: rgba(16, 138, 67, 0.5);
}

.cancel-flow-modal {
  position: fixed;
  inset: 0;
  z-index: 270;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 17, 17, 0.42);
}

.cancel-flow-modal[hidden] {
  display: none;
}

.cancel-flow-dialog {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 18px;
  background: #ffffff;
  color: #111111;
  font-family: var(--ui-font);
  overflow: hidden;
}

.cancel-flow-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 10px;
  background: #ffffff;
  color: #111111;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cancel-flow-close svg {
  width: 17px;
  height: 17px;
}

.cancel-flow-head {
  display: grid;
  gap: 7px;
  padding: 28px 28px 18px;
  padding-right: 78px;
}

.cancel-flow-head p {
  margin: 0;
  color: rgba(17, 17, 17, 0.48);
  font-size: 12px;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cancel-flow-head h2 {
  margin: 0;
  color: #111111;
  font-size: 29px;
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.cancel-flow-head span {
  color: rgba(17, 17, 17, 0.62);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
}

.cancel-flow-body {
  padding: 0 28px 18px;
}

.cancel-flow-step {
  display: grid;
  gap: 9px;
}

.cancel-flow-step[hidden] {
  display: none;
}

.cancel-flow-step label {
  color: rgba(17, 17, 17, 0.72);
  font-size: 13px;
  font-weight: 780;
}

.cancel-flow-step textarea {
  width: 100%;
  min-height: 124px;
  resize: vertical;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 12px;
  background: #ffffff;
  color: #111111;
  padding: 12px 13px;
  font-family: var(--ui-font);
  font-size: 14px;
  line-height: 1.45;
  outline: none;
}

.cancel-flow-step textarea:focus {
  border-color: rgba(17, 17, 17, 0.36);
  box-shadow: rgba(17, 17, 17, 0.06) 0 0 0 4px;
}

.cancel-reason-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 18px;
  color: rgba(17, 17, 17, 0.48);
  font-size: 12px;
  font-weight: 700;
}

.cancel-reason-meta strong {
  color: #a10f0f;
  font-size: 12px;
  font-weight: 760;
}

.cancel-offer-card {
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 14px;
  background: #fafafa;
  padding: 20px;
}

.cancel-offer-card span {
  color: rgba(17, 17, 17, 0.48);
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cancel-offer-card strong {
  color: #111111;
  font-size: 27px;
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.cancel-offer-card p {
  max-width: 440px;
  margin: 0;
  color: rgba(17, 17, 17, 0.62);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
}

.cancel-flow-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 0 28px 28px;
}

.cancel-flow-actions[hidden] {
  display: none;
}

.cancel-flow-actions button {
  min-height: 44px;
  border-radius: 11px;
  padding: 0 16px;
  font-family: var(--ui-font);
  font-size: 14px;
  font-weight: 820;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.cancel-flow-actions button:hover {
  transform: translateY(-1px);
}

.cancel-flow-primary {
  border: 1px solid #111111;
  background: #111111;
  color: #ffffff;
}

.cancel-flow-secondary {
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: #ffffff;
  color: #111111;
}

.cancel-flow-danger {
  border: 1px solid rgba(161, 15, 15, 0.24);
  background: #fff5f5;
  color: #a10f0f;
}

.experiment-login-modal {
  position: fixed;
  inset: 0;
  z-index: 280;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 17, 17, 0.42);
}

.experiment-login-modal.is-blocking {
  z-index: 10001;
}

.experiment-login-modal[hidden] {
  display: none;
}

.experiment-login-dialog {
  position: relative;
  width: min(430px, calc(100vw - 32px));
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 18px;
  background: #ffffff;
  color: #111111;
  padding: 28px;
  font-family: var(--ui-font);
}

.experiment-login-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 10px;
  background: #ffffff;
  color: #111111;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.experiment-login-close svg {
  width: 17px;
  height: 17px;
}

.experiment-login-modal.is-blocking .experiment-login-close {
  display: none;
}

.experiment-login-dialog p,
.experiment-lock-card p {
  margin: 0 0 8px;
  color: rgba(17, 17, 17, 0.48);
  font-size: 12px;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.experiment-login-dialog h2,
.experiment-lock-card h2 {
  margin: 0;
  padding-right: 42px;
  color: #111111;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.experiment-login-dialog > span,
.experiment-lock-card > span {
  display: block;
  margin-top: 10px;
  color: rgba(17, 17, 17, 0.62);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 620;
}

.experiment-login-google {
  width: 100%;
  min-height: 48px;
  margin-top: 22px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 12px;
  background: #ffffff;
  color: #111111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--ui-font);
  font-size: 15px;
  font-weight: 820;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.experiment-login-google:hover,
.experiment-login-google:focus-visible {
  border-color: rgba(17, 17, 17, 0.32);
  background: #f7f7f6;
  outline: none;
}

.experiment-login-google.is-linked {
  border-color: #f4a51c;
  background: #fffaf0;
  box-shadow: rgba(244, 165, 28, 0.18) 0 0 0 4px;
}

.experiment-login-google svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.experiment-login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: rgba(17, 17, 17, 0.42);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.experiment-login-divider::before,
.experiment-login-divider::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: rgba(17, 17, 17, 0.1);
}

.experiment-login-dialog label,
.password-reset-dialog label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: rgba(17, 17, 17, 0.72);
  font-size: 13px;
  font-weight: 780;
}

.experiment-login-dialog label[hidden],
.password-reset-dialog label[hidden] {
  display: none;
}

.experiment-login-dialog input,
.password-reset-dialog input {
  min-height: 48px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 12px;
  background: #ffffff;
  color: #111111;
  padding: 0 13px;
  font-family: var(--ui-font);
  font-size: 15px;
  line-height: 1.2;
  outline: none;
}

.experiment-login-dialog input:focus,
.password-reset-dialog input:focus {
  border-color: rgba(17, 17, 17, 0.36);
  box-shadow: rgba(17, 17, 17, 0.06) 0 0 0 4px;
}

.experiment-login-forgot {
  justify-self: start;
  margin: 10px 0 0;
  border: 0;
  background: transparent;
  color: #111111;
  padding: 0;
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 780;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.experiment-login-forgot[hidden] {
  display: none;
}

.experiment-login-forgot:disabled {
  opacity: 0.48;
  cursor: default;
}

.experiment-login-message,
.password-reset-message {
  margin: 12px 0 0 !important;
  color: rgba(17, 17, 17, 0.62) !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  font-weight: 680 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.experiment-login-message.is-warning,
.password-reset-message.is-warning {
  color: #a45b00 !important;
}

.experiment-login-primary,
.password-reset-primary,
.experiment-lock-card button {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 1px solid #111111;
  border-radius: 12px;
  background: #111111;
  color: #ffffff;
  font-family: var(--ui-font);
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
}

.password-reset-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 17, 17, 0.42);
}

.password-reset-modal[hidden] {
  display: none;
}

.password-reset-dialog {
  position: relative;
  width: min(430px, calc(100vw - 32px));
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 18px;
  background: #ffffff;
  color: #111111;
  padding: 28px;
  font-family: var(--ui-font);
}

.password-reset-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 10px;
  background: #ffffff;
  color: #111111;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.password-reset-close svg {
  width: 17px;
  height: 17px;
}

.password-reset-dialog h2 {
  margin: 0;
  padding-right: 42px;
  color: #111111;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.password-reset-dialog > span {
  display: block;
  margin-top: 10px;
  color: rgba(17, 17, 17, 0.62);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 620;
}

.experiment-lock {
  position: fixed;
  inset: 0;
  z-index: 214;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
}

.experiment-lock[hidden] {
  display: none;
}

.experiment-lock-card {
  width: min(460px, calc(100vw - 32px));
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 20px;
  background: #ffffff;
  color: #111111;
  padding: 30px;
  font-family: var(--ui-font);
}

.experiment-hard-locked .workspace,
.experiment-hard-locked .documents-full,
.experiment-hard-locked .documents-panel,
.experiment-hard-locked .settings-view,
.payment-failed-locked .workspace,
.payment-failed-locked .documents-full,
.payment-failed-locked .documents-panel,
.payment-failed-locked .settings-view {
  pointer-events: none;
}

.experiment-hard-locked .workspace,
.experiment-hard-locked .settings-view,
.experiment-hard-locked .documents-full,
.experiment-hard-locked .documents-panel {
  filter: blur(14px);
  user-select: none;
}

.experiment-hide-documents .workspace,
.experiment-hide-documents .settings-view,
.experiment-hide-documents .documents-full,
.experiment-hide-documents .documents-panel {
  filter: blur(14px);
  user-select: none;
}

.payment-failed-locked .workspace,
.payment-failed-locked .settings-view,
.payment-failed-locked .documents-full,
.payment-failed-locked .documents-panel {
  filter: blur(14px);
  user-select: none;
}

.experiment-hide-documents .composer,
.experiment-hide-documents .conversation,
.experiment-hide-documents .templates,
.experiment-hide-documents .intro,
.experiment-hide-documents .document-name,
.experiment-hide-documents .sidebar-section,
.experiment-hide-documents .documents-full,
.experiment-hide-documents .documents-panel,
.experiment-hide-documents .download-button,
.experiment-hide-documents .page-settings-button {
  visibility: hidden;
}

.experiment-hide-documents .send-button,
.experiment-hide-documents .send-mode-button,
.experiment-hide-documents .prompt-suggestions {
  display: none;
}

.download-button svg,
.mobile-switcher svg {
  width: 18px;
  height: 18px;
}

.download-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 110;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
  width: 386px;
  min-height: 52px;
  padding: 7px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: rgba(0, 0, 0, 0.16) 0 16px 38px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.96);
  transform-origin: top right;
  transition: opacity 130ms ease, transform 130ms ease;
  backdrop-filter: blur(14px);
}

.download-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.page-settings-popover {
  position: absolute;
  right: 126px;
  top: calc(100% + 8px);
  z-index: 112;
  width: 334px;
  padding: 12px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: rgba(0, 0, 0, 0.16) 0 16px 38px;
  backdrop-filter: blur(14px);
}

.page-settings-popover[hidden] {
  display: none;
}

.page-settings-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-family: var(--ui-font);
}

.page-settings-head strong {
  font-size: 13px;
}

.page-settings-head span {
  font-size: 11px;
  color: rgba(17, 17, 17, 0.58);
}

.page-settings-grid {
  display: grid;
  gap: 8px;
}

.page-settings-grid label {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 8px;
  font-family: var(--ui-font);
  font-size: 12px;
  color: rgba(17, 17, 17, 0.74);
}

.page-settings-grid input[type="range"] {
  width: 100%;
  accent-color: #111111;
}

.page-margin-number {
  height: 34px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 8px;
  padding: 0 9px;
  font-family: var(--ui-font);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #111111;
  background: #ffffff;
}

.page-margin-number:focus {
  outline: none;
  border-color: rgba(17, 17, 17, 0.34);
  box-shadow: rgba(17, 17, 17, 0.06) 0 0 0 3px;
}

.page-settings-reset {
  height: 34px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  padding: 0 11px;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.page-settings-reset:hover {
  background: #f4f4f2;
}

.page-number-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 9px;
  background: #fafafa;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 650;
  color: rgba(17, 17, 17, 0.76);
  cursor: pointer;
  user-select: none;
}

.page-number-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #111111;
}

.page-settings-reset {
  width: 100%;
  margin-top: 8px;
}

.download-action {
  min-width: 0;
  height: 38px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 9px;
  background: #ffffff;
  color: #111111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.download-action:hover {
  border-color: rgba(17, 17, 17, 0.18);
  background: #f8f8f6;
  transform: translateY(-1px);
  box-shadow: rgba(17, 17, 17, 0.08) 0 8px 18px;
}

.download-action-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.download-action-icon svg {
  width: 24px;
  height: 24px;
}

.doc-tile {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 40px;
  border-radius: 4px;
  color: #ffffff;
  font-family: "Times New Roman", Georgia, serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1;
}

.doc-tile::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: linear-gradient(225deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.18) 50%, transparent 50%);
  border-top-right-radius: 4px;
}

.doc-tile-word {
  background: linear-gradient(135deg, #2c5fd0 0%, #1f47b3 100%);
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.18), rgba(20, 40, 90, 0.18) 0 4px 10px;
}

.doc-tile-pdf {
  background: linear-gradient(135deg, #e44141 0%, #c92a2a 100%);
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.18), rgba(90, 20, 20, 0.18) 0 4px 10px;
}

.doc-tile-sm {
  width: 22px;
  height: 28px;
  font-size: 10px;
  border-radius: 3px;
  flex: 0 0 22px;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.16) 0 2px 6px;
}

.doc-tile-sm::before {
  width: 6px;
  height: 6px;
  border-top-right-radius: 3px;
}

.text-button,
.small-tool {
  border: 1px solid var(--line);
  border-radius: 100px;
  background: #ffffff;
  color: #000000;
  height: 28px;
  padding: 0 12px;
  font-family: var(--ui-font);
  font-size: 12px;
  cursor: pointer;
}

.download-menu .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  min-width: 58px;
  padding: 0 10px;
}

.download-menu .text-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.documents-panel {
  position: fixed;
  left: 0;
  top: var(--topbar-height);
  bottom: 0;
  z-index: 90;
  width: min(368px, calc(100vw - 18px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border-right: 1px solid rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, #fbfbfa 0%, #f1f0ed 100%);
  box-shadow: rgba(17, 17, 17, 0.16) 18px 0 42px;
  transform: translateX(-104%);
  transition: transform 160ms ease;
  font-family: var(--ui-font);
}

body.documents-open .documents-panel {
  transform: translateX(0);
}

.documents-scrim {
  position: fixed;
  inset: var(--topbar-height) 0 0 var(--sidebar-width);
  z-index: 89;
  background: rgba(17, 17, 17, 0.18);
  opacity: 0;
  transition: opacity 160ms ease;
}

body.documents-open .documents-scrim {
  opacity: 1;
}

.documents-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}

.workspace-switcher {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.workspace-switcher img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: rgba(17, 17, 17, 0.08) 0 7px 16px;
  object-fit: contain;
}

.documents-head p {
  margin: 0 0 3px;
  color: rgba(17, 17, 17, 0.48);
  font-size: 11px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.documents-head h2 {
  margin: 0;
  max-width: 220px;
  overflow: hidden;
  color: #111111;
  font-size: 15px;
  line-height: 1.1;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.documents-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #111111;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.documents-close:hover {
  border-color: rgba(17, 17, 17, 0.16);
  background: #ffffff;
  transform: translateY(-1px);
}

.documents-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.new-document-button {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: #111111;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: rgba(17, 17, 17, 0.14) 0 12px 24px;
  transition: background-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.new-document-button:hover {
  background: #000000;
  transform: translateY(-1px);
  box-shadow: rgba(17, 17, 17, 0.18) 0 14px 28px;
}

.new-document-button span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 16px;
  line-height: 1;
}

.documents-full-button {
  width: 42px;
  height: 40px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  display: inline-grid;
  place-items: center;
  padding: 0;
  font-family: var(--ui-font);
  font-size: 0;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease;
}

.documents-full-button svg {
  width: 17px;
  height: 17px;
}

.documents-full-button:hover {
  border-color: rgba(17, 17, 17, 0.22);
  background: #f5f5f4;
  transform: translateY(-1px);
}

.documents-search {
  height: 40px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  color: rgba(17, 17, 17, 0.42);
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.documents-search:focus-within {
  border-color: rgba(244, 165, 28, 0.52);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(244, 165, 28, 0.1);
}

.documents-search svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.documents-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111111;
  font-family: var(--ui-font);
  font-size: 13px;
}

.documents-search input::placeholder {
  color: rgba(17, 17, 17, 0.42);
}

.documents-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.documents-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 2px -2px;
  color: rgba(17, 17, 17, 0.5);
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.documents-section-head strong {
  min-width: 22px;
  border-radius: 100px;
  background: rgba(17, 17, 17, 0.07);
  color: rgba(17, 17, 17, 0.58);
  padding: 4px 7px;
  text-align: center;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
}

.documents-list {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  padding: 3px 1px 12px;
}

.document-row {
  border-radius: 10px;
}

.document-open {
  width: 100%;
  min-height: 92px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  padding: 11px;
  color: #111111;
  text-align: left;
  cursor: pointer;
  box-shadow: rgba(17, 17, 17, 0.025) 0 5px 14px;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.document-open:hover,
.document-row.active .document-open {
  border-color: rgba(17, 17, 17, 0.18);
  background: #f7f7f5;
  box-shadow: rgba(17, 17, 17, 0.06) 0 9px 20px;
}

.document-open:hover {
  transform: translateY(-1px);
}

.document-row.active .document-open {
  border-color: rgba(17, 17, 17, 0.12);
  box-shadow: rgba(17, 17, 17, 0.06) 0 9px 20px;
}

.document-row-top {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 8px;
}

.document-icon {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 7px;
  background: #111111;
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
}

.document-title {
  min-width: 0;
  max-width: calc(100% - 33px);
  overflow: hidden;
  color: #111111;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-preview {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: rgba(17, 17, 17, 0.56);
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.document-meta {
  display: flex;
  align-items: center;
  max-width: 100%;
  gap: 7px;
  overflow: hidden;
  color: rgba(17, 17, 17, 0.42);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.document-meta span {
  min-width: 0;
}

.document-meta span:not(:first-child)::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 7px 2px 0;
  border-radius: 100px;
  background: rgba(17, 17, 17, 0.24);
}

.documents-empty {
  margin: 10px 2px;
  border: 1px dashed rgba(17, 17, 17, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.54);
  padding: 16px 12px;
  color: rgba(17, 17, 17, 0.5);
  font-size: 13px;
  line-height: 1.4;
}

.documents-panel {
  inset: var(--topbar-height) 0 0 var(--sidebar-width);
  width: auto;
  padding: 0;
  border-right: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(244, 165, 28, 0.07), transparent 34%),
    linear-gradient(180deg, #fbfbfa 0%, #f4f3ef 100%);
  box-shadow: rgba(17, 17, 17, 0.1) 0 18px 50px;
  opacity: 0;
  transform: translateY(10px) scale(0.992);
  transition: opacity 160ms ease, transform 160ms ease;
}

body.documents-open .documents-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.documents-scrim {
  background: rgba(17, 17, 17, 0.12);
}

.library-shell {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 28px clamp(24px, 4vw, 54px) 36px;
}

.library-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -28px calc(clamp(24px, 4vw, 54px) * -1) 26px;
  padding: 18px clamp(24px, 4vw, 54px) 16px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
  background: rgba(251, 251, 250, 0.86);
  backdrop-filter: blur(16px);
}

.library-back {
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #1c1c1c 0%, #070707 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  font-family: var(--ui-font);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: rgba(17, 17, 17, 0.18) 0 14px 28px, inset rgba(255, 255, 255, 0.08) 0 1px 0;
  transition: background-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.library-back:hover {
  background: #000000;
  transform: translateY(-1px);
}

.library-back svg {
  width: 20px;
  height: 20px;
}

.library-toolbar .documents-full-button {
  width: auto;
  min-width: 92px;
  height: 42px;
  border-color: rgba(17, 17, 17, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 650;
  padding: 0 14px;
  box-shadow: rgba(17, 17, 17, 0.05) 0 8px 20px;
}

.library-new {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 18px;
  width: min(560px, 100%);
  margin-bottom: 34px;
}

.library-new h2,
.library-documents h2 {
  margin: 0;
  color: #111111;
  font-family: var(--ui-font);
  font-size: clamp(26px, 2vw, 34px);
  line-height: 1.18;
  font-weight: 720;
}

.library-new .new-document-button {
  grid-column: 1 / -1;
  width: min(320px, 100%);
  min-height: 118px;
  margin-top: 0;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: #111111;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 14px;
  box-shadow: rgba(17, 17, 17, 0.055) 0 12px 30px;
  transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.library-new .new-document-button:hover {
  border-color: rgba(17, 17, 17, 0.18);
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: rgba(17, 17, 17, 0.09) 0 18px 38px;
}

.library-new .new-document-button .new-document-preview {
  position: relative;
  display: block;
  width: 72px;
  height: 94px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f5 100%);
  flex: 0 0 auto;
  box-shadow: rgba(17, 17, 17, 0.08) 0 10px 22px;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.library-new .new-document-button .new-document-preview::before,
.library-new .new-document-button .new-document-preview::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  border-radius: 99px;
  background: rgba(17, 17, 17, 0.12);
}

.library-new .new-document-button .new-document-preview::before {
  top: 24px;
  box-shadow: 0 11px rgba(17, 17, 17, 0.1), 0 22px rgba(17, 17, 17, 0.08);
}

.library-new .new-document-button .new-document-preview::after {
  top: 60px;
  right: 28px;
}

.library-new .new-document-button:hover .new-document-preview {
  border-color: rgba(17, 17, 17, 0.28);
  transform: scale(1.02);
  box-shadow: rgba(17, 17, 17, 0.12) 0 14px 28px;
}

.library-new .new-document-button > span:last-child {
  display: block;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 750;
}

.library-documents-head {
  display: grid;
  grid-template-columns: auto minmax(260px, 420px) auto;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.library-documents-head .documents-search {
  justify-self: end;
  width: min(420px, 100%);
  height: 48px;
  border-color: rgba(17, 17, 17, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: rgba(17, 17, 17, 0.045) 0 10px 24px;
}

.library-documents-head #documentCount {
  justify-self: end;
  border-radius: 100px;
  background: rgba(17, 17, 17, 0.07);
  color: rgba(17, 17, 17, 0.58);
  padding: 7px 11px;
  font-size: 12px;
  line-height: 1;
}

.library-divider {
  height: 1px;
  margin: 22px 0 24px;
  background: linear-gradient(90deg, rgba(17, 17, 17, 0.16), rgba(17, 17, 17, 0.04));
}

.documents-list {
  display: block;
  overflow: visible;
  padding: 0;
}

.documents-group {
  margin-bottom: 42px;
}

.documents-group h3 {
  margin: 0 0 16px;
  color: #111111;
  font-family: var(--ui-font);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 500;
}

.document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 104px;
  border-radius: 18px;
  padding: 0;
  margin-bottom: 10px;
}

.document-open {
  min-height: 106px;
  border: 1px solid rgba(17, 17, 17, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 160px;
  align-items: center;
  gap: 20px;
  padding: 10px 18px;
  box-shadow: rgba(17, 17, 17, 0.05) 0 12px 30px;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.document-open:hover,
.document-row.active .document-open {
  border-color: rgba(17, 17, 17, 0.12);
  background: #ffffff;
  box-shadow: rgba(17, 17, 17, 0.09) 0 18px 40px;
}

.document-open:hover {
  transform: translateY(-1px);
}

.document-row.active .document-open {
  box-shadow: rgba(17, 17, 17, 0.09) 0 18px 40px;
}

.document-thumb {
  display: grid;
  place-items: center;
  width: 64px;
  height: 82px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f5 100%);
  box-shadow: rgba(17, 17, 17, 0.07) 0 9px 20px;
}

.document-thumb span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e8f0ff 0%, #5278f7 100%);
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
}

.document-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.document-title {
  max-width: 100%;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 720;
}

.document-preview {
  color: rgba(17, 17, 17, 0.58);
  font-size: 13px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
}

.document-open > .document-meta {
  justify-self: start;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.055);
  color: rgba(17, 17, 17, 0.56);
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.document-row-actions {
  display: grid;
  grid-template-columns: 32px;
  gap: 7px;
  align-items: center;
  justify-items: center;
  padding-right: 12px;
}

.document-row-actions button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(17, 17, 17, 0.74);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.document-row-actions button:hover {
  background: #ffffff;
  color: #111111;
}

.document-row-actions svg {
  width: 23px;
  height: 23px;
}

.document-row-actions > span {
  display: none;
}

.documents-empty {
  width: min(560px, 100%);
  margin: 18px 0;
  background: #ffffff;
  text-align: center;
}

.documents-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
  padding: 11px 2px 0;
  color: rgba(17, 17, 17, 0.42);
  font-size: 11px;
  line-height: 1;
}

.documents-full {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: #f4f3ef;
  color: #111111;
  font-family: var(--ui-font);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

body.documents-full-open .documents-full {
  opacity: 1;
  transform: translateY(0);
}

.documents-full-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
}

.documents-full-top p,
.documents-full-label {
  margin: 0 0 5px;
  color: rgba(17, 17, 17, 0.5);
  font-size: 11px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.documents-full-top h2 {
  margin: 0;
  font-size: 29px;
  line-height: 1.05;
  font-weight: 800;
}

.documents-full-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.documents-full-actions button,
.history-row button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: #111111;
  color: #ffffff;
  padding: 0 14px;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 120ms ease, transform 120ms ease;
}

.documents-full-actions button:hover,
.history-row button:hover {
  background: #000000;
  transform: translateY(-1px);
}

#closeDocumentsFull {
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: #ffffff;
  color: #111111;
}

#closeDocumentsFull:hover {
  background: #f8f8f6;
}

.documents-full-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
}

.documents-full-list,
.documents-history {
  min-height: 0;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 12px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 14px;
  box-shadow: rgba(17, 17, 17, 0.06) 0 16px 42px;
  overflow: hidden;
}

.documents-history h3 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 750;
}

.all-documents-list,
.document-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 2px 8px;
}

.full-document-card {
  width: 100%;
  min-height: 104px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  padding: 14px;
  text-align: left;
  color: #111111;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease;
}

.full-document-card:hover,
.full-document-card.active {
  border-color: rgba(17, 17, 17, 0.18);
  background: #f7f7f5;
}

.full-document-card:hover {
  transform: translateY(-1px);
}

.full-document-title {
  max-width: 100%;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.full-document-preview {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: rgba(17, 17, 17, 0.62);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.full-document-meta {
  color: rgba(17, 17, 17, 0.42);
  font-size: 11px;
  line-height: 1;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 94px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 10px;
  background: #ffffff;
  padding: 12px;
}

.history-row.current {
  border-color: rgba(17, 17, 17, 0.16);
  background: #f8f8f6;
}

.history-row strong {
  display: block;
  overflow: hidden;
  color: #111111;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-row span {
  display: block;
  margin-top: 4px;
  color: rgba(17, 17, 17, 0.46);
  font-size: 11px;
  line-height: 1;
}

.history-row p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: rgba(17, 17, 17, 0.64);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-row em {
  align-self: start;
  border-radius: 100px;
  background: rgba(17, 17, 17, 0.08);
  color: rgba(17, 17, 17, 0.62);
  padding: 6px 9px;
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}

.history-empty {
  margin: 0;
  color: rgba(17, 17, 17, 0.58);
  font-size: 13px;
  line-height: 1.4;
}

/* Library refresh: quieter, denser, more SaaS-like. */
.documents-panel {
  background: #f7f7f5;
  box-shadow: none;
  font-family: var(--ui-font);
}

.library-shell {
  padding: 22px clamp(22px, 3vw, 42px) 34px;
}

.library-toolbar {
  margin: 0 0 22px;
  padding: 0 0 14px;
  background: rgba(247, 247, 245, 0.92);
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
  backdrop-filter: blur(12px);
}

.library-back {
  height: 36px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 9px;
  background: #ffffff;
  color: rgba(17, 17, 17, 0.86);
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

.library-back:hover {
  border-color: rgba(17, 17, 17, 0.2);
  background: #f1f1ef;
  color: #111111;
  transform: none;
}

.library-back svg {
  width: 17px;
  height: 17px;
}

.library-toolbar .documents-full-button {
  height: 36px;
  min-width: 112px;
  border-radius: 9px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

.library-new {
  width: 100%;
  margin: 0 0 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.library-new h2,
.library-documents h2 {
  font-family: var(--ui-font);
  font-size: 21px;
  line-height: 1.2;
  font-weight: 680;
  letter-spacing: 0;
}

.library-new .new-document-button {
  width: auto;
  min-height: 38px;
  height: 38px;
  border: 1px solid #111111;
  border-radius: 9px;
  background: #111111;
  color: #ffffff;
  padding: 0 14px;
  gap: 8px;
  box-shadow: none;
}

.library-new .new-document-button::before {
  content: "+";
  font-size: 17px;
  line-height: 1;
  font-weight: 500;
}

.library-new .new-document-button:hover {
  background: #000000;
  border-color: #000000;
  transform: none;
  box-shadow: none;
}

.library-new .new-document-button .new-document-preview {
  display: none;
}

.library-new .new-document-button > span:last-child {
  color: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
}

.library-documents-head {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px) auto;
  gap: 12px;
  margin-top: 0;
}

.library-documents-head .documents-search {
  height: 40px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
}

.documents-search:focus-within {
  border-color: rgba(17, 17, 17, 0.24);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.05);
}

.documents-search input {
  font-family: inherit;
  font-size: 13px;
}

.library-documents-head #documentCount {
  background: rgba(17, 17, 17, 0.06);
  color: rgba(17, 17, 17, 0.56);
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 650;
}

.library-divider {
  margin: 14px 0 18px;
  background: rgba(17, 17, 17, 0.08);
}

.documents-group {
  margin-bottom: 28px;
}

.documents-group h3 {
  margin: 0 0 9px;
  color: rgba(17, 17, 17, 0.52);
  font-family: inherit;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.document-row {
  min-height: 72px;
  gap: 8px;
  margin-bottom: 6px;
  border-radius: 10px;
}

.document-open {
  min-height: 72px;
  grid-template-columns: 44px minmax(0, 1fr) 112px;
  gap: 12px;
  border-color: rgba(17, 17, 17, 0.08);
  border-radius: 10px;
  background: #ffffff;
  padding: 9px 12px;
  box-shadow: none;
}

.document-open:hover,
.document-row.active .document-open {
  border-color: rgba(17, 17, 17, 0.18);
  background: #fbfbfa;
  box-shadow: none;
}

.document-open:hover {
  transform: none;
}

.document-row.active .document-open {
  box-shadow: none;
}

.document-thumb {
  width: 34px;
  height: 44px;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: none;
}

.document-thumb span {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(17, 17, 17, 0.06);
  color: rgba(17, 17, 17, 0.68);
  font-size: 13px;
  font-weight: 650;
}

.document-main {
  gap: 4px;
}

.document-title {
  font-size: 14px;
  font-weight: 650;
}

.document-preview {
  color: rgba(17, 17, 17, 0.54);
  font-size: 12px;
}

.document-open > .document-meta {
  justify-self: end;
  background: transparent;
  color: rgba(17, 17, 17, 0.48);
  padding: 0;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.document-row-actions {
  grid-template-columns: 30px;
  gap: 6px;
  padding-right: 0;
  opacity: 0.72;
}

.document-row-actions button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.document-row-actions button:hover {
  background: #f1f1ef;
}

.document-row-actions svg {
  width: 18px;
  height: 18px;
}

.documents-full {
  gap: 14px;
  padding: 22px;
  background: #f7f7f5;
}

.documents-full-top {
  min-height: 42px;
}

.documents-full-top p,
.documents-full-label {
  color: rgba(17, 17, 17, 0.5);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.documents-full-top h2 {
  font-size: 24px;
  font-weight: 700;
}

.documents-full-actions button,
.history-row button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 650;
  box-shadow: none;
}

.documents-full-layout {
  gap: 12px;
}

.documents-full-list,
.documents-history {
  border-color: rgba(17, 17, 17, 0.09);
  border-radius: 10px;
  padding: 12px;
  box-shadow: none;
}

.documents-history h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 680;
}

.all-documents-list,
.document-history-list {
  gap: 6px;
}

.full-document-card {
  min-height: 78px;
  border-color: rgba(17, 17, 17, 0.08);
  border-radius: 9px;
  gap: 4px;
  padding: 11px 12px;
}

.full-document-card:hover {
  transform: none;
}

.full-document-card:hover,
.full-document-card.active {
  border-color: rgba(17, 17, 17, 0.18);
  background: #fbfbfa;
}

.full-document-card.active {
  box-shadow: none;
}

.full-document-title {
  font-size: 14px;
  font-weight: 650;
}

.full-document-preview {
  font-size: 12px;
  line-height: 1.35;
}

.history-row {
  min-height: 76px;
  border-color: rgba(17, 17, 17, 0.08);
  border-radius: 9px;
  background: #ffffff;
  padding: 11px 12px;
}

.history-row.current {
  border-color: rgba(17, 17, 17, 0.16);
  background: #fbfbfa;
  box-shadow: none;
}

.history-row strong {
  font-size: 12px;
  font-weight: 650;
}

.history-row p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
}

.history-row em {
  background: rgba(17, 17, 17, 0.06);
  font-size: 10px;
  font-weight: 650;
}

.workspace {
  position: fixed;
  inset: var(--topbar-height) 0 0 var(--sidebar-width);
  display: grid;
  grid-template-columns: var(--chat-width) minmax(320px, 1fr);
  min-width: 0;
  background: var(--canvas);
}

.chat-pane {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfa 100%);
  min-width: 320px;
  overflow: hidden;
  border-right: 1px solid rgba(17, 17, 17, 0.08);
  container-type: inline-size;
}

.chat-inner {
  position: absolute;
  inset: 0;
  padding: 0 18px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

body.chat-started .chat-inner,
body.document-has-content .chat-inner {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 18px 18px;
}

body.chat-started .intro,
body.chat-started .templates,
body.document-has-content .intro,
body.document-has-content .templates {
  display: none;
}

.intro {
  margin-top: 96px;
  text-align: center;
  font-family: var(--ui-font);
}

.intro h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.18;
  font-weight: 800;
}

.intro p,
.templates p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--muted);
}

.intro p {
  margin-top: 4px;
}

.conversation {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 18px;
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

body.chat-started .conversation,
body.document-has-content .conversation {
  order: 1;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0 0 14px;
  overflow-y: auto;
}

.message {
  box-sizing: border-box;
  max-width: 92%;
  min-width: 0;
  padding: 10px 13px;
  border-radius: 16px;
  font-family: var(--ui-font);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message *,
.question-intro-text,
.qcard-answer {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message.user {
  align-self: flex-end;
  background: #111111;
  border: 1px solid #111111;
  color: #ffffff;
}

.message.assistant {
  align-self: flex-start;
  padding: 2px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
}

.message.assistant.thinking {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.message.assistant:has(.question-card) {
  width: min(100%, 620px);
  max-width: 100%;
  padding: 0;
}

.question-intro-message {
  width: min(100%, 620px);
  white-space: normal;
}

.question-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(17, 17, 17, 0.78);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.question-brand img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.question-intro-text {
  margin: 0;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.55;
}

.question-card {
  width: min(100%, 620px);
  background: linear-gradient(180deg, #fbfbfa 0%, #f6f6f4 100%);
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 22px;
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: rgba(17, 17, 17, 0.04) 0 16px 36px;
  white-space: normal;
}

.outline-card-message {
  width: min(100%, 620px);
  max-width: 100%;
  padding: 0;
}

.outline-card {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--ui-font);
  box-shadow: none;
  white-space: normal;
}

.outline-card-head {
  display: grid;
  gap: 3px;
}

.outline-card-head span {
  color: rgba(17, 17, 17, 0.48);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.outline-card-head strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
}

.outline-title-input,
.outline-row input,
.outline-refine input {
  min-width: 0;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 9px;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--ui-font);
  font-size: 13px;
  outline: none;
}

.outline-title-input {
  height: 36px;
  padding: 0 10px;
  font-weight: 700;
}

.outline-list {
  display: grid;
  gap: 8px;
}

.outline-part,
.outline-subpart {
  position: relative;
}

.outline-part {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 12px;
  background: #fbfbfa;
}

.outline-subparts {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.outline-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 7px;
}

.outline-row input {
  height: 34px;
  padding: 0 9px;
}

.outline-part-row input {
  font-weight: 760;
}

.outline-drag,
.outline-row button,
.outline-add-subpart,
.outline-add-part,
.outline-refine button,
.outline-confirm {
  border-radius: 8px;
  font-family: var(--ui-font);
  font-weight: 700;
  cursor: pointer;
}

.outline-drag,
.outline-row button {
  width: 28px;
  height: 28px;
  border: 0;
  background: #111111;
  color: #ffffff;
  display: grid;
  place-items: center;
}

.outline-drag {
  cursor: grab;
}

.outline-row svg,
.outline-add-subpart svg,
.outline-add-part svg {
  width: 14px;
  height: 14px;
}

.outline-add-subpart,
.outline-add-part {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  width: max-content;
  border: 0;
  background: #111111;
  color: #ffffff;
  padding: 0 10px;
  font-size: 12px;
}

.outline-add-part {
  width: 100%;
}

.outline-refine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.outline-refine input {
  height: 38px;
  padding: 0 11px;
}

.outline-refine button {
  height: 38px;
  border: 0;
  background: #111111;
  color: #ffffff;
  padding: 0 13px;
  font-size: 12px;
}

.outline-confirm {
  height: 42px;
  border: 0;
  background: #111111;
  color: #ffffff;
  font-size: 13px;
}

.outline-card-readonly {
  gap: 10px;
  background: transparent;
  border-color: rgba(17, 17, 17, 0.08);
}

.outline-history-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 0 0 18px;
  color: rgba(17, 17, 17, 0.72);
  font-size: 12.5px;
  line-height: 1.45;
}

.outline-history-list > li {
  margin: 0;
  padding: 0;
}

.outline-history-list strong {
  color: #111111;
  font-size: 13px;
  font-weight: 760;
}

.outline-history-list ul {
  display: grid;
  gap: 3px;
  margin: 5px 0 0 16px;
  padding: 0;
}

.outline-history-list ul li {
  margin: 0;
  padding: 0;
}

.outline-part.dragging,
.outline-subpart.dragging {
  opacity: 0.5;
}

.outline-part.drop-before::before,
.outline-part.drop-after::after,
.outline-subpart.drop-before::before,
.outline-subpart.drop-after::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  border-radius: 999px;
  background: #111111;
}

.outline-part.drop-before::before,
.outline-subpart.drop-before::before {
  top: -5px;
}

.outline-part.drop-after::after,
.outline-subpart.drop-after::after {
  bottom: -5px;
}

.qcard-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0 0 2px;
}

.qcard-progress-track {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qcard-progress-count {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: rgba(17, 17, 17, 0.55);
  font-variant-numeric: tabular-nums;
}

.qcard-progress .qprog-seg {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.32);
}

.qcard-progress .qprog-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.22);
}

.qcard-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(17, 17, 17, 0.72);
  font-size: 13px;
  font-weight: 600;
}

.qcard-brand img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.qcard-question {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
}

.qcard-input {
  display: block;
  width: 100%;
  min-height: 76px;
  max-height: 200px;
  resize: none;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--ui-font);
  font-size: 14px;
  line-height: 1.55;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.qcard-input::placeholder {
  color: rgba(17, 17, 17, 0.35);
}

.qcard-input:focus {
  border-color: rgba(17, 17, 17, 0.28);
  box-shadow: rgba(17, 17, 17, 0.04) 0 0 0 4px;
}

.qcard-page-control {
  display: grid;
  gap: 14px;
  width: 100%;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 14px;
  padding: 16px 16px 14px;
  background: #ffffff;
}

.qcard-page-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  color: rgba(17, 17, 17, 0.7);
  font-size: 13px;
  font-weight: 650;
}

.qcard-page-value strong {
  color: #111111;
  font-size: 28px;
  line-height: 1;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.qcard-page-slider {
  width: 100%;
  height: 18px;
  appearance: none;
  background: transparent;
  outline: none;
  cursor: pointer;
}

.qcard-page-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(17, 17, 17, 0.88), rgba(17, 17, 17, 0.22));
}

.qcard-page-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: #111111;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.18);
}

.qcard-page-slider::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(17, 17, 17, 0.88), rgba(17, 17, 17, 0.22));
}

.qcard-page-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: #111111;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.18);
}

.qcard-page-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08), 0 3px 9px rgba(0, 0, 0, 0.18);
}

.qcard-page-slider:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08), 0 3px 9px rgba(0, 0, 0, 0.18);
}

.qcard-page-range {
  display: flex;
  justify-content: space-between;
  color: rgba(17, 17, 17, 0.45);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
}

.qcard-image-control {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
}

.qcard-image-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 10px;
  background: #ffffff;
  color: rgba(17, 17, 17, 0.82);
  padding: 0 12px;
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.qcard-image-button svg {
  width: 16px;
  height: 16px;
}

.qcard-image-control span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qcard-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -2px;
}

.qcard-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: #ffffff;
  color: rgba(17, 17, 17, 0.82);
  font-family: var(--ui-font);
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.qcard-chip:hover {
  border-color: rgba(17, 17, 17, 0.24);
  background: #fafafa;
  transform: translateY(-1px);
}

.qcard-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.qcard-actions.no-skip {
  grid-template-columns: 1fr;
}

.qcard-skip,
.qcard-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  border-radius: 12px;
  font-family: var(--ui-font);
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.qcard-skip {
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: #ffffff;
  color: rgba(17, 17, 17, 0.78);
}

.qcard-skip:hover {
  border-color: rgba(17, 17, 17, 0.22);
  background: #fafafa;
}

.qcard-skip svg {
  width: 16px;
  height: 16px;
}

.qcard-confirm {
  border: 0;
  background: #000000;
  color: #ffffff;
  box-shadow: rgba(0, 0, 0, 0.22) 0 6px 16px -10px;
}

.qcard-confirm:hover:not(:disabled) {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.qcard-confirm:disabled {
  background: rgba(17, 17, 17, 0.18);
  color: rgba(255, 255, 255, 0.92);
  cursor: default;
  box-shadow: none;
}

.qcard-confirm svg {
  width: 16px;
  height: 16px;
}

.qcard-answer {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(17, 17, 17, 0.04);
  border: 1px solid rgba(17, 17, 17, 0.08);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.qcard-answer.skipped {
  color: rgba(17, 17, 17, 0.45);
  font-style: italic;
}

.question-card.answered .qcard-question {
  color: rgba(17, 17, 17, 0.55);
}

body.detail-questioning .composer,
body.detail-questioning .image-tray,
body.detail-questioning .templates,
body.detail-questioning .suggestions {
  display: none !important;
}

body.outline-reviewing .composer,
body.outline-reviewing .image-tray,
body.outline-reviewing .suggestions {
  display: none !important;
}

.pen-thinking {
  --pen-ink: #000000;
  --pen-stroke: rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px 10px 10px 3px;
  padding: 3px 10px 3px 6px;
  border: 0.5px solid var(--pen-stroke);
  background: #ffffff;
  font-family: var(--ui-font);
  margin: 0;
}

.pen-thinking .pen-icon {
  width: 11px;
  height: 20px;
  flex-shrink: 0;
  transform-origin: 50% 96%;
  animation: penTap 1.4s cubic-bezier(0.36, 0, 0.66, -0.56) infinite;
}

.pen-thinking .bulb-icon {
  width: 12px;
  height: 20px;
  flex-shrink: 0;
  transform-origin: 50% 82%;
  animation: bulbThink 1.4s ease-in-out infinite;
}

.pen-thinking .bulb-glow {
  animation: bulbGlow 1.5s ease-in-out infinite;
}

.pen-thinking .bulb-spark {
  animation: tipFlash 1.4s ease-in-out infinite;
}

.pen-thinking .pen-tip-flash {
  animation: tipFlash 1.4s ease-in-out infinite;
}

.pen-thinking .pen-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pen-thinking .pen-line {
  height: 1.5px;
  border-radius: 2px;
  background: var(--pen-ink);
}

.pen-thinking .pen-line-1 {
  animation: pl1 1.4s ease-in-out infinite;
}

.pen-thinking .pen-line-2 {
  animation: pl2 1.4s ease-in-out infinite;
}

.pen-thinking .pen-line-3 {
  animation: pl3 1.4s ease-in-out infinite;
}

.pen-thinking .pen-label {
  font-size: 13px;
  color: var(--pen-ink);
  white-space: nowrap;
  opacity: 0.7;
}

@keyframes bulbThink {
  0%,
  100% { transform: translateY(0); }
  45% { transform: translateY(-0.8px); }
}

@keyframes bulbGlow {
  0%,
  100% {
    opacity: 0.35;
  }
  45% {
    opacity: 1;
  }
}

@keyframes penTap {
  0% {
    transform: rotate(0deg);
  }
  20% {
    transform: rotate(8deg);
  }
  40% {
    transform: rotate(0deg);
  }
  60% {
    transform: rotate(6deg);
  }
  80%,
  100% {
    transform: rotate(0deg);
  }
}

@keyframes tipFlash {
  0%,
  100% {
    opacity: 0.4;
  }
  20% {
    opacity: 1;
  }
  60% {
    opacity: 0.85;
  }
}

@keyframes pl1 {
  0%,
  100% {
    width: 20px;
    opacity: 0.4;
  }
  20% {
    width: 7px;
    opacity: 0.12;
  }
  40% {
    width: 20px;
    opacity: 0.4;
  }
}

@keyframes pl2 {
  0%,
  100% {
    width: 13px;
    opacity: 0.28;
  }
  30% {
    width: 5px;
    opacity: 0.08;
  }
  50% {
    width: 13px;
    opacity: 0.28;
  }
}

@keyframes pl3 {
  0%,
  100% {
    width: 16px;
    opacity: 0.28;
  }
  40% {
    width: 5px;
    opacity: 0.08;
  }
  60% {
    width: 16px;
    opacity: 0.28;
  }
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0 10px;
  min-height: 0;
}

body.chat-started .suggestions,
body.document-has-content .suggestions {
  order: 2;
  flex: 0 0 auto;
  margin: 0 0 8px;
}

.suggestions:empty {
  display: none;
}

.selection-actions,
.selection-review {
  position: fixed;
  z-index: 145;
  font-family: var(--ui-font);
  color: #111111;
}

.selection-actions {
  width: min(424px, calc(100vw - 24px));
  display: grid;
  padding: 8px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: rgba(17, 17, 17, 0.14) 0 16px 34px -18px, rgba(17, 17, 17, 0.08) 0 2px 8px;
  backdrop-filter: blur(14px);
}

.selection-actions::after,
.selection-review::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: inherit;
  border-right: inherit;
  border-bottom: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.selection-actions.below-selection::after,
.selection-review.below-selection::after {
  top: -6px;
  bottom: auto;
  border: 0;
  border-left: inherit;
  border-top: inherit;
}

.selection-action-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.translate-wrap {
  position: relative;
  min-width: 0;
}

.rephrase-wrap {
  position: relative;
  min-width: 0;
}

.selection-actions button,
.selection-custom button,
.selection-review button {
  min-height: 31px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 7px;
  background: #ffffff;
  color: #111111;
  padding: 7px 10px;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.selection-actions button {
  width: 100%;
}

.selection-action-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.selection-action-button svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.selection-actions button:hover,
.selection-custom button:hover,
.selection-review button:hover {
  border-color: rgba(17, 17, 17, 0.28);
  background: #f5f5f3;
}

.selection-custom,
.selection-refine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.selection-refine[hidden],
.selection-review.loading .selection-refine,
.selection-review.error .selection-refine {
  display: none !important;
}

.selection-custom input,
.selection-refine input {
  min-width: 0;
  height: 32px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 7px;
  background: #fafafa;
  color: #111111;
  padding: 0 10px;
  font-family: var(--ui-font);
  font-size: 12px;
  outline: none;
}

.selection-custom input:focus,
.selection-refine input:focus {
  border-color: rgba(17, 17, 17, 0.34);
  background: #ffffff;
}

.selection-custom button {
  width: 34px;
  padding: 0;
  display: grid;
  place-items: center;
}

.selection-custom svg {
  width: 15px;
  height: 15px;
}

.translate-popover,
.rephrase-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: min(360px, calc(100vw - 24px));
  max-height: min(340px, calc(100vh - 160px));
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.13);
  border-radius: 9px;
  box-shadow: rgba(17, 17, 17, 0.16) 0 20px 46px -16px, rgba(17, 17, 17, 0.08) 0 2px 8px;
  padding: 10px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 9px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  overflow: hidden;
}

.translate-popover[hidden],
.rephrase-popover[hidden] {
  display: none !important;
}

.translate-popover.open,
.rephrase-popover.open {
  opacity: 1;
  pointer-events: auto;
}

.translate-popover::after,
.rephrase-popover::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-right: 1px solid rgba(17, 17, 17, 0.13);
  border-bottom: 1px solid rgba(17, 17, 17, 0.13);
  transform: rotate(45deg);
}

.translate-popover.translate-popover-below,
.rephrase-popover.selection-popover-below {
  bottom: auto;
  top: calc(100% + 10px);
}

.translate-popover.translate-popover-below::after,
.rephrase-popover.selection-popover-below::after {
  bottom: auto;
  top: -6px;
  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid rgba(17, 17, 17, 0.13);
  border-top: 1px solid rgba(17, 17, 17, 0.13);
}

.translate-langs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

@media (max-width: 540px) {
  .translate-langs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.translate-lang {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.translate-lang:hover {
  background: #f5f5f3;
  border-color: rgba(17, 17, 17, 0.1);
}

.translate-lang-flag {
  font-size: 18px;
  line-height: 1;
}

.translate-lang-name {
  font-family: var(--ui-font);
  font-size: 10px;
  color: rgba(17, 17, 17, 0.76);
  text-align: center;
  line-height: 1.15;
  word-break: break-word;
}

.rephrase-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.rephrase-option {
  min-height: 58px !important;
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 5px !important;
  border-radius: 7px !important;
}

.selection-option-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #111111;
}

.selection-option-icon svg {
  width: 20px;
  height: 20px;
}

.selection-review {
  width: min(460px, calc(100vw - 24px));
  display: grid;
  gap: 9px;
  border: 1px solid rgba(17, 17, 17, 0.15);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.98);
  padding: 10px;
  box-shadow: rgba(17, 17, 17, 0.18) 0 22px 52px -18px, rgba(17, 17, 17, 0.08) 0 2px 8px;
  backdrop-filter: blur(14px);
}

.selection-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(17, 17, 17, 0.68);
  font-size: 12px;
  font-weight: 700;
}

.selection-review-head button {
  min-height: 28px;
  padding: 6px 9px;
}

.selection-preview {
  min-height: 72px;
  max-height: 190px;
  overflow-y: auto;
  padding: 10px 11px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 7px;
  background-color: #ffffff;
  color: #111111;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1.65;
}

.selection-preview * {
  max-width: 100%;
}

.selection-review-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6px;
}

.accept-selection {
  background: #111111 !important;
  border-color: #111111 !important;
  color: #ffffff !important;
}

.accept-selection:disabled {
  cursor: default;
  opacity: 0.5;
}

.suggestion,
.pill,
.template-chip {
  border: 1px solid var(--line);
  border-radius: 100px;
  background: #ffffff;
  color: #000000;
  min-height: 30px;
  padding: 7px 12px;
  font-family: var(--ui-font);
  font-size: 13px;
  line-height: 1.1;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.custom-template-chip {
  border-color: rgba(17, 17, 17, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f5 100%);
}

.custom-template-chip::after {
  content: "Custom";
  margin-left: auto;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.06);
  color: rgba(17, 17, 17, 0.52);
  padding: 3px 6px;
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.suggestion.skip-suggestion {
  border-color: rgba(17, 17, 17, 0.2);
  background: #f2f2f0;
  color: rgba(17, 17, 17, 0.74);
}

.composer {
  position: relative;
  margin: 10px -4px 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  background: rgba(17, 17, 17, 0.035);
  box-shadow: var(--shadow-soft);
}

body.chat-started .composer,
body.document-has-content .composer {
  order: 3;
  flex: 0 0 auto;
  margin: 0 -4px;
}

.composer::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 12px;
  background: #ffffff;
  pointer-events: none;
}

.composer.needs-input::before {
  border-color: rgba(17, 17, 17, 0.28);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.045);
}

.composer textarea,
.composer-footer {
  position: relative;
  z-index: 1;
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  max-height: 180px;
  resize: none;
  border: 0;
  border-radius: 12px;
  outline: none;
  padding: 12px 12px 8px;
  color: #000000;
  background: #ffffff;
  font-family: var(--ui-font);
  font-size: 14px;
  line-height: 1.55;
}

.composer textarea::placeholder {
  color: rgba(17, 17, 17, 0.42);
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 2px;
}

.composer-attachments {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.upload-pill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: rgba(17, 17, 17, 0.78);
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.upload-pill:hover {
  border-color: rgba(17, 17, 17, 0.22);
  background: #fafafa;
  color: #111111;
  transform: translateY(-1px);
}

.upload-pill svg {
  width: 15px;
  height: 15px;
  color: rgba(17, 17, 17, 0.62);
}

.upload-trigger span,
.upload-trigger svg,
.pdf-upload-trigger span,
.pdf-upload-trigger svg {
  pointer-events: none;
}

.image-file-input {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.image-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--ui-font);
}

body.chat-started .image-tray,
body.document-has-content .image-tray {
  order: 2;
  flex: 0 0 auto;
  margin: 0 0 8px;
}

.image-tray:empty {
  display: none;
}

.image-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 190px;
  min-height: 38px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 10px;
  background: #ffffff;
  padding: 4px 34px 4px 5px;
  box-shadow: rgba(17, 17, 17, 0.04) 0 6px 16px;
  font-size: 12px;
  color: #111111;
  overflow: hidden;
}

.image-chip img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: cover;
  flex: 0 0 30px;
}

.pdf-context-chip {
  border-color: rgba(220, 38, 38, 0.18);
  background: #fffafa;
}

.pdf-context-chip .pdf-chip-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 30px;
  flex: 0 0 34px;
  border-radius: 7px;
  background: #dc2626;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.image-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-chip.uploading {
  opacity: 0.72;
}

.image-chip.upload-failed {
  border-color: rgba(244, 165, 28, 0.55);
}

.image-chip button {
  position: absolute;
  right: 5px;
  top: 50%;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 100px;
  background: rgba(17, 17, 17, 0.82);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%) scale(0.88);
  transition: opacity 120ms ease, transform 120ms ease, background-color 120ms ease;
}

.image-chip:hover button,
.image-chip:focus-within button {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.image-chip button:hover {
  background: #000000;
}

.image-chip button svg {
  width: 14px;
  height: 14px;
}

.templates {
  margin-top: 18px;
  font-family: var(--ui-font);
  min-width: 0;
  overflow-x: hidden;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(142px, 100%), 1fr));
  gap: 5px;
  margin-top: 7px;
  min-width: 0;
}

.template-liquid-progress {
  grid-column: 1 / -1;
  width: min(360px, 100%);
  margin: 2px auto 4px;
}

.template-liquid-state {
  width: 100%;
}

.template-liquid-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(128, 128, 128, 0.16);
  border-radius: 14px;
  background: rgba(128, 128, 128, 0.07);
  backdrop-filter: blur(20px) saturate(1.45);
  -webkit-backdrop-filter: blur(20px) saturate(1.45);
}

.template-liquid-card.done {
  border-color: rgba(80, 200, 120, 0.22);
  background: rgba(80, 200, 120, 0.08);
  animation: templateLiquidDone 260ms cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

.template-liquid-edge {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  animation: templateLiquidEdge 3s ease-in-out infinite;
}

.template-liquid-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.13) 0%, transparent 60%);
}

.template-liquid-track {
  position: relative;
  overflow: hidden;
  height: 5px;
  border: 0.5px solid rgba(128, 128, 128, 0.14);
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.1);
}

.template-liquid-track.done {
  border-color: rgba(80, 200, 120, 0.14);
  background: rgba(80, 200, 120, 0.12);
}

.template-liquid-bar {
  position: relative;
  overflow: hidden;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(100, 100, 120, 0.7), rgba(180, 185, 210, 0.95) 42%, rgba(220, 225, 245, 0.98) 72%, rgba(160, 165, 190, 0.82));
  transition: width 50ms linear;
}

.template-liquid-bar.done {
  width: 100%;
  background: linear-gradient(90deg, rgba(80, 200, 120, 0.62), rgba(160, 240, 180, 0.95), rgba(80, 200, 120, 0.62));
}

.template-liquid-specular {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 50%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: templateLiquidSpecular 2s ease-in-out infinite;
}

.template-liquid-sheen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent);
}

@keyframes templateLiquidSpecular {
  0% {
    opacity: 0;
    transform: translateX(-120%) skewX(-12deg);
  }
  10%,
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(420%) skewX(-12deg);
  }
}

@keyframes templateLiquidEdge {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

@keyframes templateLiquidDone {
  0% {
    opacity: 0;
    transform: scale(0.97);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.custom-template-section {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.custom-template-section[hidden] {
  display: none;
}

.custom-template-section > span,
.template-section-label {
  display: block;
  margin-top: 10px;
  color: rgba(17, 17, 17, 0.52);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.custom-template-grid {
  margin-top: 0;
}

.template-chip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 31px;
  border-color: rgba(17, 17, 17, 0.22);
  border-radius: 8px;
  text-align: left;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.18;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 100%;
  box-shadow: rgba(17, 17, 17, 0.025) 0 3px 10px;
  animation: templateIn 150ms ease both;
}

@keyframes templateIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.template-emoji {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  object-fit: contain;
}

.template-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-chip:hover,
.suggestion:hover,
.pill:hover,
.text-button:hover,
.small-tool:hover {
  border-color: rgba(244, 165, 28, 0.74);
  background: #fff9ea;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  min-width: 0;
}

.template-action {
  flex: 1 1 150px;
  min-height: 31px;
  border: 1px solid rgba(17, 17, 17, 0.22);
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  padding: 7px 12px;
  text-align: center;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

@container (max-width: 390px) {
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-chip {
    min-height: 36px;
    padding: 7px 8px;
  }
}

@container (max-width: 285px) {
  .template-grid {
    grid-template-columns: 1fr;
  }

  .template-action {
    flex-basis: 100%;
  }
}

.template-action:hover {
  border-color: rgba(17, 17, 17, 0.36);
  background: #f6f6f4;
}

.template-action.primary {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.template-action.primary:hover {
  background: #242424;
  border-color: #242424;
}

.template-builder {
  position: fixed;
  inset: var(--topbar-height) 0 0 var(--sidebar-width);
  z-index: 285;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(248, 248, 246, 0.72);
  backdrop-filter: blur(10px);
}

.template-builder[hidden] {
  display: none;
}

body.sidebar-collapsed .template-builder {
  left: 0;
}

.template-builder-card {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - var(--topbar-height) - 36px));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: rgba(17, 17, 17, 0.12) 0 24px 60px -28px;
  overflow: hidden;
}

.template-builder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.template-builder-head p,
.template-builder-head h2 {
  margin: 0;
}

.template-builder-head p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.template-builder-head h2 {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.1;
}

.template-builder-head button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.template-builder-head svg {
  width: 16px;
  height: 16px;
}

.template-builder-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px 18px;
  overflow-y: auto;
}

.template-builder-main {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
}

.template-builder-form label {
  display: grid;
  gap: 6px;
  color: rgba(17, 17, 17, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.template-builder-form small {
  color: rgba(17, 17, 17, 0.42);
  font-weight: 600;
}

.template-builder-form input,
.template-builder-form textarea,
.template-builder-form select {
  width: 100%;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--ui-font);
  font-size: 13px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.template-builder-form input,
.template-builder-form select {
  height: 36px;
  padding: 0 10px;
}

#customTemplateEmoji {
  text-align: center;
  font-size: 20px;
}

.template-builder-form textarea {
  min-height: 64px;
  resize: vertical;
  padding: 10px;
  line-height: 1.45;
}

.template-builder-form input:focus,
.template-builder-form textarea:focus,
.template-builder-form select:focus {
  border-color: rgba(17, 17, 17, 0.28);
  box-shadow: rgba(17, 17, 17, 0.045) 0 0 0 4px;
}

.template-builder-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.template-builder-form .template-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 12px;
  background: #fbfbfa;
}

.template-option input {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  padding: 0;
  accent-color: #111111;
}

.template-option strong,
.template-option small {
  display: block;
}

.template-option strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 760;
}

.template-option small {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.25;
}

.template-builder-questions {
  display: grid;
  gap: 10px;
}

.template-builder-questions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.template-builder-questions-head span,
.template-builder-questions-head small {
  display: block;
}

.template-builder-questions-head span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.template-builder-questions-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.template-builder-questions-head button,
.add-template-question,
.template-builder-actions button {
  height: 34px;
  border-radius: 9px;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.template-builder-questions-head button,
.add-template-question,
.template-builder-actions button:first-child {
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: #ffffff;
  color: var(--ink);
}

.template-builder-questions-head button:disabled {
  border-color: rgba(17, 17, 17, 0.1);
  background: #f4f4f2;
  color: rgba(17, 17, 17, 0.42);
  cursor: not-allowed;
}

.template-question-list {
  display: grid;
  gap: 8px;
}

.template-question-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 132px auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 12px;
  background: #fbfbfa;
}

.template-question-row.dragging {
  opacity: 0.55;
}

.template-question-drag,
.template-question-actions button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 8px;
  background: #ffffff;
  color: rgba(17, 17, 17, 0.62);
  display: grid;
  place-items: center;
  cursor: grab;
}

.template-question-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.template-question-actions button {
  cursor: pointer;
}

.template-question-actions button:disabled {
  opacity: 0.35;
  cursor: default;
}

.template-question-row svg {
  width: 15px;
  height: 15px;
}

.template-question-row textarea {
  min-height: 46px;
  resize: vertical;
}

.add-template-question {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: max-content;
  padding: 0 12px;
}

.add-template-question svg {
  width: 15px;
  height: 15px;
}

.template-builder-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}

.template-builder-actions button {
  min-width: 96px;
  padding: 0 14px;
}

.template-builder-actions .save-template {
  border: 0;
  background: #111111;
  color: #ffffff;
}

.resizer {
  position: absolute;
  left: calc(var(--chat-width) - 8px);
  top: 0;
  bottom: 0;
  z-index: 4;
  width: 16px;
  cursor: col-resize;
  background: transparent;
  touch-action: none;
  transform: translateX(-2px);
}

.resizer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  margin-left: -0.5px;
  background: rgba(17, 17, 17, 0.08);
  transition: background-color 140ms ease, width 140ms ease, margin-left 140ms ease;
}

.resizer::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 44px;
  margin-left: -2.5px;
  margin-top: -22px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.12);
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  transition: background-color 140ms ease, transform 140ms ease, box-shadow 140ms ease, width 140ms ease, margin-left 140ms ease;
}

.resizer:hover::before,
.resizer.dragging::before {
  background: rgba(244, 165, 28, 0.55);
  width: 2px;
  margin-left: -1px;
}

.resizer:hover::after,
.resizer.dragging::after {
  background: #f4a51c;
  width: 6px;
  margin-left: -3px;
  transform: scaleY(1.06);
  box-shadow: 0 2px 8px rgba(244, 165, 28, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

body.is-resizing {
  cursor: col-resize;
  user-select: none;
}

body.is-resizing .tox iframe,
body.is-resizing .document-pane {
  pointer-events: none;
}

.resize-shield {
  position: fixed;
  inset: var(--topbar-height) 0 0 var(--sidebar-width);
  z-index: 88;
  cursor: col-resize;
  background: transparent;
}

.document-pane {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  background: var(--canvas);
}

.editor-shell {
  position: relative;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: var(--canvas);
  box-shadow: none;
  overflow: hidden;
}

.stream-lock-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 180;
  transform: translate(14px, 12px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(17, 17, 17, 0.13);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
  color: rgba(17, 17, 17, 0.72);
  padding: 7px 10px;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  box-shadow: rgba(17, 17, 17, 0.08) 0 10px 24px -14px;
  transition: opacity 90ms ease;
}

.stream-lock-tooltip.visible {
  opacity: 1;
}

.page-toolbar {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 10;
  display: none;
  height: 34px;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 0;
  border-radius: 9px;
  font-family: var(--ui-font);
  font-size: 12px;
  background: #111111;
  color: #ffffff;
  box-shadow: rgba(0, 0, 0, 0.18) 0 10px 22px;
}

body.is-ready .page-toolbar {
  display: flex;
}

.page-count {
  color: #ffffff;
}

.page-toolbar .small-tool,
.page-toolbar #zoomLabel,
.page-toolbar .page-count {
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-toolbar .small-tool {
  min-width: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  padding: 0 9px;
}

.page-toolbar #zoomLabel,
.page-toolbar .page-count {
  padding: 0 8px;
}

.page-toolbar .small-tool:hover {
  background: rgba(255, 255, 255, 0.12);
}

.dv-whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 210;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 15px 0 13px;
  border: 1px solid rgba(9, 121, 69, 0.2);
  border-radius: 999px;
  background: #25d366;
  color: #ffffff;
  font-family: var(--ui-font);
  font-size: 14px;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.22);
  transition: transform 120ms ease, box-shadow 140ms ease, background-color 120ms ease;
}

body.is-ready .dv-whatsapp-float {
  bottom: 64px;
}

.dv-whatsapp-float:hover {
  transform: translateY(-1px);
  background: #1fbd5a;
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.28);
}

.dv-whatsapp-logo {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg role='img' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347M12.051 21.785h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.889-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg role='img' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347M12.051 21.785h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.889-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 760px) {
  .dv-whatsapp-float {
    right: 12px;
    bottom: 72px;
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  body.is-ready .dv-whatsapp-float {
    bottom: 72px;
  }

  body.view-document .dv-whatsapp-float {
    bottom: 112px;
  }
}

.study-quiz-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  min-width: 0;
  margin-left: 5px;
  padding: 0 10px;
  border: 1px solid rgba(224, 104, 18, 0.54);
  border-radius: 7px;
  background: #ff8a12;
  color: #ffffff;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transition: background-color 120ms ease, transform 120ms ease;
}

.study-quiz-button[hidden] {
  display: none !important;
}

.study-quiz-button:hover {
  background: #f97316;
  transform: translateY(-1px);
}

.study-quiz-button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.study-quiz-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 17, 17, 0.38);
  backdrop-filter: blur(6px);
}

.study-quiz-modal[hidden] {
  display: none !important;
}

.study-quiz-dialog {
  position: relative;
  width: min(760px, calc(100vw - 34px));
  max-height: min(760px, calc(100vh - 34px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 18px;
  background: #ffffff;
  color: #111111;
  box-shadow: rgba(17, 17, 17, 0.18) 0 24px 70px -34px;
  font-family: var(--ui-font);
}

.study-quiz-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 12px;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
}

.study-quiz-close svg {
  width: 20px;
  height: 20px;
}

.study-quiz-head {
  padding: 34px 36px 18px;
}

.study-quiz-head p {
  margin: 0 0 8px;
  color: rgba(17, 17, 17, 0.52);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.study-quiz-head h2 {
  margin: 0 56px 8px 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.02;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.study-quiz-head span {
  display: block;
  max-width: 620px;
  color: rgba(17, 17, 17, 0.62);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.study-quiz-count {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 6px 8px 6px 12px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 12px;
  background: #f7f7f6;
  color: rgba(17, 17, 17, 0.68);
  font-size: 13px;
  font-weight: 780;
}

.study-quiz-count input {
  width: 58px;
  height: 34px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 9px;
  outline: none;
  background: #ffffff;
  color: #111111;
  text-align: center;
  font-family: var(--ui-font);
  font-size: 14px;
  font-weight: 800;
}

.study-quiz-count input:focus {
  border-color: rgba(249, 115, 22, 0.65);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.study-quiz-count input:disabled {
  color: rgba(17, 17, 17, 0.48);
  cursor: not-allowed;
}

.study-quiz-score {
  min-height: 24px;
  padding: 0 36px 8px;
  color: rgba(17, 17, 17, 0.56);
  font-size: 13px;
  font-weight: 750;
}

.study-quiz-body {
  overflow: auto;
  padding: 0 36px 32px;
}

.study-quiz-loading,
.study-quiz-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  gap: 14px;
  text-align: center;
  color: rgba(17, 17, 17, 0.62);
}

.study-quiz-loader {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(17, 17, 17, 0.08);
  border-top-color: #ff8a12;
  border-radius: 50%;
  animation: studyQuizSpin 800ms linear infinite;
}

@keyframes studyQuizSpin {
  to { transform: rotate(360deg); }
}

.study-quiz-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: rgba(17, 17, 17, 0.58);
  font-size: 13px;
  font-weight: 760;
}

.study-quiz-card {
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 14px;
  padding: 20px;
  background: #fbfbfa;
}

.study-quiz-card h3 {
  margin: 0 0 16px;
  color: #111111;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 780;
}

.study-quiz-card textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 12px;
  outline: none;
  background: #ffffff;
  color: #111111;
  padding: 14px;
  font-family: var(--ui-font);
  font-size: 15px;
  line-height: 1.55;
}

.study-quiz-card textarea:focus {
  border-color: rgba(249, 115, 22, 0.72);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.study-quiz-feedback {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.1);
}

.study-quiz-feedback.correct {
  border-color: rgba(22, 163, 74, 0.28);
  background: #f2fbf5;
}

.study-quiz-feedback.wrong {
  border-color: rgba(249, 115, 22, 0.32);
  background: #fff7ed;
}

.study-quiz-feedback strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 800;
}

.study-quiz-feedback p,
.study-quiz-empty p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.study-quiz-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.study-quiz-primary,
.study-quiz-secondary {
  min-height: 44px;
  border-radius: 10px;
  padding: 0 18px;
  font-family: var(--ui-font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.study-quiz-primary {
  border: 1px solid rgba(17, 17, 17, 0.86);
  background: #111111;
  color: #ffffff;
}

.study-quiz-primary:disabled {
  opacity: 0.6;
  cursor: default;
}

.study-quiz-secondary {
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: #ffffff;
  color: #111111;
}

.tox.tox-tinymce {
  border: 0 !important;
  border-radius: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  font-family: var(--ui-font) !important;
}

.tox .tox-edit-area {
  overflow: hidden auto !important;
}

.tox .tox-edit-area__iframe {
  background: #f8f8f6 !important;
  height: 100% !important;
}

.tox .tox-toolbar-overlord,
.tox .tox-toolbar__primary,
.tox .tox-editor-header {
  background: #ffffff !important;
}

.tox .tox-editor-header {
  padding: 8px 16px 7px !important;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1) !important;
  box-shadow: rgba(17, 17, 17, 0.08) 0 8px 18px -14px !important;
}

.tox .tox-toolbar-overlord,
.tox .tox-toolbar,
.tox .tox-toolbar__primary {
  border: 0 !important;
}

.tox .tox-toolbar,
.tox .tox-toolbar__primary {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  align-content: flex-start !important;
  gap: 4px 5px !important;
  padding: 0 !important;
  background: #ffffff !important;
}

.tox .tox-toolbar__group {
  align-items: center !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 5px 0 0 !important;
}

.tox .tox-toolbar__group:not(:last-child) {
  border-right: 1px solid rgba(17, 17, 17, 0.08) !important;
}

.tox .tox-tbtn,
.tox .tox-split-button {
  width: 32px !important;
  height: 32px !important;
  margin: 0 !important;
  border-radius: 6px !important;
}

.tox .tox-tbtn--select {
  width: 112px !important;
}

.tox .tox-tbtn:hover,
.tox .tox-split-button:hover {
  background: #f6f6f4 !important;
}

.selection-toolbar {
  position: fixed;
  z-index: 60;
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-control);
  backdrop-filter: blur(12px);
}

.selection-toolbar button {
  border: 0;
  border-radius: 100px;
  background: #ffffff;
  padding: 7px 10px;
  font-family: var(--ui-font);
  font-size: 12px;
  cursor: pointer;
}

.selection-toolbar button:hover {
  background: #fff3d8;
}

.onboarding {
  position: fixed;
  inset: var(--topbar-height) 0 0 var(--sidebar-width);
  z-index: 50;
  display: none;
  place-items: center;
  background: #f6f5f2;
  backdrop-filter: none;
}

html[data-plume-onboarding="open"] .onboarding:not([hidden]) {
  display: grid;
}

.onboarding-card {
  width: min(700px, calc(100vw - 32px));
  text-align: center;
  font-family: var(--ui-font);
  transform: translateY(-18px);
}

.onboarding-card > img {
  width: 42px;
  height: 42px;
  display: block;
  margin: 0 auto 24px;
}

.onboarding-card h2 {
  margin: 0 0 24px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
}

.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.role-card {
  min-height: 104px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 10px;
  background: #ffffff;
  text-align: left;
  padding: 16px;
  cursor: pointer;
  box-shadow: rgba(17, 17, 17, 0.06) 0 10px 24px;
  transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.role-card:hover,
.specialty-step button:hover {
  border-color: var(--gold);
  background: #fffaf0;
}

.role-card:hover {
  transform: translateY(-2px);
  box-shadow: rgba(17, 17, 17, 0.1) 0 14px 30px;
}

.role-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.role-title img {
  width: 36px;
  height: 36px;
}

.role-card span:last-child {
  font-size: 14px;
}

.specialty-step input,
.specialty-step button {
  display: block;
  width: min(420px, 100%);
  height: 52px;
  margin: 0 auto;
  border-radius: 10px;
  font-family: var(--ui-font);
}

.specialty-step input {
  border: 1px solid rgba(17, 17, 17, 0.12);
  padding: 0 14px;
  outline: none;
  font-size: 14px;
  background: #ffffff;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.specialty-step input:focus {
  border-color: rgba(244, 165, 28, 0.62);
  box-shadow: 0 0 0 3px rgba(244, 165, 28, 0.13);
}

.specialty-step button {
  height: 44px;
  margin-top: 12px;
  border: 0;
  background: #000000;
  color: #ffffff;
  cursor: pointer;
  box-shadow: rgba(0, 0, 0, 0.14) 0 10px 22px;
  transition: background-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.specialty-step button:hover {
  background: #111111;
  transform: translateY(-1px);
  box-shadow: rgba(0, 0, 0, 0.18) 0 12px 26px;
}

.mobile-switcher {
  display: none;
}

.view-chat .document-pane,
.view-chat .resizer {
  display: none;
}

.view-document .chat-pane,
.view-document .resizer {
  display: none;
}

.view-chat .workspace,
.view-document .workspace {
  grid-template-columns: minmax(320px, 1fr);
}

.view-chat .chat-pane {
  border-right: 0;
}

.view-chat .chat-inner {
  max-width: 760px;
  margin: 0 auto;
}

.view-document .document-pane {
  padding-left: 10px;
}

@media (max-width: 1120px) {
  .document-name {
    width: 320px;
  }

  .view-mode-switcher button {
    padding: 0 8px;
  }
}

@media (max-width: 760px) {
  :root {
    --sidebar-width: 0px;
    --topbar-height: 52px;
  }

  body {
    overflow: hidden;
  }

  .workspace {
    display: block;
    inset: var(--topbar-height) 0 0 0;
  }

  .app-sidebar {
    display: none;
  }

  .sidebar-reveal {
    display: none;
  }

  .topbar {
    inset: 0 0 auto 0;
    height: var(--topbar-height);
    overflow: hidden;
  }

  body.sidebar-collapsed .topbar .brand {
    min-width: 0;
    margin-left: 4px;
  }

  .topbar .brand {
    display: flex;
    flex: 0 0 auto;
    max-width: 88px;
    gap: 7px;
    overflow: hidden;
    white-space: nowrap;
  }

  .topbar .brand strong {
    display: none;
  }

  .topbar .brand .icon-button {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
  }

  .topbar .brand-logo {
    width: 32px;
    height: 32px;
  }

  .mobile-toolbar-hint:not([hidden]) {
    display: none;
  }

  body.view-document .mobile-toolbar-hint:not([hidden]) {
    position: fixed;
    top: calc(var(--topbar-height) + 10px);
    left: 12px;
    right: 12px;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 22px;
    border: 0.5px solid rgba(17, 17, 17, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: rgba(17, 17, 17, 0.62);
    padding: 0 5px 0 10px;
    font-family: var(--ui-font);
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1;
    box-shadow: none;
  }

  .mobile-toolbar-hint button {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(17, 17, 17, 0.46);
    display: grid;
    place-items: center;
    padding: 0;
  }

  .mobile-toolbar-hint svg {
    width: 12px;
    height: 12px;
  }

  .brand {
    width: auto;
    margin-left: 4px;
    gap: 7px;
  }

  .document-name {
    display: none;
  }

  .top-actions {
    min-width: 0;
    gap: 5px;
    margin-left: auto;
    margin-right: 7px;
    flex: 0 0 auto;
  }

  .top-actions .view-mode-switcher {
    display: none;
  }

  .top-login-button {
    height: 34px;
    min-width: 68px;
    padding: 0 10px;
    font-size: 13px;
  }

  .page-settings-button {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  .download-button {
    width: 118px;
    flex: 0 0 118px;
    padding: 0 9px;
    white-space: nowrap;
  }

  .download-menu {
    top: calc(100% + 7px);
    width: min(362px, calc(100vw - 28px));
    min-height: 50px;
    gap: 5px;
    padding: 6px;
  }

  .download-action {
    min-width: 0;
    height: 38px;
    gap: 4px;
    padding: 0 6px;
    font-size: 11px;
  }

  .download-action-icon,
  .download-action-icon svg {
    width: 22px;
    height: 22px;
  }

  .study-quiz-button {
    width: 28px;
    padding: 0;
  }

  .study-quiz-button span {
    display: none;
  }

  .study-quiz-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 16px;
  }

  .study-quiz-head,
  .study-quiz-score,
  .study-quiz-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .documents-panel {
    inset: var(--topbar-height) 0 0 0;
    overflow: hidden;
  }

  .documents-scrim,
  .onboarding,
  .resize-shield {
    inset: var(--topbar-height) 0 0 0;
  }

  .library-shell {
    padding: 18px 14px 24px;
  }

  .library-toolbar {
    align-items: stretch;
    gap: 10px;
    margin-bottom: 20px;
  }

  .library-back {
    flex: 1 1 auto;
    min-width: 0;
    height: 36px;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .library-back svg {
    width: 18px;
    height: 18px;
  }

  .library-toolbar .documents-full-button {
    flex: 0 0 auto;
    min-width: 108px;
    height: 36px;
  }

  .library-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-bottom: 22px;
    padding-bottom: 18px;
  }

  .library-new h2,
  .library-documents h2 {
    font-size: 20px;
  }

  .library-new .new-document-button {
    width: auto;
    min-height: 36px;
    height: 36px;
    margin-top: 0;
    padding: 0 12px;
    flex-direction: row;
    justify-content: center;
  }

  .library-new .new-document-button .new-document-preview {
    display: none;
  }

  .library-new .new-document-button > span:last-child {
    text-align: left;
    font-size: 13px;
  }

  .library-documents-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .library-documents-head h2 {
    grid-column: 1 / 2;
  }

  .library-documents-head .documents-search {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }

  .library-documents-head #documentCount {
    grid-column: 2;
    grid-row: 1;
  }

  .library-divider {
    margin: 14px 0 18px;
  }

  .documents-group {
    margin-bottom: 28px;
  }

  .documents-group h3 {
    margin-bottom: 9px;
    font-size: 11px;
  }

  .document-row {
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 8px;
    min-height: 72px;
    padding: 0;
  }

  .document-open {
    min-height: 72px;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 4px 10px;
    padding: 9px 10px;
  }

  .document-thumb {
    grid-row: 1 / 3;
    width: 34px;
    height: 44px;
    border-width: 1px;
  }

  .document-thumb span {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 13px;
  }

  .document-title {
    font-size: 14px;
  }

  .document-preview {
    display: none;
  }

  .document-open > .document-meta {
    justify-self: start;
    font-size: 10px;
  }

  .document-row-actions {
    grid-template-columns: 28px;
    gap: 6px;
    padding-right: 0;
  }

  .document-row-actions svg {
    width: 21px;
    height: 21px;
  }

  .documents-full {
    gap: 12px;
    padding: 12px;
    overflow-y: auto;
  }

  .documents-full-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    flex: 0 0 auto;
    min-height: auto;
  }

  .documents-full-top h2 {
    font-size: 23px;
  }

  .documents-full-actions {
    width: 100%;
  }

  .documents-full-actions button {
    flex: 1 1 0;
  }

  .documents-full-layout {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 10px;
    min-height: auto;
  }

  .documents-full-list,
  .documents-history {
    flex: 0 0 auto;
    min-height: auto;
    padding: 10px;
  }

  .all-documents-list {
    max-height: 330px;
  }

  .document-history-list {
    max-height: 390px;
  }

  .full-document-card {
    min-height: 78px;
  }

  .history-row {
    min-height: 76px;
    grid-template-columns: minmax(0, 1fr);
  }

  .text-button {
    display: none;
  }

  .chat-pane,
  .document-pane {
    position: absolute;
    inset: 0 0 0 0;
    min-width: 0;
    padding: 0;
  }

  .document-pane {
    display: none;
    padding: 0;
    transform: none;
  }

  .view-document .document-pane {
    display: block;
  }

  .view-document .chat-pane {
    display: none;
  }

  .view-chat .chat-pane {
    display: block;
  }

  .chat-inner {
    inset: 0;
    padding: 0 8px 112px;
  }

  body.chat-started .chat-inner,
  body.document-has-content .chat-inner {
    padding: 12px 8px 96px;
  }

  .intro {
    margin-top: 120px;
  }

  .intro h1 {
    font-size: 22px;
  }

  .conversation {
    max-height: 260px;
  }

  body.chat-started .conversation,
  body.document-has-content .conversation {
    max-height: none;
    padding-bottom: 10px;
  }

  body.chat-started .composer,
  body.document-has-content .composer {
    margin: 0 -2px;
  }

  .template-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(142px, 100%), 1fr));
    gap: 6px;
  }

  .editor-shell {
    height: 100%;
  }

  .tox .tox-editor-header {
    min-height: 38px !important;
    padding: 3px 7px !important;
    border-bottom: 0.5px solid rgba(17, 17, 17, 0.08) !important;
    box-shadow: rgba(17, 17, 17, 0.05) 0 8px 18px -16px !important;
    overflow: hidden !important;
  }

  .tox .tox-toolbar-overlord,
  .tox .tox-toolbar,
  .tox .tox-toolbar__primary {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    align-content: center !important;
    gap: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    white-space: nowrap !important;
  }

  .tox .tox-toolbar-overlord::-webkit-scrollbar,
  .tox .tox-toolbar::-webkit-scrollbar,
  .tox .tox-toolbar__primary::-webkit-scrollbar {
    display: none !important;
  }

  .tox .tox-toolbar__group {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    min-height: 32px !important;
    padding: 0 4px !important;
  }

  .tox .tox-toolbar__group:not(:last-child) {
    border-right: 0.5px solid rgba(17, 17, 17, 0.07) !important;
  }

  .tox .tox-tbtn,
  .tox .tox-split-button {
    width: 28px !important;
    height: 28px !important;
    border-radius: 5px !important;
  }

  .tox .tox-tbtn--select {
    width: auto !important;
    min-width: 86px !important;
    max-width: 132px !important;
  }

  .page-toolbar {
    right: 14px;
    bottom: 62px;
  }

  .mobile-switcher {
    position: fixed;
    left: 50%;
    bottom: 6px;
    z-index: 70;
    transform: translateX(-50%);
    width: 296px;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border: 1px solid rgba(168, 175, 240, 0.52);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: rgba(40, 40, 70, 0.08) 0 12px 28px;
    backdrop-filter: blur(12px);
  }

  .mobile-switcher button {
    flex: 1;
    height: 40px;
    border: 0;
    border-radius: 100px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--ui-font);
    font-size: 14px;
    color: #9aa3df;
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease;
  }

  .mobile-switcher button.active {
    background: #f4f5ff;
    color: #7f88d8;
  }

  .onboarding {
    align-items: start;
    padding-top: 180px;
  }

  .role-grid {
    grid-template-columns: 1fr;
  }
}

body.sidebar-collapsed #menuButton {
  display: none !important;
}

/* ==================== Library — inline Word-style Recent ==================== */

.library-view {
  position: fixed;
  inset: var(--topbar-height) 0 0 var(--sidebar-width);
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px clamp(20px, 4vw, 48px) 32px;
  background: var(--canvas);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

body.documents-full-open .library-view {
  opacity: 1;
  transform: translateY(0);
}

body.sidebar-collapsed .library-view {
  left: 0;
}

.library-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.library-head-title {
  min-width: 0;
}

.library-eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.library-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.library-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.library-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  height: 36px;
  width: 240px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.library-search:focus-within {
  border-color: rgba(17, 17, 17, 0.32);
  box-shadow: rgba(17, 17, 17, 0.06) 0 0 0 4px;
}

.library-search svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex: 0 0 auto;
}

.library-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  color: var(--ink);
}

.library-newdoc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  width: auto;
  height: 36px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease;
}

.library-newdoc:hover {
  background: #000;
  transform: translateY(-1px);
}

.library-newdoc svg {
  width: 16px;
  height: 16px;
}

.library-import {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.library-import svg {
  width: 16px;
  height: 16px;
}

.library-import:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.library-import-pdf {
  background: linear-gradient(180deg, #e44141 0%, #c92a2a 100%);
  box-shadow: rgba(201, 42, 42, 0.28) 0 6px 14px -6px;
}

.library-import-pdf:hover {
  box-shadow: rgba(201, 42, 42, 0.38) 0 10px 20px -6px;
}

.library-import-word {
  background: linear-gradient(180deg, #3a6fdf 0%, #2350c0 100%);
  box-shadow: rgba(35, 80, 192, 0.28) 0 6px 14px -6px;
}

.library-import-word:hover {
  box-shadow: rgba(35, 80, 192, 0.38) 0 10px 20px -6px;
}

.library-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease;
}

.library-close:hover {
  border-color: var(--line-strong);
  background: #fafafa;
  transform: translateY(-1px);
}

.library-close svg {
  width: 16px;
  height: 16px;
}

.library-columns {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 90px 160px;
  gap: 14px;
  padding: 0 24px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 650;
}

.library-col-name {
  grid-column: 2;
}

.library-col-pages {
  grid-column: 3;
}

.library-col-date {
  grid-column: 4;
}

.library-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 6px;
  box-shadow: rgba(17, 17, 17, 0.04) 0 12px 36px;
}

.library-row {
  position: relative;
  display: flex;
  align-items: stretch;
  border-radius: 10px;
  transition: background-color 120ms ease;
}

.library-row:hover,
.library-row.active {
  background: #f7f7f5;
}

.library-row-open {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 90px 160px;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 8px 14px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font-family: inherit;
}

.library-row-pages {
  color: var(--muted);
  font-size: 12.5px;
  text-align: left;
}

.library-row-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.library-row-title {
  overflow: hidden;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-row-preview {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-row-date {
  color: var(--muted);
  font-size: 12.5px;
  text-align: left;
}

.library-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-right: 10px;
  opacity: 0;
  transition: opacity 120ms ease;
}

.library-row:hover .library-row-actions,
.library-row:focus-within .library-row-actions {
  opacity: 1;
}

.library-row-actions button {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.library-row-actions button svg {
  width: 17px;
  height: 17px;
}

.library-row-actions button:hover {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.library-empty {
  margin: 28px auto;
  color: var(--muted);
  font-size: 13px;
}

.settings-view {
  position: fixed;
  inset: var(--topbar-height) 0 0 var(--sidebar-width);
  z-index: 96;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px clamp(20px, 4vw, 48px) 32px;
  background: #ffffff;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

body.settings-open .settings-view {
  opacity: 1;
  transform: translateY(0);
}

body.sidebar-collapsed .settings-view {
  left: 0;
}

.settings-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.settings-eyebrow,
.settings-plan-kicker {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 750;
}

.settings-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.settings-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease;
}

.settings-close:hover {
  border-color: var(--line-strong);
  background: #fafafa;
  transform: translateY(-1px);
}

.settings-close svg {
  width: 16px;
  height: 16px;
}

.settings-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.settings-logout {
  height: 36px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 10px;
  background: #ffffff;
  color: #a10f0f;
  padding: 0 14px;
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.settings-logout:hover {
  border-color: rgba(161, 15, 15, 0.3);
  background: #fff6f6;
  transform: translateY(-1px);
}

.settings-logout[hidden] {
  display: none;
}

.settings-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7f7f5;
}

.settings-tabs button {
  height: 40px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  padding: 0 18px;
  font-family: var(--ui-font);
  font-size: 14px;
  font-weight: 760;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.settings-tabs button.active {
  background: #111111;
  color: #ffffff;
}

.settings-grid {
  display: block;
  width: min(980px, 100%);
}

.settings-summary,
.settings-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.settings-summary {
  display: grid;
  gap: 8px;
  padding: 22px;
  position: static;
  top: auto;
}

.settings-summary strong {
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.settings-summary > span:not(.settings-plan-kicker) {
  color: #111111;
  font-size: 19px;
  font-weight: 760;
}

.settings-summary small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.settings-panels {
  min-width: 0;
}

.settings-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.settings-panel[hidden] {
  display: none;
}

.settings-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settings-section-head h3 {
  margin: 0 0 4px;
  font-size: 19px;
  line-height: 1.15;
  font-weight: 820;
}

.settings-section-head p,
.settings-danger p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.settings-ghost,
.settings-primary,
.settings-billing-row button,
.settings-danger button {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 13px;
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.settings-primary {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
}

.settings-ghost:hover,
.settings-primary:hover,
.settings-billing-row button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.settings-ghost:hover,
.settings-billing-row button:hover {
  background: #fafafa;
}

.settings-primary:hover {
  background: #000000;
}

.settings-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-mode-option {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  padding: 18px;
  text-align: left;
  font-family: var(--ui-font);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.settings-mode-option:hover {
  border-color: rgba(17, 17, 17, 0.28);
  transform: translateY(-1px);
}

.settings-mode-option.active {
  border-color: #111111;
  background: #f4f4f2;
}

.settings-mode-option span,
.settings-template-box strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 820;
}

.settings-mode-option small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 620;
}

.settings-mode-field {
  display: grid;
  gap: 9px;
}

.settings-mode-field > span,
.settings-template-box > div:first-child > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.settings-mode-field > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.settings-mode-field input {
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 13px;
  font-family: var(--ui-font);
  font-size: 14px;
  font-weight: 680;
  outline: none;
}

.settings-mode-field input:focus {
  border-color: rgba(17, 17, 17, 0.34);
}

.settings-template-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fafafa;
}

.settings-template-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.settings-template-list {
  display: grid;
  gap: 8px;
}

.settings-template-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.settings-template-item:hover,
.settings-template-item:focus-visible {
  border-color: rgba(17, 17, 17, 0.18);
  background: #f8f8f7;
  outline: none;
}

.settings-template-item > span {
  font-size: 20px;
  line-height: 1;
}

.settings-template-copy {
  min-width: 0;
}

.settings-template-copy strong,
.settings-template-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-template-copy strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
}

.settings-template-copy small,
.settings-template-empty {
  color: var(--muted);
  font-size: 12.5px;
}

.settings-template-edit {
  height: 32px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 9px;
  background: #111111;
  color: #ffffff;
  padding: 0 12px;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 730;
  cursor: pointer;
}

.settings-template-edit:hover {
  background: #000000;
}

.settings-template-empty {
  margin: 0;
}

.settings-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-plan-option {
  display: grid;
  gap: 8px;
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 18px;
  text-align: left;
  color: var(--ink);
  font-family: var(--ui-font);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.settings-plan-option:hover {
  border-color: rgba(17, 17, 17, 0.28);
  transform: translateY(-1px);
}

.settings-plan-option.active {
  border-color: #111111;
  background: #f8f8f6;
}

.settings-plan-option span {
  font-size: 18px;
  font-weight: 850;
}

.settings-plan-option strong {
  font-size: 24px;
  line-height: 1;
  font-weight: 850;
}

.settings-plan-option small {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.settings-billing-switch {
  display: inline-grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1fr);
  gap: 7px;
  width: max-content;
  max-width: 100%;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7f7f5;
}

.settings-billing-switch button {
  height: 42px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  padding: 0 15px;
  font-family: var(--ui-font);
  font-size: 14px;
  font-weight: 780;
  cursor: pointer;
}

.settings-billing-switch button.active {
  background: #111111;
  color: #ffffff;
}

.settings-billing-switch span {
  margin-left: 6px;
  color: #137333;
  font-size: 12px;
  font-weight: 850;
}

.settings-billing-switch button.active span {
  color: #b7f7c8;
}

.settings-billing-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: #fafafa;
}

.settings-billing-card span,
.settings-billing-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.settings-billing-card strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  font-weight: 850;
}

.settings-billing-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.settings-billing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
}

.settings-danger {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.settings-danger summary {
  width: max-content;
  color: rgba(17, 17, 17, 0.5);
  font-size: 12.5px;
  font-weight: 760;
  cursor: pointer;
}

.settings-danger[open] {
  display: grid;
  gap: 10px;
}

.settings-danger button {
  width: max-content;
  color: #a10f0f;
}

.settings-danger button:hover {
  border-color: rgba(161, 15, 15, 0.28);
  background: #fff5f5;
}

.settings-language-field {
  display: grid;
  gap: 9px;
  max-width: 420px;
}

.settings-language-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.settings-language-field select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 13px;
  font-family: var(--ui-font);
  font-size: 14px;
  font-weight: 680;
  outline: none;
}

.settings-language-field select:focus {
  border-color: rgba(17, 17, 17, 0.34);
}

.settings-note {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .pricing-modal {
    padding: 10px;
    align-items: end;
  }

  .pricing-dialog {
    width: 100%;
    height: min(1200px, calc(100vh - 20px));
    max-height: min(1200px, calc(100vh - 20px));
    border-radius: 16px;
  }

  .pricing-scroll {
    padding: 20px 16px 14px;
  }

  .pricing-billing {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px;
    border-radius: 16px;
  }

  .pricing-billing button {
    height: 46px;
    padding: 0 7px;
    border-radius: 12px;
    font-size: 14px;
    gap: 5px;
    flex-direction: column;
  }

  .pricing-modal[data-pricing-billing-state="annual"] .pricing-billing button[data-pricing-billing="annual"] {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
  }

  .pricing-billing small {
    padding: 3px 6px;
    font-size: 10.5px;
  }

  .pricing-footer {
    padding: 14px 16px 16px;
  }

  .pricing-modal.pricing-simple-999 .pricing-dialog {
    width: 100%;
    height: auto;
    max-height: min(760px, calc(100vh - 20px));
  }

  .pricing-modal.pricing-simple-999 .pricing-scroll {
    padding-bottom: 10px;
  }

  .pricing-modal.pricing-simple-999 .pricing-head h2 {
    font-size: 23px;
  }

  .simple-pricing-hero {
    padding: 16px;
    border-radius: 15px;
  }

  .simple-pricing-hero h3 {
    font-size: 25px;
  }

  .simple-pricing-price strong {
    font-size: 30px;
  }

  .simple-pricing-price em {
    margin-left: 0;
  }

  .simple-pricing-benefits span {
    font-size: 13px;
  }

  .pricing-social-actions {
    grid-template-columns: 1fr;
  }

  .social-free-modal {
    padding: 10px;
    align-items: end;
  }

  .social-free-dialog {
    width: 100%;
    min-height: 0;
    max-height: calc(100vh - 20px);
    border-radius: 16px;
  }

  .social-free-head {
    padding: 22px 16px 14px;
    padding-right: 58px;
  }

  .social-free-body {
    padding: 2px 16px 22px;
  }

  .social-free-link {
    width: 100%;
    height: 50px;
  }

  .social-free-qr {
    width: min(240px, calc(100vw - 64px));
    height: min(240px, calc(100vw - 64px));
  }

  .cancel-flow-modal {
    padding: 10px;
    align-items: end;
  }

  .cancel-flow-dialog {
    width: 100%;
    border-radius: 16px;
  }

  .cancel-flow-head {
    padding: 22px 16px 14px;
    padding-right: 58px;
  }

  .cancel-flow-head h2 {
    font-size: 24px;
  }

  .cancel-flow-body {
    padding: 0 16px 14px;
  }

  .cancel-flow-actions {
    grid-template-columns: 1fr;
    padding: 0 16px 16px;
  }

  .pricing-row {
    grid-template-columns: minmax(0, 1fr) 74px 74px;
  }

  .pricing-compare {
    --pricing-first-col: calc(100% - 148px);
    --pricing-plan-col: 74px;
  }

  .pricing-row {
    grid-template-columns: minmax(0, 1fr) 74px 74px;
    gap: 6px;
  }

  .pricing-top-button span {
    display: none;
  }

  .pricing-top-button {
    width: 34px;
    padding: 0;
  }

  .library-view {
    padding: 18px 14px 24px;
    gap: 14px;
  }

  .library-head {
    align-items: flex-start;
  }

  .library-head h2 {
    font-size: 24px;
  }

  .library-head-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .library-search {
    flex: 1 1 160px;
    width: auto;
  }

  .library-columns {
    grid-template-columns: 36px minmax(0, 1fr) 60px auto;
    padding: 0 12px;
    font-size: 10px;
  }

  .library-row-open {
    grid-template-columns: 32px minmax(0, 1fr) 60px auto;
    gap: 10px;
    padding: 8px 10px;
    min-height: 56px;
  }

  .doc-tile.library-row-icon {
    width: 26px;
    height: 33px;
    font-size: 13px;
  }

  .library-row-pages,
  .library-row-date {
    font-size: 11.5px;
  }

  .library-row-actions {
    opacity: 1;
    padding-right: 6px;
  }

  .settings-view {
    inset: var(--topbar-height) 0 0 0;
    padding: 18px 14px 24px;
    gap: 14px;
  }

  .settings-head {
    align-items: flex-start;
  }

  .settings-head h2 {
    font-size: 25px;
  }

  .settings-tabs {
    width: 100%;
  }

  .settings-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .settings-summary {
    position: static;
    padding: 18px;
  }

  .settings-summary strong {
    font-size: 29px;
  }

  .settings-panel {
    padding: 16px;
    gap: 14px;
  }

  .settings-section-head {
    flex-direction: column;
    gap: 10px;
  }

  .settings-option-grid,
  .settings-mode-grid,
  .settings-mode-field > div,
  .settings-billing-switch {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .settings-template-box {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-template-actions {
    justify-content: stretch;
  }

  .settings-template-actions button,
  .settings-mode-field button {
    width: 100%;
  }

  .settings-billing-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .language-picker-popover {
    position: fixed;
    left: 10px;
    right: auto;
    bottom: 84px;
    width: min(360px, calc(100vw - 20px));
    max-height: min(340px, calc(100vh - 116px));
    padding: 10px;
  }

  .language-picker-popover::after {
    left: 42px;
  }

  .language-picker-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .language-picker-option {
    min-height: 54px;
    padding: 6px 4px;
  }
}

@media (max-width: 900px) {
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  textarea,
  select,
  .composer textarea,
  .specialty-step input,
  .template-builder-form input,
  .template-builder-form textarea,
  .template-builder-form select,
  .qcard-input,
  .study-quiz-card textarea,
  .experiment-login-dialog input,
  .selection-custom input,
  .selection-refine input {
    font-size: 16px !important;
  }
}
