:root {
  --color-primary-50: #eef9ff;
  --color-primary-100: #d9f1ff;
  --color-primary-200: #bce7ff;
  --color-primary-300: #8ed8ff;
  --color-primary-400: #58c2ff;
  --color-primary-500: #24abfc;
  --color-primary-600: #1595e3;
  --color-primary-700: #1177b7;
  --color-primary-800: #145f8f;
  --color-primary-900: #154f75;
  --btn-open-file: #0879bc;
  --accent-interactive: #0879bc;
  --text-instruction: #0879bc;
  --text-secondary: #334155;
  --text-muted: #475569;
  --mantine-color-dimmed: #475569;
  --mantine-color-placeholder: #64748b;
  --tool-subcategory-text-color: #475569;
  --search-text-and-icon-color: #475569;
  --border-strong: #64748b;
  --icon-tools-bg: #0879bc;
  --icon-files-color: #0879bc;
  --icon-activity-color: #0879bc;
  --landing-hero-gradient: linear-gradient(135deg, #0879bc 0%, #075f9c 100%);
  --bg-background: #f5f7fb;
  --bg-file-manager: #f5f7fb;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

[data-mantine-color-scheme="dark"] {
  --btn-open-file: #0879bc;
  --accent-interactive: #7dd3fc;
  --text-instruction: #7dd3fc;
  --text-secondary: #e2e8f0;
  --text-muted: #cbd5e1;
  --mantine-color-dimmed: #cbd5e1;
  --mantine-color-placeholder: #cbd5e1;
  --tool-subcategory-text-color: #cbd5e1;
  --search-text-and-icon-color: #e2e8f0;
  --border-strong: #94a3b8;
  --icon-tools-bg: #334155;
  --icon-files-color: #e2e8f0;
  --icon-activity-color: #e2e8f0;
  --landing-hero-gradient: linear-gradient(135deg, #0879bc 0%, #075f9c 100%);
}

.landing-subtitle {
  color: #334155 !important;
  font-size: 1rem;
  font-weight: 500;
}

.tap-tool-page :where(.landing-title, .landing-subtitle) {
  display: none !important;
}

.file-sidebar-empty-hint {
  color: #475569 !important;
  opacity: 1 !important;
}

.landing-btn-secondary,
.landing-btn-secondary * {
  color: #075f9c !important;
}

.landing-btn-secondary {
  background: #fff !important;
  border-color: #cbd5e1 !important;
}

.tool-panel .mantine-Text-root {
  color: #475569 !important;
}

.tool-panel :where(
  .mantine-InputWrapper-label,
  .mantine-InputWrapper-description,
  .mantine-InputWrapper-error,
  label
) {
  opacity: 1 !important;
}

.tool-panel :where(
  .mantine-InputWrapper-description,
  .mantine-Text-root[data-dimmed="true"]
) {
  color: #475569 !important;
}

.tool-panel .mantine-Anchor-root {
  color: #075f9c !important;
}

[data-mantine-color-scheme="dark"] .file-sidebar-empty-hint,
[data-mantine-color-scheme="dark"] .tool-panel .mantine-Text-root,
[data-mantine-color-scheme="dark"] .tool-panel .mantine-InputWrapper-description {
  color: #cbd5e1 !important;
}

[data-mantine-color-scheme="dark"] .tool-panel .mantine-Anchor-root {
  color: #7dd3fc !important;
}

.tap-shell-home-link {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  height: 40px;
  left: 42px;
  position: fixed;
  top: 6px;
  width: 150px;
  z-index: 450;
}

.tap-shell-home-logo {
  display: block;
  height: 32px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  width: auto;
}

.tap-tool-page {
  background: var(--bg-background);
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.tap-tool-page__workspace {
  flex: 1 1 auto;
  min-height: 0;
}

.tap-tool-page__workspace > .h-screen {
  height: 100% !important;
}

.tap-tool-context {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid #cbd5e1;
  color: #102437;
  display: flex;
  flex: 0 0 auto;
  gap: 1.5rem;
  justify-content: space-between;
  min-height: 104px;
  padding: 0.85rem 1.5rem 0.85rem 220px;
}

.tap-tool-context__copy {
  min-width: 0;
}

.tap-tool-context__eyebrow {
  color: #075f9c;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  margin: 0 0 0.2rem;
  text-transform: uppercase;
}

.tap-tool-context h1 {
  color: #102437;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
}

.tap-tool-context__description {
  color: #334155;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  margin: 0.3rem 0 0;
  max-width: 780px;
}

.tap-tool-context__status {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tap-tool-context__status li {
  background: #e2e8f0;
  border: 1px solid #94a3b8;
  border-radius: 999px;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.48rem 0.65rem;
  white-space: nowrap;
}

.tap-tool-context__status li[data-access="premium"] {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #075f9c;
}

[data-mantine-color-scheme="dark"] .tap-tool-context {
  background: #111c2d;
  border-bottom-color: #475569;
  color: #f8fafc;
}

[data-mantine-color-scheme="dark"] .tap-tool-context__eyebrow {
  color: #7dd3fc;
}

[data-mantine-color-scheme="dark"] .tap-tool-context h1 {
  color: #f8fafc;
}

[data-mantine-color-scheme="dark"] .tap-tool-context__description {
  color: #cbd5e1;
}

[data-mantine-color-scheme="dark"] .tap-tool-context__status li {
  background: #1e293b;
  border-color: #64748b;
  color: #e2e8f0;
}

[data-mantine-color-scheme="dark"] .tap-tool-context__status li[data-access="premium"] {
  background: #0c4a6e;
  border-color: #38bdf8;
  color: #e0f2fe;
}

.file-sidebar-brand-text,
.mobile-brand-icon,
.mobile-brand-text {
  visibility: hidden !important;
}

:where(
  .tap-shell-home-link,
  .tap-home a,
  .tap-home button,
  .tap-home input,
  .tap-account-dock button,
  .tap-account-bar a,
  .tap-account-bar button,
  .tap-consent-shell a,
  .tap-consent-shell button,
  .tap-consent-shell input
):focus-visible {
  outline: 3px solid #0879bc !important;
  outline-offset: 3px !important;
}

.tap-account-bar {
  align-items: center;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  padding: 0.75rem;
}

.tap-account-bar a,
.tap-account-bar button {
  text-decoration: none;
}

.tap-account-bar__identity {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.875rem;
  gap: 0.45rem;
  min-width: 0;
}

.tap-account-bar__identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tap-account-bar__actions {
  align-items: center;
  display: flex;
  flex: none;
  gap: 0.45rem;
}

.tap-account-bar__settings {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 650;
  min-height: 34px;
  padding: 0 0.65rem;
}

.tap-account-bar__cta {
  background: #0879bc;
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  flex: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.7rem;
}

.tap-account-bar__cta:hover {
  background: #075f9c;
}

.tap-account-dock {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dce7ef;
  border-radius: 14px;
  bottom: 18px;
  box-shadow: 0 12px 34px rgba(16, 36, 55, 0.16);
  display: flex;
  gap: 8px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 7px;
  position: fixed;
  right: 18px;
  z-index: 400;
}

.tap-account-dock button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.tap-account-dock button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.tap-account-dock__identity {
  align-items: center;
  background: transparent;
  color: #102437;
  display: flex;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  padding: 4px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tap-account-dock__avatar {
  align-items: center;
  background: #e8f7ff;
  border-radius: 9px;
  color: #075f9c;
  display: inline-flex;
  flex: 0 0 auto;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.tap-account-dock__upgrade {
  background: #075f9c !important;
  border-radius: 9px;
  color: #fff;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 750;
  min-height: 34px;
  padding: 0 12px;
}

.tap-account-dock__settings {
  background: #fff !important;
  border: 1px solid #94a3b8 !important;
  border-radius: 9px;
  color: #102437;
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 700;
  min-height: 34px;
  padding: 0 10px;
}

html[data-tap-embed="landing"] {
  background: transparent !important;
  min-height: 0;
}

html[data-tap-embed="landing"] body {
  background: transparent !important;
  min-height: 0;
}

html[data-tap-embed="landing"] :where(
  .tap-shell-home-link,
  .tap-account-dock,
  .tap-consent-shell,
  .tap-tool-context
) {
  display: none !important;
}

html[data-tap-embed="landing"] .tap-tool-page__workspace {
  height: 100%;
}

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

@media (max-width: 620px) {
  .tap-shell-home-link {
    left: 8px;
    width: 160px;
  }

  .tap-tool-context {
    align-items: flex-start;
    display: block;
    min-height: 0;
    padding: 3.25rem 0.85rem 0.7rem;
  }

  .tap-tool-context h1 {
    font-size: 1.25rem;
  }

  .tap-tool-context__description {
    font-size: 0.82rem;
    line-height: 1.35;
    margin-top: 0.2rem;
  }

  .tap-tool-context__status {
    justify-content: flex-start;
    margin-top: 0.55rem;
  }

  .tap-tool-context__status li {
    font-size: 0.68rem;
    padding: 0.4rem 0.55rem;
  }

  .mobile-toggle-button,
  .tool-button,
  .tap-account-dock__identity,
  .tap-account-dock__settings,
  .tap-account-dock__upgrade {
    min-height: 44px;
  }

  .tool-panel__expand-btn,
  .workbench-bar-action-icon {
    height: 44px !important;
    min-height: 44px !important;
    min-width: 44px !important;
    width: 44px !important;
  }

  .tool-panel input,
  .tool-panel [role="searchbox"] {
    min-height: 44px;
  }

  .tap-account-dock {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    right: 10px;
  }

  .tap-account-dock__identity > span:last-child {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
