/* App + auth modal only */

/*
 * Palette spécifique app + modal de connexion (thème crème, texte sombre).
 * Scopée pour ne pas écraser le :root sombre de la landing (landing.css).
 */
.view-app,
.auth-modal {
  --white: #ffffff;
  --paper-soft: #f7f4ee;
  --paper-line: rgba(5, 10, 20, 0.12);
  --ink: #050a14;
  --gold: #c5a572;
  --blue: #002395;
  --green: #1f7a4d;
  --red: #c0392b;
  --muted: #5a6172;
  --muted-2: #8a94a6;
  --shadow: 0 28px 90px rgba(5, 10, 20, 0.28);
  --text: #0a1120;
}

/* App */

.view-app {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--paper-soft);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.view-app .ifg-connected-header {
  background: #050a14 !important;
  border-bottom: 1px solid #1a1f2b !important;
  box-shadow: none !important;
  width: 100%;
  height: 64px;
  padding: 0 32px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.fr-app-header .header-inner {
  flex: 1;
  width: 100%;
  max-width: none !important;
  height: 64px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.view-app .ifg-connected-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.view-app .ifg-connected-brand img {
  height: 24px !important;
  width: auto !important;
  display: block;
  filter: none !important;
}

.fr-app-nav {
  margin-left: auto;
}

.view-app .ifg-connected-header-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.view-app .burger-btn.ifg-connected-burger {
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #8a8578 !important;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.view-app .burger-btn.ifg-connected-burger:hover,
.view-app .burger-btn.ifg-connected-burger:focus-visible,
.view-app .burger-btn.ifg-connected-burger[aria-expanded="true"],
.view-app .burger-btn.ifg-connected-burger.is-open {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #c5a572 !important;
  outline: none;
  transform: none !important;
}

.view-app .burger-btn.ifg-connected-burger i {
  font-size: 18px !important;
  color: currentColor;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .view-app .ifg-connected-nav {
    display: none !important;
  }

  .fr-app-header .header-inner {
    justify-content: space-between;
  }

  .view-app .ifg-connected-header-tools {
    margin-left: 0;
  }

  .view-app .burger-btn.ifg-connected-burger {
    display: inline-flex !important;
  }

  .view-app .fr-header-quota {
    display: none !important;
  }
}

@media (min-width: 1101px) {
  .view-app .burger-btn.ifg-connected-burger {
    display: none !important;
  }
}

.view-app .ifg-connected-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: color 0.18s ease, background 0.18s ease;
}

.view-app .ifg-connected-link:hover {
  color: #c5a572;
  background: rgba(197, 165, 114, 0.12);
}

.view-app .ifg-connected-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.view-app .ifg-connected-link.tab {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.view-app .ifg-connected-link.tab.active {
  color: #c5a572;
  background: rgba(197, 165, 114, 0.12);
}

.fr-header-quota {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fr-header-quota strong {
  color: #c5a572;
  font-size: 12px;
}

.bmenu-quota,
#drawerQuota.hidden {
  display: none !important;
}

html body #burgerMenu .bmenu-usage-bar {
  position: relative;
}

html body #burgerMenu .bmenu-usage-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--usage, 0%);
  height: 100%;
}

body.fr-drawer-open {
  overflow: hidden;
}

html body #burgerMenu .fr-drawer-tab.active {
  color: #c5a572 !important;
  background: rgba(197, 165, 114, 0.045) !important;
}

.fr-drawer-tab {
  font: inherit;
  cursor: pointer;
}

.fr-drawer-tab.active {
  color: #c5a572 !important;
  background: rgba(197, 165, 114, 0.1) !important;
}

.quota-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.quota-label,
.quota-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.5);
}

.quota-remaining {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
}

.quota-meta {
  margin-top: 7px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: none;
  color: rgba(248, 250, 252, 0.58);
}

.quota-bar {
  height: 2px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 0;
  overflow: hidden;
}

.quota-fill {
  height: 100%;
  background: var(--gold);
}

.app-main {
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background: var(--paper-soft);
  display: flex;
  flex-direction: column;
}

