/* Marina: trusted conversational components, shared on desktop and mobile. */
:root {
  --assistant-panel-width: 440px;
}
body:has(.assistant-panel.is-expanded) {
  --assistant-panel-width: min(760px, 70vw);
}
.assistant-panel {
  background: #fff;
  border-left: 1px solid #e4e8f0;
}
.assistant-panel-header {
  gap: 12px;
  padding: 20px;
  background: #fff;
  border-bottom: 1px solid #edf0f6;
}
.marina-avatar,.marina-welcome-mark {
  display: grid;
  place-items: center;
  color: #fff;
  background: #26327e;
  border-radius: 16px;
  flex-shrink: 0;
}
.marina-avatar {
  width: 42px;
  height: 42px;
  box-shadow: var(--shadow-1);
}
.assistant-panel-heading {
  flex: 1;
}
.assistant-panel-title {
  font-size: 17px;
  letter-spacing: -.4px;
}
.assistant-panel-subtitle {
  font-size: 11px;
  color: #748098;
}
.assistant-panel-actions {
  gap: 2px;
}
.assistant-panel-messages {
  padding: 24px 20px;
  gap: 28px;
  background: linear-gradient(180deg,#f8faff 0,#fff 220px);
  scroll-behavior: auto;
}
.assistant-message {
  min-width: 0;
  line-height: 1.7;
  font-size: 14px;
}
.assistant-message-user {
  max-width: 90%;
  align-self: flex-end;
  padding: 12px 17px;
  border-radius: 19px 19px 5px 19px;
  background: #eef1fb;
  color: #26327e;
  box-shadow: none;
  white-space: pre-wrap;
}
.assistant-message-assistant {
  width: 100%;
  max-width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #29354b;
}
.marina-streaming {
  width: 100%;
  max-width: 100%;
  padding: 0;
  background: transparent;
  color: #29354b;
}
.marina-streaming .marina-prose:empty {
  display: none;
}
.marina-streaming .marina-prose>p:last-child::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 13px;
  margin-left: 5px;
  vertical-align: -1px;
  border-radius: 2px;
  background: #8798cb;
}
.marina-message-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}
.marina-message-byline>span:last-child {
  color: #8791a4;
  font-size: 11px;
}
.marina-spark {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: #26327e;
  background: #ecf2ff;
  border-radius: 8px;
}
.marina-spark .icon {
  width: 16px;
  height: 16px;
}
.marina-prose {
  overflow-x: auto;
  overflow-wrap: anywhere;
}
.marina-prose p {
  margin: 0 0 13px;
}
.marina-prose strong {
  font-weight: 650;
  color: #1d2852;
}
.marina-prose h2,.marina-prose h3,.marina-prose h4 {
  margin: 20px 0 8px;
  font-size: 16px;
  line-height: 1.4;
}
.marina-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 12px 0;
}
.marina-prose th,.marina-prose td {
  padding: 9px 11px;
  text-align: left;
  border-bottom: 1px solid #e8edf5;
}
.marina-prose th {
  background: #f3f6fb;
  color: #26327e;
}
.marina-prose blockquote {
  border-left: 3px solid #aadcf2;
  margin: 14px 0;
  padding: 8px 14px;
  background: #f5faff;
}
.marina-prose pre {
  background: #f3f5fa;
  padding: 14px;
  border-radius: 12px;
  overflow-x: auto;
}
.marina-message-actions {
  margin-top: 12px;
}
.marina-message-actions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #7a869b;
  background: none;
  border: 0;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  padding: 4px;
}
.marina-message-actions .icon {
  width: 14px;
  height: 14px;
}
.marina-welcome {
  padding: 30px 0 18px;
  text-align: left;
  color: #748098;
}
.marina-welcome-mark {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-2);
}
.marina-welcome-mark .icon {
  width: 29px;
  height: 29px;
}
.marina-eyebrow {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 1.35px;
  color: #6c7893;
}
.marina-welcome .marina-welcome-title {
  font-weight: 700;
  font-size: clamp(26px,3vw,34px);
  line-height: 1.2;
  letter-spacing: -1.2px;
  color: #202c63;
  margin: 13px 0 15px;
}
.marina-welcome>p:not(.marina-eyebrow):not(.marina-welcome-title) {
  font-size: 13px;
  line-height: 1.8;
}
.marina-suggestions {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}
.marina-suggestions button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid #e5eaf4;
  border-radius: 15px;
  padding: 15px 12px;
  color: #26327e;
  cursor: pointer;
  transition: border-color .2s,transform .2s;
}
.marina-suggestions button:hover {
  border-color: #a7b7e1;
  transform: translateY(-2px);
}
.marina-suggestions button>span:nth-child(2) {
  flex: 1;
}
.marina-suggestions b {
  font-size: 12px;
  display: block;
}
.marina-suggestions small {
  display: block;
  font-size: 11px;
  color: #7c879d;
  margin-top: 4px;
}
.marina-suggestion-icon {
  background: #f1f5fd;
  padding: 9px;
  border-radius: 11px;
  display: flex;
}
.marina-suggestion-icon .icon {
  width: 19px;
  height: 19px;
}
.assistant-panel-form {
  margin: 0;
  padding: 14px 18px 20px;
  background: #fff;
  border-top: 1px solid #edf0f6;
}
.assistant-panel-input-row {
  border: 1px solid #dce3f1;
  border-radius: 18px;
  padding: 6px;
  background: #f9faff;
  align-items: flex-end;
  box-shadow: var(--shadow-1);
}
.assistant-panel-input-row:focus-within {
  border-color: #96a9dd;
  outline: 3px solid #eef2ff;
}
.assistant-panel-input-row .assistant-panel-input {
  font-family: inherit;
  background: transparent;
  border: 0;
  box-shadow: none;
  resize: none;
  min-height: 42px;
  max-height: 140px;
  line-height: 1.5;
  padding: 10px;
  border-radius: 12px;
}
.assistant-panel-input-row .assistant-panel-input:focus {
  outline: none;
  box-shadow: none;
}
.assistant-panel-input-row .btn-primary {
  border-radius: 12px;
  min-height: 42px;
  padding: 10px 13px;
}
.assistant-panel-voice-controls {
  padding: 0 4px 7px;
}
.marina-result-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 15px;
  margin-top: 12px;
  border: 1px solid #e4eaf4;
  border-radius: 16px;
  background: #fff;
  color: #273354;
  text-decoration: none;
}
.marina-result-card>div {
  flex: 1;
  min-width: 0;
}
.marina-result-card strong {
  font-size: 13px;
}
.marina-result-card p,.marina-result-detail {
  display: block;
  font-size: 11px;
  color: #7a859a;
  margin: 4px 0 8px;
}
.marina-result-icon {
  color: #26327e;
}
.marina-card-action {
  width: 100%;
  background: #f3f6fc;
  border: 0;
  border-radius: 9px;
  color: #26327e;
  font-size: 11px;
  font-weight: 650;
  padding: 9px;
  cursor: pointer;
}
.marina-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 650;
  border-radius: 6px;
  padding: 3px 7px;
  color: #536786;
  background: #edf2fa;
  white-space: nowrap;
}
.marina-event-time {
  display: grid;
  gap: 2px;
  background: #eff4ff;
  color: #26327e;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
}
.marina-event-time b {
  font-size: 15px;
}
.marina-event-time small {
  font-size: 10px;
}
.marina-card-arrow {
  margin-left: auto;
  color: #7688b2;
}
.marina-document {
  margin-top: 18px;
  border: 1px solid #dce4f2;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(145deg,#f4f8ff,#fff 55%);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.marina-document-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.marina-document-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}
.marina-document-hero>div {
  min-width: 0;
}
.marina-document-hero h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  color: #26327e;
  letter-spacing: -.3px;
  overflow-wrap: anywhere;
}
.marina-document-hero p {
  margin: 5px 0 0;
  font-size: 10px;
  color: #7c879c;
}
.marina-file-icon {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 11px;
  background: #fff;
  border: 1px solid #e1e7f2;
  border-radius: 12px;
  color: #26327e;
}
.marina-file-icon .icon {
  width: 23px;
  height: 23px;
}
.marina-file-icon small {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}
.marina-document-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 15px;
}
.marina-document-context span {
  font-size: 9px;
  color: #546a83;
  background: #eaf4f8;
  border-radius: 6px;
  padding: 3px 7px;
}
.marina-document-sample {
  border-top: 1px solid #e6ebf4;
  padding-top: 7px;
}
.marina-document-sample>div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  font-size: 11px;
  line-height: 1.5;
}
.marina-document-sample strong {
  white-space: nowrap;
  color: #26327e;
}
.marina-document-sample small {
  color: #8390a4;
  font-size: 9px;
  font-weight: 400;
}
.marina-document-sample p {
  font-size: 10px;
  color: #7c879c;
  margin: 6px 0 12px;
}
.marina-document-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #64738f;
  padding: 12px 0 8px;
}
.marina-document-status.is-ready {
  color: #277763;
}
.marina-document-status.is-failed {
  color: #a15639;
}
.marina-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 6px 0 14px;
}
.marina-download,.marina-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}
.marina-download {
  background: #26327e;
  color: #fff;
  border: 1px solid #26327e;
}
.marina-download:hover {
  background: #354798;
  color: #fff;
}
.marina-download .icon {
  width: 15px;
  height: 15px;
}
.marina-secondary {
  background: #fff;
  color: #445479;
  border: 1px solid #dce3f0;
}
.marina-secondary:hover {
  background: #f1f5fc;
}
.marina-document-footer {
  border-top: 1px solid #e6ebf4;
  padding-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  font-size: 9px;
  color: #8993a5;
}
.marina-document-footer button {
  color: #5267a0;
  background: none;
  border: 0;
  padding: 0;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}
