.greet {
  font-size: 26px !important;
}

.archive-print-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 0 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.archive-print-actions span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 580px) {
  .archive-print-actions .btn {
    flex: 1 1 calc(50% - 5px);
    padding-inline: 10px;
  }

  .archive-print-actions span {
    flex-basis: 100%;
  }
}

.card h2 {
  font-size: 20px !important;
  line-height: 1.25 !important;
}

.card {
  border: 1px solid #cfd8d2 !important;
  box-shadow: 0 3px 14px #263b3508 !important;
}

.narrative,
#quick,
.toggleline,
.metric {
  border-color: #d4dcd7 !important;
}

.metric strong {
  font-size: 21px !important;
}

.story {
  font-size: 16px !important;
}

.capture {
  align-items: stretch;
}

#quick {
  width: 100%;
  min-height: 92px;
  flex: 1 1 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 13px 14px;
  font-size: 16px !important;
  line-height: 1.5;
  outline-color: #72a69a;
}

.capture-guidance {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

#captureStatus {
  line-height: 1.45;
}

.capture-mode {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  padding: 3px 8px;
  border-radius: 99px;
  background: #edf6f1;
  color: var(--teal);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.capture-option.selected {
  border-color: #5d9b8d !important;
  background: #edf6f1 !important;
  color: #276b61 !important;
}

#add.save-confirmed {
  background: #176a50 !important;
}

.narrative-note {
  color: var(--muted);
  font-size: 12px;
  margin: -7px 0 12px;
}

.study-picker-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
  padding: 16px;
  border: 1px dashed #9eb8ae;
  border-radius: 12px;
  background: #f8fbf9;
}

.study-picker-panel.dragging {
  border-color: var(--teal);
  background: #edf7f3;
}

.study-native-file-label {
  flex-basis: 100%;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.study-native-file {
  flex: 1 1 320px;
  min-width: 0;
  max-width: 100%;
  padding: 8px;
  border: 1px solid #aec2ba;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.study-native-file::file-selector-button {
  margin-right: 10px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.study-native-file:focus-visible {
  outline: 3px solid rgba(39, 107, 97, .25);
  outline-offset: 2px;
}

.study-file-help {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

#studyFiles .study-document-file {
  display: block;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafaf7;
}

#studyFiles .study-document-file p {
  margin: 2px 0;
  font-weight: 750;
}

.study-paste-panel {
  margin: -4px 0 16px;
  padding: 16px;
  border: 1px solid #aec2ba;
  border-radius: 12px;
  background: #fbfdfc;
}

.study-paste-panel[hidden] {
  display: none;
}

.study-paste-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
}

.study-paste-panel textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 12px;
  border: 1px solid #b7c7c1;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 14px/1.55 inherit;
}

.study-paste-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.study-drop-copy {
  flex: 1 1 220px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.study-external-link {
  flex-basis: 100%;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.study-workspace-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -3px 0 16px;
}

.study-workspace-actions span {
  color: var(--muted);
  font-size: 12px;
}

.study-workflow {
  display: grid;
  gap: 18px;
  margin: 18px 0;
}

.study-workflow-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.study-workflow-progress span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafaf7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.study-workflow-progress b {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e8efeb;
  color: var(--teal);
  font-size: 11px;
}

.study-workflow-progress .current {
  border-color: #b8a16d;
  background: #fffaf0;
  color: var(--ink);
}

.study-workflow-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.study-workflow-panel.current {
  border-color: #b8a16d;
  box-shadow: 0 0 0 2px rgba(200, 154, 75, .08);
}

.study-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}

.study-panel-heading strong,
.study-panel-heading span {
  display: block;
}

.study-panel-heading strong {
  color: var(--ink);
  font: 700 21px/1.25 Georgia, serif;
}

.study-panel-heading > span {
  max-width: 52%;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
}

.study-step-label {
  margin-bottom: 3px;
  color: var(--teal);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.study-document-reader {
  height: clamp(400px, 58vh, 680px);
  overflow: auto;
  padding: 22px;
  border: 1px solid #d6d9d4;
  border-radius: 11px;
  background: #fffefa;
  color: var(--ink);
  font: 15px/1.72 Georgia, 'Times New Roman', serif;
  white-space: pre-wrap;
  scrollbar-gutter: stable;
}

.study-document-reader p {
  margin: 0 0 1em;
}

.study-reader-empty,
.study-empty-result {
  color: var(--muted);
  font-family: inherit;
  font-style: italic;
}

.study-main-points,
.study-results ol {
  display: grid;
  gap: 10px;
  padding-left: 26px;
}

.study-main-points li,
.study-results li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfcf9;
  line-height: 1.6;
}

.study-main-points .study-empty-result {
  list-style: none;
  margin-left: -26px;
}

.study-workflow-panel > .btn {
  margin-top: 12px;
}