.tab-panel {
  display: none;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.tab-panel.page-panel {
  overflow: auto;
  padding: 20px 24px 28px;
}

.research-panel.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.research-panel .fr-workspace {
  flex: 1;
  min-height: 0;
}

.page-toolbar {
  margin: 0 0 18px;
  max-width: 980px;
}

.page-toolbar--split {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.page-toolbar h1 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.page-toolbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.workspace-toolbar {
  display: none;
}

.fr-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 244, 238, 0.92));
}

.fr-workspace-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.fr-workspace-inner {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: clamp(52px, 9vh, 86px) clamp(18px, 4vw, 40px) 34px;
}

.fr-workspace-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: min(760px, 100%);
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  text-align: left;
}

.fr-workspace-empty[hidden] {
  display: none !important;
}

.fr-empty-kicker {
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.fr-workspace-empty h2 {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.02;
  color: var(--ink);
}

.fr-workspace-empty p {
  margin: 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.62;
}

.fr-empty-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 30px;
}

.fr-empty-point {
  min-width: 0;
  padding: 16px 16px 18px;
  border: 1px solid var(--paper-line);
  background: rgba(255, 255, 255, 0.64);
}

.fr-empty-point span {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold);
}

.fr-empty-point strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.fr-example-prompts {
  width: 100%;
  margin-top: 30px;
}

.fr-example-kicker {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.fr-example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.fr-example-card {
  min-width: 0;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--paper-line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.fr-example-card:hover,
.fr-example-card:focus-visible {
  border-color: rgba(197, 165, 114, 0.72);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  transform: translateY(-1px);
}

.fr-example-card span {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.fr-example-card strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.38;
}

.fr-status {
  margin: 0 0 16px;
  padding: 9px 12px;
  border: 1px solid var(--paper-line);
  background: #fff;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fr-status.hidden {
  display: none !important;
}

.fr-composer-dock {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 12;
  border-top: 1px solid var(--paper-line);
  background: rgba(247, 244, 238, 0.96);
  padding: 12px clamp(14px, 3vw, 28px) calc(14px + env(safe-area-inset-bottom));
  box-shadow: 0 -18px 44px rgba(5, 10, 20, 0.08);
}

.fr-composer-inner {
  position: relative;
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--paper-line);
  background: #fff;
}

.fr-composer-inner:focus-within {
  border-color: rgba(197, 165, 114, 0.7);
  box-shadow: 0 0 0 3px rgba(184, 146, 85, 0.12);
}

.fr-composer-main {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 132px;
  align-items: center;
  gap: 0;
}

.fr-app-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  border-top: 1px solid rgba(5, 10, 20, 0.08);
  padding: 8px 10px;
  background: #fbfaf7;
}

.fr-app-legal-links a {
  color: #5f6675;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.fr-app-legal-links a:hover {
  color: var(--blue);
}

.fr-composer-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(5, 10, 20, 0.08);
}

.fr-composer-dock textarea {
  flex: 1 1 auto;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  border: 0;
  border-radius: 0;
  padding: 11px 12px 11px 6px;
  color: var(--text);
  background: transparent;
  font-size: 16px;
  line-height: 1.45;
}

.fr-composer-dock .btn-search {
  flex: 0 0 auto;
  min-width: 132px;
  min-height: 44px;
  padding: 0 14px;
}

.composer-plus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #5f6675;
  padding: 0;
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.composer-plus-btn:hover,
.composer-plus-btn[aria-expanded="true"] {
  background: rgba(197, 165, 114, 0.08);
  color: var(--blue);
}

.action-menu-panel {
  position: absolute;
  left: 10px;
  bottom: calc(100% + 10px);
  z-index: 15;
  width: min(440px, calc(100% - 20px));
  max-height: min(62vh, 460px);
  overflow: auto;
  border: 1px solid var(--paper-line);
  background: #fff;
  padding: 14px;
  box-shadow: 0 24px 70px rgba(5, 10, 20, 0.18);
}

.action-menu-panel.hidden {
  display: none !important;
}

.action-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.action-menu-head span {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.action-menu-head strong {
  color: var(--muted);
  font-size: 12px;
}

.connector-list {
  display: grid;
  gap: 10px;
}

.connector-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--paper-line);
  background: #fff;
}

.connector-card--memory {
  background: var(--paper-soft);
}