.marina-progress {
  height: 3px;
  background: linear-gradient(90deg,#e6eefc,#86bbe1,#e6eefc);
  background-size: 200% 100%;
  animation: marina-progress 2s linear infinite;
  border-radius: 3px;
  margin: 4px 0 16px;
}
@keyframes marina-progress {
  to {
    background-position: -200% 0;
  }
}
.marina-preview {
  width: min(960px,94vw);
  height: 88dvh;
  max-width: 94vw;
  padding: 0;
  border: 1px solid #dce3ef;
  border-radius: 20px;
  box-shadow: var(--shadow-3);
  background: #fff;
}
.marina-preview::backdrop {
  background: #111c42a6;
  backdrop-filter: blur(5px);
}
.marina-preview header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid #e8edf5;
  color: #26327e;
  font-size: 14px;
}
.marina-preview iframe {
  width: 100%;
  height: calc(100% - 70px);
  border: 0;
}
.marina-document-page {
  margin: 0;
  padding: 0;
  background: #f6f8fc;
  color: #34415a;
}
.marina-document-page main {
  max-width: 900px;
  margin: auto;
  padding: 32px;
}
.marina-document-page h1 {
  color: #26327e;
  letter-spacing: -1px;
  font-size: 30px;
}
.marina-preview-table {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid #e1e7f1;
  border-radius: 14px;
  background: #fff;
}
.marina-preview-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.marina-preview-table th,.marina-preview-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid #eef1f6;
}
.marina-preview-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #edf2fa;
}
.marina-preview-table small {
  display: block;
  color: #8b95a8;
  font-size: 10px;
  margin-top: 4px;
}
.marina-document-footnote {
  color: #7a8598;
  font-size: 11px;
}
.marina-document [hidden] {
  display: none !important;
}
.marina-file-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.marina-file-actions [hidden] {
  display: none !important;
}
.marina-file-status {
  flex-basis: 100%;
  font-size: 12px;
  color: #546a83;
}
.marina-file-status:empty {
  display: none;
}
.marina-appointment-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.marina-appointment-action p {
  margin: 0;
}
.assistant-panel button:focus-visible,.assistant-panel a:focus-visible {
  outline: 3px solid #95bade;
  outline-offset: 3px;
}
@media (max-width: 48rem) {
  .marina-expand {
    display: none;
  }
  .assistant-panel-header {
    padding: 14px 16px;
  }
  .assistant-panel-messages {
    padding: 22px 17px;
  }
  .assistant-panel-form {
    padding: 10px 13px max(14px,env(safe-area-inset-bottom));
  }
  .assistant-panel-input-row .assistant-panel-input {
    font-size: 16px;
  }
  .marina-welcome {
    padding-top: 8px;
  }
  .marina-welcome-mark {
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    border-radius: 15px;
  }
  .marina-welcome .marina-welcome-title {
    font-size: 27px;
  }
  .marina-suggestions {
    margin-top: 20px;
    gap: 8px;
  }
  .marina-suggestions button {
    padding: 12px;
  }
  .marina-document {
    padding: 15px;
  }
  .marina-document-page main {
    padding: 20px 14px;
  }
  .marina-preview-table th,.marina-preview-table td {
    padding: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .assistant-panel-messages {
    scroll-behavior: auto;
  }
  .marina-progress {
    animation: none;
  }
  .marina-suggestions button {
    transition: none;
  }
}
