@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;500;600;700;800&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --dbn-red: #ba0c2f;
  --dbn-red-dark: #9a0a26;
  --dbn-blue: #00205b;
  --dbn-blue-dark: #001540;
  --dbn-soft-blue: #003d7a;
  --dbn-gold: #f4c542;
  --dbn-gold-deep: #b88a2c;
  --dbn-paper: #f6f2ea;
  --dbn-ivory: #fffaf3;
  --dbn-ink: #16130f;
  --dbn-muted: #5a544d;
  --dbn-line: rgba(22, 19, 15, 0.16);
  --dbn-font-display: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --dbn-font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --dbn-font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --dbn-shadow-paper: 0 1px 0 rgba(22, 19, 15, 0.04), 0 12px 32px -22px rgba(0, 32, 91, 0.18);
  --dbn-shadow-paper-lg: 0 18px 45px rgba(22, 19, 15, 0.10);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(90deg, rgba(0, 32, 91, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(186, 12, 47, 0.04), transparent 38rem),
    var(--dbn-paper) !important;
  background-size: 44px 44px, auto, auto !important;
  color: var(--dbn-ink);
  font-family: var(--dbn-font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.lt-landing {
  background: #fff !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(244, 197, 66, 0.34);
  outline-offset: 3px;
}

.dbn-nav,
.lt-nav {
  background: rgba(0, 32, 91, 0.97) !important;
  border-bottom: 1px solid rgba(244, 197, 66, 0.34) !important;
  box-shadow: 0 8px 24px rgba(0, 15, 40, 0.22) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 64px;
}

.dbn-nav {
  padding-inline: clamp(14px, 3vw, 48px);
}

.dbn-nav__brand,
.lt-nav__brand {
  align-items: center;
  color: #fff;
  display: inline-flex;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
}

.dbn-nav__brandmark {
  display: none !important;
}

.dbn-nav__brand-logo,
.lt-nav__logo {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  display: block;
  height: 34px;
  object-fit: contain;
  padding: 3px 7px;
  width: auto;
}

.dbn-nav__brand-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.dbn-nav__brandname {
  color: #fff;
  font-family: var(--dbn-font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.dbn-nav__product,
.lt-nav__badge {
  color: rgba(244, 197, 66, 0.70);
  font-family: var(--dbn-font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  line-height: 1;
  text-transform: uppercase;
}

.dbn-nav__links {
  margin-left: clamp(1rem, 3vw, 2.2rem);
}

.dbn-nav__link,
.dbn-nav__logout,
.dbn-nav__login,
.lt-nav__secondary-link,
.lt-nav__btn-join {
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--dbn-font-body);
  font-weight: 700;
  text-decoration: none;
}

.dbn-nav__link:hover,
.dbn-nav__link.is-active,
.dbn-nav__logout:hover,
.dbn-nav__login:hover,
.lt-nav__secondary-link:hover,
.lt-nav__btn-join:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}

.dbn-nav__panel {
  border: 1px solid rgba(22, 19, 15, 0.14);
  border-radius: 14px;
  box-shadow: var(--dbn-shadow-paper-lg);
  overflow: hidden;
}

.dbn-nav__panel-item:hover {
  background: var(--dbn-paper);
}

.dbn-nav__panel-badge {
  background: rgba(0, 32, 91, 0.09);
  border-radius: 6px;
  color: var(--dbn-blue);
  font-family: var(--dbn-font-mono);
}

.dbn-nav__langs,
.shell-lang-switcher {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 3px;
}

.dbn-nav__lang,
.shell-lang-switcher a {
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--dbn-font-mono);
  font-weight: 700;
  text-decoration: none;
}

.dbn-nav__lang.is-active,
.dbn-nav__lang:hover,
.shell-lang-switcher a.is-active,
.shell-lang-switcher a:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.dbn-nav__login,
.lt-nav__btn-signin,
.lt-nav__cta {
  background: var(--dbn-red) !important;
  border: 1px solid var(--dbn-red) !important;
  border-radius: 999px !important;
  box-shadow: 0 6px 20px rgba(186, 12, 47, 0.30);
  color: #fff !important;
  padding: 0.55rem 1rem;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dbn-nav__login:hover,
.lt-nav__btn-signin:hover,
.lt-nav__cta:hover {
  background: var(--dbn-red-dark) !important;
  box-shadow: 0 10px 24px rgba(186, 12, 47, 0.38);
  transform: translateY(-1px);
}

.app-shell,
.dash-shell,
.dashboard-shell {
  max-width: 1500px;
  padding: clamp(18px, 3vw, 34px);
}

.manifesto,
.dashboard-manifesto {
  background:
    radial-gradient(circle at 0 0, rgba(186, 12, 47, 0.16), transparent 28rem),
    linear-gradient(120deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.50)) !important;
  border: 1px solid rgba(22, 19, 15, 0.17) !important;
  border-radius: 8px !important;
  box-shadow: var(--dbn-shadow-paper);
  overflow: hidden;
}

.manifesto-title,
.dash-main__head h1,
.tool-heading h2,
.lt-hero__title,
.lt-tools__title,
.kdoc-hero__title {
  color: var(--dbn-blue);
  font-family: var(--dbn-font-display);
  letter-spacing: 0 !important;
}

.manifesto-title {
  line-height: 0.96;
}

.manifesto-eyebrow,
.eyebrow,
.lt-hero__kicker,
.lt-tools__eyebrow,
.lt-card__badge,
.kdoc-hero__kicker,
.control-label,
.tool-badge {
  font-family: var(--dbn-font-mono) !important;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.manifesto-eyebrow,
.eyebrow,
.lt-tools__eyebrow,
.kdoc-hero__kicker {
  color: var(--dbn-red) !important;
}

.manifesto-stat strong {
  color: var(--dbn-blue);
  font-family: var(--dbn-font-display);
}

.disclaimer,
.guest-banner,
.status-card {
  background: rgba(255, 250, 243, 0.86) !important;
  border: 1px solid rgba(22, 19, 15, 0.14) !important;
  border-left: 4px solid var(--dbn-red) !important;
  border-radius: 8px !important;
  box-shadow: var(--dbn-shadow-paper);
  color: var(--dbn-muted);
}

.workspace {
  gap: clamp(14px, 2vw, 22px);
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr) minmax(290px, 360px);
}

.tool-rail,
.tool-panel,
.reasoning-panel,
.dash-sidebar,
.dash-main,
.dashboard-tool-card,
.lt-card,
.lt-trust__item,
.kdoc-card,
.kdoc-step-card,
.kdoc-section,
.kdoc-screenshot,
.pricing-card {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(22, 19, 15, 0.15) !important;
  border-radius: 8px !important;
  box-shadow: var(--dbn-shadow-paper) !important;
}

/* Gate cards keep their dark navy backgrounds from tools.css */
.lt-gate__card {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.tool-panel {
  position: relative;
  overflow: hidden;
}

.tool-panel::before {
  background: var(--tool-accent, var(--dbn-red));
  content: '';
  display: block;
  height: 5px;
  inset: 0 0 auto;
  position: absolute;
}

.tool-heading {
  border-bottom: 1px solid rgba(22, 19, 15, 0.12);
  padding-top: 0.4rem;
}

.tool-badge {
  background: rgba(0, 32, 91, 0.08);
  border: 1px solid rgba(0, 32, 91, 0.12);
  border-radius: 999px;
  color: var(--dbn-blue);
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.tool-tab,
.dash-sidebar__item {
  border-radius: 7px;
  color: var(--dbn-ink);
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.tool-tab:hover,
.tool-tab.is-active,
.dash-sidebar__item:hover,
.dash-sidebar__item.is-active {
  background: var(--dbn-ivory);
  color: var(--dbn-blue);
  transform: translateX(3px);
}

.tool-tab.is-active,
.dash-sidebar__item.is-active {
  border-left: 4px solid var(--tool-accent, var(--dbn-red));
}

.tool-tab em,
.dashboard-tool-card__icon {
  background: rgba(0, 32, 91, 0.08);
  border-radius: 6px;
  color: var(--dbn-blue);
  font-family: var(--dbn-font-mono);
  font-style: normal;
  font-weight: 800;
}

.tool-form,
.results,
.deep-research-results {
  color: var(--dbn-ink);
}

.control-row,
.dr-control-card,
.adv-role-row,
.doc-picker-section,
.advanced-panel,
.expert-field,
.branch-panel {
  background: rgba(255, 250, 243, 0.52);
  border: 1px solid rgba(22, 19, 15, 0.12);
  border-radius: 8px;
}

.control-row,
.adv-role-row {
  padding: 12px 14px;
}

.control-label {
  color: var(--dbn-blue) !important;
  font-size: 0.76rem;
  font-weight: 800;
}

input,
textarea,
select,
.adv-role-select,
.tf-input,
.tf-select,
.tf-area {
  background: #fff !important;
  border: 1px solid rgba(22, 19, 15, 0.18) !important;
  border-radius: 8px !important;
  color: var(--dbn-ink) !important;
  font-family: var(--dbn-font-body) !important;
}

input:focus,
textarea:focus,
select:focus,
.adv-role-select:focus {
  border-color: rgba(0, 32, 91, 0.45) !important;
  box-shadow: 0 0 0 4px rgba(0, 32, 91, 0.10) !important;
  outline: 0 !important;
}

.upload-zone,
.tf-upload {
  background:
    linear-gradient(90deg, rgba(0, 32, 91, 0.04) 1px, transparent 1px),
    rgba(255, 255, 255, 0.72) !important;
  background-size: 28px 28px, auto !important;
  border: 2px dashed rgba(0, 32, 91, 0.22) !important;
  border-radius: 12px !important;
}

.upload-zone:hover,
.tf-upload:hover {
  background-color: #fff !important;
  border-color: var(--tool-accent, var(--dbn-red)) !important;
}

.form-footer button,
.primary-button,
.doc-picker-btn,
.adv-preview-btn,
.korr-chip,
.lt-card__arrow,
.dashboard-tool-card strong {
  border-radius: 6px;
  font-family: var(--dbn-font-body);
  font-weight: 800;
}

.form-footer button,
.primary-button,
.doc-picker-dialog__confirm {
  background: var(--tool-accent, var(--dbn-red)) !important;
  border-color: var(--tool-accent, var(--dbn-red)) !important;
  box-shadow: 0 6px 20px rgba(186, 12, 47, 0.18);
  color: #fff !important;
}

.form-footer button:hover,
.primary-button:hover,
.doc-picker-dialog__confirm:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
}

.results,
.deep-research-results {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 243, 0.84)) !important;
  border: 1px solid rgba(22, 19, 15, 0.13) !important;
  border-radius: 8px !important;
}

.empty-state h3 {
  color: var(--dbn-blue);
  font-family: var(--dbn-font-display);
}

body[data-active-tool='workbench'] { --tool-accent: var(--dbn-blue); }
body[data-active-tool='transcribe'] { --tool-accent: #0f766e; }
body[data-active-tool='timeline'] { --tool-accent: #b88a2c; }
body[data-active-tool='redact'] { --tool-accent: #111827; }
body[data-active-tool='summarize'] { --tool-accent: #7c2d12; }
body[data-active-tool='legal-analysis'] { --tool-accent: var(--dbn-blue); }
body[data-active-tool='korrespond'] { --tool-accent: var(--dbn-red); }
body[data-active-tool='barnevernet'] { --tool-accent: #92400e; }
body[data-active-tool='advocate'] { --tool-accent: #4b5563; }
body[data-active-tool='deep-research'] { --tool-accent: #0f766e; }
body[data-active-tool='discrepancy'] { --tool-accent: #7f1d1d; }
body[data-active-tool='corpus'] { --tool-accent: var(--dbn-blue); }
body[data-active-tool='citations'] { --tool-accent: var(--dbn-gold-deep); }
body[data-active-tool='translate'] { --tool-accent: #1d4ed8; }

.workbench-page .topbar,
.workbench-hero,
.workbench-panel {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(22, 19, 15, 0.15) !important;
  border-radius: 8px !important;
  box-shadow: var(--dbn-shadow-paper) !important;
}

.workbench-page .topbar {
  align-items: center;
  border-bottom: 1px solid rgba(22, 19, 15, 0.15) !important;
  margin-bottom: 14px;
  padding: clamp(16px, 3vw, 26px);
}

.workbench-page .topbar h1,
.workbench-hero h2,
.workbench-panel h2 {
  color: var(--dbn-blue);
  font-family: var(--dbn-font-display);
  letter-spacing: 0 !important;
}

.workbench-hero {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.75fr);
  overflow: hidden;
  padding: clamp(22px, 4vw, 38px);
  position: relative;
}

.workbench-hero::before {
  background: var(--dbn-red);
  content: '';
  inset: 0 auto 0 0;
  position: absolute;
  width: 5px;
}

.workbench-hero__panel {
  background:
    linear-gradient(135deg, rgba(0, 32, 91, 0.10), rgba(255, 250, 243, 0.80));
  border: 1px solid rgba(0, 32, 91, 0.14);
  border-radius: 8px;
  padding: 18px;
}

.workbench-kicker {
  color: var(--dbn-red);
  font-family: var(--dbn-font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.workbench-grid {
  gap: 14px;
}

.workbench-panel {
  overflow: hidden;
  padding: clamp(18px, 3vw, 28px) !important;
  position: relative;
}

.workbench-panel::before {
  background: var(--dbn-red);
  content: '';
  height: 5px;
  inset: 0 0 auto;
  position: absolute;
}

.workbench-section-head {
  border-bottom: 1px solid rgba(22, 19, 15, 0.11);
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.workbench-field span,
.workbench-check span {
  color: var(--dbn-blue);
  font-weight: 800;
}

.workbench-clear,
.workbench-dashboard-link,
.status-pill {
  border-radius: 999px !important;
  font-family: var(--dbn-font-body);
  font-weight: 800;
}

.workbench-clear {
  background: var(--dbn-red) !important;
  border: 1px solid var(--dbn-red) !important;
  color: #fff !important;
}

@media (max-width: 900px) {
  .workbench-hero {
    grid-template-columns: 1fr;
  }
}

body[data-active-tool='transcribe'] .results {
  background:
    linear-gradient(180deg, rgba(1, 22, 39, 0.04), rgba(255, 255, 255, 0.94)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(15, 118, 110, 0.08) 18px 20px) !important;
}

body[data-active-tool='timeline'] .results {
  background:
    linear-gradient(90deg, rgba(184, 138, 44, 0.14) 1px, transparent 1px),
    linear-gradient(#fff, #fffaf3) !important;
  background-size: 34px 34px, auto !important;
}

body[data-active-tool='redact'] .results {
  background:
    repeating-linear-gradient(180deg, #fff 0 27px, rgba(17, 24, 39, 0.06) 27px 28px) !important;
}

body[data-active-tool='korrespond'] .results,
body[data-active-tool='translate'] .results {
  background:
    linear-gradient(90deg, rgba(186, 12, 47, 0.20) 0 4px, transparent 4px),
    repeating-linear-gradient(180deg, #fff 0 31px, rgba(0, 32, 91, 0.06) 31px 32px) !important;
}

body[data-active-tool='barnevernet'] .results {
  background:
    linear-gradient(135deg, rgba(146, 64, 14, 0.12), transparent 44%),
    #f8edcf !important;
}

body[data-active-tool='advocate'] .results,
body[data-active-tool='legal-analysis'] .results {
  border: 3px double rgba(0, 32, 91, 0.32) !important;
}

body[data-active-tool='deep-research'] .results {
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.10) 1px, transparent 1px),
    #fff !important;
  background-size: 36px 36px, auto !important;
}

body[data-active-tool='discrepancy'] .results {
  background:
    linear-gradient(90deg, rgba(186, 12, 47, 0.08), rgba(15, 118, 110, 0.08)),
    #fff !important;
}

body[data-active-tool='corpus'] .results {
  background:
    linear-gradient(90deg, rgba(0, 32, 91, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, #fff, #fffaf3) !important;
  background-size: 42px 42px, auto !important;
}

body[data-active-tool='citations'] .results {
  background:
    radial-gradient(circle at 50% 45%, rgba(244, 197, 66, 0.20), transparent 18rem),
    linear-gradient(90deg, rgba(0, 32, 91, 0.055) 1px, transparent 1px),
    #fff !important;
  background-size: auto, 38px 38px, auto !important;
}

.lt-hero {
  background:
    radial-gradient(ellipse 80% 65% at 50% 0%, rgba(186, 12, 47, 0.26), transparent),
    linear-gradient(148deg, var(--dbn-blue-dark), var(--dbn-blue) 58%, #180010) !important;
}

.lt-hero__title,
.lt-hero__body {
  color: #fff;
}

.lt-hero__kicker,
.lt-hero__stat strong {
  color: var(--dbn-gold) !important;
}

.lt-card:hover,
.dashboard-tool-card:hover {
  border-color: rgba(186, 12, 47, 0.26) !important;
  box-shadow: var(--dbn-shadow-paper-lg) !important;
  transform: translateY(-5px);
}

.lt-gate__card:hover {
  transform: translateY(-3px);
}

.lt-card__title,
.dashboard-tool-card h2,
.kdoc-section h2,
.pricing-card h2 {
  color: var(--dbn-blue);
  font-family: var(--dbn-font-display);
}

.lt-gate__card-title {
  font-family: var(--dbn-font-display);
}

.dashboard-tool-card {
  position: relative;
}

.dashboard-tool-card::before,
.lt-card::before {
  background: var(--dbn-red);
  content: '';
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 4px;
}

.lt-footer {
  background:
    radial-gradient(circle at 14% 0%, rgba(186, 12, 47, 0.32), transparent 24rem),
    linear-gradient(135deg, var(--dbn-blue-dark), var(--dbn-soft-blue)) !important;
  color: rgba(255, 255, 255, 0.86);
}

.lt-footer a {
  color: rgba(255, 255, 255, 0.84);
}

.lt-footer a:hover {
  color: #fff;
}

.lt-footer__logo {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 5px;
  padding: 4px 7px;
}

.kdoc-page {
  background:
    linear-gradient(90deg, rgba(0, 32, 91, 0.055) 1px, transparent 1px),
    var(--dbn-paper) !important;
  background-size: 44px 44px, auto !important;
}

.kdoc-hero {
  border-bottom: 4px solid var(--dbn-gold);
}
.kdoc-hero .kdoc-hero__title { color: #fff; }
.kdoc-hero .kdoc-hero__kicker { color: rgba(255,255,255,0.8) !important; }
.kdoc-hero .kdoc-hero__sub { color: rgba(255,255,255,0.88); }

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .tool-rail,
  .reasoning-panel {
    position: static;
  }

  .tool-rail {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
    max-height: none !important;
    max-width: 100%;
    overflow: visible !important;
    width: 100%;
  }

  .tool-tab {
    min-width: 0;
    width: 100%;
  }

  .tool-tab span,
  .tool-tab small,
  .tool-tab em {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 860px) {
  .dbn-nav,
  .lt-nav {
    align-items: flex-start;
    flex-wrap: wrap;
    height: auto;
    padding-block: 10px;
  }

  .dbn-nav__links,
  .dbn-nav__right,
  .lt-nav__right {
    flex-wrap: wrap;
    margin-left: 0;
    width: 100%;
  }

  .dbn-nav__brandname {
    font-size: 0.98rem;
  }

  .tool-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