.connector-card--document {
  background: #fff;
}

.connector-card--pending {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background: var(--paper-soft);
}

.connector-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.connector-logo-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 34px;
}

.connector-logo {
  display: block;
  width: 34px;
  height: auto;
}

.connector-logo-wrap--memory {
  border: 1px solid rgba(197, 165, 114, 0.35);
  color: var(--gold);
  background: #fff;
}

.connector-logo-wrap--document {
  border: 1px solid rgba(197, 165, 114, 0.35);
  background: #fff;
}

.folder-logo {
  width: 30px;
}

.document-logo {
  width: 30px;
}

.icon-refresh {
  display: block;
  width: 17px;
  height: 17px;
  margin: auto;
}

.outlook-logo,
.sharepoint-logo {
  width: 36px;
}

.drive-logo {
  width: 35px;
}

.connector-dot {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #9ca3af;
}

.connector-dot.is-connected {
  background: #1f7a4d;
}

.connector-card-main strong,
.connector-card-main p {
  display: block;
}

.connector-card-main strong {
  color: var(--ink);
  font-size: 14px;
}

.connector-card-main p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.connector-badge {
  align-self: start;
  padding: 5px 8px;
  border: 1px solid rgba(197, 165, 114, 0.28);
  color: var(--muted);
  background: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.connector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.connector-actions .hidden {
  display: none !important;
}

.document-upload-input {
  display: none;
}

.dossier-memory-controls,
.dossier-memory-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.dossier-memory-controls select,
.dossier-memory-create input,
.dossier-memory-notes {
  min-width: 0;
  border: 1px solid var(--paper-line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: 600 13px/1.2 var(--font-sans);
}

.dossier-memory-controls select,
.dossier-memory-create input {
  height: 40px;
}

.dossier-memory-controls select {
  padding: 0 34px 0 10px;
}

.dossier-memory-create input {
  padding: 0 10px;
}

.dossier-memory-notes {
  width: 100%;
  min-height: 76px;
  padding: 10px;
  resize: vertical;
  line-height: 1.45;
}

.dossier-memory-notes:disabled {
  color: var(--muted);
  background: #f8f6f1;
}

.dossier-memory-actions {
  display: flex;
  justify-content: flex-end;
}

.dossier-memory-controls .btn-secondary,
.dossier-memory-create .btn-secondary,
.dossier-memory-actions .btn-secondary {
  min-height: 40px;
  padding: 0 12px;
}

.dossier-memory-controls .btn-secondary {
  width: 44px;
}

.connector-status {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--paper-line);
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.connector-status.hidden {
  display: none !important;
}

.connector-status.error {
  color: #8f1d1d;
  background: #fff1f1;
  border-color: #ffd3d3;
}

.connector-status.success {
  color: #126c44;
  background: #f0fff7;
  border-color: #bdebd2;
}

.fr-composer-foot .prompt-strip {
  display: none !important;
}

.fr-composer-foot .prompt-link {
  border: 1px solid var(--paper-line);
  padding: 7px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.fr-composer-foot .prompt-link:hover {
  border-color: rgba(197, 165, 114, 0.55);
  color: var(--ink);
  background: var(--paper-soft);
}

@media (max-width: 560px) {
  .fr-composer-main {
    grid-template-columns: 32px minmax(0, 1fr) 48px;
    gap: 0;
  }

  .composer-plus-btn {
    width: 32px;
    min-height: 40px;
    font-size: 19px;
  }

  .fr-composer-dock .btn-search {
    grid-column: auto;
    width: 48px;
    min-width: 48px;
    min-height: 40px;
    padding: 0;
    font-size: 18px;
  }

  .fr-composer-dock textarea {
    min-height: 40px;
    padding: 9px 2px;
    font-size: 15px;
  }

  .action-menu-panel {
    width: calc(100% - 20px);
  }

  .fr-empty-points {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 22px;
  }

  .fr-empty-point {
    padding: 14px;
  }

  .fr-example-prompts {
    margin-top: 22px;
  }

  .fr-example-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .fr-example-card {
    min-height: 0;
    padding: 14px;
  }

  .fr-composer-foot .prompt-strip {
    justify-content: flex-start;
  }
}

@media (min-width: 720px) {
  .fr-composer-dock textarea {
    min-height: 44px;
    max-height: 160px;
    resize: vertical;
  }

  .fr-composer-dock .btn-search {
    min-width: 132px;
    min-height: 44px;
  }
}

.btn-search {
  flex: 0 0 auto;
  min-width: 132px;
}

.btn-search-icon {
  display: none;
}

.btn-search-label {
  display: inline;
}

@media (max-width: 560px) {
  .btn-search-label {
    display: none;
  }

  .btn-search-icon {
    display: inline;
    line-height: 1;
  }
}

.composer-exports {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.composer-exports.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.fr-composer-dock textarea:focus,
.composer-plus-btn:focus-visible,
.auth-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 146, 85, 0.16);
}

.fr-composer-dock textarea:focus,
.composer-plus-btn:focus-visible {
  box-shadow: none;
}

.view-app .btn-primary,
.view-app .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.view-app .btn-primary {
  min-width: 168px;
  border: 1px solid rgba(184, 146, 85, 0.86);
  background: var(--gold);
  color: var(--ink);
}

.view-app .fr-composer-dock .btn-search {
  min-width: 132px;
}

@media (max-width: 560px) {
  .view-app .fr-composer-dock .btn-search {
    min-width: 48px;
  }
}

.view-app .btn-primary:hover {
  background: #d2b77f;
}

.view-app .btn-secondary {
  min-width: 56px;
  border: 1px solid var(--paper-line);
  background: #fff;
  color: var(--ink);
}

.view-app .btn-secondary:hover:not(:disabled) {
  border-color: rgba(184, 146, 85, 0.7);
  background: #fbf7ef;
}

.view-app .btn-primary:disabled,
.view-app .btn-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.view-app .btn-text {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.view-app a.btn-text:hover,
.view-app button.btn-text:hover {
  color: var(--blue);
}

.dossier-panel {
  margin: 20px 0 0;
  padding: 18px 20px 16px;
  background: var(--paper-soft);
  border: 1px solid var(--paper-line);
}

.dossier-panel.hidden {
  display: none !important;
}

.dossier-block {
  margin-bottom: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--paper-line);
}

.dossier-block h3 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.dossier-checks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.dossier-checks li {
  position: relative;
  padding-left: 18px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.dossier-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold);
}

.dossier-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.dossier-disclaimer {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.source-list,
.history-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-list {
  display: grid;
  gap: 10px;
}

.source-list li {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--paper-line);
}

.source-list a {
  display: block;
  color: var(--blue);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
}

.source-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.privacy-block {
  border-color: rgba(197, 165, 114, 0.45);
  background: rgba(197, 165, 114, 0.08);
}

.privacy-block p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.answer {
  min-height: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.66;
  color: #1f2937;
  white-space: normal;
}

.answer.hidden {
  display: none !important;
}

.answer-question {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--paper-line);
  background: #fff;
}