.study-history {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.study-history-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.study-history-heading h3 {
  margin: 4px 0 5px;
  color: var(--ink);
  font: 700 20px/1.25 Georgia, serif;
}

.study-history-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.study-history-tools,
.study-history-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.study-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid #d4ddd8;
  border-radius: 11px;
  background: #fff;
}

.study-history-row > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.study-history-row span,
.study-history-row small {
  color: var(--muted);
  font-size: 11px;
}

.study-history-row strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-history-empty {
  margin: 0;
  padding: 16px;
  border: 1px dashed #becdc6;
  border-radius: 11px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.btn.danger {
  color: #8c3e3e;
  border-color: #d9b5b5;
}

.paraclete-confirm {
  width: min(92vw, 440px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: transparent;
  box-shadow: 0 24px 70px rgba(25, 43, 47, .28);
}

.paraclete-confirm::backdrop {
  background: rgba(22, 37, 40, .58);
  backdrop-filter: blur(3px);
}

.paraclete-confirm-card {
  margin: 0;
  padding: 25px;
  border: 1px solid rgba(196, 153, 79, .55);
  border-radius: 18px;
  background: #fffefa;
}

.paraclete-confirm-brand {
  margin-bottom: 12px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.paraclete-confirm h2 {
  margin: 0 0 8px;
  font: 700 24px/1.2 Georgia, serif;
}

.paraclete-confirm p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.paraclete-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.btn.danger-solid {
  color: #fff;
  background: #8c3e3e;
}

@media (max-width: 520px) {
  .paraclete-confirm-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .paraclete-confirm-actions .btn {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .study-picker-panel .btn {
    width: 100%;
  }

  .study-drop-copy {
    flex-basis: 100%;
  }

  .study-workspace-actions .btn,
  .study-history-tools .btn {
    width: 100%;
  }

  .study-history-heading,
  .study-history-row {
    align-items: stretch;
    flex-direction: column;
  }

  .study-history-row-actions .btn {
    flex: 1 1 calc(33.333% - 6px);
  }

  .study-workflow-progress {
    grid-template-columns: 1fr;
  }

  .study-workflow-panel {
    padding: 14px;
  }

  .study-panel-heading {
    display: block;
  }

  .study-panel-heading > span {
    max-width: none;
    margin-top: 5px;
    text-align: left;
  }

  .study-document-reader {
    height: 56vh;
    min-height: 360px;
    padding: 16px;
    font-size: 14px;
  }
}

.mobile-more,
.mobile-nav-sheet {
  display: none;
}

.mobile-nav-sheet[hidden] {
  display: none !important;
}

@media (max-width: 580px) {
  .app {
    padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important;
  }

  .side {
    height: calc(70px + env(safe-area-inset-bottom)) !important;
    padding: 5px 8px env(safe-area-inset-bottom) !important;
  }

  .nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    height: 100%;
  }

  .nav button {
    min-width: 0;
    padding: 6px 3px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    font-size: 11px !important;
    line-height: 1;
  }

  .nav .ico {
    width: auto !important;
    font-size: 18px;
    line-height: 1;
  }

  .nav .label {
    display: block !important;
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav .mobile-secondary {
    display: none !important;
  }

  .mobile-more {
    display: flex !important;
  }

  .mobile-nav-sheet {
    display: grid;
    position: fixed;
    z-index: 12;
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: min(330px, calc(100% - 24px));
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fffefa;
    box-shadow: 0 18px 60px #14231f38;
  }

  .mobile-nav-sheet-head {
    padding: 5px 9px 9px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .mobile-nav-sheet button {
    width: 100%;
    min-height: 49px;
    border: 0;
    border-top: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 9px;
    align-items: center;
    padding: 10px 9px;
    text-align: left;
    font-weight: 650;
  }

  .sheet-icon {
    color: var(--gold);
    font-size: 19px;
    text-align: center;
  }

  .sheet-arrow {
    color: var(--muted);
    font-size: 24px;
  }

  .greet {
    font-size: 22px !important;
  }

  .card h2 {
    font-size: 18px !important;
  }

  .card {
    padding: 15px !important;
  }

  #quick,
  #add,
  #voice {
    width: 100%;
    flex-basis: 100%;
  }
}



.study-report-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 2px 0 18px;
  padding: 18px 20px;
  border: 1px solid #c2a15b;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffaf0, #f8fbf9);
  box-shadow: 0 8px 24px rgba(40, 46, 84, .06);
}

.study-report-panel[hidden] {
  display: none;
}

.study-report-copy {
  min-width: 0;
}

.study-report-copy h3 {
  margin: 1px 0 5px;
  color: var(--ink);
  font: 700 21px/1.25 Georgia, serif;
}

.study-report-copy p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.study-report-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
  flex-wrap: wrap;
}

@media (max-width: 700px) {
  .study-report-panel {
    display: block;
    padding: 16px;
  }

  .study-report-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 14px;
  }

  .study-report-actions .btn {
    width: 100%;
  }
}
