/* Jura's warm glass workspace; Amicus keeps its original interaction structure. */
.jura-welcome {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 56px 24px;
  background:
    radial-gradient(ellipse at 25% 10%, #bcac8730, transparent 55%),
    radial-gradient(ellipse at 90% 90%, #7b9caa18, transparent 50%), var(--bg);
  color: var(--ink);
}
.welcome-heading {
  text-align: center;
  max-width: 680px;
}
.welcome-wordmark {
  font:
    32px Georgia,
    serif;
  letter-spacing: 8px;
  color: #9d7e49;
}
.welcome-heading p {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 24px 0 12px;
}
.welcome-heading h1 {
  font:
    400 clamp(32px, 4vw, 48px)/1.2 Georgia,
    serif;
  letter-spacing: -1.3px;
  margin: 12px 0 38px;
}
.welcome-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: min(760px, 100%);
}
.welcome-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
  min-height: 238px;
  padding: 28px;
  border: 1px solid var(--jura-border);
  border-radius: 20px;
  background: var(--jura-glass);
  color: var(--ink);
  backdrop-filter: blur(24px);
  box-shadow: 0 10px 35px #30291d05;
  transition:
    transform 0.22s,
    box-shadow 0.22s,
    border-color 0.22s;
}
.welcome-choice:hover {
  transform: translateY(-4px);
  background: var(--surface-raised);
  box-shadow: var(--jura-shadow);
  border-color: #9d7e4960;
}
.welcome-choice strong {
  font-size: 20px;
  font-weight: 550;
}
.welcome-choice > span:not(.welcome-monogram):not(.welcome-arrow) {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 250px;
}
.welcome-monogram {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--jura-border);
  border-radius: 14px;
  font:
    italic 30px Georgia,
    serif;
  color: #9d7e49;
  background: var(--surface-raised);
}
.welcome-arrow {
  position: absolute;
  right: 26px;
  top: 30px;
  color: var(--muted);
  font-size: 22px;
}
.welcome-footnote {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 30px;
}
.topbar-spacer {
  flex: 1;
}
.workspace-label {
  font-size: 14px;
  font-weight: 550;
}
#app {
  position: relative;
}
#amicus-host {
  --jura-text-primary: var(--ink);
  --jura-text-muted: var(--muted);
  --jura-text-secondary: var(--muted);
  --jura-surface-bg: var(--surface);
  --jura-surface-hover: var(--jura-hover);
  --jura-glass-border: var(--jura-border);
  --jura-divider: var(--line);
  --jura-accent: var(--accent);
  --jura-accent-soft: var(--accent-soft);
  position: absolute;
  right: 0;
  top: 42px;
  bottom: 0;
  width: 420px;
  max-width: 100%;
  z-index: 40;
  background: var(--jura-glass);
  border-left: 1px solid var(--jura-border);
  animation: amicus-pane-in 0.22s ease-out;
  box-shadow: -8px 0 30px #30291d08;
  color: var(--ink);
}
#amicus-host.is-fullpage {
  left: 0;
  width: 100%;
  border: 0;
  box-shadow: none;
}
#amicus-content,
#amicus-host .jamicus-root {
  height: 100%;
  min-height: 0;
}
#amicus-host .jamicus-panel {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  z-index: auto;
  background: transparent;
}
#amicus-host .jamicus-launcher {
  display: none;
}
#app.amicus-taskpane #editor {
  width: calc(100% - 420px);
  flex-basis: auto;
}
#app.amicus-workspace #editor,
#app.amicus-workspace > footer,
#app.amicus-workspace #compatibility {
  visibility: hidden;
  pointer-events: none;
}
#amicus-connect {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 35px;
  gap: 12px;
}
#amicus-connect h2 {
  font:
    28px Georgia,
    serif;
  margin: 10px 0 0;
}
#amicus-connect p {
  max-width: 360px;
  color: var(--muted);
  line-height: 1.7;
}
#amicus-connect ~ #amicus-content:empty {
  display: none;
}
#amicus-connect:not([hidden]) ~ #amicus-content {
  display: none;
}
#amicus-host .jamicus-notice {
  background: var(--jura-glass-solid);
  border: 1px solid var(--jura-border);
  color: var(--ink);
  border-radius: 10px;
  box-shadow: var(--jura-shadow);
}
#amicus-host .jamicus-history,
#amicus-host .jamicus-history-menu,
#amicus-host .jamicus-confirm-modal,
#amicus-host .jamicus-preview-modal,
#amicus-host .jamicus-document {
  background: var(--jura-glass);
  backdrop-filter: blur(24px);
  color: var(--ink);
  border-color: var(--jura-border);
}
#amicus-host .jamicus-history-tools {
  background: var(--jura-glass-solid);
}
#amicus-host .jamicus-document-actions {
  flex-wrap: wrap;
}
#amicus-host .jamicus-document-actions button {
  font-size: 11px;
  padding: 7px 10px;
  border-radius: 7px;
}
#amicus-host .jamicus-document-actions button:first-child {
  background: var(--accent);
  color: var(--accent-ink);
}
#amicus-host .jamicus-history {
  animation: amicus-pane-in 0.18s ease-out;
}
#amicus-host .jamicus-input-box {
  background: var(--jura-glass);
  border-color: var(--jura-border);
  box-shadow: 0 4px 24px #30291d09;
  backdrop-filter: blur(20px);
}
#amicus-host .jamicus-composer {
  background: linear-gradient(transparent, var(--bg) 55%);
}
#amicus-host .jamicus-watermark {
  opacity: 0.07;
}
#amicus-host .jamicus-messages {
  scrollbar-width: thin;
}
#amicus-host .jamicus-fullpage {
  --amicus-sidebar: 260px;
}
#amicus-host .jamicus-fullpage .jamicus-history {
  position: absolute;
  top: 100px;
  bottom: 18px;
  left: 16px;
  right: auto;
  width: 228px;
  max-height: none;
  max-width: none;
  box-shadow: none;
  border-radius: 14px;
  background: var(--surface-alt);
}
#amicus-host .jamicus-fullpage .jamicus-history-list {
  max-height: none;
  flex: 1;
}
#amicus-host .jamicus-fullpage .jamicus-messages {
  margin-left: var(--amicus-sidebar);
  padding-left: max(28px, calc((100% - var(--amicus-sidebar) - 790px) / 2));
  padding-right: max(28px, calc((100% - var(--amicus-sidebar) - 790px) / 2));
  padding-bottom: calc(var(--jamicus-composer-space, 170px) + 20px);
}
#amicus-host .jamicus-fullpage .jamicus-composer {
  left: var(--amicus-sidebar);
  padding-left: max(28px, calc((100% - var(--amicus-sidebar) - 790px) / 2));
  padding-right: max(28px, calc((100% - var(--amicus-sidebar) - 790px) / 2));
}
#amicus-host .jamicus-fullpage .jamicus-notice {
  left: calc(var(--amicus-sidebar) + 20px);
  right: 20px;
}
#amicus-host .jamicus-fullpage .jamicus-panel > div:first-child {
  left: var(--amicus-sidebar) !important;
}
#amicus-host .jamicus-fullpage .jamicus-prose {
  font-size: 14px;
  line-height: 1.85;
}
.mobile-welcome {
  max-width: 650px;
  margin: 35px auto 45px;
}
.mobile-welcome h2 {
  font:
    400 42px/1.15 Georgia,
    serif;
  letter-spacing: -1px;
  margin: 18px 0;
}
.mobile-welcome > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.mobile-eyebrow {
  font-size: 10px !important;
  letter-spacing: 1.8px;
}
.mobile-welcome-mark .jamicus-mark {
  width: 40px;
  height: 40px;
  color: #9d7e49;
}
.mobile-starters {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}
.mobile-starters button {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--jura-glass);
  border: 1px solid var(--jura-border);
  text-align: left;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 13px;
  transition:
    background 0.2s,
    transform 0.2s;
}
.mobile-starters button:hover {
  background: var(--jura-hover);
  transform: translateX(2px);
}
.mobile-starters button svg:last-child {
  margin-left: auto;
}
.mobile-voice-hint {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  margin-top: 20px;
}
@keyframes amicus-pane-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (max-width: 900px) {
  #amicus-host .jamicus-fullpage {
    --amicus-sidebar: 220px;
  }
  #amicus-host .jamicus-fullpage .jamicus-history {
    width: 192px;
  }
  #app.amicus-taskpane #editor {
    width: calc(100% - 360px);
  }
  #amicus-host:not(.is-fullpage) {
    width: 360px;
  }
  #amicus-host .jamicus-fullpage .jamicus-messages {
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (max-width: 640px) {
  .welcome-choices {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  .welcome-choice {
    min-height: 185px;
    padding: 22px;
  }
  .welcome-heading h1 {
    margin-bottom: 24px;
  }
  .jura-welcome {
    padding: 30px 20px;
  }
  .welcome-footnote {
    max-width: 320px;
    line-height: 1.7;
  }
  #amicus-host:not(.is-fullpage) {
    width: 100%;
  }
  #app.amicus-taskpane #editor {
    width: 100%;
  }
  #amicus-host .jamicus-fullpage {
    --amicus-sidebar: 0px;
  }
  #amicus-host .jamicus-fullpage .jamicus-history {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 90px;
    bottom: 12px;
    width: auto;
    z-index: 70;
    box-shadow: var(--jura-shadow);
  }
  #amicus-host
    .jamicus-fullpage
    .jamicus-history:not(:has(.jamicus-history-select:focus)) {
    max-height: 65vh;
  }
  #amicus-host .jamicus-fullpage .jamicus-history {
    display: none;
  }
  #amicus-host
    .jamicus-fullpage:has([aria-label="Task history"][aria-expanded="true"])
    .jamicus-history {
    display: flex;
  }
  .mobile-welcome h2 {
    font-size: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-choice,
  .mobile-starters button {
    transition: none;
  }
  #amicus-host,
  #amicus-host .jamicus-history {
    animation: none;
  }
}
.workspace-switch {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--surface-alt);
  border: 1px solid var(--jura-border);
  border-radius: 8px;
  flex: none;
}
.jura-topbar .workspace-switch button {
  border: 0;
  padding: 4px 11px;
  background: transparent;
  font-size: 11px;
  min-height: 25px;
  border-radius: 5px;
  color: var(--muted);
}
.jura-topbar .workspace-switch button[aria-current] {
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: 0 1px 4px #30291d12;
  opacity: 1;
  cursor: default;
}
.jura-topbar .workspace-switch button:hover:not([disabled]) {
  background: var(--jura-hover);
  color: var(--ink);
}
@media (max-width: 1050px) {
  .scribe-switch {
    order: 2;
  }
  .jura-topbar .workspace-switch button {
    padding: 4px 7px;
  }
}
#amicus-host {
  --jura-glass-bg: var(--jura-glass);
  --jura-text: var(--ink);
}
#amicus-host .jamicus-scribe-context {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  margin: 0 0 8px;
  padding: 6px 9px;
  font-size: 11px;
  border: 1px solid var(--jura-border);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--muted);
}
#amicus-host .jamicus-scribe-context[aria-pressed="true"] {
  background: var(--selected);
  color: var(--selected-ink);
}
#amicus-host .jamicus-scribe-context small {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.75;
}
#amicus-host .jamicus-fullpage-collapsed {
  --amicus-sidebar: 0px;
}
@media (max-width: 640px) {
  #scribe-topbar .autosave,
  #scribe-topbar #quick-undo,
  #scribe-topbar #quick-redo,
  #scribe-topbar #status,
  #scribe-topbar #command-search {
    display: none;
  }
  #scribe-topbar #title {
    order: 0;
    flex: 1;
    min-width: 40px;
    width: 50px;
  }
  #scribe-topbar .workspace-switch {
    order: 0;
  }
  #scribe-topbar #workspace-account {
    padding: 4px 5px;
  }
}

.partner-link {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  color: var(--accent-text);
  margin: 14px 0 0;
  padding: 8px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
#partner-flow h2 {
  font:
    25px Georgia,
    serif;
}
#partner-form {
  display: grid;
  gap: 18px;
  margin: 24px 0;
}
#partner-form label {
  display: grid;
  gap: 7px;
}
#partner-form select,
#partner-form input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--jura-border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
}
#partner-error {
  font-size: 13px;
  color: var(--muted);
}

#reviewer-form {
  display: grid;
  gap: 18px;
  margin: 24px 0;
}
#reviewer-form label {
  display: grid;
  gap: 7px;
}
#reviewer-passcode {
  width: 100%;
  padding: 10px;
}
#reviewer-error {
  color: var(--muted);
  font-size: 13px;
}

/* Theme-safe hover on composer and workspace controls in both Amicus surfaces. */
#amicus-host :is(.jamicus-workspace-trigger,.jamicus-length-trigger,.jamicus-link-dialog button,.jamicus-length-drawer button,.jamicus-scribe-context,.jamicus-history-tools button):hover {
  background: var(--jura-hover); color: var(--ink);
}
#amicus-host .jamicus-query-row textarea { background: transparent; }