.answer-question span {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.answer-question p {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.45;
}

.answer.empty {
  display: block;
  min-height: 0;
  padding: 0;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  text-align: left;
}

.answer h2,
.answer h3 {
  margin: 24px 0 10px;
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.25;
}

.answer h2:first-child,
.answer h3:first-child {
  margin-top: 0;
}

.answer h3 {
  font-size: 16px;
  font-weight: 800;
}

.answer p {
  margin: 0 0 14px;
}

.answer strong {
  color: var(--ink);
  font-weight: 800;
}

.answer ul {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.answer li {
  position: relative;
  padding-left: 18px;
}

.answer li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  background: var(--gold);
}

.answer-loading {
  padding: 16px;
  border: 1px solid var(--paper-line);
  background: #fff;
  color: var(--text);
}

.answer-loading-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.answer-loading-head strong {
  font-size: 14px;
}

.loading-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(197, 165, 114, 0.5);
  animation: ifgPulse 1.2s ease-out infinite;
}

.answer-loading ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@keyframes ifgPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(197, 165, 114, 0.45);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(197, 165, 114, 0);
  }
}

.citation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eaf1ff;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  vertical-align: 0.12em;
}

.error {
  margin: 16px 0 0;
  padding: 12px 14px;
  color: #8f1d1d;
  background: #fff1f1;
  border: 1px solid #ffd3d3;
  border-radius: 8px;
}

.history-list {
  max-width: 860px;
  display: grid;
  gap: 10px;
}

.history-list button {
  width: 100%;
  display: block;
  text-align: left;
  padding: 16px;
  border: 1px solid var(--paper-line);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.history-list button:hover {
  border-color: var(--gold);
}

.history-list .meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.account-layout {
  display: grid;
  gap: 16px;
  max-width: 680px;
}

.account-card {
  background: #fff;
  border: 1px solid var(--paper-line);
  padding: 20px 22px 22px;
}

.account-card--upsell {
  border-color: rgba(197, 165, 114, 0.5);
  background: linear-gradient(180deg, #fff 0%, #faf7f0 100%);
}

.account-card-title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.account-dl {
  margin: 0;
}

.account-dl-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--paper-line);
}

.account-dl-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.account-dl-row--stack {
  align-items: start;
}

.account-dl-row dt {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.account-dl-row dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.account-field-note,
.account-footnote,
.account-renewal {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.account-plan-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.account-plan-badge {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--gold, #c5a572);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-plan-status {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.account-lead {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.account-quota {
  margin-bottom: 18px;
  padding-top: 4px;
}

.account-quota-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}

.account-quota-top strong {
  color: var(--blue);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.account-quota-bar {
  height: 3px;
  background: rgba(5, 10, 20, 0.08);
}

.account-quota-fill {
  height: 100%;
  background: var(--gold, #c5a572);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.account-action-muted {
  color: var(--muted) !important;
  font-size: 13px;
}

.account-upsell-list {
  margin: 0 0 16px;
  padding: 0 0 0 18px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.account-upsell-list li + li {
  margin-top: 6px;
}

.account-profession-picker {
  max-width: 100%;
}

.account-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  color: #8f1d1d;
  font-size: 13px;
  background: #fff1f1;
  border: 1px solid #ffd3d3;
}

.account-status.hidden {
  display: none;
}

.account-status.success {
  color: #126c44;
  background: #f0fff7;
  border-color: #bdebd2;
}

.gmail-state {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 13px 14px;
  border: 1px solid var(--paper-line);
  background: var(--paper-soft);
}

.gmail-state-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 999px;
  background: #9ca3af;
}

.gmail-state.is-connected .gmail-state-dot {
  background: #1f7a4d;
}

.gmail-state strong,
.gmail-state span {
  display: block;
}

.gmail-state strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
}

.gmail-state span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.gmail-preview {
  margin-top: 16px;
  border-top: 1px solid var(--paper-line);
  padding-top: 14px;
}

.gmail-preview-head {
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gmail-preview ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gmail-preview li {
  padding: 12px;
  border: 1px solid var(--paper-line);
  background: #fff;
}

.gmail-preview li strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.gmail-preview li span,
.gmail-preview li p {
  display: block;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.gmail-preview li .gmail-intake-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 7px;
  border: 1px solid rgba(197, 165, 114, 0.28);
  color: var(--gold);
  background: var(--paper-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
}

.auth-modal-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 20px 24px 28px;
  background: var(--ifg-surface, #f4efe6);
  color: var(--ifg-text-dark, #0a1120);
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 0;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--dim-on-paper, #5a6172);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.auth-modal-close:hover {
  color: var(--ink-on-paper, #0a1120);
}

.auth-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 40px 26px 0;
  background: rgba(26, 26, 26, 0.04);
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 0;
  overflow: hidden;
}

.auth-mode-btn {
  border: 0;
  background: transparent;
  padding: 13px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ifg-muted, #8a94a6);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.auth-mode-btn:hover:not(.active) {
  color: var(--ifg-text-dark, #0a1120);
  background: rgba(26, 26, 26, 0.03);
}

.auth-mode-btn.active {
  background: var(--ifg-accent, #c5a572);
  color: var(--ifg-text-dark, #0a1120);
  font-weight: 700;
}

.auth-modal-panel h2 {
  margin: 0 0 10px;
  font-family: var(--font-serif, "IBM Plex Serif", Georgia, serif);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--ifg-text-dark, #0a1120);
}

.auth-modal-lead {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ifg-secondary, #5a6172);
}

.auth-modal-footnote,
.auth-modal-status {
  font-size: 13px;
  line-height: 1.5;
}

.auth-modal-footnote {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--ifg-muted, #8a94a6);
}

.auth-modal-status {
  margin: 0 0 14px;
  color: var(--ifg-secondary, #5a6172);
}

.auth-modal-status.error {
  color: #b42318;
}

.auth-modal-status.success {
  color: #2d6a4f;
}

.auth-field {
  margin-bottom: 4px;
}

.profession-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 14px;
  border: 1px solid rgba(26, 26, 26, 0.16);
  background: #fff;
}

.profession-option {
  min-height: 44px;
  border: 0;
  border-right: 1px solid rgba(26, 26, 26, 0.12);
  background: transparent;
  color: var(--ifg-secondary, #5a6172);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.profession-option:last-child {
  border-right: 0;
}

.profession-option.active {
  background: var(--ifg-accent, #c5a572);
  color: var(--ifg-text-dark, #0a1120);
}

.profession-option:hover:not(.active) {
  background: rgba(197, 165, 114, 0.12);
  color: var(--ifg-text-dark, #0a1120);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ifg-secondary, #5a6172);
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(26, 26, 26, 0.16);
  border-radius: 0;
  background: #ffffff;
  color: var(--ifg-text-dark, #0a1120);
  font: inherit;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.auth-input::placeholder {
  color: rgba(26, 26, 26, 0.35);
}

.auth-input:focus {
  outline: none;
  border-color: var(--ifg-accent, #c5a572);
  box-shadow: 0 0 0 1px rgba(197, 165, 114, 0.35);
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: var(--ifg-text-dark, #0a1120);
  border-color: var(--ifg-accent, #c5a572);
}

.auth-modal-panel .btn-primary {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 18px 0 16px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ifg-muted, #8a94a6);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: rgba(26, 26, 26, 0.12);
}

.btn-google {
  width: 100%;
  border: 1px solid rgba(26, 26, 26, 0.18);
  border-radius: 0;
  background: #ffffff;
  color: var(--ifg-text-dark, #0a1120);
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.btn-google:hover {
  border-color: var(--ifg-accent, #c5a572);
  background: rgba(197, 165, 114, 0.08);
}

.profession-summary {
  display: none;
}

@media (max-width: 959px) {
  .fr-composer-foot .prompt-link {
    font-size: 10px;
  }
}

@media (max-width: 1060px) {
  .landing-grid,
  .pricing-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header {
    height: auto;
    padding: 14px 18px;
  }

  .site-nav {
    gap: 8px;
  }

  .site-nav .btn-primary {
    padding: 11px 16px;
    font-size: 13px;
  }

  .hero-section,
  .landing-band,
  .pricing-section,
  .cta-section {
    width: min(100% - 28px, 1180px);
  }

  .hero-copy h1 {
    font-size: clamp(2.45rem, 13vw, 4rem);
  }

  .scope-list div,
  .account-dl-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .fr-workspace-inner {
    padding: 20px 14px 24px;
  }

  .fr-workspace-empty {
    min-height: min(38vh, 260px);
  }

  .fr-composer-dock textarea {
    min-height: 44px;
  }

  .view-app .fr-composer-dock {
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  }

  .tab-panel.page-panel {
    padding: 14px 12px 24px;
  }

  .dossier-panel {
    margin: 16px 0 0;
    padding: 16px 14px;
  }

  .dossier-actions {
    flex-direction: column;
  }

  .dossier-actions .btn-secondary {
    width: 100%;
  }

  .profession-picker {
    grid-template-columns: 1fr;
  }

  .profession-option {
    border-right: 0;
    border-bottom: 1px solid rgba(26, 26, 26, 0.12);
  }

  .profession-option:last-child {
    border-bottom: 0;
  }

  .answer {
    font-size: 16px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .fr-app-header,
  .fr-composer-dock,
  .fr-status,
  .dossier-panel,
  .site-header,
  .auth-modal {
    display: none !important;
  }

  .app-main,
  .view-app,
  .tab-panel,
  .fr-workspace {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .answer {
    padding: 0;
    min-height: 0;
    color: #000;
  }
}
