@import url("/assets/n3xra-brand.css?v=20261102-review");
:root {
  --ink: #0f1620;
  --ink-soft: #1c2733;
  --slate: #5d6979;
  --fog: #f4f7fb;
  --mist: #e9eef5;
  --line: rgba(15, 22, 32, 0.1);
  --teal: #176f66;
  --gold: #ea9b3f;
  --danger: #9d2f3f;
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(12, 18, 28, 0.14);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", "Trebuchet MS", sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background:
    radial-gradient(900px 460px at 8% 12%, rgba(23, 111, 102, 0.14), transparent 60%),
    radial-gradient(720px 420px at 94% 0%, rgba(234, 155, 63, 0.16), transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #ecf1f7 100%);
}

a { color: inherit; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  color: var(--white);
  background:
    radial-gradient(640px 360px at 10% 18%, rgba(23, 111, 102, 0.38), transparent 58%),
    radial-gradient(540px 300px at 92% 10%, rgba(234, 155, 63, 0.32), transparent 55%),
    linear-gradient(135deg, #0b1219 0%, #101925 52%, #0c141c 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner,
.main {
  width: min(1120px, calc(100vw - 2.4rem));
  margin: 0 auto;
}

.topbar-inner {
  padding: 1.6rem 0 2rem;
  display: grid;
  gap: 1.2rem;
  position: relative;
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.dashboard-topbar-row {
  position: relative;
}

.login-topbar-row {
  justify-content: center;
}

.login-topbar-row .brand {
  width: 100%;
  justify-content: center;
}

.login-topbar-row .brand-badge-image {
  width: clamp(170px, 24vw, 250px);
  height: auto;
  border-radius: 0;
  filter: drop-shadow(0 14px 28px rgba(5, 10, 16, 0.22));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

.brand-home-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.brand-badge {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 0.96rem;
}

.brand-badge-image {
  object-fit: contain;
  padding: 0;
  background: transparent;
  border-radius: 10px;
}

.dashboard-topbar-row .brand-badge {
  width: auto;
  height: auto;
  padding: 0;
  display: block;
  border-radius: 0;
  background: transparent;
}

.dashboard-topbar-row .brand-badge-image {
  height: 30px;
  width: auto;
  max-width: min(52vw, 340px);
  display: block;
}

.topbar-logout,
.menu-toggle {
  display: none;
}

.topbar-logout {
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.84);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  padding: 0;
  flex-direction: column;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--white);
}

.mobile-menu {
  display: none;
}

.mobile-menu.is-open {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 0 0;
  border-radius: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-width: 1px 0 0;
  box-shadow: none;
  backdrop-filter: none;
  width: 100%;
  position: static;
  z-index: auto;
}

.mobile-menu-head {
  flex: 1 0 100%;
  padding: 0 0 0.1rem;
  border-bottom: 0;
  margin-bottom: 0;
}

.mobile-menu-title {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.mobile-menu-link {
  flex: 0 1 180px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  text-align: center;
  padding: 0.82rem 0.8rem;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.mobile-menu-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.mobile-menu-link.is-active {
  background:
    radial-gradient(180px 80px at 10% 10%, rgba(23, 111, 102, 0.3), transparent 60%),
    rgba(255, 255, 255, 0.08);
  border-color: rgba(23, 111, 102, 0.4);
  box-shadow: inset 0 0 0 1px rgba(23, 111, 102, 0.14);
}

.topbar-links {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main {
  padding: 2rem 0 3rem;
  display: grid;
  gap: 1.4rem;
}

.site-footer {
  padding: 1.35rem 0;
  color: rgba(255, 255, 255, 0.58);
  background: #070c12;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.86rem;
  text-align: center;
}

.footer-inner {
  width: min(1120px, calc(100vw - 2rem));
  margin: 0 auto;
  display: grid;
  gap: 0.6rem;
  justify-items: center;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: inherit;
  text-decoration: none;
  font-weight: 800;
}

.panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

#files-panel .panel-head {
  align-items: center;
}

#files-panel .panel-head h2 {
  line-height: 1;
}

#files-panel {
  align-content: start;
}

#files-panel .library-actions-grid,
#files-panel #files-library-context,
#files-panel .files-filter-bar,
#files-panel .download-list {
  margin-top: 0;
  margin-bottom: 0;
}

#files-panel .download-list {
  align-self: start;
}

#files-panel #file-status {
  margin-top: 0;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.45rem;
}

.panel-head p {
  margin: 0.35rem 0 0;
  color: var(--slate);
}

.stack {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.38rem;
}

.meeting-source-field {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0.95rem;
  border: 1px solid rgba(15, 22, 32, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(248, 250, 252, 0.72);
}

.meeting-source-field legend {
  padding: 0;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal);
}

.meeting-source-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.meeting-source-option {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.meeting-source-option.is-selected {
  border-color: var(--teal);
  background: #f2fbf8;
  box-shadow: 0 0 0 1px rgba(23, 111, 102, 0.12);
}

.meeting-source-option.is-unavailable {
  opacity: 0.52;
  cursor: not-allowed;
}

.meeting-source-option input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.12rem 0 0;
  accent-color: var(--teal);
}

.meeting-source-option span {
  display: grid;
  gap: 0.16rem;
}

.meeting-source-option strong {
  font-size: 0.9rem;
}

.meeting-source-option small {
  color: var(--slate);
  font-size: 0.8rem;
}

.browser-recording-workflow {
  display: grid;
  gap: 0.8rem;
}

.meeting-note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.phone-meeting-start {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 1.5rem;
  align-items: start;
  padding: 1.1rem 1.2rem;
  border: 1px solid #b9ddd6;
  border-radius: 14px;
  background: #f4fbf9;
}

.phone-meeting-start h4 {
  margin: .15rem 0 .35rem;
  color: var(--ink);
}

.phone-meeting-start p {
  margin: 0;
}

.phone-meeting-dial-in {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: .45rem .75rem;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #cbe4df;
}

.phone-meeting-dial-in strong {
  font-size: 1.1rem;
  letter-spacing: .03em;
}

.phone-meeting-dial-in .field-note {
  grid-column: 1 / -1;
  margin-top: .25rem;
}

.phone-meeting-live-status {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .25rem .75rem;
  align-items: baseline;
  margin-top: .35rem;
  padding: .8rem .9rem;
  border: 1px solid #cbe4df;
  border-radius: 10px;
  background: #fff;
}

.phone-meeting-live-status .field-note {
  grid-column: 1 / -1;
  margin: 0;
}

.phone-meeting-session-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

@media (max-width: 700px) {
  .meeting-source-options {
    grid-template-columns: 1fr;
  }

  .phone-meeting-start {
    grid-template-columns: 1fr;
  }

  .phone-meeting-start .btn {
    width: 100%;
  }

  .phone-meeting-dial-in {
    grid-template-columns: 1fr;
    gap: .2rem;
  }

  .phone-meeting-live-status {
    grid-template-columns: 1fr;
  }
}

.field label,
.field-title {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal);
}

input,
textarea,
select,
button {
  font: inherit;
}

input[type="email"],
input[type="password"],
input[type="search"],
input[type="text"],
input[type="datetime-local"],
input[type="file"],
textarea,
select {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 22, 32, 0.12);
  background: var(--fog);
  padding: 0.8rem 0.9rem;
  color: var(--ink);
}

input[type="color"] {
  width: 100%;
  min-height: 3.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 22, 32, 0.12);
  background: var(--fog);
  padding: 0.35rem;
  cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: calc(var(--radius-sm) - 4px);
}

input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: calc(var(--radius-sm) - 4px);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--fog) inset;
  -webkit-box-shadow: 0 0 0 1000px var(--fog) inset;
  transition: background-color 9999s ease-in-out 0s;
  caret-color: var(--ink);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 4.8rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  border: 1px solid rgba(15, 22, 32, 0.12);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  padding: 0.38rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.field-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--slate);
}

.field-optional {
  color: var(--slate);
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.field-note.is-valid {
  color: #08745f;
  font-weight: 700;
}

.field-note.is-error {
  color: #a43a1a;
  font-weight: 700;
}

.required-mark {
  color: var(--danger);
  font-weight: 900;
}

.ai-memory-manager {
  display: grid;
  gap: 0.85rem;
}

.ai-memory-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ai-memory-empty {
  width: 100%;
  margin: 0;
  color: var(--slate);
  padding: 0.85rem 0.95rem;
  border: 1px dashed rgba(15, 22, 32, 0.16);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.78);
}

.ai-memory-bubble {
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 0.78rem 0.72rem 0.95rem;
  border-radius: 20px;
  border: 1px solid rgba(23, 111, 102, 0.18);
  background:
    radial-gradient(180px 90px at 0% 0%, rgba(23, 111, 102, 0.08), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f6fbfa 100%);
  color: var(--ink);
}

.ai-memory-bubble p {
  margin: 0;
  line-height: 1.35;
}

.ai-memory-bubble.is-editing {
  flex: 1 1 420px;
}

.ai-memory-edit-input {
  min-width: min(420px, 100%);
  flex: 1 1 260px;
  background: #ffffff;
}

.ai-memory-actions {
  display: inline-flex;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.ai-memory-actions button {
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-soft);
  padding: 0.36rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.ai-memory-actions button:hover,
.ai-memory-actions button:focus-visible {
  color: var(--teal);
  border-color: rgba(23, 111, 102, 0.24);
}

.ai-memory-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
}

@media (max-width: 680px) {
  .ai-memory-bubble {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-memory-add-row {
    grid-template-columns: 1fr;
  }

  .ai-memory-add-row .btn {
    width: 100%;
  }
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.actions,
.inline-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.15rem;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(12, 18, 28, 0.14);
}

.btn.block {
  width: 100%;
  justify-content: center;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn.secondary {
  background: var(--white);
  color: var(--ink);
  border: 1px solid rgba(15, 22, 32, 0.12);
  box-shadow: none;
}

.btn.warn {
  background: var(--danger);
}

.notice {
  border-radius: var(--radius-md);
  padding: 0.95rem 1rem;
  background: #f7fbfa;
  border: 1px solid rgba(23, 111, 102, 0.16);
  color: var(--ink-soft);
}

.notice strong {
  color: var(--teal);
}

.status {
  min-height: 1.25rem;
  color: var(--slate);
  font-size: 0.94rem;
}

.status.error { color: var(--danger); }
.status.notice { color: var(--teal); }
.status.success { color: var(--teal); }

.auth-captcha {
  margin-top: 0.25rem;
}

.auth-captcha > label {
  display: block;
  text-align: center;
}

#auth-turnstile {
  min-height: 66px;
  width: 100%;
  display: flex;
  justify-content: center;
}

#auth-turnstile > * {
  margin-inline: auto;
}

.auth-captcha .field-note {
  text-align: center;
}

.upload-mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: var(--radius-pill);
  background: #e9ecef;
  border: 1px solid rgba(15, 22, 32, 0.08);
  width: min(440px, 100%);
}

.upload-mode-btn {
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0.7rem 0.85rem;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.upload-mode-btn.is-active {
  background: #123a33;
  color: var(--white);
  box-shadow: 0 10px 22px rgba(12, 18, 28, 0.14);
}

.upload-results {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  max-height: 220px;
  overflow: auto;
}

.upload-result {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0.5rem 0.7rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.55rem;
  row-gap: 0.25rem;
  align-items: start;
}

.upload-result-tone {
  border-radius: var(--radius-pill);
  padding: 0.16rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.upload-result-tone.uploaded {
  background: rgba(23, 111, 102, 0.14);
  color: var(--teal);
}

.upload-result-tone.failed {
  background: rgba(168, 46, 66, 0.13);
  color: var(--danger);
}

.upload-result-tone.skipped {
  background: rgba(12, 18, 28, 0.1);
  color: var(--ink-soft);
}

.upload-result-tone.needs-ocr {
  background: rgba(234, 155, 63, 0.18);
  color: #9a5c00;
}

.upload-result-name {
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
}

.upload-result-message {
  grid-column: 2;
  color: var(--slate);
  font-size: 0.88rem;
  word-break: break-word;
}

.hidden { display: none !important; }

.account-summary,
.dashboard-layout {
  display: grid;
  gap: 1rem;
}

.dashboard-layout {
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  align-items: start;
}

.recordings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.recording-workspace,
.recording-sidebar {
  display: grid;
  gap: 1rem;
}

.recording-hero,
.recording-sidebar-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    radial-gradient(280px 180px at 100% 0%, rgba(234, 155, 63, 0.12), transparent 60%),
    radial-gradient(260px 180px at 0% 0%, rgba(23, 111, 102, 0.08), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: clamp(1rem, 2.4vw, 1.35rem);
  box-shadow: 0 18px 38px rgba(12, 18, 28, 0.08);
}

.recording-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.recording-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

.recording-hero h3 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(1.8rem, 2.8vw, 2.3rem);
  line-height: 1.05;
}

.recording-copy {
  margin: 0.6rem 0 0;
  color: var(--slate);
  max-width: 56ch;
}

.recording-pulse-card {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  border-radius: 20px;
  padding: 1rem;
  background:
    radial-gradient(circle at 14% 18%, rgba(23, 111, 102, 0.24), transparent 0.38rem),
    linear-gradient(180deg, #0f1821 0%, #15212d 100%);
  color: var(--white);
}

.recording-pulse-label,
.recording-pulse-meta,
.recording-stat-label,
.recording-row-meta,
.recording-row-note {
  margin: 0;
}

.recording-pulse-label,
.recording-stat-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.recording-pulse-value {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
}

.recording-pulse-meta {
  color: rgba(255, 255, 255, 0.74);
}

.recording-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
}

.recording-stat {
  border: 1px solid rgba(15, 22, 32, 0.08);
  border-radius: 16px;
  background: #fbfcfe;
  padding: 0.75rem 0.9rem;
}

.recording-stat-label {
  color: var(--teal);
}

.recording-stat-value {
  margin: 0.35rem 0 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 800;
  color: var(--ink);
  word-break: break-word;
}

.recording-stat-value.success {
  color: var(--teal);
}

.recording-stat-value.error {
  color: var(--danger);
}

.recording-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.recording-note-tools {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.75rem;
}

.recording-references-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: 16px;
  background: rgba(245, 247, 251, 0.78);
}

.recording-reference-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) auto;
  gap: 12px;
  align-items: end;
}

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

.recording-reference-attached {
  display: grid;
  gap: 8px;
}

.recording-reference-section-label {
  margin: 0;
  color: #5d6979;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recording-reference-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(15, 22, 32, 0.08);
  border-radius: 12px;
  background: #ffffff;
}

.recording-reference-type {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #176f66;
}

.recording-reference-title {
  margin: 0;
  min-width: 0;
  color: #101828;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.recording-reference-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.recording-reference-remove {
  border: 0;
  background: transparent;
  color: #b42318;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.recording-reference-preview {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: 14px;
  background: #ffffff;
}

.recording-reference-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}

.recording-reference-frame {
  width: 100%;
  min-height: 520px;
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: 10px;
  background: #f5f7fb;
}

.upload-progress {
  display: grid;
  gap: 0.45rem;
}

.upload-progress-bar {
  position: relative;
  overflow: hidden;
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(15, 22, 32, 0.08);
}

.upload-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(23, 111, 102, 0.82) 0%, rgba(234, 155, 63, 0.82) 100%);
  transition: width 320ms ease;
}

.upload-progress-copy {
  margin: 0;
  color: var(--slate);
  font-size: 0.94rem;
  font-weight: 600;
}

.recording-row-progress {
  overflow: hidden;
  height: 0.35rem;
  margin-top: 0.65rem;
  border-radius: 999px;
  background: rgba(15, 22, 32, 0.08);
}

.recording-row-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(23, 111, 102, 0.82), rgba(234, 155, 63, 0.82));
}

.recording-row-progress-copy {
  margin: 0.3rem 0 0;
  color: var(--slate);
  font-size: 0.82rem;
  font-weight: 700;
}

.recording-player {
  width: 100%;
}

.recording-player-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: clamp(1rem, 2.4vw, 1.35rem);
  box-shadow: 0 18px 38px rgba(12, 18, 28, 0.08);
  display: grid;
  gap: 0.85rem;
}

.recording-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.recording-detail-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem;
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: 16px;
  background: #f4f7fa;
  overflow-x: auto;
  scrollbar-width: none;
}

.recording-detail-tabs::-webkit-scrollbar {
  display: none;
}

.recording-detail-tab {
  min-width: max-content;
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  padding: 0.55rem 0.78rem;
  background: transparent;
  color: var(--slate);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.recording-detail-tab:hover,
.recording-detail-tab:focus-visible {
  color: var(--ink);
  outline: none;
}

.recording-detail-tab.is-active {
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(20, 94, 80, 0.18);
}

.recording-detail-tab-panels {
  min-height: 0;
}

.recording-detail-section {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 22, 32, 0.08);
}

.recording-detail-tab-panel {
  margin-top: 0.85rem;
  padding-top: 0;
  border-top: 0;
}

.recording-detail-tab-panel:not(.is-active) {
  display: none;
}

.recording-detail-card {
  border: 1px solid rgba(15, 22, 32, 0.08);
  border-radius: 16px;
  background: #fbfcfe;
  padding: 0.9rem 1rem;
}

.recording-detail-card .account-value {
  margin-top: 0.25rem;
}

.recording-detail-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.minutes-style-field {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
}

.minutes-style-field legend {
  margin-bottom: 0.55rem;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal);
}

.minutes-style-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: var(--radius-pill);
  background: var(--fog);
}

.minutes-style-options label {
  cursor: pointer;
}

.minutes-style-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.minutes-style-options span {
  display: block;
  padding: 0.62rem 0.8rem;
  border-radius: var(--radius-pill);
  text-align: center;
  font-weight: 700;
  color: var(--slate);
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.minutes-style-options input:checked + span {
  background: #fff;
  color: var(--teal);
  box-shadow: 0 1px 4px rgba(15, 22, 32, 0.12);
}

.minutes-style-options input:focus-visible + span {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.minutes-style-options input:disabled + span {
  cursor: not-allowed;
  opacity: 0.58;
}

.recording-detail-panel-actions .recording-transfer-discreet {
  order: -1;
  margin-right: auto;
  padding: 0.5rem 0.65rem;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: none;
}

.recording-detail-panel-actions .recording-transfer-discreet:hover,
.recording-detail-panel-actions .recording-transfer-discreet:focus-visible {
  border-color: rgba(23, 111, 102, 0.16);
  background: rgba(23, 111, 102, 0.06);
  color: var(--teal);
}

.recording-interruptions {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(184, 121, 31, 0.2);
  border-radius: 16px;
  background: #fffaf1;
}

.recording-interruptions h4,
.recording-interruptions p {
  margin: 0;
}

.recording-interruptions h4 {
  font-size: 0.98rem;
}

.recording-interruptions p,
.recording-interruptions small {
  color: var(--slate);
  line-height: 1.45;
}

.recording-interruptions ol {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recording-interruptions li {
  display: grid;
  gap: 0.18rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(184, 121, 31, 0.14);
}

.recording-interruptions li:first-child {
  padding-top: 0;
  border-top: 0;
}

.recording-interruptions li span {
  color: var(--ink);
  font-size: 0.9rem;
}

.compact-head {
  align-items: start;
}

.compact-head h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.compact-head p {
  margin: 0.25rem 0 0;
  color: var(--slate);
  font-size: 0.92rem;
}

.recording-notes-preview {
  margin: 0;
  min-height: 130px;
  max-height: min(42vh, 420px);
  overflow: auto;
  border: 1px solid rgba(15, 22, 32, 0.08);
  border-radius: 16px;
  background: #fbfcfe;
  padding: 0.9rem 1rem;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-wrap;
  user-select: text;
}

.recording-detail-notes-editor {
  width: 100%;
  min-height: min(34vh, 360px);
  resize: vertical;
}

.recording-transcript-preview {
  min-height: 110px;
  max-height: min(32vh, 340px);
}

.recording-ai-draft-preview {
  min-height: 92px;
  max-height: min(32vh, 320px);
}

.recording-ai-draft-editor {
  width: 100%;
  min-height: min(38vh, 390px);
  resize: vertical;
}

.recording-ai-draft-editor:not(:disabled):focus {
  border-color: rgba(18, 112, 98, 0.55);
  outline: 3px solid rgba(18, 112, 98, 0.12);
}

.recording-review-list {
  display: grid;
  gap: 0.55rem;
}

.recording-review-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.recording-review-title {
  margin: 0;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.recording-review-item {
  border: 1px solid rgba(15, 22, 32, 0.08);
  border-radius: 16px;
  background: #fbfcfe;
  padding: 0.85rem 0.95rem;
}

.recording-review-item p,
.recording-review-item span {
  margin: 0;
}

.recording-review-item p {
  color: var(--ink);
  line-height: 1.45;
}

.recording-review-item span {
  display: block;
  margin-top: 0.35rem;
  color: var(--slate);
  font-size: 0.9rem;
}

.recording-review-item .recording-review-status {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 0.45rem;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  background: rgba(20, 94, 80, 0.1);
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recording-review-item .recording-review-status.is-dismissed {
  background: rgba(100, 116, 139, 0.14);
  color: var(--slate);
}

.recording-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.recording-review-action {
  min-height: 0;
  padding: 0.48rem 0.78rem;
  font-size: 0.85rem;
}

.recording-detail-storage-path {
  word-break: break-word;
  font-size: 0.94rem;
}

.recordings-list {
  display: grid;
  gap: 0.8rem;
}

.recording-row {
  border: 1px solid rgba(15, 22, 32, 0.08);
  border-radius: 18px;
  background: #fff;
  padding: 0.95rem 1rem;
  display: grid;
  gap: 0.75rem;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.recording-row:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 111, 102, 0.22);
  box-shadow: 0 16px 28px rgba(12, 18, 28, 0.07);
}

.recording-row:focus-visible {
  outline: 2px solid rgba(23, 111, 102, 0.4);
  outline-offset: 2px;
}

.recording-row-main,
.recording-row-details,
.recording-row-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.recording-row-title {
  margin: 0;
  font-weight: 800;
  color: var(--ink);
}

.recording-row-meta,
.recording-row-details,
.recording-row-note {
  color: var(--slate);
  font-size: 0.92rem;
}

.recording-row-details span {
  border-radius: 999px;
  background: var(--fog);
  padding: 0.28rem 0.6rem;
}

.recording-row-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.32rem 0.72rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recording-row-status.status-uploaded,
.recording-row-status.status-ready {
  background: rgba(23, 111, 102, 0.12);
  color: var(--teal);
}

.recording-row-status.status-recording,
.recording-row-status.status-uploading,
.recording-row-status.status-transcribing {
  background: rgba(234, 155, 63, 0.16);
  color: #9a5f11;
}

.recording-row-status.status-failed {
  background: rgba(157, 47, 63, 0.12);
  color: var(--danger);
}

.recording-row-status.status-created,
.recording-row-status.status-recorded {
  background: rgba(15, 22, 32, 0.08);
  color: var(--ink-soft);
}

.recording-row-note-error {
  color: var(--danger);
}

.section-menu {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 4px;
  background: #e9ecef;
  border: 1px solid rgba(15, 22, 32, 0.08);
  width: min(420px, 100%);
}

.section-menu-btn {
  border: 0;
  border-radius: 4px;
  padding: 0.85rem 1rem;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.section-menu-btn.is-active {
  background: #123a33;
  color: var(--white);
  box-shadow: 0 10px 22px rgba(12, 18, 28, 0.14);
}

.section-view {
  display: grid;
  gap: 1rem;
}

.section-view#library-section {
  gap: 0.45rem;
}

.section-view[hidden] {
  display: none !important;
}

.dashboard-sidebar,
.dashboard-main {
  display: grid;
  gap: 1rem;
}

.account-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fffefb 0%, #f8fafc 100%);
  padding: clamp(1.1rem, 2.4vw, 1.5rem);
  display: grid;
  gap: 1rem;
  box-shadow: 0 22px 50px rgba(12, 18, 28, 0.08);
}

.support-scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 720px) {
  .support-scope-grid { grid-template-columns: 1fr; }
}

.account-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}

.account-top h3 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(1.65rem, 2.6vw, 2rem);
  min-width: 0;
}

.profile-settings-button {
  padding-inline: 1.3rem;
  justify-self: end;
  white-space: nowrap;
}

.account-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

#account-library-card .account-list {
  grid-template-columns: 1.3fr 1fr 1fr;
}

.selected-library-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.selected-library-head p {
  margin: 0.2rem 0 0;
  color: var(--slate);
}

.library-context-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.library-logo-mark,
.library-logo-preview {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  border: 1px solid rgba(23, 111, 102, 0.18);
  background:
    linear-gradient(45deg, rgba(15, 22, 32, 0.045) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(15, 22, 32, 0.045) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(15, 22, 32, 0.045) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(15, 22, 32, 0.045) 75%),
    #ffffff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(12, 18, 28, 0.08);
}

.library-logo-preview {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  flex: 0 0 auto;
}

.library-context-logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
}

.library-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.45rem;
}

.library-logo-fallback {
  color: var(--teal);
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 800;
}

.library-logo-preview .library-logo-fallback {
  font-size: 2.1rem;
}

.library-logo-settings {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.settings-group,
.settings-subsection {
  display: grid;
  gap: 1rem;
}

.settings-subsection {
  padding: 1rem;
  border: 1px solid rgba(15, 22, 32, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(220px 120px at 94% 8%, rgba(234, 155, 63, 0.07), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(248, 251, 250, 0.92) 100%);
}

.settings-subsection-head h4,
.settings-subsection-head p {
  margin: 0;
}

.settings-subsection-head h4 {
  color: var(--ink);
  font-size: 1.02rem;
}

.settings-subsection-head p {
  margin-top: 0.25rem;
  color: var(--slate);
  line-height: 1.5;
}

#library-settings-card,
#billing-section {
  align-content: start;
}

#library-settings-card {
  gap: 0.75rem;
}

#billing-section .panel-head {
  margin-bottom: 0;
}

#library-settings-card .actions:has(.hidden:only-child),
#library-settings-card .status:empty,
#billing-section .status:empty {
  display: none;
}

.account-item {
  display: grid;
  gap: 0.2rem;
}

.account-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal);
}

.account-value {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.02rem;
}

.records-profile-header {
  display: none;
}

.records-profile-section-copy {
  margin: 0.3rem 0 0;
  color: var(--slate);
  font-size: 0.9rem;
}

.records-help-card {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
}

.records-help-form {
  display: grid;
  gap: 0.85rem;
}

.records-help-form textarea {
  min-height: 96px;
}

.review-meta-field {
  align-self: end;
}

#organization-review-text {
  min-height: 120px;
}

.records-help-answer {
  border: 1px solid rgba(23, 111, 102, 0.18);
  border-radius: var(--radius-sm);
  background: #f4fbf8;
  color: var(--ink-soft);
  padding: 0.9rem 1rem;
  line-height: 1.55;
}

.records-help-answer p,
.ai-search-answer p {
  margin: 0 0 0.55rem;
}

.records-help-answer p:last-child,
.ai-search-answer p:last-child {
  margin-bottom: 0;
}

.records-help-answer ul,
.ai-search-answer ul {
  margin: 0 0 0.65rem;
  padding-left: 1.2rem;
}

.records-help-answer li,
.ai-search-answer li {
  margin: 0.25rem 0;
}

.records-help-answer ol,
.ai-search-answer ol {
  margin: 0 0 0.65rem;
  padding-left: 1.25rem;
}

.records-help-answer em,
.ai-search-answer em {
  font-style: italic;
}

.records-help-answer .ai-answer-heading,
.ai-search-answer .ai-answer-heading {
  margin: 0.2rem 0 0.55rem;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.25;
  font-weight: 800;
}

.ai-rich-table-wrap {
  margin: 0.35rem 0 0.75rem;
  overflow-x: auto;
}

.ai-rich-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(15, 22, 32, 0.12);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.ai-rich-table th,
.ai-rich-table td {
  padding: 0.5rem 0.58rem;
  border-bottom: 1px solid rgba(15, 22, 32, 0.08);
  border-right: 1px solid rgba(15, 22, 32, 0.08);
  text-align: left;
  vertical-align: top;
  font-size: 0.95rem;
}

.ai-rich-table th:last-child,
.ai-rich-table td:last-child {
  border-right: 0;
}

.ai-rich-table th {
  color: var(--ink);
  font-weight: 800;
  background: #f4fbf8;
}

.ai-rich-table tr:last-child td {
  border-bottom: 0;
}

.records-help-answer strong,
.ai-search-answer strong {
  font-weight: 800;
}

.records-help-answer a,
.ai-search-answer a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.account-note {
  margin: 0;
  color: var(--slate);
  font-size: 0.94rem;
}

.current-plan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(23, 111, 102, 0.16);
  background:
    radial-gradient(240px 120px at 8% 12%, rgba(23, 111, 102, 0.06), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.current-plan-name,
.current-plan-copy {
  margin: 0;
}

.current-plan-name {
  font-size: 1.2rem;
  line-height: 1.15;
  font-weight: 800;
  color: var(--ink);
}

.current-plan-copy {
  margin-top: 0.25rem;
  color: var(--slate);
}

.current-plan-note {
  margin: 0.35rem 0 0;
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 700;
}

.current-plan-usage {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.usage-item {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 22, 32, 0.08);
  background: rgba(255, 255, 255, 0.74);
}

.usage-item.is-over {
  border-color: rgba(176, 54, 54, 0.28);
  background: rgba(176, 54, 54, 0.06);
}

.usage-item-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--slate);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.usage-item-head strong {
  color: var(--ink);
  text-align: right;
  text-transform: none;
  letter-spacing: 0;
}

.usage-meter {
  overflow: hidden;
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(15, 22, 32, 0.08);
}

.usage-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.usage-item.is-over .usage-meter span {
  background: var(--danger);
}

.usage-item p {
  margin: 0;
  color: var(--slate);
  font-size: 0.82rem;
  line-height: 1.35;
}

.usage-item-action {
  width: fit-content;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.usage-item-action:hover,
.usage-item-action:focus-visible {
  text-decoration: underline;
}

.current-plan-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.current-plan-text-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.current-plan-text-link:hover,
.current-plan-text-link:focus-visible {
  color: color-mix(in srgb, var(--teal) 82%, var(--ink));
}

.section-toggle {
  width: 100%;
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(220px 110px at 94% 14%, rgba(234, 155, 63, 0.1), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
  padding: 1rem 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  cursor: pointer;
}

.section-toggle h3,
.section-toggle p {
  margin: 0;
}

.section-toggle p {
  margin-top: 0.22rem;
  color: var(--slate);
}

.section-toggle-indicator {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 22, 32, 0.1);
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
}

.section-toggle.is-open .section-toggle-indicator {
  font-size: 1.4rem;
}

.admin-settings-layout {
  display: grid;
  gap: 1rem;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.35rem;
  border: 1px solid rgba(15, 22, 32, 0.08);
  border-radius: var(--radius-md);
  background: rgba(248, 250, 252, 0.88);
}

.admin-tab {
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--slate);
  padding: 0.68rem 0.95rem;
  font-weight: 800;
  cursor: pointer;
}

.admin-tab.is-active {
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(12, 18, 28, 0.12);
}

.admin-panels {
  min-width: 0;
}

.admin-panel {
  display: grid;
  gap: 1rem;
}

.admin-panel[hidden] {
  display: none !important;
}

.admin-panel-head {
  display: grid;
  gap: 0.22rem;
}

.admin-panel-head-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}

.admin-panel-head h4,
.admin-panel-head p,
.admin-template-title,
.admin-template-meta {
  margin: 0;
}

.admin-panel-head h4 {
  color: var(--ink);
  font-size: 1.08rem;
}

.admin-panel-head p,
.admin-template-meta {
  color: var(--slate);
}

.compact-field {
  min-width: 12rem;
}

.admin-template-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
}

.admin-template-list:empty {
  display: none;
}

.admin-template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(15, 22, 32, 0.08);
}

.admin-template-row:last-child {
  border-bottom: 0;
}

.admin-template-title {
  color: var(--ink);
  font-weight: 800;
}

.contact-form-panel {
  display: grid;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(15, 22, 32, 0.08);
}

.contact-form-panel.hidden {
  display: none;
}

.admin-disclosure {
  padding: 0;
  overflow: hidden;
}

.admin-disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
  list-style: none;
}

.admin-disclosure-summary::-webkit-details-marker {
  display: none;
}

.admin-disclosure-summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(15, 22, 32, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-weight: 900;
}

.admin-disclosure[open] > .admin-disclosure-summary::after {
  content: "-";
}

.admin-disclosure-summary span {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.admin-disclosure-summary strong {
  color: var(--ink);
  font-size: 1.02rem;
}

.admin-disclosure-summary small {
  color: var(--slate);
  font-size: 0.95rem;
  line-height: 1.45;
}

.admin-disclosure-content {
  padding: 0 1rem 1rem;
}

.admin-disclosure.is-targeted {
  border-color: rgba(23, 111, 102, 0.45);
  box-shadow: 0 0 0 3px rgba(23, 111, 102, 0.12);
}

.embed-access-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(234, 155, 63, 0.2);
  background:
    radial-gradient(220px 110px at 92% 14%, rgba(234, 155, 63, 0.12), transparent 60%),
    linear-gradient(180deg, #fffefb 0%, #f9fafc 100%);
}

@media (max-width: 980px) {
  .recordings-layout,
  .recording-hero {
    grid-template-columns: 1fr;
  }

  .recording-detail-grid {
    grid-template-columns: 1fr;
  }
}

.embed-access-title,
.embed-access-copy {
  margin: 0;
}

.embed-access-title {
  font-weight: 800;
  color: var(--ink);
}

.embed-access-copy {
  margin-top: 0.22rem;
  color: var(--slate);
}

.billing-plan-picker {
  display: grid;
  gap: 0.9rem;
  justify-items: center;
}

.billing-cycle-head {
  display: flex;
  align-items: center;
  justify-content: center;
}

.billing-cycle-label {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
}

.billing-cycle-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  align-self: center;
  width: auto;
  min-width: 0;
  gap: 0.5rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(15, 22, 32, 0.04);
  border: 1px solid rgba(15, 22, 32, 0.08);
}

.billing-cycle-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.58rem 0.9rem;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.billing-cycle-btn.is-active {
  background: #ffffff;
  border-color: rgba(23, 111, 102, 0.18);
  color: #123a33;
  box-shadow: 0 8px 18px rgba(12, 18, 28, 0.08);
}

.billing-cycle-btn:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.55);
}

.billing-cycle-save {
  display: inline-flex;
  margin-left: 0.42rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(23, 111, 102, 0.1);
  color: var(--white);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.billing-cycle-btn.is-active .billing-cycle-save {
  background: rgba(23, 111, 102, 0.12);
  color: var(--teal);
}

.billing-cycle-btn:not(.is-active) .billing-cycle-save {
  color: var(--teal);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.plan-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 22, 32, 0.1);
  background: #ffffff;
}

.plan-card.is-current {
  border-color: rgba(23, 111, 102, 0.26);
  box-shadow: 0 18px 34px rgba(23, 111, 102, 0.08);
  background:
    radial-gradient(220px 120px at 12% 10%, rgba(23, 111, 102, 0.06), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.plan-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.plan-name,
.plan-price,
.plan-summary,
.plan-limit,
.plan-footnote {
  margin: 0;
}

.plan-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.plan-price {
  color: var(--teal);
  font-weight: 700;
}

.plan-price-note {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate);
}

.plan-summary {
  color: var(--slate);
  font-size: 0.94rem;
}

.plan-limit {
  font-weight: 700;
  color: var(--ink-soft);
}

.compact-head {
  margin-bottom: 0;
}

.setting-toggles {
  align-items: stretch;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(15, 22, 32, 0.1);
  background: var(--fog);
  cursor: pointer;
  font-weight: 700;
}

.toggle-pill input {
  width: auto;
  margin: 0;
}

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.85rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid rgba(15, 22, 32, 0.08);
  vertical-align: middle;
}

.data-table th {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.activity-table td {
  vertical-align: top;
}

.activity-action-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: 0.2rem 0.62rem;
  border-radius: var(--radius-pill);
  background: rgba(23, 111, 102, 0.1);
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

#create-invite-form .grid-3 {
  align-items: start;
}

#create-invite-form .grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: start;
}

#create-invite-form .field {
  align-content: start;
}

.invite-expires-note {
  margin-top: 0.15rem;
}

#invite-management-section .data-table th:last-child,
#invite-management-section .data-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

#invite-management-section .data-table td:last-child .btn {
  margin-right: 0.4rem;
}

#invite-management-section .data-table td:last-child .btn:last-child {
  margin-right: 0;
}

#contact-form .grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: start;
}

.contact-table th:last-child,
.contact-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

.contact-table td:last-child .btn {
  margin-right: 0.35rem;
  padding-inline: 0.7rem;
}

.contact-table td:last-child .btn:last-child {
  margin-right: 0;
}

.records-person-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.28rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: #f5f7f8;
  color: var(--slate);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
}

.records-person-status.is-member {
  border-color: rgba(23, 111, 102, 0.2);
  background: rgba(23, 111, 102, 0.09);
  color: var(--green);
}

.is-selected-row {
  background: rgba(23, 111, 102, 0.06);
}

.admin-topbar-button {
  display: inline-flex;
}

.plan-badge {
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.7rem;
  background: #123a33;
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-features {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--slate);
  display: grid;
  gap: 0.35rem;
}

.plan-footnote {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.billing-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

#library-search-panel .panel-head {
  justify-content: center;
  text-align: center;
  width: 100%;
}

#library-search-panel .panel-head > div {
  width: min(760px, 100%);
}

.library-combined-panel {
  gap: 1rem;
}

.library-search-section {
  display: grid;
  gap: 1.25rem;
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}

.library-files-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-top: clamp(1rem, 2vw, 2rem);
}

.library-files-section-head h2 {
  margin: 0.2rem 0;
}

.library-files-section-head p:last-child {
  margin: 0;
}

.library-search-actions {
  align-self: end;
}

.library-combined-panel .ai-search-answer {
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .library-files-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-search-actions {
    align-self: stretch;
    width: 100%;
  }

  .library-search-actions .btn {
    flex: 1 1 auto;
  }
}

.search-mode-toggle {
  align-self: center;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  width: min(360px, 100%);
  margin-inline: auto;
  padding: 0.35rem;
  border-radius: var(--radius-pill);
  background: #e9ecef;
  border: 1px solid rgba(15, 22, 32, 0.08);
}

.search-mode-btn {
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0.62rem 0.9rem;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.search-mode-btn.is-active {
  background: #123a33;
  color: var(--white);
  box-shadow: 0 10px 22px rgba(12, 18, 28, 0.14);
}

.ai-search-answer {
  border: 1px solid rgba(23, 111, 102, 0.18);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(220px 120px at 96% 8%, rgba(234, 155, 63, 0.12), transparent 60%),
    linear-gradient(180deg, #f4fbf8 0%, #ffffff 100%);
  color: var(--ink-soft);
  padding: 0.95rem 1rem;
  line-height: 1.55;
  width: 100%;
}

.ai-search-audio-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-height: 1.75rem;
  margin-top: -0.35rem;
}

.ai-search-audio-controls.hidden,
.ai-search-audio-button.hidden {
  display: none;
}

.ai-search-audio-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  padding: 0.28rem 0.45rem;
  background: transparent;
  color: var(--teal);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.ai-search-audio-button:hover,
.ai-search-audio-button:focus-visible {
  color: #0b4d45;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

.ai-search-audio-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.ai-search-audio-status {
  color: var(--slate);
  font-size: 0.72rem;
}

/* Turns the AI answer into a Document Builder draft. */
.ai-search-document-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid #0f1720;
  border-radius: 999px;
  padding: 0.34rem 0.8rem;
  background: #0f1720;
  color: #ffffff;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.ai-search-document-button:hover,
.ai-search-document-button:focus-visible {
  background: #ffffff;
  color: #0f1720;
}

.ai-search-document-button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.ai-search-document-button:disabled {
  cursor: progress;
  opacity: 0.55;
}

/* Turn into PDF form: full-width choice rows, each with a one-line description. */
.report-form {
  display: grid;
  gap: 1.1rem;
}

.report-choice {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.report-form .field > label,
.report-choice legend {
  margin-bottom: 0.45rem;
  padding: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: normal;
  text-transform: none;
}

.report-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  background: var(--white);
  cursor: pointer;
}

.report-option:hover {
  border-color: rgba(15, 22, 32, 0.28);
}

.report-option:has(input:checked) {
  border-color: var(--ink);
  background: var(--fog);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.report-option input {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.15rem 0 0;
  accent-color: var(--ink);
}

.report-option span {
  display: grid;
  gap: 0.1rem;
}

.report-option strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.report-option small {
  color: var(--slate);
  font-size: 0.84rem;
  line-height: 1.35;
}

.report-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.report-check input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--ink);
}

.report-note {
  margin: 0;
  color: var(--slate);
  font-size: 0.86rem;
}

.report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.report-form .status:empty {
  display: none;
}

.ai-search-sources-label {
  margin: 0.35rem 0 0.05rem;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ai-evidence {
  display: grid;
  gap: 0.35rem;
}

.ai-evidence-label {
  margin: 0;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.doc-snippet mark {
  border-radius: 0.25rem;
  background: rgba(234, 155, 63, 0.24);
  color: inherit;
  padding: 0 0.12em;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.8rem;
  align-items: end;
  width: 100%;
}

.doc-list,
.download-list {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.files-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.32rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  min-height: 3.05rem;
}

.files-filter-btn {
  border: 1px solid transparent;
  border-radius: calc(var(--radius-md) - 2px);
  background: transparent;
  color: var(--slate);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.48rem 0.72rem;
  cursor: pointer;
}

.files-filter-btn:hover,
.files-filter-btn:focus-visible {
  color: var(--ink);
  background: rgba(23, 111, 102, 0.08);
  outline: none;
}

.files-filter-btn.is-active {
  border-color: rgba(23, 111, 102, 0.2);
  background: rgba(23, 111, 102, 0.12);
  color: var(--teal);
}

.files-filter-upload-btn {
  margin-left: auto;
  border: 1px solid #0d171f;
  border-radius: calc(var(--radius-md) - 2px);
  background: #0d171f;
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.48rem 0.86rem;
  cursor: pointer;
}

.files-filter-upload-btn:hover,
.files-filter-upload-btn:focus-visible {
  background: #173c40;
  outline: none;
}

@media (max-width: 640px) {
  .files-filter-upload-btn {
    width: 100%;
    margin-left: 0;
  }
}

.doc-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
  background: #fff;
}

.doc-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.doc-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.doc-subtitle,
.doc-snippet,
.doc-error {
  margin: 0;
  color: var(--slate);
  font-size: 0.94rem;
}

.doc-error { color: var(--danger); }

.doc-status {
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.7rem;
  background: color-mix(in srgb, var(--gold) 12%, var(--fog));
  border: 1px solid color-mix(in srgb, var(--gold) 34%, rgba(15, 22, 32, 0.14));
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: capitalize;
}

.doc-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.download-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 0.42rem 0.58rem;
  min-height: 0;
}

.recent-file-item .actions .btn {
  box-shadow: none;
}

.recent-files-reminder {
  margin: 0;
  font-size: 0.94rem;
}

.recent-files-link {
  color: var(--teal);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.storage-overview {
  display: grid;
  grid-template-columns: minmax(18rem, 0.85fr) minmax(0, 1.15fr);
  gap: 1rem;
  align-items: stretch;
}

.storage-total-card,
.storage-card,
.storage-breakdown-card {
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(15, 22, 32, 0.05);
}

.storage-total-card {
  display: grid;
  align-content: center;
  gap: 0.65rem;
  padding: 1.1rem;
}

.storage-total-card h3,
.storage-card h3 {
  margin: 0;
  color: var(--ink);
}

.storage-total-card p {
  margin: 0;
  color: var(--slate);
}

.storage-meter-large {
  height: 0.65rem;
}

.storage-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.storage-breakdown-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem;
}

.storage-breakdown-card span,
.section-kicker,
.storage-type-badge {
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.storage-breakdown-card strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.storage-breakdown-card p {
  margin: 0;
  color: var(--slate);
  font-size: 0.9rem;
  line-height: 1.4;
}

.storage-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  gap: 1rem;
}

.storage-card {
  min-width: 0;
  padding: 1rem;
}

.storage-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.section-kicker {
  margin: 0 0 0.25rem;
}

.storage-item-list,
.storage-suggestion-list {
  display: grid;
  gap: 0.65rem;
}

.storage-item,
.storage-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem;
  border: 1px solid rgba(15, 22, 32, 0.08);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.8);
}

.storage-item-main {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

.storage-item strong,
.storage-suggestion strong {
  color: var(--ink);
}

.storage-item p,
.storage-suggestion p {
  margin: 0;
  color: var(--slate);
  font-size: 0.9rem;
  line-height: 1.4;
}

.storage-type-badge {
  letter-spacing: 0.1em;
}

.storage-suggestion {
  align-items: flex-start;
  display: grid;
  gap: 0.3rem;
}

.storage-suggestion span {
  color: var(--teal);
  font-weight: 800;
}

.admin-usage-table-shell {
  overflow-x: auto;
}

.admin-usage-table {
  min-width: 980px;
}

.admin-usage-table tbody tr {
  cursor: pointer;
}

.records-admin-workspace {
  gap: 1.1rem;
}

.records-admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.7fr) minmax(560px, 1.3fr);
  gap: 1rem;
  align-items: start;
}

.records-admin-selector,
.records-admin-selected {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.records-admin-org-list {
  display: grid;
  gap: 0.55rem;
}

.records-admin-org-item {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  border: 1px solid rgba(15, 22, 32, 0.08);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  padding: 0.82rem 0.9rem;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.records-admin-org-item:hover,
.records-admin-org-item:focus-visible,
.records-admin-org-item.is-selected {
  border-color: rgba(23, 111, 102, 0.28);
  background:
    radial-gradient(280px 130px at 0% 0%, rgba(23, 111, 102, 0.1), transparent 65%),
    #ffffff;
  box-shadow: 0 12px 28px rgba(15, 22, 32, 0.08);
  outline: none;
}

.records-admin-org-main,
.records-admin-org-meta {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.records-admin-org-main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.records-admin-org-main span,
.records-admin-org-meta {
  color: var(--slate);
  font-size: 0.84rem;
}

.records-admin-org-main span,
.records-admin-org-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-subhead {
  display: grid;
  gap: 0.2rem;
}

.admin-subhead h4,
.admin-subhead p,
.selected-organization-head h3,
.selected-organization-head p {
  margin: 0;
}

.admin-subhead h4 {
  color: var(--ink);
  font-size: 1rem;
}

.admin-subhead p,
.selected-organization-head p:not(.auth-kicker) {
  color: var(--slate);
}

.selected-organization-head,
.selected-support-form {
  border: 1px solid rgba(15, 22, 32, 0.08);
  border-radius: var(--radius-md);
  background:
    radial-gradient(360px 160px at 0% 0%, rgba(23, 111, 102, 0.1), transparent 62%),
    #fbfcfd;
  padding: 1rem;
}

.selected-organization-head {
  display: flex;
  min-height: 0;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.selected-organization-head h3 {
  font-size: 1.25rem;
}

.records-admin-selected #organization-form {
  border: 1px solid rgba(15, 22, 32, 0.08);
  border-radius: var(--radius-md);
  background: #fbfcfd;
  padding: 1rem;
}

.admin-usage-table small {
  color: var(--slate);
  font-size: 0.78rem;
}

.admin-usage-metric {
  display: grid;
  gap: 0.32rem;
  min-width: 7.5rem;
}

.admin-usage-metric strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.admin-usage-meter {
  overflow: hidden;
  width: 100%;
  height: 0.38rem;
  border-radius: 999px;
  background: rgba(15, 22, 32, 0.08);
}

.admin-usage-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.admin-usage-metric.is-near .admin-usage-meter span {
  background: var(--gold);
}

.admin-usage-metric.is-over .admin-usage-meter span {
  background: var(--danger);
}

.admin-usage-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 8rem;
}

.admin-usage-flag {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  padding: 0.25rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 22, 32, 0.1);
  background: rgba(15, 22, 32, 0.04);
  color: var(--slate);
  font-size: 0.74rem;
  font-weight: 800;
}

.admin-usage-flag.is-clear {
  border-color: rgba(23, 111, 102, 0.18);
  background: rgba(23, 111, 102, 0.08);
  color: var(--teal);
}

.admin-usage-flag.is-near {
  border-color: rgba(234, 155, 63, 0.32);
  background: rgba(234, 155, 63, 0.12);
  color: #81500b;
}

.admin-usage-flag.is-over {
  border-color: rgba(176, 54, 54, 0.28);
  background: rgba(176, 54, 54, 0.1);
  color: var(--danger);
}

.file-row {
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.file-row:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 111, 102, 0.22);
  box-shadow: 0 16px 28px rgba(12, 18, 28, 0.07);
}

.file-row:focus-visible {
  outline: 2px solid rgba(23, 111, 102, 0.4);
  outline-offset: 2px;
}

.file-row-main {
  min-width: 0;
}

.file-row-actions {
  justify-self: end;
  align-items: center;
}

.file-row-controls {
  position: relative;
  justify-self: end;
  display: flex;
  align-items: center;
}

.file-row-menu-toggle {
  display: none;
}

.file-row-actions .btn {
  padding: 0.4rem 0.62rem;
  box-shadow: none;
  font-size: 0.84rem;
}

.btn-delete-solid {
  border-color: #a82e42;
  background: #a82e42;
  color: #ffffff;
}

.btn-delete-solid:hover,
.btn-delete-solid:focus-visible {
  border-color: #92283a;
  background: #92283a;
  color: #ffffff;
}

.danger-zone {
  margin-top: 1.15rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(15, 22, 32, 0.08);
  display: grid;
  gap: 0.9rem;
}

.danger-zone-kicker {
  margin: 0 0 0.22rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: #a82e42;
}

.danger-zone-text {
  margin: 0;
  color: var(--slate);
}

.download-name {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  font-size: 0.98rem;
}

.download-meta {
  margin: 0.08rem 0 0;
  color: var(--slate);
  font-size: 0.86rem;
  line-height: 1.1;
}

.empty {
  margin: 0;
  color: var(--slate);
}

code.inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--fog);
  padding: 0.14rem 0.35rem;
  border-radius: 6px;
}

.auth-panel {
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 0.85fr);
  gap: 1.15rem;
  align-items: stretch;
}

.auth-intro {
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  color: var(--white);
  background:
    radial-gradient(500px 240px at 15% 18%, rgba(23, 111, 102, 0.36), transparent 58%),
    radial-gradient(360px 220px at 88% 14%, rgba(234, 155, 63, 0.28), transparent 55%),
    linear-gradient(145deg, #0f1721 0%, #152131 52%, #101a26 100%);
  display: grid;
  gap: 1.2rem;
  min-height: 100%;
}

.auth-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.auth-intro h2 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.05;
}

.auth-intro p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  max-width: 34ch;
}

.auth-points {
  display: grid;
  gap: 0.75rem;
  margin-top: auto;
}

.auth-point {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.9rem 1rem;
}

.auth-point-title {
  margin: 0 0 0.15rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 700;
}

.auth-point-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.96rem;
}

.auth-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 42px rgba(12, 18, 28, 0.08);
  padding: clamp(1.25rem, 2.2vw, 1.7rem);
  display: grid;
  gap: 1rem;
  align-content: start;
}

.auth-card-head {
  display: grid;
  gap: 0.35rem;
}

.auth-card-head h3 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.55rem;
}

.auth-card-head p {
  margin: 0;
  color: var(--slate);
}

.auth-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: #e9ecef;
  border: 1px solid rgba(15, 22, 32, 0.08);
}

.auth-toggle-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1rem;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.auth-toggle-btn.is-active {
  background: #123a33;
  color: var(--white);
  box-shadow: 0 10px 22px rgba(12, 18, 28, 0.14);
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.signup-mode-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 18px;
  background: #e9ecef;
  border: 1px solid rgba(15, 22, 32, 0.08);
}

.signup-mode-toggle .auth-toggle-btn {
  padding: 0.62rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.15;
}

.route-status {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 120px);
}

.route-card {
  width: min(520px, calc(100vw - 2rem));
  text-align: center;
}

.embed-body {
  min-height: auto;
  background:
    radial-gradient(760px 360px at 8% 10%, rgba(23, 111, 102, 0.1), transparent 58%),
    linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
}

.embed-shell {
  width: min(1120px, calc(100vw - 1.4rem));
  margin: 0 auto;
  padding: 0.7rem 0;
}

.embed-head {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.35rem;
}

.embed-head::after {
  content: "";
  width: 88px;
  height: 3px;
  border-radius: 999px;
  background: var(--teal);
  opacity: 0.9;
}

:root[data-embed-accent="on"] .embed-head::after {
  background: linear-gradient(90deg, var(--teal) 0%, var(--gold) 100%);
}

.embed-head h1 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
}

.embed-head-copy {
  margin: 0.15rem 0 0;
  color: var(--slate);
}

.embed-powered-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  display: flex;
  justify-content: center;
  padding: 1.4rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(237, 242, 247, 0) 0%, rgba(237, 242, 247, 0.92) 48%, rgba(237, 242, 247, 0.98) 100%);
  pointer-events: none;
}

.embed-powered-footer a {
  display: inline-block;
  color: var(--teal);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
}

.embed-powered-footer a:hover,
.embed-powered-footer a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.embed-records-list {
  display: grid;
  gap: 0.75rem;
}

.embed-record-card {
  border: 1px solid rgba(15, 22, 32, 0.12);
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 0.95rem 1rem;
  display: grid;
  gap: 0.8rem;
  box-shadow: 0 10px 24px rgba(15, 22, 32, 0.06);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

:root[data-embed-accent="on"] .embed-record-card {
  border: 1px solid color-mix(in srgb, var(--gold) 22%, rgba(15, 22, 32, 0.12));
  background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 4%, #ffffff) 0%, #ffffff 100%);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--gold) 10%, transparent);
}

.embed-record-card:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 111, 102, 0.22);
  box-shadow: 0 14px 28px rgba(15, 22, 32, 0.08);
}

.embed-record-card:focus-visible {
  outline: 2px solid rgba(23, 111, 102, 0.32);
  outline-offset: 2px;
}

:root[data-embed-accent="on"] .embed-record-card:hover {
  border-color: color-mix(in srgb, var(--gold) 38%, rgba(15, 22, 32, 0.12));
  box-shadow: 0 14px 28px color-mix(in srgb, var(--gold) 14%, transparent);
}

.embed-record-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.embed-record-main {
  display: grid;
  gap: 0.7rem;
}

.file-modal-actions .file-modal-link:hover,
.file-modal-actions .file-modal-link:focus-visible,
.file-modal-actions .file-modal-close:hover,
.file-modal-actions .file-modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  outline: none;
}

.embed-record-card mark {
  background: #eef6f4;
  color: inherit;
  border-radius: 0.24rem;
  padding: 0 0.16rem;
}

:root[data-embed-accent="on"] .file-modal-actions .file-modal-link:hover,
:root[data-embed-accent="on"] .file-modal-actions .file-modal-link:focus-visible,
:root[data-embed-accent="on"] .file-modal-actions .file-modal-close:hover,
:root[data-embed-accent="on"] .file-modal-actions .file-modal-close:focus-visible {
  background: color-mix(in srgb, var(--gold) 18%, rgba(255, 255, 255, 0.08));
}

:root[data-embed-accent="on"] .embed-record-card mark {
  background: color-mix(in srgb, var(--gold) 24%, #fff4cf);
}

.file-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(9, 14, 20, 0.72);
  padding: 1.2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  z-index: 40;
}

.file-modal.is-open {
  display: flex;
}

.file-modal-dialog {
  width: min(1080px, 96vw);
  max-height: calc(100vh - 2.4rem);
  max-height: calc(100dvh - 2.4rem);
  min-height: 0;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 26px 70px rgba(12, 18, 28, 0.28);
  border: 1px solid rgba(15, 22, 32, 0.12);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.file-modal-header {
  min-height: 48px;
  padding: 0.48rem 0.75rem 0.48rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  background: #0f141b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.file-modal-title {
  min-width: 0;
  flex: 1;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 0.88rem;
  line-height: 1.2;
  font-weight: 700;
  color: #ffffff;
}

.file-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
  flex: 0 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.file-modal-actions::-webkit-scrollbar {
  display: none;
}

.file-modal-link,
.file-modal-close {
  border: 0;
  border-radius: 8px;
  padding: 0.32rem 0.48rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.84);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 0.88rem;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.file-modal-danger {
  color: #ff9aaa;
}

.file-modal-body {
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
}

.file-modal-frame {
  width: 100%;
  height: min(72vh, calc(100vh - 8.5rem));
  height: min(72dvh, calc(100dvh - 8.5rem));
  min-height: min(520px, calc(100vh - 8.5rem));
  min-height: min(520px, calc(100dvh - 8.5rem));
  border: 0;
  display: block;
}

.document-pdf-dialog {
  width: min(1180px, 96vw);
}

.document-pdf-frame {
  height: min(78vh, calc(100vh - 8.5rem));
  height: min(78dvh, calc(100dvh - 8.5rem));
}

.document-send-dialog {
  width: min(680px, 96vw);
}

.document-send-body {
  display: grid;
  gap: 0.85rem;
  padding: 1.1rem;
}

.document-send-body textarea {
  min-height: 130px;
  resize: vertical;
}

.document-send-options {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.document-send-contact-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.document-send-recipient-group {
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: var(--radius-sm);
  background: #ffffff;
  overflow: hidden;
}

.document-send-recipient-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  list-style: none;
}

.document-send-recipient-summary::before {
  content: "+";
  display: inline-grid;
  width: 1.4rem;
  height: 1.4rem;
  place-items: center;
  border: 1px solid rgba(15, 22, 32, 0.14);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1;
  flex: 0 0 auto;
}

.document-send-recipient-group[open] > .document-send-recipient-summary::before {
  content: "-";
}

.document-send-recipient-summary::-webkit-details-marker {
  display: none;
}

.document-send-recipient-summary span {
  flex: 1;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.document-send-recipient-summary small {
  color: var(--slate);
  letter-spacing: 0;
}

.document-send-select-all {
  padding: 0.45rem 0.7rem;
  min-height: auto;
}

.document-send-recipient-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.55rem;
  padding: 0 0.75rem 0.75rem;
}

.document-send-contact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.document-send-contact input {
  width: auto;
}

.document-send-contact span {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.document-send-contact small {
  color: var(--slate);
  overflow-wrap: anywhere;
}

.document-send-option {
  display: inline-flex;
  gap: 0.45rem;
  align-items: flex-start;
  color: var(--ink);
  font-weight: 700;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.document-send-option input {
  width: auto;
  margin-top: 0.2rem;
}

.document-send-option span {
  display: grid;
  gap: 0.12rem;
}

.document-send-option small {
  color: var(--slate);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.document-send-note {
  margin: 0;
  color: var(--slate);
  font-size: 0.9rem;
}

.document-send-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.messages-compose {
  display: grid;
  gap: 1rem;
}

.messages-compose-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 1rem;
  align-items: start;
}

.messages-compose-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.messages-page-header,
.messages-section-head,
.messages-compose-card-head {
  display: grid;
  gap: 0.35rem;
}

.messages-page-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
}

.messages-page-header h1,
.messages-page-header p,
.messages-section-head h2,
.messages-section-head p,
.messages-compose-card-head h3,
.messages-compose-card-head p {
  margin: 0;
}

.messages-page-header h1,
.messages-section-head h2 {
  font-family: "Fraunces", "Times New Roman", serif;
}

.messages-page-kicker,
.messages-section-kicker {
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.messages-page-header > div > p:last-child,
.messages-section-head > div > p:last-child,
.messages-compose-card-head p {
  color: var(--slate);
}

.messages-compose-card textarea {
  min-height: 260px;
  resize: vertical;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(9, 14, 20, 0.64);
  padding: 1.2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  z-index: 60;
}

.confirm-modal.is-open {
  display: flex;
}

.recording-processing-modal {
  z-index: 75;
}

.recording-processing-modal .confirm-modal-dialog {
  width: min(500px, 96vw);
}

.recording-processing-modal .upload-progress {
  padding: 1rem;
  border: 1px solid rgba(23, 111, 102, 0.18);
  border-radius: 14px;
  background: rgba(23, 111, 102, 0.05);
}

.confirm-modal-dialog {
  width: min(460px, 96vw);
  max-height: calc(100vh - 2.4rem);
  max-height: calc(100dvh - 2.4rem);
  min-height: 0;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(15, 22, 32, 0.12);
  box-shadow: 0 26px 70px rgba(12, 18, 28, 0.24);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.confirm-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.1rem 0.85rem;
  border-bottom: 1px solid rgba(15, 22, 32, 0.08);
  background:
    radial-gradient(240px 130px at 10% 12%, rgba(168, 46, 66, 0.08), transparent 60%),
    linear-gradient(180deg, #fffefb 0%, #f8fafc 100%);
}

.confirm-modal-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: #a82e42;
}

.confirm-modal-title {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1.05;
}

.confirm-modal-body {
  padding: 1rem 1.1rem 1.15rem;
  display: grid;
  gap: 1rem;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.confirm-modal-copy {
  margin: 0;
  color: var(--slate);
  line-height: 1.55;
}

.confirm-modal-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem;
  border: 1px solid rgba(157, 47, 63, 0.18);
  border-radius: 16px;
  background: rgba(157, 47, 63, 0.045);
  color: var(--ink);
}

.confirm-modal-option input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.18rem;
}

.confirm-modal-option strong,
.confirm-modal-option small {
  display: block;
}

.confirm-modal-option strong {
  font-size: 0.95rem;
  line-height: 1.35;
}

.confirm-modal-option small {
  margin-top: 0.25rem;
  color: var(--slate);
  line-height: 1.45;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.speaker-correction-modal {
  --modal-width: 560px;
  z-index: 70;
}

.speaker-correction-modal .confirm-modal-header {
  background:
    radial-gradient(260px 150px at 8% 8%, rgba(23, 111, 102, 0.12), transparent 62%),
    linear-gradient(180deg, #fffefb 0%, #f7faf9 100%);
}

.speaker-correction-modal .confirm-modal-kicker {
  color: var(--teal);
}

.speaker-correction-modal .settings-modal-close {
  flex: 0 0 auto;
}

.speaker-correction-form {
  gap: 0.9rem;
}

.speaker-correction-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.speaker-correction-fieldset legend {
  margin: 0 0 0.5rem;
  padding: 0;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.speaker-correction-options {
  display: grid;
  gap: 0.55rem;
  max-height: min(300px, 34vh);
  overflow-y: auto;
  padding: 2px;
}

.speaker-correction-option {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(15, 22, 32, 0.12);
  border-radius: 15px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.speaker-correction-option-select {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  cursor: pointer;
}

.speaker-correction-option:hover {
  border-color: rgba(23, 111, 102, 0.42);
  background: rgba(23, 111, 102, 0.035);
}

.speaker-correction-option:has(input:checked) {
  border-color: rgba(23, 111, 102, 0.7);
  background: rgba(23, 111, 102, 0.07);
  box-shadow: 0 0 0 2px rgba(23, 111, 102, 0.08);
}

.speaker-correction-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.speaker-correction-option:has(input:focus-visible) {
  outline: 3px solid rgba(23, 111, 102, 0.25);
  outline-offset: 2px;
}

.speaker-correction-marker {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: var(--fog);
  color: var(--slate);
  font-size: 0.8rem;
  font-weight: 800;
}

.speaker-correction-option:has(input:checked) .speaker-correction-marker {
  background: var(--teal);
  color: #ffffff;
}

.speaker-correction-option-copy,
.speaker-correction-option-copy strong,
.speaker-correction-option-copy small {
  display: block;
  min-width: 0;
}

.speaker-correction-option-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.speaker-correction-option-copy small {
  margin-top: 0.18rem;
  color: var(--slate);
  font-size: 0.82rem;
}

.speaker-correction-sample {
  min-width: 6.4rem;
  border: 1px solid rgba(23, 111, 102, 0.24);
  border-radius: 999px;
  padding: 0.52rem 0.7rem;
  background: #ffffff;
  color: var(--teal);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.speaker-correction-sample:hover:not(:disabled),
.speaker-correction-sample:focus-visible,
.speaker-correction-sample.is-playing {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.speaker-correction-sample:focus-visible {
  outline: 3px solid rgba(23, 111, 102, 0.22);
  outline-offset: 2px;
}

.speaker-correction-sample:disabled {
  border-color: rgba(15, 22, 32, 0.1);
  background: var(--fog);
  color: var(--slate);
  cursor: not-allowed;
  opacity: 0.7;
}

.speaker-correction-name-field input:focus {
  border-color: rgba(23, 111, 102, 0.62);
  outline: 3px solid rgba(23, 111, 102, 0.13);
}

.speaker-correction-status {
  margin: -0.2rem 0 0;
}

.speaker-correction-modal .confirm-modal-actions {
  padding-top: 0.1rem;
}

.settings-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(9, 14, 20, 0.64);
  padding: 1.2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  z-index: 50;
}

.settings-modal.is-open {
  display: flex;
}

.settings-modal-dialog {
  width: min(560px, 96vw);
  max-height: calc(100vh - 2.4rem);
  max-height: calc(100dvh - 2.4rem);
  min-height: 0;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(15, 22, 32, 0.12);
  box-shadow: 0 26px 70px rgba(12, 18, 28, 0.24);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.settings-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.15rem 0.9rem;
  border-bottom: 1px solid rgba(15, 22, 32, 0.08);
  background:
    radial-gradient(260px 140px at 10% 12%, rgba(23, 111, 102, 0.08), transparent 60%),
    linear-gradient(180deg, #fffefb 0%, #f6f9fc 100%);
}

.settings-modal-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal);
}

.settings-modal-title {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.5rem;
}

.settings-modal-close {
  border: 1px solid rgba(15, 22, 32, 0.12);
  border-radius: var(--radius-pill);
  padding: 0.65rem 1rem;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.settings-modal-body {
  padding: 1.1rem 1.15rem 1.2rem;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Shared modal system: consistent shell, scroll body, mobile-safe sizing. */
.file-modal,
.settings-modal,
.confirm-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.2rem);
  overflow: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.file-modal {
  --modal-width: 1080px;
  --modal-radius: 22px;
  --modal-shadow: 0 26px 70px rgba(12, 18, 28, 0.28);
  background: rgba(9, 14, 20, 0.72);
  z-index: 40;
}

.settings-modal {
  --modal-width: 640px;
  --modal-radius: 22px;
  --modal-shadow: 0 26px 70px rgba(12, 18, 28, 0.24);
  background: rgba(9, 14, 20, 0.64);
  z-index: 50;
}

.confirm-modal {
  --modal-width: 460px;
  --modal-radius: 22px;
  --modal-shadow: 0 26px 70px rgba(12, 18, 28, 0.24);
  background: rgba(9, 14, 20, 0.64);
  z-index: 60;
}

#recording-transfer-modal {
  --modal-width: 620px;
}

.recording-transfer-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.recording-transfer-option {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(15, 22, 32, 0.14);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.recording-transfer-option span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.recording-transfer-option.is-active {
  border-color: var(--teal);
  background: rgba(23, 111, 102, 0.08);
  box-shadow: 0 0 0 1px var(--teal);
}

#recording-transfer-pending {
  margin: 0.85rem 0 0;
}

#recording-transfer-pending p {
  margin: 0.35rem 0 0.8rem;
}

.record-transfer-page-panel {
  width: min(720px, 100%);
  margin: 2rem auto;
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.record-transfer-page-panel > h1 {
  margin: 0.4rem 0 0.55rem;
}

.record-transfer-summary {
  margin-top: 1.4rem;
}

.record-transfer-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.3rem;
}

.record-transfer-summary dl > div {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: 12px;
  background: rgba(15, 22, 32, 0.025);
}

.record-transfer-summary dt {
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.record-transfer-summary dd {
  margin: 0.35rem 0 0;
  color: var(--ink);
  font-weight: 700;
}

.record-transfer-warning {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(23, 111, 102, 0.08);
}

.record-transfer-warning p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 620px) {
  .recording-transfer-options {
    grid-template-columns: 1fr;
  }

  .record-transfer-summary dl {
    grid-template-columns: 1fr;
  }
}

.file-modal.is-open,
.settings-modal.is-open,
.confirm-modal.is-open {
  display: flex;
}

body:has(.file-modal.is-open),
body:has(.settings-modal.is-open),
body:has(.confirm-modal.is-open) {
  overflow: hidden;
}

.file-modal-dialog,
.settings-modal-dialog,
.confirm-modal-dialog {
  width: min(var(--modal-width), 100%);
  max-height: calc(100vh - clamp(1.5rem, 4vw, 2.4rem));
  max-height: calc(100dvh - clamp(1.5rem, 4vw, 2.4rem));
  min-height: 0;
  background: #ffffff;
  border-radius: var(--modal-radius);
  border: 1px solid rgba(15, 22, 32, 0.12);
  box-shadow: var(--modal-shadow);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.file-modal-header,
.settings-modal-header,
.confirm-modal-header {
  flex: 0 0 auto;
  min-width: 0;
}

.file-modal-body,
.settings-modal-body,
.confirm-modal-body,
.document-send-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#recording-detail-modal .settings-modal-dialog,
#app-input-modal .settings-modal-dialog,
#invite-email-modal .settings-modal-dialog,
#document-send-modal .file-modal-dialog {
  --modal-width: 720px;
}

#document-pdf-modal .file-modal-dialog,
#file-modal .file-modal-dialog,
#embed-file-modal .file-modal-dialog {
  --modal-width: 1180px;
}

.settings-modal-body > .actions,
.confirm-modal-actions,
.document-send-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0 -1.1rem -1.1rem;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid rgba(15, 22, 32, 0.08);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.records-messages-page .document-send-actions {
  position: static;
  bottom: auto;
  z-index: auto;
  margin: 0;
  padding: 0.25rem 0 0;
  border-top: 0;
  background: transparent;
  backdrop-filter: none;
}

.settings-modal-body > .actions {
  justify-content: flex-end;
}

.shared-document-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 16%, rgba(22, 111, 102, 0.14), transparent 28rem),
    linear-gradient(180deg, #f8fafc 0%, #eef3f7 100%);
}

.shared-document-topbar {
  background: linear-gradient(115deg, #08121b 0%, #07101a 58%, #2a1b11 100%);
}

.shared-document-main {
  padding-top: 2.2rem;
}

.shared-document-panel {
  max-width: 1120px;
  margin: 0 auto;
  gap: 1.2rem;
}

.shared-document-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.shared-document-head h1 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

.shared-document-head p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.shared-document-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.shared-document-frame-wrap {
  overflow: hidden;
  min-height: 70vh;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #202020;
}

.shared-document-frame {
  display: block;
  width: 100%;
  height: 78vh;
  min-height: 620px;
  border: 0;
  background: #202020;
}

.shared-document-footer {
  justify-content: center;
  border-top: 0;
}

.file-modal-frame {
  height: min(72vh, calc(100vh - 8.5rem));
  height: min(72dvh, calc(100dvh - 8.5rem));
  min-height: min(520px, calc(100vh - 8.5rem));
  min-height: min(520px, calc(100dvh - 8.5rem));
}

#embed-code {
  min-height: 140px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.library-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: center;
}

.documents-shell .main {
  max-width: 1360px;
}

.documents-page-head {
  align-items: center;
}

.document-create-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, auto);
  gap: 0.75rem;
  align-items: center;
}

.document-create-actions,
.document-template-create {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}

.document-create-bar .btn {
  white-space: nowrap;
}

.document-template-create {
  justify-content: flex-end;
}

.document-template-create select {
  min-height: 44px;
  width: min(320px, 100%);
  min-width: 220px;
}

.documents-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.document-sidebar,
.document-editor-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.document-sidebar {
  padding: 0.85rem;
  display: grid;
  gap: 0.75rem;
  max-height: 74vh;
  overflow: auto;
}

.document-list-section {
  display: grid;
  gap: 0.6rem;
}

.document-list-section + .document-list-section {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(15, 22, 32, 0.08);
}

.document-list-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.document-list-section-title {
  margin: 0;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.document-list {
  display: grid;
  gap: 0.45rem;
}

.document-list-item {
  display: grid;
  gap: 0.18rem;
  width: 100%;
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 0.65rem 0.7rem;
  text-align: left;
  cursor: pointer;
}

.document-list-item:hover,
.document-list-item.is-active {
  border-color: rgba(23, 111, 102, 0.38);
  background: color-mix(in srgb, var(--teal) 6%, #ffffff);
}

.document-template-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  cursor: default;
}

.document-template-edit {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.document-template-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.document-template-action {
  border: 1px solid rgba(15, 22, 32, 0.12);
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--ink);
  padding: 0.32rem 0.58rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.document-template-action:hover,
.document-template-action:focus-visible {
  border-color: rgba(23, 111, 102, 0.38);
  background: color-mix(in srgb, var(--teal) 8%, #ffffff);
}

.document-template-action.danger {
  color: var(--danger);
  border-color: rgba(168, 46, 66, 0.28);
}

.document-template-action.danger:hover,
.document-template-action.danger:focus-visible {
  background: rgba(168, 46, 66, 0.08);
}

.document-list-title {
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.document-list-meta {
  color: var(--slate);
  font-size: 0.82rem;
  text-transform: capitalize;
}

.document-editor-panel {
  min-height: 74vh;
  display: grid;
}

.document-editor-empty {
  display: grid;
  min-height: 320px;
  place-items: center;
  color: var(--slate);
  padding: 2rem;
}

.document-editor {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem;
}

.document-editor-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 160px);
  gap: 0.75rem;
  align-items: end;
}

.document-toolbar {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.45rem;
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: var(--radius-md);
  background: #f8fafc;
}

.document-toolbar button {
  min-width: 38px;
  min-height: 34px;
  border: 1px solid rgba(15, 22, 32, 0.12);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.document-page {
  min-height: 620px;
  padding: 1.25rem;
  border: 1px solid rgba(15, 22, 32, 0.12);
  border-radius: var(--radius-sm);
  background: #fffefb;
  color: var(--ink);
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.document-page:focus-within {
  outline: 2px solid rgba(23, 111, 102, 0.35);
  outline-offset: 2px;
}

.document-page.is-readonly {
  background: #f8fafc;
}

.document-page .tiptap {
  min-height: 570px;
  outline: none;
}

.document-page .tiptap h1,
.document-page .tiptap h2,
.document-page .tiptap h3,
.document-page .tiptap p {
  margin-top: 0;
}

.document-page .tiptap ul,
.document-page .tiptap ol {
  padding-left: 1.45rem;
}

.document-page .tiptap blockquote {
  margin: 0 0 1rem;
  padding-left: 0.9rem;
  border-left: 3px solid color-mix(in srgb, var(--teal) 45%, rgba(15, 22, 32, 0.12));
  color: var(--slate);
}

.document-page .tiptap table {
  width: 100%;
  margin: 0 0 1rem;
  border-collapse: collapse;
  table-layout: fixed;
}

.document-page .tiptap th,
.document-page .tiptap td {
  position: relative;
  min-width: 1.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(15, 22, 32, 0.22);
  vertical-align: top;
}

.document-page .tiptap th {
  background: #eef6f5;
  font-weight: 800;
}

.document-page .tiptap .selectedCell::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  content: "";
  background: rgba(23, 111, 102, 0.14);
}

.document-toolbar button.is-active {
  border-color: rgba(23, 111, 102, 0.36);
  background: color-mix(in srgb, var(--teal) 12%, #ffffff);
  color: var(--teal);
}

.document-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.document-editor-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

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

  .topbar,
  .document-sidebar,
  .document-create-bar,
  .document-toolbar,
  .document-editor-actions,
  .documents-page-head,
  #documents-library-context,
  #documents-status,
  #document-editor-status {
    display: none !important;
  }

  .shell,
  .main,
  .panel,
  .documents-workspace,
  .document-editor-panel,
  .document-editor {
    display: block;
    max-width: none;
    padding: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .document-page {
    min-height: 0;
    border: 0;
    padding: 0;
    background: #ffffff;
  }

  .document-page .tiptap {
    min-height: 0;
  }
}

.library-action-slot .btn,
.library-action-slot .button-link {
  width: 100%;
}

@media (max-width: 1080px) {
  .document-create-bar {
    grid-template-columns: 1fr;
  }

  .document-template-create {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .records-document-builder-page .documents-page {
    height: auto;
    overflow: visible;
  }

  .messages-page-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .messages-back-link {
    justify-self: start;
  }

  .grid-3,
  .search-row,
  .library-actions-grid,
  .documents-workspace,
  .messages-compose-grid,
  .document-editor-top,
  .account-list,
  .auth-layout,
  .plan-grid,
  .billing-meta-grid,
  .current-plan-usage,
  .current-plan-card,
  .storage-overview,
  .storage-breakdown-grid,
  .storage-two-column,
  .embed-access-card {
    grid-template-columns: 1fr;
  }

  #account-library-card .account-list {
    grid-template-columns: 1fr;
  }

  .library-logo-settings {
    grid-template-columns: 1fr;
  }

  .library-context-head {
    grid-template-columns: 1fr;
  }

  .document-create-actions,
  .document-template-create,
  .document-template-create select,
  .document-template-create .btn {
    width: 100%;
  }

  .document-create-actions .btn {
    width: 100%;
  }

  #contact-form .grid-2 {
    grid-template-columns: 1fr;
  }

  .document-template-item {
    grid-template-columns: 1fr;
  }

  .storage-item {
    align-items: stretch;
    flex-direction: column;
  }

  .storage-item .btn {
    width: 100%;
  }

  .records-admin-layout {
    grid-template-columns: 1fr;
  }

  .selected-organization-head {
    display: grid;
  }

  .selected-organization-head .btn {
    width: 100%;
  }

  .document-template-actions {
    width: 100%;
  }

  .document-template-action {
    flex: 1;
  }

  .auth-intro p {
    max-width: none;
  }

  .file-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0.5rem;
  }

  .file-row-controls {
    width: 100%;
    align-items: center;
    flex-direction: row;
    justify-content: flex-end;
    gap: 0.35rem;
  }

  .file-row-menu-toggle {
    display: inline-flex;
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
    box-shadow: none;
  }

  .file-row-actions {
    display: none;
    position: static;
    width: 100%;
    justify-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.28rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .file-row-controls.is-open .file-row-actions {
    display: flex;
  }

  .file-row-actions .btn {
    flex: 0 0 auto;
    justify-content: center;
    padding: 0.42rem 0.58rem;
    font-size: 0.82rem;
    white-space: nowrap;
    line-height: 1.1;
  }

  .file-row-main {
    flex: 1 1 auto;
    min-width: 0;
  }

  .file-row.is-actions-open .file-row-main {
    display: block;
  }

  .current-plan-actions {
    justify-content: flex-start;
  }

  .download-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .download-meta {
    display: none;
  }
}

/* iOS zooms the viewport when a focused form control renders below 16px. */
@media (max-width: 980px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  textarea,
  select,
  [contenteditable="true"] {
    font-size: 16px !important;
  }
}

.voice-profile-overview {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1.55fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(23, 111, 102, 0.18);
  border-radius: 12px;
  background: rgba(23, 111, 102, 0.055);
}

.voice-profile-overview p {
  margin: 0;
}

.voice-profile-overview > p {
  color: var(--slate);
  font-size: 0.88rem;
  line-height: 1.6;
}

.voice-profile-count {
  margin-top: 0.25rem !important;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
}

.voice-profile-status,
.voice-profile-you {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.voice-profile-status {
  color: #77551c;
  background: rgba(234, 155, 63, 0.16);
}

.voice-profile-status.is-enrolled {
  color: #0c655b;
  background: rgba(23, 111, 102, 0.12);
}

.voice-profile-status.is-processing {
  color: #315e85;
  background: rgba(67, 135, 190, 0.13);
}

.voice-profile-status.is-failed {
  color: #8a2c3c;
  background: rgba(168, 46, 66, 0.12);
}

.voice-profile-you {
  margin-left: 0.45rem;
  color: var(--teal);
  background: rgba(23, 111, 102, 0.1);
}

.voice-profile-enroll:disabled {
  cursor: default;
  opacity: 0.62;
}

.voice-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.voice-profile-actions .btn {
  min-height: 36px;
  padding: 0.45rem 0.7rem;
  font-size: 0.72rem;
}

.voice-enrollment-card {
  display: grid;
  gap: 1.15rem;
  margin-top: 1.35rem;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  border: 1px solid rgba(23, 111, 102, 0.2);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(7, 12, 18, 0.06);
}

.voice-enrollment-card.hidden {
  display: none;
}

.voice-enrollment-head {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: start;
}

.voice-enrollment-head h5,
.voice-enrollment-head p {
  margin: 0;
}

.voice-enrollment-head h5 {
  color: var(--ink);
  font-size: 1.1rem;
}

.voice-enrollment-head h5 + p {
  margin-top: 0.35rem;
  color: var(--slate);
  font-size: 0.88rem;
}

.voice-enrollment-script {
  margin: 0;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--teal);
  border-radius: 0 9px 9px 0;
  color: var(--ink);
  background: rgba(23, 111, 102, 0.055);
  font-size: 0.98rem;
  line-height: 1.7;
}

.voice-recorder-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.voice-record-timer {
  min-width: 3rem;
  color: var(--slate);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.voice-record-preview {
  width: min(100%, 520px);
}

.voice-consent-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  color: var(--slate);
  font-size: 0.78rem;
  line-height: 1.55;
}

.voice-consent-check input {
  margin-top: 0.2rem;
}

.voice-profile-privacy-note {
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .voice-profile-overview {
    grid-template-columns: 1fr;
  }

  .voice-enrollment-head {
    display: grid;
  }

  .voice-enrollment-head .btn {
    justify-self: start;
  }
}

/* Meeting Notes uses the same focused library-and-workspace model as Documents and Communication. */
.records-meeting-notes-page .meeting-notes-page {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.records-meeting-notes-page .meeting-notes-workspace {
  display: grid;
  grid-template-columns: minmax(290px, 340px) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #eef2f5;
}

.records-meeting-notes-page .meeting-library-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid rgba(15, 22, 32, 0.1);
  background: #fff;
}

.records-meeting-notes-page .meeting-library-sidebar-head {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.25rem 1.1rem;
  border-bottom: 1px solid rgba(15, 22, 32, 0.1);
}

.records-meeting-notes-page .meeting-library-sidebar-head .meeting-notes-section-kicker {
  margin-bottom: 0.35rem;
}

.records-meeting-notes-page .meeting-library-sidebar-head h2 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.records-meeting-notes-page .meeting-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #edf6f4;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
}

.records-meeting-notes-page .meeting-notes-library-context {
  flex: 0 0 auto;
  gap: 0.9rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(15, 22, 32, 0.1);
}

.records-meeting-notes-page .meeting-notes-library-context .field {
  gap: 0.3rem;
}

.records-meeting-notes-page .meeting-notes-library-context label,
.records-meeting-notes-page .meeting-notes-library-context .field-title,
.records-meeting-notes-page .meeting-library-tools label {
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.records-meeting-notes-page .meeting-notes-library-context select {
  min-height: 44px;
  border-radius: 9px;
  background: #f3f6fa;
}

.records-meeting-notes-page .meeting-library-access {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 0.65rem;
}

.records-meeting-notes-page .meeting-library-new-button {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  width: auto;
  margin: 1rem 1.25rem;
  padding: 0.85rem 0.9rem 0.85rem 1rem;
  border: 1px solid #0d171f;
  border-radius: 12px;
  background: #0d171f;
  color: #fff;
  text-align: left;
  box-shadow: 0 12px 28px rgba(8, 16, 24, 0.12);
}

.records-meeting-notes-page .meeting-library-new-button > span:first-child {
  display: grid;
  gap: 0.22rem;
}

.records-meeting-notes-page .meeting-library-new-button strong {
  color: inherit;
  font-size: 0.96rem;
}

.records-meeting-notes-page .meeting-library-new-button small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
}

.records-meeting-notes-page .meeting-library-new-button .meeting-note-toggle-action {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.records-meeting-notes-page .meeting-library-new-button .meeting-note-toggle-label {
  display: none;
}

.records-meeting-notes-page .meeting-library-new-button .section-toggle-indicator {
  width: 34px;
  height: 34px;
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.records-meeting-notes-page .meeting-library-new-button.is-open {
  border-color: rgba(15, 22, 32, 0.14);
  background: #edf6f4;
  color: #123c37;
  box-shadow: none;
}

.records-meeting-notes-page .meeting-library-new-button.is-open small {
  color: #61716f;
}

.records-meeting-notes-page .meeting-library-new-button.is-open .section-toggle-indicator {
  border-color: rgba(15, 22, 32, 0.12);
  color: #123c37;
}

.records-meeting-notes-page #recordings-library-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 0 1.25rem 1.75rem;
  border: 0;
  background: #fff;
  overscroll-behavior: contain;
}

.records-meeting-notes-page .meeting-library-tools {
  position: sticky;
  z-index: 2;
  top: 0;
  display: grid;
  gap: 0.45rem;
  padding: 0.35rem 0 0.9rem;
  background: #fff;
}

.records-meeting-notes-page .meeting-library-tools input {
  min-height: 46px;
  border-radius: 9px;
  background: #f3f6fa;
}

.records-meeting-notes-page .recordings-list {
  display: grid;
  gap: 0.2rem;
}

.records-meeting-notes-page .recording-row {
  display: block;
  padding: 0.9rem 0.75rem;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.records-meeting-notes-page .recording-row:hover,
.records-meeting-notes-page .recording-row:focus-visible {
  border-left-color: var(--teal);
  background: #edf6f4;
  outline: none;
}

.records-meeting-notes-page .recording-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: start;
}

.records-meeting-notes-page .recording-row-title {
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.records-meeting-notes-page .recording-row-meta {
  margin: 0.25rem 0 0;
  color: var(--slate);
  font-size: 0.74rem;
}

.records-meeting-notes-page .recording-row-status {
  padding: 0.25rem 0.45rem;
  font-size: 0.58rem;
  white-space: nowrap;
}

.records-meeting-notes-page .recording-row-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.7rem;
  margin-top: 0.55rem;
  color: var(--slate);
  font-size: 0.68rem;
}

.records-meeting-notes-page .recording-row-details span:nth-child(n + 3):not(.recording-transcript-badge) {
  display: none;
}

.records-meeting-notes-page .recording-row-note {
  margin: 0.5rem 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
}

.records-meeting-notes-page #recordings-empty,
.records-meeting-notes-page #recordings-list-status {
  padding: 1rem 0.75rem;
  color: var(--slate);
  font-size: 0.78rem;
}

.records-meeting-notes-page .meeting-note-editor-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #eef2f5;
  box-shadow: none;
  overscroll-behavior: contain;
}

.records-meeting-notes-page .meeting-editor-empty {
  display: grid;
  flex: 1 1 auto;
  place-content: center;
  justify-items: center;
  min-height: 520px;
  padding: 3rem;
  text-align: center;
}

.records-meeting-notes-page .meeting-editor-empty.hidden {
  display: none;
}

.records-meeting-notes-page .meeting-empty-icon {
  display: grid;
  gap: 7px;
  width: 74px;
  height: 82px;
  margin-bottom: 1.4rem;
  padding: 24px 16px 14px;
  border: 1px solid rgba(15, 22, 32, 0.13);
  border-radius: 10px;
  background: #fffdf9;
  box-shadow: 0 14px 34px rgba(15, 22, 32, 0.08);
}

.records-meeting-notes-page .meeting-empty-icon span {
  display: block;
  height: 5px;
  border-radius: 99px;
  background: #d1e4df;
}

.records-meeting-notes-page .meeting-empty-icon span:nth-child(2) {
  width: 78%;
}

.records-meeting-notes-page .meeting-empty-icon span:nth-child(3) {
  width: 56%;
}

.records-meeting-notes-page .meeting-editor-empty h2 {
  max-width: 640px;
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  color: #657183;
  font-size: clamp(2.35rem, 5vw, 4.35rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.records-meeting-notes-page .meeting-editor-empty > p:last-child {
  max-width: 580px;
  margin: 1rem 0 0;
  color: var(--slate);
  font-size: 1rem;
  line-height: 1.55;
}

.records-meeting-notes-page #record-panel-body {
  width: min(100%, 1420px);
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.75rem);
}

@media (min-width: 981px) {
  .records-meeting-notes-page.records-shared-desktop-shell-page .records-desktop-frame > .main {
    overflow: hidden;
    padding: 0;
  }

  .records-meeting-notes-page.records-shared-desktop-shell-page #recordings-panel {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .records-meeting-notes-page.records-shared-desktop-shell-page .records-desktop-page-head {
    display: none;
  }
}

@media (max-width: 860px) {
  .records-meeting-notes-page .meeting-notes-page,
  .records-meeting-notes-page .meeting-notes-workspace,
  .records-meeting-notes-page .meeting-library-sidebar,
  .records-meeting-notes-page .meeting-note-editor-panel {
    height: auto;
    overflow: visible;
  }

  .records-meeting-notes-page .meeting-notes-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .records-meeting-notes-page .meeting-library-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(15, 22, 32, 0.1);
  }

  .records-meeting-notes-page #recordings-library-panel {
    flex: none;
    max-height: 390px;
    overflow-y: auto;
  }

  .records-meeting-notes-page .meeting-editor-empty {
    min-height: 400px;
    padding: 3rem 1.25rem;
  }

  .records-meeting-notes-page .meeting-editor-empty h2 {
    font-size: clamp(2.2rem, 12vw, 3.5rem);
  }

  .records-meeting-notes-page #record-panel-body {
    padding: 1.5rem 1rem 2.5rem;
  }
}

@media (max-width: 640px) {
  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .admin-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .admin-panel-head-row,
  .admin-template-row {
    grid-template-columns: 1fr;
  }

  .admin-template-row .actions {
    justify-content: flex-start;
  }

  .recording-reference-picker,
  .recording-reference-preview-head,
  .recording-reference-row {
    grid-template-columns: 1fr;
  }

  .recording-reference-actions {
    justify-content: flex-start;
  }

  .recording-reference-frame {
    min-height: 420px;
  }

  .login-topbar-row .brand-badge-image {
    width: min(62vw, 220px);
  }

  .topbar-inner,
  .main {
    width: min(100vw - 1.2rem, 1120px);
  }

  .topbar-inner {
    padding: 1rem 0 1.35rem;
  }

  .topbar-row {
    text-align: left;
  }

  .topbar-links {
    justify-content: center;
  }

  .dashboard-topbar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 42px;
    align-items: center;
    gap: 0.75rem;
  }

  .mobile-menu.is-open {
    padding-top: 0.8rem;
  }

  .dashboard-topbar-row .brand {
    min-width: 0;
    justify-self: start;
  }

  .dashboard-topbar-row .brand-badge {
    flex: 0 0 auto;
  }

  .dashboard-topbar-row .brand-badge-image {
    height: 24px;
    max-width: min(58vw, 220px);
  }

  .topbar-logout {
    display: inline-flex;
    justify-self: center;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .profile-settings-button {
    width: auto;
  }

  .library-actions-grid {
    gap: 0.65rem;
  }

  .documents-workspace {
    gap: 0.75rem;
  }

  .document-sidebar {
    max-height: none;
  }

  .document-page {
    min-height: 420px;
    padding: 0.9rem;
  }

  .document-page .tiptap {
    min-height: 370px;
  }

  .library-action-slot .btn {
    padding: 0.68rem 0.7rem;
    font-size: 0.94rem;
  }

  .panel {
    padding: 1.1rem;
  }

  .auth-panel {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .auth-intro,
  .auth-card {
    border-radius: 20px;
  }

  .auth-intro {
    padding: 1.15rem 1.1rem;
    gap: 0.85rem;
    text-align: center;
    justify-items: center;
  }

  .auth-intro h2 {
    font-size: 1.55rem;
  }

  .auth-intro > .stack {
    gap: 0.55rem;
    justify-items: center;
  }

  .auth-intro > .stack p:last-child,
  .auth-points {
    display: none;
  }

  .auth-toggle {
    border-radius: 18px;
  }

  .auth-toggle-btn,
  .auth-toggle-btn.is-active {
    border-radius: 14px;
  }

  .signup-mode-toggle {
    grid-template-columns: 1fr;
  }

  #create-invite-form .grid-2 {
    grid-template-columns: 1fr;
  }

  .file-modal-header {
    align-items: center;
    text-align: left;
  }

  .file-modal,
  .settings-modal,
  .confirm-modal {
    align-items: flex-start;
    padding: 0.7rem;
    padding-top: max(0.7rem, env(safe-area-inset-top, 0px));
    padding-right: max(0.7rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(0.7rem, env(safe-area-inset-bottom, 0px));
    padding-left: max(0.7rem, env(safe-area-inset-left, 0px));
  }

  .file-modal-dialog,
  .settings-modal-dialog,
  .confirm-modal-dialog {
    width: 100%;
    max-height: calc(100vh - 1.4rem);
    max-height: calc(100dvh - 1.4rem);
    border-radius: 18px;
  }

  .file-modal-actions {
    justify-content: flex-end;
  }

  .file-modal-frame {
    height: min(68vh, calc(100vh - 7.5rem));
    height: min(68dvh, calc(100dvh - 7.5rem));
    min-height: min(360px, calc(100vh - 7.5rem));
    min-height: min(360px, calc(100dvh - 7.5rem));
  }

  .embed-search-row {
    grid-template-columns: 1fr;
  }

  .confirm-modal-header {
    flex-direction: column;
    align-items: stretch;
  }

  .confirm-modal-actions {
    justify-content: stretch;
  }

  .confirm-modal-actions .btn {
    flex: 1 1 0;
  }

  .shared-document-main {
    padding-top: 1rem;
  }

  .shared-document-head {
    grid-template-columns: 1fr;
  }

  .shared-document-actions {
    justify-content: stretch;
  }

  .shared-document-actions .btn {
    flex: 1 1 100%;
  }

  .shared-document-frame {
    height: 70vh;
    height: 70dvh;
    min-height: 420px;
  }

}

@media (min-width: 641px) {
  .file-row-controls {
    gap: 0.45rem;
  }

  .dashboard-topbar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.9rem;
  }

  .dashboard-topbar-row .brand {
    min-width: 0;
    justify-self: start;
  }

  .topbar-logout {
    display: inline-flex;
    align-items: center;
    justify-self: end;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .mobile-menu.is-open {
    margin-top: 0.35rem;
  }
}

/* Shared desktop Records shell. The current mobile experience stays unchanged. */
@media (min-width: 981px) {
  body.records-account-page,
  body.records-shared-desktop-shell-page { height: 100vh; overflow: hidden; }
  .records-account-page .shell,
  .records-shared-desktop-shell-page .shell { grid-template-rows: 76px minmax(0, 1fr); height: 100vh; min-height: 0; overflow: hidden; }
  .records-account-page .topbar,
  .records-shared-desktop-shell-page .topbar { position: relative; z-index: 20; height: 76px; background: #070d14; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
  .records-account-page .topbar-inner,
  .records-shared-desktop-shell-page .topbar-inner { width: min(1240px, calc(100vw - 40px)); height: 100%; padding: 0; }
  .records-account-page .topbar-inner > .dashboard-topbar-row,
  .records-shared-desktop-shell-page .topbar-inner > .dashboard-topbar-row,
  .records-account-page .topbar-inner > .mobile-menu,
  .records-shared-desktop-shell-page .topbar-inner > .mobile-menu { display: none !important; }
  .records-desktop-appbar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
  .records-desktop-app-brand { display: inline-flex; align-items: center; gap: 0.68rem; color: #fff; font-size: 0.92rem; font-style: normal; font-weight: 800; letter-spacing: 0.17em; line-height: 1; text-decoration: none; text-transform: uppercase; }
  .records-desktop-app-brand img { width: 34px; height: 34px; object-fit: contain; }
  .records-desktop-app-brand i { width: 1px; height: 25px; margin: 0 0.12rem; background: rgba(255, 255, 255, 0.22); }
  .records-desktop-app-brand strong { color: rgba(255, 255, 255, 0.8); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; }
  .records-desktop-app-actions { display: flex; align-items: center; gap: 0.7rem; }
  .records-desktop-app-actions a,
  .records-desktop-app-actions button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 0.82rem; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 4px; background: rgba(255, 255, 255, 0.05); color: #fff; cursor: pointer; font: 500 0.69rem/1 "Manrope", "Trebuchet MS", sans-serif; letter-spacing: normal; text-decoration: none; text-transform: none; }
  .records-desktop-app-actions a:hover,
  .records-desktop-app-actions a:focus-visible,
  .records-desktop-app-actions button:hover,
  .records-desktop-app-actions button:focus-visible { border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.12); outline: none; }
  .records-desktop-app-actions .records-ai-header-trigger {
    border-color: rgba(105, 210, 196, 0.44);
    background: rgba(29, 121, 110, 0.2);
  }
  .records-desktop-app-actions .records-portal-dashboard-link {
    border-color: rgba(255, 255, 255, 0.88);
    border-radius: 4px;
    background: #fff;
    color: #07101a;
  }
  .records-desktop-app-actions .records-portal-dashboard-link:hover,
  .records-desktop-app-actions .records-portal-dashboard-link:focus-visible {
    border-color: #8fd8ce;
    background: #dff4f0;
    color: #07101a;
  }
  .records-account-page .main { width: 100%; min-height: 0; height: 100%; overflow: hidden; padding: 0; }
  .records-account-page #dashboard-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; box-shadow: none; }
  .records-account-page #dashboard-panel > #support-banner { margin: 1.25rem 1.25rem 0; }

  .records-desktop-workspace { display: grid; flex: 1 1 auto; grid-template-columns: 252px minmax(0, 1fr); min-height: 0; height: 100%; overflow: hidden; }
  .records-desktop-nav { position: relative; align-self: stretch; display: flex; flex-direction: column; gap: 0.65rem; min-height: 0; height: 100%; max-height: none; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; padding: 1.35rem 1rem 2rem; border-right: 1px solid var(--line); background: #fff; }
  .records-desktop-nav-label { margin: 0 0 0.2rem; padding: 0 0.65rem; color: var(--teal); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
  .records-desktop-nav-links { display: grid; gap: 0.16rem; }
  .records-desktop-nav-section { display: grid; gap: 0.35rem; }
  .records-desktop-nav-section > .records-desktop-nav-label { margin-top: 0.55rem; }
  .records-desktop-nav-group-label { margin: 0.7rem 0 0.18rem; padding: 0 0.7rem; color: #8793a0; font-size: 0.61rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
  .records-desktop-nav-section > .records-desktop-nav-group-label:first-child { margin-top: 0; }
  .records-desktop-nav-parent { width: 100%; border: 0; border-radius: 4px; padding: 0.66rem 0.7rem; background: transparent; color: #526170; font: inherit; font-size: 0.88rem; font-weight: 700; text-align: left; }
  .records-desktop-nav-parent-active { background: #e4f2ef; color: #123a33; }
  .records-desktop-nav-submenu { margin-left: 0.35rem; padding-left: 0.55rem; border-left: 2px solid #e4f2ef; }
  .records-desktop-nav-submenu[hidden] { display: none !important; }
  .records-desktop-nav-toggle { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; cursor: pointer; }
  .records-desktop-nav-toggle:hover, .records-desktop-nav-toggle:focus-visible { background: rgba(23, 111, 102, 0.08); color: var(--teal); outline: none; }
  .records-desktop-nav-toggle-icon { display: grid; place-items: center; width: 1.2rem; height: 1.2rem; color: #758290; font-size: 1rem; font-weight: 600; line-height: 1; }
  .records-desktop-nav-manage { padding-bottom: 0.2rem; }
  .records-desktop-nav-manage .records-desktop-nav-group-label { margin-top: 0.65rem; padding-left: 0.7rem; }
  .records-desktop-nav-manage .records-desktop-nav-group-label:first-child { margin-top: 0.25rem; }
  .records-desktop-nav-links > a { border-radius: 4px; color: #526170; font-size: 0.88rem; font-weight: 700; padding: 0.66rem 0.7rem; text-decoration: none; }
  .records-desktop-nav-links > a:hover, .records-desktop-nav-links > a:focus-visible { background: rgba(23, 111, 102, 0.08); color: var(--teal); outline: none; }
  .records-desktop-nav-links > a.is-active { background: #e4f2ef; color: #123a33; }
  .records-desktop-nav-links > button { width: 100%; border: 0; border-radius: 4px; padding: 0.66rem 0.7rem; background: transparent; color: #526170; cursor: pointer; font: inherit; font-size: 0.88rem; font-weight: 700; text-align: left; }
  .records-desktop-nav-links > button:hover, .records-desktop-nav-links > button:focus-visible { background: rgba(23, 111, 102, 0.08); color: var(--teal); outline: none; }
  .records-desktop-nav-links > button.is-active { background: #e4f2ef; color: #123a33; }
  .records-desktop-nav-divider { height: 1px; margin: 0.65rem 0 0.2rem; background: var(--line); }
  .records-desktop-nav-footer { margin-top: auto; padding: 1rem 0.7rem 0; border-top: 1px solid var(--line); }
  .records-desktop-nav-footer span { color: var(--slate); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
  .records-desktop-content { min-width: 0; min-height: 0; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 0 clamp(1.75rem, 4vw, 3.25rem) clamp(2rem, 4vw, 3.25rem); }
  .records-desktop-frame { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 0; height: 100%; overflow: hidden; }
  .records-desktop-frame > .main { width: 100%; max-width: none; min-height: 0; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.75rem, 4vw, 3.25rem) clamp(2rem, 4vw, 3.25rem); }
  .records-shared-desktop-nav { grid-column: 1; }
  .records-desktop-page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; margin: 0 0 1.75rem; padding: 0 0 0.7rem; border-bottom: 1px solid var(--line); }
  .records-desktop-page-head p { justify-self: start; margin: 0; color: var(--teal); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
  .records-desktop-page-head strong { justify-self: center; color: var(--ink); font-size: 0.8rem; font-weight: 800; }
  .records-desktop-page-head span { justify-self: end; color: var(--slate); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }

  .records-messages-page.records-shared-desktop-shell-page .records-desktop-frame > .main {
    padding-top: 0;
  }

  .records-messages-page.records-shared-desktop-shell-page .records-desktop-page-head {
    margin-bottom: 0;
    padding-top: 0.85rem;
  }

  .records-messages-page.records-shared-desktop-shell-page #messages-panel {
    width: min(100%, 1320px);
    margin: 0 auto;
    padding: 0;
    gap: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .records-messages-page .messages-page-header {
    padding: clamp(2rem, 4vw, 3.5rem) 0 2rem;
    border-bottom: 1px solid var(--line);
  }

  .records-messages-page .messages-page-header h1 {
    margin-top: 0.45rem;
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
  }

  .records-messages-page .messages-page-header > div > p:last-child {
    max-width: 680px;
    margin-top: 0.75rem;
    font-size: 0.96rem;
  }

  .records-messages-page .messages-back-link {
    display: none;
  }

  .records-messages-page #messages-no-access-notice {
    margin-top: 1.5rem;
  }

  .records-messages-page .messages-library-context {
    grid-template-columns: minmax(280px, 1.4fr) repeat(2, minmax(150px, 0.65fr));
    gap: clamp(1.5rem, 4vw, 4rem);
    padding: 1.35rem 0;
    border-bottom: 1px solid var(--line);
  }

  .records-messages-page .messages-library-context .field {
    align-content: start;
    gap: 0.38rem;
  }

  .records-messages-page .messages-library-context select {
    min-height: 44px;
    border-radius: 8px;
    background: #ffffff;
  }

  .records-messages-page .messages-library-context .account-value {
    margin: 0;
    padding-top: 0.55rem;
    font-size: 1rem;
  }

  .records-messages-page .messages-section-head {
    padding: clamp(1.8rem, 3vw, 2.65rem) 0 1.35rem;
    border-bottom: 1px solid var(--line);
  }

  .records-messages-page .messages-section-head h2 {
    margin-top: 0.4rem;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .records-messages-page .messages-section-head > div > p:last-child {
    max-width: 720px;
    margin-top: 0.6rem;
    font-size: 0.92rem;
  }

  .records-messages-page .messages-compose {
    padding: 2rem 0 3rem;
  }

  .records-messages-page .messages-compose-grid {
    grid-template-columns: minmax(280px, 0.72fr) minmax(520px, 1.28fr);
    gap: clamp(2rem, 5vw, 5rem);
  }

  .records-messages-page .messages-compose-card {
    align-content: start;
    gap: 1.15rem;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .records-messages-page .messages-content-card {
    padding-left: clamp(2rem, 4vw, 4rem);
    border-left: 1px solid var(--line);
  }

  .records-messages-page .messages-compose-card-head {
    padding-bottom: 0.25rem;
  }

  .records-messages-page .messages-compose-card-head h3 {
    font-size: 1.08rem;
  }

  .records-messages-page .messages-compose-card-head p {
    max-width: 600px;
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .records-messages-page .messages-compose-card input,
  .records-messages-page .messages-compose-card textarea {
    border-radius: 8px;
    background: #ffffff;
  }

  .records-messages-page .messages-compose-card input {
    min-height: 48px;
  }

  .records-messages-page .messages-compose-card textarea {
    min-height: 300px;
  }

  .records-messages-page .document-send-contact-list {
    gap: 0.7rem;
  }

  .records-messages-page .document-send-recipient-group {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
  }

  .records-messages-page .document-send-recipient-summary {
    padding: 0.7rem 0;
  }

  .records-messages-page .document-send-recipient-options {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  .records-messages-page .document-send-contact {
    min-height: 56px;
    padding: 0.65rem 0.15rem;
    border-width: 1px 0 0;
    border-radius: 0;
    background: transparent;
  }

  .records-messages-page .document-send-contact:first-child {
    border-top: 0;
  }

  .records-messages-page .document-send-actions {
    padding-top: 0.25rem;
  }

  .records-messages-page #message-status:empty {
    display: none;
  }

  .records-account-page .admin-tabs { display: none; }
  .records-account-page #library-access-card > .panel-head { display: none; }
  .records-account-page:not(.desktop-account-admin-view) #library-access-card { display: none; }
  .records-account-page.desktop-account-admin-view #account-library-card { display: block; margin-bottom: 1.25rem; }
  .records-account-page.desktop-account-admin-view #account-library-card .selected-library-head,
  .records-account-page.desktop-account-admin-view #account-library-card .account-list { display: none; }
  .records-account-page.desktop-account-admin-view #account-library-card .account-card { padding: 0; }
  .records-account-page.desktop-account-admin-view #account-library-context { grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); }
  .records-account-page:not(.desktop-account-admin-view) .profile-settings-button { display: none; }
  .records-account-page:not(.desktop-account-admin-view) #account-section { width: min(100%, 1320px); margin: 0 auto; gap: 0; }
  .records-account-page:not(.desktop-account-admin-view) .records-profile-header { display: block; padding: clamp(2rem, 4vw, 3.5rem) 0 2rem; border-bottom: 1px solid var(--line); }
  .records-account-page:not(.desktop-account-admin-view) .records-profile-header p { margin: 0 0 0.55rem; color: var(--teal); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
  .records-account-page:not(.desktop-account-admin-view) .records-profile-header h1 { margin: 0; font-family: "Fraunces", "Times New Roman", serif; font-size: clamp(2.25rem, 4vw, 3.5rem); line-height: 1.05; letter-spacing: -0.025em; }
  .records-account-page:not(.desktop-account-admin-view) .records-profile-header span { display: block; max-width: 660px; margin-top: 0.75rem; color: var(--slate); font-size: 0.96rem; }
  .records-account-page:not(.desktop-account-admin-view) #account-no-library-notice { margin: 1.5rem 0 0; }
  .records-account-page:not(.desktop-account-admin-view) #library-settings-card { gap: 1.4rem; padding: 2rem 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
  .records-account-page:not(.desktop-account-admin-view) #library-settings-card .account-top { display: block; }
  .records-account-page:not(.desktop-account-admin-view) #library-settings-card .account-top h3 { font-family: "Manrope", "Trebuchet MS", sans-serif; font-size: 1.15rem; }
  .records-account-page:not(.desktop-account-admin-view) #library-settings-card .account-list { gap: clamp(2rem, 8vw, 6rem); }
  .records-account-page:not(.desktop-account-admin-view) #library-settings-card .account-item { gap: 0.35rem; }
  .records-account-page:not(.desktop-account-admin-view) #library-settings-card .account-value { font-size: 1.06rem; }
  .records-account-page:not(.desktop-account-admin-view) #profile-settings-modal { position: static; display: block; padding: 0; background: transparent; }
  .records-account-page:not(.desktop-account-admin-view) #profile-settings-modal .settings-modal-dialog { width: auto; max-width: none; max-height: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .records-account-page:not(.desktop-account-admin-view) #profile-settings-modal .settings-modal-header { padding: 2rem 0 1.15rem; }
  .records-account-page:not(.desktop-account-admin-view) #profile-settings-modal .settings-modal-close { display: none; }
  .records-account-page:not(.desktop-account-admin-view) #profile-settings-modal .settings-modal-header { border: 0; border-bottom: 1px solid var(--line); background: transparent; }
  .records-account-page:not(.desktop-account-admin-view) #profile-settings-modal .settings-modal-title { font-family: "Manrope", "Trebuchet MS", sans-serif; font-size: 1.15rem; }
  .records-account-page:not(.desktop-account-admin-view) #profile-settings-modal .settings-modal-body { padding: 1.5rem 0 2.5rem; overflow: visible; }
  .records-account-page:not(.desktop-account-admin-view) #profile-form { width: 100%; gap: 1.15rem; }
  .records-account-page:not(.desktop-account-admin-view) #profile-form input { min-height: 50px; border-radius: 8px; background: #ffffff; }
  .records-account-page:not(.desktop-account-admin-view) #profile-form .actions { justify-content: flex-start; }
  .records-account-page:not(.desktop-account-admin-view) #profile-settings-modal .danger-zone { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2rem; margin-top: 3rem; padding-top: 2rem; border-top-color: rgba(168, 46, 66, 0.2); }
  .records-account-page:not(.desktop-account-admin-view) #profile-settings-modal .danger-zone .btn { justify-self: end; }

  .records-account-page.desktop-account-contacts-view #account-section {
    width: min(100%, 1320px);
    margin: 0 auto;
    gap: 0;
  }

  .records-account-page.desktop-account-contacts-view #account-library-card {
    margin: 0;
    padding: 1.35rem 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .records-account-page.desktop-account-contacts-view #account-library-context {
    grid-template-columns: minmax(280px, 1.4fr) repeat(2, minmax(150px, 0.65fr));
    gap: clamp(1.5rem, 4vw, 4rem);
  }

  .records-account-page.desktop-account-contacts-view #account-library-context .field {
    gap: 0.38rem;
  }

  .records-account-page.desktop-account-contacts-view #account-library-context select {
    min-height: 44px;
    border-radius: 8px;
    background: #ffffff;
  }

  .records-account-page.desktop-account-contacts-view #library-access-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .records-account-page.desktop-account-contacts-view #admin-contacts-panel {
    gap: 0;
  }

  .records-account-page.desktop-account-contacts-view #admin-contacts-panel > .admin-panel-head {
    align-items: end;
    padding: clamp(1.6rem, 3vw, 2.5rem) 0 1.35rem;
    border-bottom: 1px solid var(--line);
  }

  .records-account-page.desktop-account-contacts-view .records-account-view-kicker {
    margin: 0 0 0.55rem;
    color: var(--teal);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .records-account-page.desktop-account-contacts-view #admin-contacts-panel > .admin-panel-head h4 {
    font-family: "Fraunces", "Times New Roman", serif;
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
  }

  .records-account-page.desktop-account-contacts-view #admin-contacts-panel > .admin-panel-head h4 + p {
    max-width: 680px;
    margin-top: 0.75rem;
    font-size: 0.96rem;
  }

  .records-account-page.desktop-account-contacts-view #contact-form-toggle {
    align-self: end;
    min-height: 44px;
    padding-inline: 1.15rem;
  }

  .records-account-page.desktop-account-contacts-view #contacts-settings-body,
  .records-account-page.desktop-account-contacts-view #contact-management-body {
    gap: 0;
  }

  .records-account-page.desktop-account-contacts-view #contact-management-body {
    display: grid;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .records-account-page.desktop-account-contacts-view #contact-form-panel {
    margin: 0;
    padding: 2rem 0;
    border-bottom: 1px solid var(--line);
  }

  .records-account-page.desktop-account-contacts-view #contact-form input,
  .records-account-page.desktop-account-contacts-view #contact-form textarea {
    border-radius: 8px;
    background: #ffffff;
  }

  .records-account-page.desktop-account-contacts-view #contact-form input {
    min-height: 48px;
  }

  .records-account-page.desktop-account-contacts-view .contact-directory {
    min-width: 0;
    padding: 1.35rem 0 0;
  }

  .records-account-page.desktop-account-contacts-view .contact-directory-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
  }

  .records-account-page.desktop-account-contacts-view .contact-directory-head h5,
  .records-account-page.desktop-account-contacts-view .contact-directory-head p {
    margin: 0;
  }

  .records-account-page.desktop-account-contacts-view .contact-directory-head h5 {
    color: var(--ink);
    font-size: 1.08rem;
  }

  .records-account-page.desktop-account-contacts-view .contact-directory-head h5 + p {
    max-width: 680px;
    margin-top: 0.35rem;
    color: var(--slate);
    font-size: 0.9rem;
  }

  .records-account-page.desktop-account-contacts-view .contact-directory-head .status:empty {
    display: none;
  }

  .records-account-page.desktop-account-contacts-view .contact-directory .table-shell {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
  }

  .records-account-page.desktop-account-contacts-view .contact-table th:first-child,
  .records-account-page.desktop-account-contacts-view .contact-table td:first-child {
    padding-left: 0;
  }

  .records-account-page.desktop-account-contacts-view .contact-table th:last-child,
  .records-account-page.desktop-account-contacts-view .contact-table td:last-child {
    padding-right: 0;
  }

  /* Remaining account pages share the same flat desktop structure as Users and Contacts. */
  .records-account-page.desktop-account-secondary-view #account-section {
    width: min(100%, 1320px);
    margin: 0 auto;
    gap: 0;
  }

  .records-account-page.desktop-account-secondary-view #account-library-card {
    margin: 0;
    padding: 1.15rem 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .records-account-page.desktop-account-secondary-view #library-access-card {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .records-account-page.desktop-account-secondary-view #account-library-context {
    grid-template-columns: minmax(280px, 1.4fr) repeat(2, minmax(150px, .65fr));
    gap: clamp(1.5rem, 4vw, 4rem);
  }

  .records-account-page.desktop-account-secondary-view #account-library-context .field {
    margin: 0;
  }

  .records-account-page.desktop-account-secondary-view #account-library-context select {
    min-height: 44px;
    border-radius: 8px;
    background: #fff;
  }

  .records-account-page.desktop-account-secondary-view .admin-panel {
    gap: 0;
    min-height: 0;
    align-content: start;
  }

  .records-account-page.desktop-account-secondary-view .admin-panel > .admin-panel-head,
  .records-account-page.desktop-account-secondary-view #support-access-card > .panel-head {
    align-items: end;
    padding: clamp(1.6rem, 3vw, 2.5rem) 0 1.35rem;
    border-bottom: 1px solid var(--line);
  }

  .records-account-page.desktop-account-secondary-view .admin-panel > .admin-panel-head h4,
  .records-account-page.desktop-account-secondary-view #support-access-card > .panel-head h3 {
    margin: 0;
    color: var(--ink);
    font-family: "Fraunces", "Times New Roman", serif;
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
  }

  .records-account-page.desktop-account-secondary-view .admin-panel > .admin-panel-head h4 + p,
  .records-account-page.desktop-account-secondary-view #support-access-card > .panel-head h3 + p {
    max-width: 680px;
    margin: .75rem 0 0;
    color: var(--slate);
    font-size: .96rem;
  }

  .records-account-page.desktop-account-secondary-view .records-account-view-kicker {
    margin: 0 0 .55rem;
    color: var(--teal);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .16em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .records-account-page.desktop-account-secondary-view .admin-panel > .settings-subsection,
  .records-account-page.desktop-account-secondary-view .admin-panel > .settings-group,
  .records-account-page.desktop-account-secondary-view .admin-panel > .stack,
  .records-account-page.desktop-account-secondary-view #support-access-card > form {
    margin-top: 1.35rem;
  }

  .records-account-page.desktop-account-secondary-view .settings-subsection,
  .records-account-page.desktop-account-secondary-view .current-plan-card,
  .records-account-page.desktop-account-secondary-view .storage-card,
  .records-account-page.desktop-account-secondary-view .storage-total-card {
    border-radius: 10px;
  }

  .records-account-page.desktop-account-secondary-view #admin-template-list {
    margin-top: 1.35rem;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
  }

  .records-account-page.desktop-account-secondary-view .admin-template-row {
    padding: .9rem 0;
  }

  .records-account-page.desktop-account-secondary-view #admin-template-empty,
  .records-account-page.desktop-account-secondary-view #admin-template-status,
  .records-account-page.desktop-account-secondary-view #activity-status,
  .records-account-page.desktop-account-secondary-view #account-storage-status {
    margin-top: 1rem;
  }

  .records-account-page.desktop-account-secondary-view .admin-disclosure {
    padding: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
  }

  .records-account-page.desktop-account-secondary-view .admin-disclosure-summary {
    padding: 1.15rem 0;
  }

  .records-account-page.desktop-account-secondary-view .admin-disclosure-content {
    padding: 0 0 1.5rem;
  }

  .records-account-page.desktop-account-secondary-view #organization-ai-settings-form {
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .records-account-page.desktop-account-secondary-view #organization-ai-settings-form > .field {
    padding: 1.35rem 0;
    border-bottom: 1px solid var(--line);
  }

  .records-account-page.desktop-account-secondary-view #organization-ai-settings-form > .actions {
    padding-top: 1.35rem;
  }

  .records-account-page.desktop-account-secondary-view #support-access-card > form {
    padding-bottom: 1.35rem;
    border-bottom: 1px solid var(--line);
  }

  .records-account-page.desktop-account-secondary-view #support-access-card > .settings-subsection {
    margin-top: 1.35rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .records-account-page.desktop-account-secondary-view #support-access-card .settings-subsection-head {
    margin-bottom: 1rem;
  }

  .records-account-page.desktop-account-secondary-view #admin-billing-panel .current-plan-card {
    padding: 1.35rem 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }

  .records-account-page.desktop-account-secondary-view #admin-billing-panel .billing-plan-picker {
    margin-top: 1.35rem;
  }

  .records-account-page.desktop-account-secondary-view #admin-storage-panel .storage-total-card,
  .records-account-page.desktop-account-secondary-view #admin-storage-panel .storage-card,
  .records-account-page.desktop-account-secondary-view #admin-storage-panel .storage-breakdown-card {
    box-shadow: none;
  }

  .records-account-page.desktop-account-secondary-view #admin-activity-panel .compact-field {
    width: min(100%, 14rem);
    margin: 0;
  }

  .records-account-page.desktop-account-secondary-view .table-shell {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
  }

  .records-account-page.desktop-account-secondary-view .data-table th:first-child,
  .records-account-page.desktop-account-secondary-view .data-table td:first-child {
    padding-left: 0;
  }

  .records-account-page.desktop-account-secondary-view .data-table th:last-child,
  .records-account-page.desktop-account-secondary-view .data-table td:last-child {
    padding-right: 0;
  }

  .records-account-page.desktop-account-secondary-view #admin-storage-panel .storage-overview,
  .records-account-page.desktop-account-secondary-view #admin-storage-panel .storage-two-column,
  .records-account-page.desktop-account-secondary-view #admin-activity-panel > .table-shell {
    margin-top: 1.35rem;
  }

  .records-account-page.desktop-account-secondary-view .voice-profile-overview,
  .records-account-page.desktop-account-secondary-view .voice-profile-table-shell {
    margin-top: 1.35rem;
  }

  .records-account-page.desktop-account-users-view #account-section {
    width: min(100%, 1320px);
    margin: 0 auto;
    gap: 0;
  }

  .records-account-page.desktop-account-users-view #account-library-card {
    margin: 0;
    padding: 1.15rem 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .records-account-page.desktop-account-users-view #account-library-context {
    grid-template-columns: minmax(280px, 1.4fr) repeat(2, minmax(150px, .65fr));
    gap: clamp(1.5rem, 4vw, 4rem);
  }

  .records-account-page.desktop-account-users-view #account-library-context select {
    min-height: 44px;
    border-radius: 8px;
    background: #fff;
  }

  .records-account-page.desktop-account-users-view #library-access-card {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .records-account-page.desktop-account-users-view #admin-users-panel {
    gap: 0;
    align-content: start;
  }

  .records-account-page.desktop-account-users-view #admin-users-panel > .admin-panel-head {
    align-items: end;
    padding: clamp(1.6rem, 3vw, 2.5rem) 0 1.35rem;
    border-bottom: 1px solid var(--line);
  }

  .records-account-page.desktop-account-users-view #admin-users-panel > .admin-panel-head h4 {
    margin: 0;
    font-family: "Fraunces", "Times New Roman", serif;
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -.025em;
  }

  .records-account-page.desktop-account-users-view #admin-users-panel > .admin-panel-head h4 + p {
    max-width: 680px;
    margin: .75rem 0 0;
    color: var(--slate);
    font-size: .96rem;
  }

  .records-account-page.desktop-account-users-view .records-account-view-kicker {
    margin: 0 0 .55rem;
    color: var(--teal);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .16em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .records-account-page.desktop-account-users-view #member-management-body,
  .records-account-page.desktop-account-users-view #member-management-section {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .records-account-page.desktop-account-users-view #member-management-body {
    padding-top: 1.35rem;
  }

  .records-account-page.desktop-account-users-view .user-directory-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
  }

  .records-account-page.desktop-account-users-view .user-directory-head h5,
  .records-account-page.desktop-account-users-view .user-directory-head p {
    margin: 0;
  }

  .records-account-page.desktop-account-users-view .user-directory-head h5 {
    color: var(--ink);
    font-size: 1.08rem;
  }

  .records-account-page.desktop-account-users-view .user-directory-head h5 + p {
    margin-top: .35rem;
    color: var(--slate);
    font-size: .9rem;
  }

  .records-account-page.desktop-account-users-view .user-directory-head .status:empty {
    display: none;
  }

  .records-account-page.desktop-account-users-view .user-directory .table-shell {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
  }

  .records-account-page.desktop-account-users-view .user-table th:first-child,
  .records-account-page.desktop-account-users-view .user-table td:first-child {
    padding-left: 0;
  }

  .records-account-page.desktop-account-users-view .user-table th:last-child,
  .records-account-page.desktop-account-users-view .user-table td:last-child {
    padding-right: 0;
  }
}

@media (min-width: 1260px) {
  .records-account-page:not(.desktop-account-admin-view) #account-section {
    grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.72fr);
    column-gap: clamp(3rem, 5vw, 5.5rem);
    align-content: start;
  }

  .records-account-page:not(.desktop-account-admin-view) .records-profile-header,
  .records-account-page:not(.desktop-account-admin-view) #account-no-library-notice {
    grid-column: 1 / -1;
  }

  .records-account-page:not(.desktop-account-admin-view) .records-profile-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
    column-gap: clamp(3rem, 5vw, 5.5rem);
    align-items: end;
  }

  .records-account-page:not(.desktop-account-admin-view) .records-profile-header p,
  .records-account-page:not(.desktop-account-admin-view) .records-profile-header h1 {
    grid-column: 1;
  }

  .records-account-page:not(.desktop-account-admin-view) .records-profile-header span {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: end;
    margin: 0 0 0.35rem;
  }

  .records-account-page:not(.desktop-account-admin-view) #profile-settings-modal {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
  }

  .records-account-page:not(.desktop-account-admin-view) #library-settings-card {
    grid-column: 2;
    grid-row: 3;
    align-self: start;
    padding: 2rem 0 2rem clamp(2rem, 3vw, 3.25rem);
    border-bottom: 0;
    border-left: 1px solid var(--line);
  }

  .records-account-page:not(.desktop-account-admin-view) #library-settings-card .account-list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .records-account-page:not(.desktop-account-admin-view) #library-settings-card .account-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
  }

  .records-account-page:not(.desktop-account-admin-view) #profile-settings-modal .settings-modal-header {
    padding-top: 2rem;
  }

  .records-account-page.desktop-account-contacts-view #contact-management-body:has(#contact-form-panel:not(.hidden)) {
    grid-template-columns: minmax(310px, 0.72fr) minmax(0, 1.55fr);
    column-gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
  }

  .records-account-page.desktop-account-contacts-view #contact-management-body:has(#contact-form-panel:not(.hidden)) #contact-form-panel {
    padding: 2rem clamp(2rem, 3vw, 3.25rem) 2rem 0;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .records-account-page.desktop-account-users-view #account-section {
    width: min(1320px, calc(100vw - 340px));
  }
}

/* Records AI is available from every authenticated Records workspace. */
.records-ai-layer[hidden] {
  display: none;
}

.records-ai-layer {
  position: fixed;
  inset: 0;
  z-index: 1600;
}

.records-ai-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(4, 12, 21, 0.5);
  cursor: default;
  opacity: 0;
  transition: opacity 220ms ease;
}

.records-ai-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(520px, 100vw);
  height: 100%;
  border-left: 1px solid rgba(18, 43, 57, 0.12);
  background: #f8fafb;
  box-shadow: -28px 0 70px rgba(4, 12, 21, 0.2);
  color: var(--ink);
  transform: translateX(102%);
  transition: transform 220ms ease;
}

.records-ai-layer.is-open .records-ai-scrim {
  opacity: 1;
}

.records-ai-layer.is-open .records-ai-drawer {
  transform: translateX(0);
}

.records-ai-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.45rem 1.35rem 1.2rem;
  border-bottom: 1px solid rgba(18, 43, 57, 0.1);
  background: #07111d;
  color: #fff;
}

.records-ai-kicker {
  margin: 0 0 0.42rem;
  color: #78cfc3;
  font: 800 0.68rem/1.2 "Manrope", "Trebuchet MS", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.records-ai-drawer-head h2 {
  margin: 0;
  color: #fff;
  font: 700 1.7rem/1.08 "Fraunces", Georgia, serif;
}

.records-ai-drawer-head p:last-child {
  margin: 0.42rem 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.86rem;
  line-height: 1.5;
}

.records-ai-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font: 400 1.5rem/1 "Manrope", sans-serif;
}

.records-ai-close:hover,
.records-ai-close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.records-ai-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem 1.25rem 0.75rem;
  overscroll-behavior: contain;
}

.records-ai-message {
  width: fit-content;
  max-width: 94%;
  margin: 0 0 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(18, 43, 57, 0.1);
  border-radius: 16px 16px 16px 5px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(4, 12, 21, 0.05);
}

.records-ai-message.is-user {
  max-width: 84%;
  margin-left: auto;
  border-color: rgba(22, 117, 105, 0.2);
  border-radius: 16px 16px 5px 16px;
  background: #e6f3f0;
}

.records-ai-message.is-user .records-ai-message-copy {
  white-space: pre-wrap;
}

.records-ai-message-label {
  margin: 0 0 0.34rem;
  color: var(--teal);
  font: 800 0.62rem/1.2 "Manrope", "Trebuchet MS", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.records-ai-message-copy {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.55;
}

.records-ai-message-copy p {
  margin: 0 0 0.65rem;
}

.records-ai-message-copy p:last-child,
.records-ai-message-copy li:last-child {
  margin-bottom: 0;
}

.records-ai-message-copy ol,
.records-ai-message-copy ul {
  margin: 0.25rem 0 0.7rem;
  padding-left: 1.25rem;
}

.records-ai-message-copy li {
  margin: 0 0 0.42rem;
  padding-left: 0.12rem;
}

.records-ai-message-copy strong {
  color: #102c35;
  font-weight: 800;
}

.records-ai-message-copy code {
  padding: 0.08rem 0.28rem;
  border-radius: 4px;
  background: rgba(18, 43, 57, 0.08);
  font-size: 0.82em;
}

.records-ai-message-copy a {
  color: var(--teal);
  font-weight: 750;
  text-underline-offset: 2px;
}

.records-ai-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.records-ai-message-actions button {
  min-height: 36px;
  padding: 0.52rem 0.78rem;
  border: 1px solid rgba(22, 117, 105, 0.34);
  border-radius: 999px;
  background: #e6f3f0;
  color: #105f55;
  cursor: pointer;
  font: 800 0.72rem/1.1 "Manrope", "Trebuchet MS", sans-serif;
}

.records-ai-message-actions button:hover,
.records-ai-message-actions button:focus-visible {
  border-color: var(--teal);
  background: #d6ece8;
  outline: 2px solid rgba(22, 117, 105, 0.14);
}

.records-ai-message-actions button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.records-ai-spotlight {
  position: relative;
  z-index: 2;
  border-radius: 12px;
  animation: records-ai-spotlight-pulse 1.05s ease-in-out 3;
  outline: 4px solid #078779 !important;
  outline-offset: -4px;
  box-shadow: 0 14px 34px rgba(4, 12, 21, 0.18) !important;
}

.records-ai-guide-note {
  position: fixed;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 1700;
  display: grid;
  gap: 0.2rem;
  width: min(420px, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  border: 1px solid rgba(120, 207, 195, 0.34);
  border-radius: 14px;
  background: #07111d;
  box-shadow: 0 18px 54px rgba(4, 12, 21, 0.28);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.records-ai-guide-note.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.records-ai-guide-note span {
  color: #78cfc3;
  font: 800 0.62rem/1.2 "Manrope", "Trebuchet MS", sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.records-ai-guide-note strong {
  font: 750 0.88rem/1.4 "Manrope", "Trebuchet MS", sans-serif;
}

@keyframes records-ai-spotlight-pulse {
  0%, 100% { outline-color: #078779; }
  50% { outline-color: #28b8a5; }
}

@media (prefers-reduced-motion: reduce) {
  .records-ai-spotlight { animation: none; }
  .records-ai-guide-note { transition: none; }
}

.records-ai-answer-heading {
  margin: 0.85rem 0 0.4rem;
  color: var(--ink);
  font: 800 0.76rem/1.3 "Manrope", "Trebuchet MS", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.records-ai-answer-heading:first-child {
  margin-top: 0;
}

.records-ai-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 1.25rem 0.85rem;
}

.records-ai-starters button {
  min-height: 34px;
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(18, 43, 57, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #31505d;
  cursor: pointer;
  font: 700 0.72rem/1.1 "Manrope", "Trebuchet MS", sans-serif;
}

.records-ai-starters button:hover,
.records-ai-starters button:focus-visible {
  border-color: rgba(22, 117, 105, 0.45);
  color: var(--teal);
  outline: none;
}

.records-ai-composer {
  padding: 1rem 1.25rem 1.2rem;
  border-top: 1px solid rgba(18, 43, 57, 0.1);
  background: #fff;
}

.records-ai-composer > label {
  display: block;
  margin: 0 0 0.5rem;
  color: var(--teal);
  font: 800 0.66rem/1.2 "Manrope", "Trebuchet MS", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.records-ai-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.55rem;
}

.records-ai-composer textarea {
  width: 100%;
  min-height: 58px;
  max-height: 140px;
  resize: vertical;
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(18, 43, 57, 0.18);
  border-radius: 12px;
  background: #f7f9fa;
  color: var(--ink);
  font: 500 0.88rem/1.45 "Manrope", "Trebuchet MS", sans-serif;
}

.records-ai-composer textarea:focus {
  border-color: var(--teal);
  outline: 2px solid rgba(22, 117, 105, 0.12);
}

.records-ai-composer button[type="submit"] {
  min-height: 48px;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 999px;
  background: #07111d;
  color: #fff;
  cursor: pointer;
  font: 800 0.76rem/1 "Manrope", "Trebuchet MS", sans-serif;
}

.records-ai-composer button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.55;
}

.records-ai-voice-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.records-ai-voice-controls button {
  min-height: 36px;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(18, 43, 57, 0.16);
  border-radius: 999px;
  background: #f1f7f6;
  color: #244650;
  cursor: pointer;
  font: 800 0.72rem/1 "Manrope", "Trebuchet MS", sans-serif;
}

.records-ai-voice-controls button:hover,
.records-ai-voice-controls button:focus-visible {
  border-color: rgba(22, 117, 105, 0.45);
  color: var(--teal);
  outline: none;
}

.records-ai-voice-controls button[hidden] {
  display: none;
}

.records-ai-voice-controls button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.records-ai-voice-controls [data-records-ai-voice] span {
  color: var(--teal);
  font-size: 0.68rem;
}

.records-ai-voice-controls [data-records-ai-voice].is-recording {
  border-color: rgba(185, 28, 28, 0.35);
  background: #fff1f1;
  color: #8b1e1e;
}

.records-ai-voice-controls [data-records-ai-voice].is-recording span {
  color: #dc2626;
  animation: records-ai-voice-pulse 1s ease-in-out infinite;
}

@keyframes records-ai-voice-pulse {
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .records-ai-voice-controls [data-records-ai-voice].is-recording span { animation: none; }
}

.records-ai-status {
  min-height: 1.15rem;
  margin: 0.45rem 0 0;
  color: #61717d;
  font-size: 0.72rem;
  line-height: 1.4;
}

.records-ai-status.is-error {
  color: #b52d3b;
}

.records-ai-mobile-trigger {
  color: var(--teal);
}

@media (max-width: 620px) {
  .records-ai-drawer {
    width: 100%;
    border-left: 0;
  }

  .records-ai-drawer-head {
    padding-top: max(1.25rem, env(safe-area-inset-top));
  }

  .records-ai-composer {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

@media (max-width: 980px) {
  .records-desktop-appbar { display: none; }
  .records-desktop-frame { display: contents; }
  .records-desktop-workspace, .records-desktop-content { display: contents; }
  .records-desktop-nav, .records-desktop-page-head, .records-shared-desktop-nav { display: none; }
}

/* Meeting workspace: one creation flow followed by the complete meeting library. */
.records-meeting-notes-page .meeting-notes-page {
  gap: 0;
}

.records-meeting-notes-page .meeting-notes-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.records-meeting-notes-page .meeting-notes-page-kicker,
.records-meeting-notes-page .meeting-notes-section-kicker {
  margin: 0 0 0.45rem;
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.records-meeting-notes-page .meeting-notes-page-header h1,
.records-meeting-notes-page .meeting-notes-section-head h2 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  color: var(--ink);
  letter-spacing: -0.025em;
}

.records-meeting-notes-page .meeting-notes-page-header h1 {
  font-size: clamp(2.35rem, 7vw, 3.5rem);
  line-height: 1.02;
}

.records-meeting-notes-page .meeting-notes-page-header > div > p:last-child,
.records-meeting-notes-page .meeting-notes-section-head > div > p:last-child {
  max-width: 720px;
  margin: 0.65rem 0 0;
  color: var(--slate);
  line-height: 1.55;
}

.records-meeting-notes-page .meeting-notes-library-context,
.records-meeting-notes-page #record-panel,
.records-meeting-notes-page #recordings-library-panel {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.records-meeting-notes-page .meeting-notes-library-context {
  padding: 1.15rem 0;
}

.records-meeting-notes-page .meeting-notes-library-context .field {
  gap: 0.35rem;
}

.records-meeting-notes-page .meeting-notes-library-context .account-value {
  margin: 0;
}

.records-meeting-notes-page #record-panel {
  padding: 1.3rem 0;
}

.records-meeting-notes-page #record-panel > .section-toggle {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.records-meeting-notes-page #record-panel > .section-toggle h3 {
  color: var(--ink);
  font-size: 1.12rem;
}

.records-meeting-notes-page .meeting-note-toggle-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.7rem;
  min-height: 46px;
  padding: 0.35rem 0.4rem 0.35rem 1.05rem;
  border: 1px solid #070d14;
  border-radius: 999px;
  background: #070d14;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.records-meeting-notes-page .meeting-note-toggle-action .section-toggle-indicator {
  width: 36px;
  height: 36px;
  border-color: rgba(255, 255, 255, 0.22);
  color: inherit;
}

.records-meeting-notes-page #record-panel > .section-toggle:hover .meeting-note-toggle-action,
.records-meeting-notes-page #record-panel > .section-toggle:focus-visible .meeting-note-toggle-action {
  transform: translateY(-1px);
}

.records-meeting-notes-page #record-panel > .section-toggle.is-open .meeting-note-toggle-action {
  border-color: rgba(15, 22, 32, 0.18);
  background: #fff;
  color: var(--ink);
}

.records-meeting-notes-page #record-panel > .section-toggle.is-open .meeting-note-toggle-action .section-toggle-indicator {
  border-color: rgba(15, 22, 32, 0.12);
}

.records-meeting-notes-page #record-panel-body {
  padding-top: 1.6rem;
}

.records-meeting-notes-page #record-panel-body input,
.records-meeting-notes-page #record-panel-body select,
.records-meeting-notes-page #record-panel-body textarea {
  border-radius: 9px;
  background: #fff;
}

.records-meeting-notes-page #recordings-library-panel {
  padding: 0 0 2rem;
}

.records-meeting-notes-page .meeting-notes-section-head {
  padding: 1.8rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

.records-meeting-notes-page .meeting-notes-section-head h2 {
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  line-height: 1.08;
}

.records-meeting-notes-page .recordings-list {
  gap: 0;
}

.records-meeting-notes-page .recording-row {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 1.15rem 0;
  background: transparent;
  box-shadow: none;
}

.records-meeting-notes-page .recording-row:hover {
  transform: none;
  border-color: rgba(23, 111, 102, 0.24);
  background: rgba(23, 111, 102, 0.025);
  box-shadow: none;
}

@media (min-width: 981px) {
  .records-meeting-notes-page.records-shared-desktop-shell-page .records-desktop-frame > .main {
    padding-top: 0;
  }

  .records-meeting-notes-page.records-shared-desktop-shell-page .records-desktop-page-head {
    margin-bottom: 0;
    padding-top: 0.85rem;
  }

  .records-meeting-notes-page.records-shared-desktop-shell-page #recordings-panel {
    width: min(100%, 1320px);
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .records-meeting-notes-page .meeting-notes-page-header {
    padding: clamp(2rem, 4vw, 3.5rem) 0 2rem;
  }

  .records-meeting-notes-page .meeting-notes-page-header .btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding-inline: 1.2rem;
  }

  .records-meeting-notes-page .meeting-notes-library-context .grid-3 {
    grid-template-columns: minmax(280px, 1.4fr) repeat(2, minmax(150px, 0.65fr));
    gap: clamp(1.5rem, 4vw, 4rem);
  }

  .records-meeting-notes-page .meeting-notes-library-context select {
    min-height: 44px;
  }

  .records-meeting-notes-page #record-panel {
    padding: 1.5rem 0;
  }

  .records-meeting-notes-page #record-panel-body {
    width: 100%;
  }

  .records-meeting-notes-page .meeting-source-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .records-meeting-notes-page .recording-row {
    grid-template-columns: minmax(260px, 1.2fr) minmax(360px, 1fr);
    column-gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
  }

  .records-meeting-notes-page .recording-row-main {
    align-items: flex-start;
  }

  .records-meeting-notes-page .recording-row-details,
  .records-meeting-notes-page .recording-row-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 980px) {
  .records-meeting-notes-page .main {
    width: min(100% - 1.25rem, 760px);
    padding: 1.2rem 0 2.5rem;
  }

  .records-meeting-notes-page #recordings-panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .records-meeting-notes-page .meeting-notes-page-header {
    align-items: flex-start;
    padding: 0.5rem 0 1.35rem;
  }

  .records-meeting-notes-page .meeting-notes-page-header .btn {
    flex: 0 0 auto;
  }

  .records-meeting-notes-page .meeting-notes-library-context .grid-3 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
  }

  .records-meeting-notes-page .meeting-notes-library-context .field:first-child {
    grid-column: 1 / -1;
  }

  .records-meeting-notes-page .meeting-notes-section-head {
    padding-top: 1.55rem;
  }

  .records-meeting-notes-page .meeting-source-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .records-meeting-notes-page .recording-row {
    padding: 1rem 0;
  }
}

@media (max-width: 620px) {
  .records-meeting-notes-page .main {
    width: min(100% - 1rem, 560px);
    padding-top: 0.9rem;
  }

  .records-meeting-notes-page .meeting-notes-page-header {
    display: grid;
    gap: 1rem;
  }

  .records-meeting-notes-page .meeting-notes-page-header h1 {
    font-size: clamp(2.15rem, 12vw, 3rem);
  }

  .records-meeting-notes-page .meeting-notes-page-header .btn {
    width: 100%;
  }

  .records-meeting-notes-page .meeting-notes-library-context .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .records-meeting-notes-page #record-panel {
    padding: 1.15rem 0;
  }

  .records-meeting-notes-page #record-panel > .section-toggle {
    align-items: flex-start;
  }

  .records-meeting-notes-page #record-panel > .section-toggle p {
    max-width: 32ch;
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .records-meeting-notes-page .meeting-note-toggle-action {
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.3rem 0.35rem 0.3rem 0.8rem;
    font-size: 0.76rem;
  }

  .records-meeting-notes-page .meeting-note-toggle-action .section-toggle-indicator {
    width: 32px;
    height: 32px;
  }

  .records-meeting-notes-page .meeting-source-options {
    grid-template-columns: 1fr;
  }

  .records-meeting-notes-page .recording-stats {
    grid-template-columns: 1fr 1fr;
  }

  .records-meeting-notes-page .recording-stat:last-child {
    grid-column: 1 / -1;
  }

  .records-meeting-notes-page .recording-controls,
  .records-meeting-notes-page .meeting-note-actions,
  .records-meeting-notes-page .phone-meeting-session-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .records-meeting-notes-page .recording-controls .btn,
  .records-meeting-notes-page .meeting-note-actions .btn,
  .records-meeting-notes-page .phone-meeting-session-actions .btn {
    width: 100%;
  }

  .records-meeting-notes-page .recording-reference-picker {
    grid-template-columns: 1fr;
  }

  .records-meeting-notes-page .recording-row-main,
  .records-meeting-notes-page .recording-row-details,
  .records-meeting-notes-page .recording-row-actions {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .records-meeting-notes-page .recording-row-details {
    gap: 0.4rem;
  }
}

/* Focused new-meeting workflow. */
.records-meeting-notes-page .meeting-note-workspace {
  width: 100%;
  gap: 0;
}

.records-meeting-notes-page .meeting-workspace-intro {
  padding: 0 0 1.5rem;
}

.records-meeting-notes-page .meeting-workspace-intro h3,
.records-meeting-notes-page .meeting-workspace-section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.2;
}

.records-meeting-notes-page .meeting-workspace-intro > p:last-child,
.records-meeting-notes-page .meeting-workspace-section-head > div > p:last-child {
  max-width: 760px;
  margin: 0.45rem 0 0;
  color: var(--slate);
  line-height: 1.5;
}

.records-meeting-notes-page .meeting-setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  padding-bottom: 1.75rem;
}

.records-meeting-notes-page .meeting-capture-workspace,
.records-meeting-notes-page .meeting-preparation-workspace {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

.records-meeting-notes-page .meeting-workspace-section-head {
  margin-bottom: 1.1rem;
}

.records-meeting-notes-page .meeting-source-field {
  padding: 0;
  border: 0;
  background: transparent;
}

.records-meeting-notes-page .meeting-source-field legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.records-meeting-notes-page .meeting-source-field > .field-note:first-of-type {
  margin: 0 0 0.85rem;
}

.records-meeting-notes-page .meeting-source-options {
  gap: 0.75rem;
}

.records-meeting-notes-page .meeting-source-option {
  min-height: 112px;
  padding: 1rem;
  border-radius: 12px;
  background: #fff;
}

.records-meeting-notes-page .phone-meeting-start,
.records-meeting-notes-page .browser-recording-workflow {
  margin-top: 1rem;
  padding: 1.1rem 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.records-meeting-notes-page .phone-meeting-start {
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  align-items: start;
}

.records-meeting-notes-page .phone-meeting-dial-in {
  margin: 0;
}

.records-meeting-notes-page .browser-recording-workflow .recording-stats {
  margin: 0;
}

.records-meeting-notes-page .browser-recording-workflow .recording-controls {
  justify-content: flex-start;
  margin-top: 0.85rem;
}

.records-meeting-notes-page .meeting-preparation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.records-meeting-notes-page .meeting-live-notes textarea {
  min-height: 300px;
  resize: vertical;
}

.records-meeting-notes-page .recording-references-panel {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.records-meeting-notes-page .recording-references-panel > div:first-child h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.records-meeting-notes-page .recording-reference-picker {
  grid-template-columns: minmax(0, 1.35fr) minmax(130px, 0.65fr);
}

.records-meeting-notes-page .recording-reference-picker > .btn {
  grid-column: 1 / -1;
  justify-self: start;
}

.records-meeting-notes-page .meeting-workspace-actions-anchor {
  width: 100%;
  height: 1px;
  margin-top: -1px;
  pointer-events: none;
}

.records-meeting-notes-page .meeting-workspace-actions-slot {
  position: relative;
  width: 100%;
  min-height: 0;
}

.records-meeting-notes-page .meeting-workspace-actions {
  position: fixed;
  z-index: 18;
  right: 0;
  bottom: 0;
  left: var(--action-dock-left, 0);
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: auto;
  min-height: 62px;
  height: 62px;
  box-sizing: border-box;
  margin-top: 0;
  padding: 0.8rem 1.35rem;
  padding:
    0.9rem
    var(--action-dock-content-right, 1rem)
    max(0.9rem, env(safe-area-inset-bottom))
    var(--action-dock-content-left, 1rem);
  border-top: 1px solid #dfe4e8;
  border-bottom: 1px solid #dfe4e8;
  color: #111821;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition:
    opacity 420ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease,
    box-shadow 220ms ease,
    color 220ms ease;
}

.records-meeting-notes-page .meeting-workspace-actions.is-revealed {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.records-meeting-notes-page .meeting-workspace-actions::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: #f8fafb;
  box-shadow: 0 -12px 28px rgba(20, 33, 45, 0.1);
  opacity: var(--action-dock-opacity, 1);
  transition: box-shadow 220ms ease;
}

.records-meeting-notes-page .meeting-workspace-actions.is-docked {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0 1rem;
  border-top-color: #dfe4e8;
  color: #111821;
}

.records-meeting-notes-page .meeting-workspace-actions.is-docked::before {
  box-shadow: none;
  opacity: 1;
}

.records-meeting-notes-page .meeting-workspace-actions-secondary,
.records-meeting-notes-page .meeting-workspace-actions-primary {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.records-meeting-notes-page .meeting-workspace-actions-primary {
  justify-content: flex-end;
}

.records-meeting-notes-page .meeting-workspace-actions .btn {
  min-height: 42px;
  padding: 0.55rem 1.15rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111821;
  box-shadow: none;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.records-meeting-notes-page .meeting-workspace-actions-secondary .btn + .btn,
.records-meeting-notes-page .meeting-workspace-actions-primary .btn {
  border-left: 1px solid #d9dee3;
}

.records-meeting-notes-page .meeting-workspace-actions-primary .btn {
  color: #18796d;
}

.records-meeting-notes-page .meeting-workspace-actions .btn:hover,
.records-meeting-notes-page .meeting-workspace-actions .btn:focus-visible {
  background: #eef2f4;
}

.records-meeting-notes-page .meeting-workspace-actions-primary .btn:hover,
.records-meeting-notes-page .meeting-workspace-actions-primary .btn:focus-visible {
  background: #e7f2ef;
}

.records-meeting-notes-page #record-panel.has-active-capture .meeting-workspace-actions {
  border-top-color: #dfe4e8;
}

@media (max-width: 860px) {
  .records-meeting-notes-page .meeting-setup-grid,
  .records-meeting-notes-page .meeting-preparation-grid {
    grid-template-columns: 1fr;
  }

  .records-meeting-notes-page .phone-meeting-start {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .records-meeting-notes-page .meeting-workspace-intro {
    padding-bottom: 1.15rem;
  }

  .records-meeting-notes-page .meeting-capture-workspace,
  .records-meeting-notes-page .meeting-preparation-workspace {
    padding: 1.35rem 0;
  }

  .records-meeting-notes-page .meeting-source-option {
    min-height: 0;
  }

  .records-meeting-notes-page .meeting-live-notes textarea {
    min-height: 240px;
  }

  .records-meeting-notes-page .meeting-workspace-actions {
    display: grid;
    gap: 0.65rem;
    height: auto;
    min-height: 62px;
    padding:
      0.8rem
      var(--action-dock-content-right, 0.8rem)
      max(0.8rem, env(safe-area-inset-bottom))
      var(--action-dock-content-left, 0.8rem);
  }

  .records-meeting-notes-page .meeting-workspace-actions.is-docked {
    padding-inline: 0.8rem;
  }

  .records-meeting-notes-page .meeting-workspace-actions-secondary,
  .records-meeting-notes-page .meeting-workspace-actions-primary {
    display: grid;
    gap: 0.55rem;
  }

  .records-meeting-notes-page .meeting-workspace-actions-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .records-meeting-notes-page .meeting-workspace-actions-primary {
    grid-template-columns: 1fr;
  }

  .records-meeting-notes-page .meeting-workspace-actions-primary {
    grid-row: 1;
  }

  .records-meeting-notes-page .meeting-workspace-actions .btn {
    width: 100%;
    padding-inline: 0.8rem;
    border-left: 0;
    border-top: 1px solid #d9dee3;
  }

  .records-meeting-notes-page .meeting-workspace-actions-secondary .btn:first-child,
  .records-meeting-notes-page .meeting-workspace-actions-primary .btn:first-child {
    border-top: 0;
  }
}

/* Document Builder workspace */
.records-document-builder-page .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;
}

.records-document-builder-page .documents-page {
  gap: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.records-document-builder-page .documents-page-head,
.records-document-builder-page .document-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.records-document-builder-page .documents-page-head {
  padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid rgba(15, 22, 32, 0.1);
}

.records-document-builder-page .documents-page-head h1 {
  margin: 0.15rem 0 0.45rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.75rem, 5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.records-document-builder-page .documents-page-head > div > p:last-child,
.records-document-builder-page .document-start-copy > p:last-child,
.records-document-builder-page .document-empty-state > p {
  margin: 0;
  color: var(--slate);
  line-height: 1.6;
}

.records-document-builder-page .documents-page-kicker,
.records-document-builder-page .documents-section-kicker {
  margin: 0;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.records-document-builder-page #documents-no-access-notice {
  margin-top: 1.5rem;
}

.records-document-builder-page .documents-library-context {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) repeat(2, minmax(160px, 0.6fr));
  gap: clamp(1.25rem, 4vw, 4rem);
  align-items: end;
  padding: 1.35rem 0;
  border-bottom: 1px solid rgba(15, 22, 32, 0.1);
}

.records-document-builder-page .documents-library-context .field {
  gap: 0.45rem;
}

.records-document-builder-page .documents-library-context select {
  min-height: 50px;
}

.records-document-builder-page .documents-library-context .account-value {
  margin: 0;
}

.records-document-builder-page .document-start-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(520px, 1.5fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  padding: clamp(1.6rem, 3vw, 2.3rem) 0;
  border-bottom: 1px solid rgba(15, 22, 32, 0.1);
}

.records-document-builder-page .document-start-copy h2,
.records-document-builder-page .document-sidebar-head h2,
.records-document-builder-page .document-empty-state h2 {
  margin: 0.2rem 0 0.35rem;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.records-document-builder-page .document-create-bar {
  grid-template-columns: auto minmax(0, 1fr);
}

.records-document-builder-page .document-template-create {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  justify-content: stretch;
}

.records-document-builder-page .document-template-create select {
  width: 100%;
  min-width: 0;
}

.records-document-builder-page .documents-workspace {
  grid-template-columns: minmax(290px, 340px) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 0;
  height: 100%;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #f2f5f7;
  box-shadow: none;
}

.records-document-builder-page .document-sidebar,
.records-document-builder-page .document-editor-panel {
  max-height: none;
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
}

.records-document-builder-page .document-sidebar {
  position: relative;
  align-content: start;
  gap: 1.1rem;
  height: 100%;
  max-height: none;
  padding: 1.25rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid rgba(15, 22, 32, 0.1);
  background: #ffffff;
  scrollbar-gutter: stable;
}

.records-document-builder-page .document-sidebar-head {
  align-items: center;
}

.records-document-builder-page .document-sidebar-head h2 {
  font-size: 1.22rem;
}

.records-document-builder-page .document-count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #edf5f4;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
}

.records-document-builder-page .document-list-section + .document-list-section {
  padding-top: 1.1rem;
}

.records-document-builder-page .document-list {
  gap: 0.35rem;
}

.records-document-builder-page .document-list-item {
  gap: 0.25rem;
  border-color: transparent;
  border-radius: 12px;
  padding: 0.75rem;
}

.records-document-builder-page .document-list-item:hover,
.records-document-builder-page .document-list-item.is-active {
  border-color: rgba(23, 111, 102, 0.18);
  background: #eaf4f2;
}

.records-document-builder-page .document-list-item.is-active {
  box-shadow: inset 3px 0 0 var(--teal);
}

.records-document-builder-page .document-editor-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: #eef2f5;
}

.records-document-builder-page .document-creation-row {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(190px, 0.85fr) auto minmax(360px, 1.55fr);
  gap: 0.7rem;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid rgba(15, 22, 32, 0.1);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 22, 32, 0.06);
}

.records-document-builder-page .document-creation-row .field {
  min-width: 0;
}

.records-document-builder-page .document-creation-row select,
.records-document-builder-page .document-creation-row .btn {
  min-height: 46px;
}

.records-document-builder-page .document-library-select select {
  width: 100%;
}

.records-document-builder-page .document-creation-row .document-template-create {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 0.55rem;
  min-width: 0;
}

.records-document-builder-page .document-editor-empty {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  place-items: center;
  overflow-y: auto;
  padding: clamp(2rem, 5vw, 4.5rem);
}

.records-document-builder-page .document-empty-state {
  width: min(520px, 100%);
  padding: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.records-document-builder-page .document-empty-icon {
  position: relative;
  width: 70px;
  height: 88px;
  margin: 0 auto 1.5rem;
  border: 1px solid rgba(15, 22, 32, 0.16);
  border-radius: 7px;
  background: #fffdf9;
  box-shadow: 0 16px 30px rgba(15, 22, 32, 0.08);
}

.records-document-builder-page .document-empty-icon::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 23px;
  height: 23px;
  border-left: 1px solid rgba(15, 22, 32, 0.14);
  border-bottom: 1px solid rgba(15, 22, 32, 0.14);
  background:
    linear-gradient(225deg, transparent 49%, rgba(15, 22, 32, 0.12) 50%, rgba(15, 22, 32, 0.12) 52%, transparent 53%),
    #f1f4f5;
  border-radius: 0 7px 0 0;
}

.records-document-builder-page .document-empty-icon span {
  position: absolute;
  left: 17px;
  height: 4px;
  border-radius: 999px;
  background: #cfe0dc;
}

.records-document-builder-page .document-empty-icon span:nth-child(1) {
  top: 45px;
  width: 37px;
}

.records-document-builder-page .document-empty-icon span:nth-child(2) {
  top: 56px;
  width: 29px;
}

.records-document-builder-page .document-empty-icon span:nth-child(3) {
  top: 67px;
  width: 22px;
}

.records-document-builder-page .document-empty-state h2 {
  max-width: 430px;
  margin: 0.45rem auto 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.records-document-builder-page .document-empty-state > p:last-child {
  max-width: 430px;
  margin: 1rem auto 0;
  color: var(--slate);
  font-size: 1rem;
  line-height: 1.65;
}

.records-document-builder-page .document-empty-page {
  position: relative;
  display: grid;
  align-content: center;
  gap: 0.45rem;
  width: 74px;
  height: 92px;
  margin: 0 auto 1.25rem;
  padding: 1rem 0.85rem;
  border: 1px solid rgba(15, 22, 32, 0.14);
  border-radius: 6px;
  background: #fffefb;
  box-shadow: 0 12px 28px rgba(15, 22, 32, 0.1);
}

.records-document-builder-page .document-empty-page::after {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 18px;
  height: 18px;
  border-bottom: 1px solid rgba(15, 22, 32, 0.12);
  border-left: 1px solid rgba(15, 22, 32, 0.12);
  background: #eef2f5;
  content: "";
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.records-document-builder-page .document-empty-page span {
  display: block;
  height: 4px;
  border-radius: 99px;
  background: rgba(23, 111, 102, 0.18);
}

.records-document-builder-page .document-empty-page span:nth-child(2) {
  width: 82%;
}

.records-document-builder-page .document-empty-page span:nth-child(3) {
  width: 62%;
}

.records-document-builder-page .document-editor {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  gap: 0;
  padding: 0;
}

.records-document-builder-page .document-editor-controls {
  position: relative;
  flex: 0 0 auto;
  z-index: 8;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 22, 32, 0.08);
}

.records-document-builder-page .document-editor-top {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid rgba(15, 22, 32, 0.1);
  background: #ffffff;
}

.records-document-builder-page .document-toolbar {
  gap: 0.55rem;
  padding: 0.6rem 1.35rem;
  border: 0;
  border-bottom: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: 0;
  background: #f8fafb;
}

.records-document-builder-page .document-toolbar-group {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  padding-right: 0.55rem;
  border-right: 1px solid rgba(15, 22, 32, 0.12);
}

.records-document-builder-page .document-toolbar-group:last-child {
  padding-right: 0;
  border-right: 0;
}

.records-document-builder-page .document-toolbar button {
  min-width: 36px;
  padding: 0.35rem 0.5rem;
  border-color: transparent;
  background: transparent;
  font-size: 0.78rem;
}

.records-document-builder-page .document-toolbar button:hover,
.records-document-builder-page .document-toolbar button:focus-visible {
  border-color: rgba(15, 22, 32, 0.1);
  background: #ffffff;
}

.records-document-builder-page .document-canvas {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: clamp(1.2rem, 3vw, 2.5rem);
  /* The action slot below the canvas reserves the footer height. */
  padding-bottom: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.42)),
    #e8edf0;
}

.records-document-builder-page #document-editor-status {
  min-height: 0;
  margin: 0;
}

.records-document-builder-page #document-editor-status:empty {
  display: none;
}

.records-document-builder-page .document-page {
  width: min(816px, 100%);
  min-height: 1056px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 1px solid rgba(15, 22, 32, 0.1);
  border-radius: 3px;
  background: #fffefb;
  box-shadow: 0 16px 38px rgba(15, 22, 32, 0.12);
}

.records-document-builder-page .document-page .tiptap {
  min-height: 900px;
}

.records-document-builder-page .document-workspace-actions-anchor {
  width: 100%;
  height: 1px;
  margin-top: -1px;
  pointer-events: none;
}

.records-document-builder-page .document-workspace-actions-slot {
  position: relative;
  width: 100%;
  min-height: 0;
}

.records-document-builder-page .document-editor-actions {
  position: fixed;
  z-index: 18;
  right: 0;
  bottom: 0;
  left: var(--document-action-dock-left, 0);
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: auto;
  min-height: 62px;
  height: 62px;
  box-sizing: border-box;
  margin-top: 0;
  padding: 0.8rem 1.35rem;
  padding:
    0.9rem
    var(--document-action-dock-content-right, 1rem)
    max(0.9rem, env(safe-area-inset-bottom))
    var(--document-action-dock-content-left, 1rem);
  border-top: 1px solid #dfe4e8;
  border-bottom: 1px solid #dfe4e8;
  color: #111821;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition:
    opacity 420ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease,
    box-shadow 220ms ease,
    color 220ms ease;
}

.records-document-builder-page .document-editor-actions.is-revealed {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.records-document-builder-page .document-editor-actions::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: #f8fafb;
  box-shadow: 0 -12px 28px rgba(20, 33, 45, 0.1);
  opacity: var(--document-action-dock-opacity, 1);
  transition: box-shadow 220ms ease;
}

.records-document-builder-page .document-editor-actions.is-docked {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0 1rem;
  border-top-color: #dfe4e8;
  color: #111821;
}

.records-document-builder-page .document-editor-actions.is-docked::before {
  box-shadow: none;
  opacity: 1;
}

.records-document-builder-page .document-editor-actions-secondary,
.records-document-builder-page .document-delivery-actions {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.records-document-builder-page .document-delivery-actions {
  justify-content: flex-end;
}

.records-document-builder-page .document-editor-actions .btn {
  min-height: 42px;
  padding: 0.55rem 1.15rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111821;
  box-shadow: none;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.records-document-builder-page .document-editor-actions .document-delivery-actions .btn {
  border: 0;
  border-left: 1px solid #d9dee3;
  background: transparent;
  color: #111821;
  box-shadow: none;
}

.records-document-builder-page .document-editor-actions #document-delete {
  border: 0;
  background: transparent;
  color: #b52f3e;
  box-shadow: none;
}

.records-document-builder-page .document-editor-actions .document-delivery-actions .btn:last-child {
  border-left: 1px solid #d9dee3;
  background: transparent;
  color: #18796d;
}

.records-document-builder-page .document-editor-actions .document-delivery-actions .btn:not(:last-child):hover,
.records-document-builder-page .document-editor-actions .document-delivery-actions .btn:not(:last-child):focus-visible {
  border-left-color: #d9dee3;
  background: #eef2f4;
}

.records-document-builder-page .document-editor-actions #document-delete:hover,
.records-document-builder-page .document-editor-actions #document-delete:focus-visible {
  background: #f8e9eb;
  color: #982433;
}

.records-document-builder-page .document-editor-actions .document-delivery-actions .btn:last-child:hover,
.records-document-builder-page .document-editor-actions .document-delivery-actions .btn:last-child:focus-visible {
  background: #e7f2ef;
}

.records-document-builder-page #documents-status {
  position: absolute;
  right: 1rem;
  bottom: 5.2rem;
  z-index: 7;
  max-width: min(520px, calc(100% - 2rem));
  margin: 0;
}

@media (min-width: 981px) {
  .records-document-builder-page.records-shared-desktop-shell-page .records-desktop-frame > .main {
    overflow: hidden;
    padding: 0;
  }

  .records-document-builder-page.records-shared-desktop-shell-page #documents-panel {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}

@media (max-width: 1180px) {
  .records-document-builder-page .document-start-section {
    grid-template-columns: 1fr;
  }

  .records-document-builder-page .documents-workspace {
    grid-template-columns: minmax(230px, 280px) minmax(540px, 1fr);
  }

  .records-document-builder-page .document-creation-row {
    grid-template-columns: minmax(180px, 1fr) auto;
  }

  .records-document-builder-page .document-creation-row .document-template-create {
    grid-column: 1 / -1;
  }

  .records-document-builder-page .document-create-bar {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .records-document-builder-page .documents-page-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .records-document-builder-page .documents-library-context,
  .records-document-builder-page .document-start-section,
  .records-document-builder-page .documents-workspace,
  .records-document-builder-page .document-creation-row,
  .records-document-builder-page .document-create-bar,
  .records-document-builder-page .document-template-create {
    grid-template-columns: 1fr;
  }

  .records-document-builder-page .documents-workspace {
    height: auto;
    min-height: 0;
    border-radius: 18px;
  }

  .records-document-builder-page .document-sidebar,
  .records-document-builder-page .document-editor-panel,
  .records-document-builder-page .document-editor-empty {
    height: auto;
    min-height: 0;
  }

  .records-document-builder-page .document-sidebar {
    position: static;
    height: auto;
    max-height: min(420px, 56dvh);
    border-right: 0;
    border-bottom: 1px solid rgba(15, 22, 32, 0.1);
  }

  .records-document-builder-page .document-creation-row .document-template-create {
    grid-column: auto;
  }

  .records-document-builder-page .document-editor-panel,
  .records-document-builder-page .document-editor {
    overflow: visible;
  }

  .records-document-builder-page .document-editor {
    height: auto;
  }

  .records-document-builder-page .document-canvas {
    overflow: visible;
  }

  .records-document-builder-page .document-page {
    min-height: 620px;
    padding: 1.4rem;
  }

  .records-document-builder-page .document-page .tiptap {
    min-height: 560px;
  }
}

@media (max-width: 620px) {
  .records-document-builder-page .documents-page-head h1 {
    font-size: 2.7rem;
  }

  .records-document-builder-page .documents-library-context {
    gap: 1rem;
  }

  .records-document-builder-page .document-start-section {
    padding-block: 1.35rem;
  }

  .records-document-builder-page .document-create-actions,
  .records-document-builder-page .document-template-create,
  .records-document-builder-page .document-create-actions .btn,
  .records-document-builder-page .document-template-create .btn,
  .records-document-builder-page .document-template-create select {
    width: 100%;
  }

  .records-document-builder-page .document-toolbar {
    padding-inline: 0.8rem;
  }

  .records-document-builder-page .document-toolbar-group {
    border-right: 0;
  }

  .records-document-builder-page .document-canvas {
    padding: 0.7rem;
  }

  .records-document-builder-page .document-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
    height: auto;
    padding:
      0.8rem
      var(--document-action-dock-content-right, 0.8rem)
      max(0.8rem, env(safe-area-inset-bottom))
      var(--document-action-dock-content-left, 0.8rem);
  }

  .records-document-builder-page .document-editor-actions.is-docked {
    padding-inline: 0.8rem;
  }

  .records-document-builder-page .document-editor-actions-secondary,
  .records-document-builder-page .document-delivery-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .records-document-builder-page .document-editor-actions-secondary {
    order: 2;
  }

  .records-document-builder-page .document-editor-actions .btn {
    width: 100%;
  }
}

/* Communication workspace */
.records-messages-page .messages-page {
  min-height: 0;
}

.records-messages-page .messages-workspace {
  display: grid;
  grid-template-columns: minmax(290px, 340px) minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #eef2f5;
}

.records-messages-page .messages-recipient-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border-right: 1px solid rgba(15, 22, 32, 0.1);
  background: #ffffff;
}

.records-messages-page .messages-recipient-sidebar-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid rgba(15, 22, 32, 0.1);
}

.records-messages-page .messages-recipient-sidebar-head h3 {
  margin: 0.25rem 0 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.35rem;
}

.records-messages-page .message-recipient-count-badge {
  display: grid;
  min-width: 34px;
  min-height: 34px;
  place-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #edf5f4;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
}

.records-messages-page .messages-recipient-sidebar-body {
  display: grid;
  align-content: start;
  gap: 1.1rem;
  min-height: 0;
  padding: 1.15rem 1.25rem 2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.records-messages-page .messages-additional-recipient {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(15, 22, 32, 0.1);
}

.records-messages-page .messages-recipient-sidebar input {
  min-height: 46px;
  border-radius: 8px;
  background: #f7f9fb;
}

.records-messages-page .messages-recipient-sidebar .document-send-contact-list {
  gap: 0.6rem;
}

.records-messages-page .messages-recipient-sidebar .document-send-recipient-group {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.records-messages-page .messages-recipient-sidebar .document-send-recipient-summary {
  padding: 0.7rem 0;
}

.records-messages-page .messages-recipient-sidebar .document-send-recipient-options {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
}

.records-messages-page .messages-recipient-sidebar .document-send-contact {
  min-height: 54px;
  padding: 0.65rem 0.1rem;
  border-width: 1px 0 0;
  border-radius: 0;
  background: transparent;
}

.records-messages-page .messages-editor-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #eef2f5;
}

.records-messages-page .messages-library-context {
  display: grid;
  grid-template-columns: minmax(220px, 420px) minmax(150px, auto);
  gap: 1.25rem;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid rgba(15, 22, 32, 0.1);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 22, 32, 0.06);
}

.records-messages-page .messages-library-context select {
  min-height: 46px;
}

.records-messages-page .messages-library-access {
  display: grid;
  gap: 0.15rem;
}

.records-messages-page .messages-library-access .account-value {
  margin: 0;
  font-size: 0.9rem;
}

.records-messages-page .messages-compose {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.records-messages-page .messages-content-card {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: clamp(1.4rem, 3vw, 2.25rem) clamp(1.4rem, 3vw, 2.75rem) 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.records-messages-page .messages-content-card .messages-compose-card-head {
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(15, 22, 32, 0.1);
}

.records-messages-page .messages-content-card .messages-compose-card-head h3 {
  margin-top: 0.35rem;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.records-messages-page .messages-content-card input,
.records-messages-page .messages-content-card textarea {
  border-radius: 8px;
  background: #ffffff;
}

.records-messages-page .messages-content-card textarea {
  flex: 1 1 auto;
  min-height: 320px;
  height: 100%;
}

.records-messages-page .messages-content-card .messages-body-field {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}

.records-messages-page .messages-content-card .document-send-actions {
  position: sticky;
  z-index: 3;
  bottom: 0;
  margin: 0 clamp(-2.75rem, -3vw, -1.4rem);
  padding:
    0.9rem
    clamp(1.4rem, 3vw, 2.75rem)
    max(0.9rem, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(15, 22, 32, 0.1);
  background: rgba(238, 242, 245, 0.96);
  backdrop-filter: blur(12px);
}

.records-messages-page #message-status:empty {
  display: none;
}

@media (min-width: 981px) {
  .records-messages-page.records-shared-desktop-shell-page .records-desktop-frame > .main {
    overflow: hidden;
    padding: 0;
  }

  .records-messages-page.records-shared-desktop-shell-page #messages-panel {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .records-messages-page.records-shared-desktop-shell-page .records-desktop-page-head {
    display: none;
  }
}

@media (max-width: 860px) {
  .records-messages-page .messages-page,
  .records-messages-page .messages-workspace,
  .records-messages-page .messages-recipient-sidebar,
  .records-messages-page .messages-editor-panel {
    height: auto;
    overflow: visible;
  }

  .records-messages-page .messages-workspace {
    grid-template-columns: 1fr;
  }

  .records-messages-page .messages-recipient-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(15, 22, 32, 0.1);
  }

  .records-messages-page .messages-recipient-sidebar-body {
    max-height: 420px;
  }

  .records-messages-page .messages-library-context {
    grid-template-columns: 1fr;
  }

  .records-messages-page .messages-compose {
    overflow: visible;
  }

  .records-messages-page .messages-content-card {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 1.5rem 1rem 2rem;
  }

  .records-messages-page .messages-content-card .document-send-actions {
    bottom: 0;
    margin-inline: -1rem;
    padding-inline: 1rem;
  }
}

/* Meeting Notes workspace — aligned with Document Builder and Communication. */
.records-meeting-notes-page .meeting-notes-workspace {
  grid-template-columns: minmax(290px, 340px) minmax(0, 1fr);
}

.records-meeting-notes-page .meeting-library-sidebar-head {
  align-items: center;
  padding: 1.25rem;
}

.records-meeting-notes-page .meeting-library-sidebar-head h2 {
  font-size: 1.22rem;
}

.records-meeting-notes-page #recordings-library-panel {
  padding: 1.1rem 1.25rem 2rem;
}

.records-meeting-notes-page .meeting-library-tools {
  padding: 0 0 0.85rem;
}

.records-meeting-notes-page .recording-row {
  padding: 0.8rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 12px;
}

.records-meeting-notes-page .recording-row:hover,
.records-meeting-notes-page .recording-row:focus-visible,
.records-meeting-notes-page .recording-row.is-active {
  border-color: rgba(23, 111, 102, 0.18);
  background: #eaf4f2;
  box-shadow: inset 3px 0 0 var(--teal);
}

.records-meeting-notes-page .recording-row-main {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.records-meeting-notes-page .recording-row-details,
.records-meeting-notes-page .recording-row-actions {
  justify-content: flex-start;
}

.records-meeting-notes-page #recordings-list-status:not(.error) {
  display: none;
}

.records-meeting-notes-page #record-panel.meeting-note-editor-panel {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.records-meeting-notes-page .meeting-creation-row {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: end;
  flex: 0 0 auto;
  min-height: 98px;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(15, 22, 32, 0.1);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 22, 32, 0.06);
}

.records-meeting-notes-page .meeting-notes-library-context {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, auto);
  gap: 1.5rem;
  align-items: end;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.records-meeting-notes-page .meeting-notes-library-context .field {
  min-width: 0;
}

.records-meeting-notes-page .meeting-notes-library-context select {
  width: 100%;
  min-height: 46px;
}

.records-meeting-notes-page .meeting-library-access {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
  align-content: center;
}

.records-meeting-notes-page .meeting-library-new-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: auto;
  min-height: 46px;
  margin: 0;
  padding: 0.7rem 0.9rem 0.7rem 1.1rem;
  border: 1px solid #0d171f;
  border-radius: 999px;
  background: #0d171f;
  color: #ffffff;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(8, 16, 24, 0.12);
  align-self: end;
}

.records-meeting-notes-page .meeting-new-button-copy {
  color: inherit;
  font-size: 0.88rem;
  font-weight: 800;
}

.records-meeting-notes-page .meeting-library-new-button .meeting-note-toggle-action {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.records-meeting-notes-page .meeting-library-new-button .meeting-note-toggle-label {
  display: none;
}

.records-meeting-notes-page .meeting-library-new-button .section-toggle-indicator {
  width: 28px;
  height: 28px;
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.records-meeting-notes-page .meeting-library-new-button.is-open {
  border-color: rgba(23, 111, 102, 0.24);
  background: #edf6f4;
  color: #123c37;
  box-shadow: none;
}

.records-meeting-notes-page .meeting-library-new-button.is-open .section-toggle-indicator {
  border-color: rgba(15, 22, 32, 0.12);
  color: #123c37;
}

.records-meeting-notes-page .meeting-editor-empty {
  min-height: 0;
  padding: clamp(2rem, 5vw, 4.5rem);
}

.records-meeting-notes-page .meeting-editor-empty h2 {
  max-width: 520px;
  font-size: clamp(2rem, 3.8vw, 3.4rem);
}

.records-meeting-notes-page #record-panel-body {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  margin: 0;
  overflow-y: auto;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  padding-bottom: 7rem;
}

@media (min-width: 981px) {
  .records-meeting-notes-page.records-shared-desktop-shell-page .records-desktop-frame > .main {
    width: 100%;
    max-width: none;
    margin: 0;
    overflow: hidden;
    padding: 0;
  }

  .records-meeting-notes-page.records-shared-desktop-shell-page #recordings-panel {
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: 0;
  }

  .records-meeting-notes-page .recording-row {
    display: block;
  }

  .records-meeting-notes-page .recording-row-main {
    align-items: start;
  }

  .records-meeting-notes-page .recording-row-details,
  .records-meeting-notes-page .recording-row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 1120px) and (min-width: 861px) {
  .records-meeting-notes-page .meeting-notes-workspace {
    grid-template-columns: minmax(250px, 285px) minmax(0, 1fr);
  }

  .records-meeting-notes-page .meeting-creation-row {
    grid-template-columns: 1fr;
  }

  .records-meeting-notes-page .meeting-library-new-button {
    justify-self: start;
  }
}

@media (max-width: 860px) {
  .records-meeting-notes-page .meeting-creation-row,
  .records-meeting-notes-page .meeting-notes-library-context {
    grid-template-columns: 1fr;
  }

  .records-meeting-notes-page .meeting-library-new-button {
    width: 100%;
  }

  .records-meeting-notes-page .meeting-note-editor-panel,
  .records-meeting-notes-page #record-panel-body {
    overflow: visible;
  }
}

/* Shared mobile Records application shell. */
.records-mobile-more-directory {
  display: none;
}

@media (max-width: 980px) {
  body.records-mobile-shell-ready {
    --records-mobile-tabbar-height: 68px;
    overflow-x: hidden;
    background: #f5f7f9;
  }

  .records-mobile-shell-ready .shell {
    min-height: 100dvh;
  }

  .records-mobile-shell-ready .topbar {
    position: sticky;
    z-index: 45;
    top: 0;
    background: #070d14;
    border-bottom-color: rgba(255,255,255,.1);
  }

  .records-mobile-shell-ready .topbar-inner {
    width: 100%;
    min-height: 64px;
    display: block;
    padding: 0 .85rem;
  }

  .records-mobile-shell-ready .dashboard-topbar-row {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
  }

  .records-mobile-shell-ready .dashboard-topbar-row .brand {
    min-width: 0;
  }

  .records-mobile-shell-ready .dashboard-topbar-row .brand-badge-image {
    width: auto;
    height: 28px;
    max-width: min(55vw, 220px);
  }

  .records-mobile-shell-ready .topbar-logout,
  .records-mobile-shell-ready .menu-toggle,
  .records-mobile-shell-ready .topbar-inner > .mobile-menu {
    display: none !important;
  }

  .records-mobile-ai-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    padding: .55rem .8rem;
    border: 1px solid rgba(105,210,196,.4);
    border-radius: 999px;
    background: rgba(29,121,110,.22);
    color: #fff;
    cursor: pointer;
    font: 800 .72rem/1 "Manrope", "Trebuchet MS", sans-serif;
  }

  .records-mobile-tabbar {
    position: fixed;
    z-index: 70;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: calc(var(--records-mobile-tabbar-height) + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    align-items: start;
    padding: .42rem .28rem max(.42rem,env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97);
    border-top: 1px solid rgba(15,22,32,.12);
    box-shadow: 0 -12px 30px rgba(15,22,32,.1);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .records-mobile-tabbar a {
    min-width: 0;
    min-height: 52px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: .16rem;
    padding: .24rem .1rem;
    border-radius: 10px;
    color: #6a7582;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .records-mobile-tabbar a svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .records-mobile-tabbar a span {
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(.58rem,2.7vw,.68rem);
    font-weight: 800;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .records-mobile-tabbar a.is-active {
    color: #176f66;
    background: #e6f2f0;
  }

  .records-mobile-shell-ready .main {
    width: min(100% - 1rem, 760px);
    padding-bottom: calc(var(--records-mobile-tabbar-height) + env(safe-area-inset-bottom) + 1.5rem);
  }

  .records-mobile-shell-ready .panel,
  .records-mobile-shell-ready .account-card,
  .records-mobile-shell-ready .messages-workspace,
  .records-mobile-shell-ready .documents-workspace,
  .records-mobile-shell-ready .meeting-notes-workspace {
    max-width: 100%;
  }

  /* Keep the meeting library and editor usable as one real mobile column. */
  .records-meeting-notes-page .meeting-notes-page,
  .records-meeting-notes-page .meeting-notes-workspace,
  .records-meeting-notes-page .meeting-library-sidebar,
  .records-meeting-notes-page #record-panel.meeting-note-editor-panel {
    width: 100%;
    min-width: 0;
    height: auto;
    overflow: visible;
  }

  .records-meeting-notes-page .meeting-notes-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .records-meeting-notes-page .meeting-library-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(15, 22, 32, 0.1);
  }

  .records-meeting-notes-page .meeting-creation-row,
  .records-meeting-notes-page .meeting-notes-library-context {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .records-meeting-notes-page .meeting-library-new-button {
    width: 100%;
    max-width: 100%;
  }

  .records-meeting-notes-page #record-panel-body {
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .records-meeting-notes-page :is(
    .meeting-setup-grid,
    .meeting-source-options,
    .meeting-preparation-grid,
    .recording-reference-picker,
    .recording-reference-preview-head,
    .recording-reference-row
  ) {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .records-meeting-notes-page :is(input, select, textarea, button, .btn) {
    max-width: 100%;
  }

  .records-mobile-shell-ready :is(button,a,input,select,textarea) {
    scroll-margin-bottom: calc(var(--records-mobile-tabbar-height) + 1.25rem);
  }

  .records-mobile-shell-ready .table-shell,
  .records-mobile-shell-ready .document-toolbar,
  .records-mobile-shell-ready .files-filter-bar,
  .records-mobile-shell-ready .recording-detail-tabs {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .records-mobile-shell-ready :is(.table-shell,.document-toolbar,.files-filter-bar,.recording-detail-tabs)::-webkit-scrollbar {
    display: none;
  }

  .records-mobile-more-directory {
    display: grid;
    gap: 1rem;
    margin: 0 0 1rem;
  }

  .records-mobile-more-head {
    padding: .55rem .15rem .25rem;
  }

  .records-mobile-more-head p,
  .records-mobile-more-detail-head p {
    margin: 0 0 .35rem;
    color: var(--teal);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
  }

  .records-mobile-more-head h1,
  .records-mobile-more-detail-head h1 {
    margin: 0;
    font: 700 clamp(2rem,10vw,2.8rem)/1.05 "Fraunces", "Times New Roman", serif;
  }

  .records-mobile-more-head span {
    display: block;
    margin-top: .5rem;
    color: var(--slate);
    font-size: .88rem;
  }

  .records-mobile-more-groups {
    display: grid;
    gap: .8rem;
  }

  .records-mobile-more-group {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 15px;
  }

  .records-mobile-more-group:not(:has(a:not(.hidden))) {
    display: none;
  }

  .records-mobile-more-group h2 {
    margin: 0;
    padding: .85rem 1rem .55rem;
    color: #7a8692;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .records-mobile-more-group > div {
    display: grid;
  }

  .records-mobile-more-group a {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .78rem 1rem;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: .84rem;
    font-weight: 750;
    text-decoration: none;
  }

  .records-mobile-more-group a i {
    color: #7b8793;
    font-size: 1.35rem;
    font-style: normal;
    font-weight: 400;
  }

  .records-mobile-more-utilities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
  }

  .records-mobile-more-utilities a,
  .records-mobile-more-utilities button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .7rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font: 800 .72rem/1.2 "Manrope", "Trebuchet MS", sans-serif;
    text-align: center;
    text-decoration: none;
  }

  .records-mobile-more-detail-head {
    display: grid;
    gap: .9rem;
    padding: .2rem 0 .9rem;
    border-bottom: 1px solid var(--line);
  }

  .records-mobile-more-detail-head > a {
    width: fit-content;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--teal);
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
  }

  .records-account-page .records-profile-header,
  .records-account-page .admin-tabs {
    display: none !important;
  }

  .records-account-page #account-section {
    gap: 1rem;
  }

  .records-account-page.desktop-account-admin-view #library-settings-card,
  .records-account-page.desktop-account-admin-view #records-help-card {
    display: none !important;
  }

  .records-account-page.desktop-account-admin-view #account-library-card {
    display: block;
    padding: 1rem;
  }

  .records-account-page.desktop-account-admin-view #account-library-card .selected-library-head,
  .records-account-page.desktop-account-admin-view #account-library-card .account-list {
    display: none;
  }

  .records-account-page #library-access-card {
    padding: 1rem;
  }

  .records-account-page #library-access-card > .panel-head {
    display: none;
  }

  .records-account-page .admin-panel-head h4 {
    font-size: clamp(1.35rem,7vw,1.8rem);
  }

  .records-account-page .admin-panel-head-row {
    grid-template-columns: 1fr;
  }

  .records-account-page .admin-panel-head-row .btn {
    width: 100%;
  }

  /* Account detail pages contain wide desktop directories and settings cards.
     Keep those widths inside the page and let data tables scroll locally. */
  .records-account-page.desktop-account-admin-view :is(
    #library-access-card,
    .admin-panels,
    .admin-panel,
    .admin-panel > *,
    .settings-subsection,
    .settings-group,
    .stack,
    .user-directory,
    .contact-directory,
    #member-management-body,
    #member-management-section
  ) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .records-account-page.desktop-account-admin-view :is(
    .admin-panel-head-row,
    .user-directory-head,
    .contact-directory-head
  ) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: .8rem;
  }

  .records-account-page.desktop-account-admin-view .table-shell {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
  }

  .records-account-page.desktop-account-admin-view .data-table {
    min-width: 520px;
  }

  .records-mobile-shell-ready .files-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: .38rem;
  }

  .records-mobile-shell-ready .files-filter-btn,
  .records-mobile-shell-ready .files-filter-upload-btn {
    min-height: 42px;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .records-mobile-shell-ready .files-filter-upload-btn {
    position: sticky;
    right: 0;
    margin-left: .25rem;
    box-shadow: -12px 0 18px #fff;
  }

  .records-meeting-notes-page #recordings-library-panel,
  .records-document-builder-page .document-sidebar,
  .records-messages-page .messages-recipient-sidebar-body {
    max-height: min(330px,42dvh);
    overflow-y: auto;
  }

  .records-meeting-notes-page .meeting-library-sidebar,
  .records-document-builder-page .document-sidebar,
  .records-messages-page .messages-recipient-sidebar {
    background: #fff;
  }

  .records-meeting-notes-page .meeting-editor-empty,
  .records-document-builder-page .document-editor-empty {
    min-height: 280px;
    padding: 2rem 1rem;
  }

  .records-document-builder-page .document-page {
    width: 100%;
    min-height: 520px;
    padding: 1rem;
  }

  .records-document-builder-page .document-page .tiptap {
    min-height: 480px;
  }

  .records-document-builder-page .document-creation-row .document-template-create {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .records-document-builder-page .document-creation-row .document-template-create :is(select, .btn) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .records-document-builder-page .document-toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .records-messages-page .messages-content-card textarea {
    min-height: 220px;
  }

  .records-messages-page .document-send-actions {
    display: grid;
    grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr);
    gap: .6rem;
  }

  .records-messages-page .document-send-actions .btn {
    width: 100%;
    min-height: 46px;
  }

  .records-meeting-notes-page .meeting-workspace-actions.is-revealed:not(.is-docked),
  .records-document-builder-page .document-editor-actions.is-revealed:not(.is-docked) {
    bottom: calc(var(--records-mobile-tabbar-height) + env(safe-area-inset-bottom));
  }

  .records-ai-drawer {
    padding-bottom: calc(var(--records-mobile-tabbar-height) + env(safe-area-inset-bottom));
  }
}

@media (max-width: 620px) {
  .records-mobile-shell-ready .main {
    width: min(100% - .75rem, 560px);
    padding-top: .7rem;
  }

  .records-mobile-shell-ready .panel,
  .records-mobile-shell-ready .account-card {
    padding: .85rem;
    border-radius: 14px;
  }

  .records-mobile-more-utilities {
    grid-template-columns: 1fr;
  }

  .records-account-page #account-library-context,
  .records-meeting-notes-page .meeting-notes-library-context,
  .records-messages-page .messages-library-context {
    grid-template-columns: 1fr;
  }

  .records-document-builder-page .document-editor-actions,
  .records-meeting-notes-page .meeting-workspace-actions {
    max-height: calc(100dvh - var(--records-mobile-tabbar-height) - 1rem);
    overflow-y: auto;
  }

  .records-meeting-notes-page .meeting-library-sidebar-head,
  .records-meeting-notes-page .meeting-creation-row {
    padding-inline: .85rem;
  }

  .records-meeting-notes-page #recordings-library-panel {
    padding-inline: .85rem;
  }

  .records-meeting-notes-page #record-panel-body {
    padding: 1rem .85rem calc(var(--records-mobile-tabbar-height) + 2rem);
  }
}

/* Visible, accessible feedback throughout the Records document workflow. */
.status.is-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  color: var(--teal);
  background: var(--fog, #f4f7fb);
}
.status.is-loading::before {
  content: "";
  flex: 0 0 28px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  animation: records-loading-pulse 1s ease-in-out infinite alternate;
}
#document-pdf-status { margin: 16px; }
@keyframes records-loading-pulse {
  from { opacity: .3; transform: scaleX(.45); }
  to { opacity: 1; transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .status.is-loading::before { animation: none; }
}

/* Match the editor's document hierarchy to its PDF output. */
.document-page .tiptap {
  max-width: 70ch;
  margin-inline: auto;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.46;
}
.document-page .tiptap h1 { font-size: 27px; line-height: 1.25; margin: 0 0 16px; }
.document-page .tiptap h2 { font-size: 18px; line-height: 1.38; margin: 22px 0 8px; }
.document-page .tiptap h3 { font-size: 16px; line-height: 1.39; margin: 16px 0 7px; }
.document-page .tiptap p { margin: 0 0 10px; }
.document-page .tiptap li > p { margin-bottom: 6px; }
.document-page .tiptap > :first-child { margin-top: 0; }

/* Compact, progressive disclosure for draft revision requests and history. */
.recording-revision-composer,
.recording-revision-history { border-top: 1px solid var(--line); padding: 14px 0; }
.recording-revision-composer > summary,
.recording-revision-history > summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-weight: 700; list-style: none; padding: 4px 0;
}
.recording-revision-composer > summary::-webkit-details-marker,
.recording-revision-history > summary::-webkit-details-marker { display: none; }
.recording-revision-composer > summary::after,
.recording-revision-history > summary::after { content: "+"; margin-left: auto; font-size: 22px; }
.recording-revision-composer[open] > summary::after,
.recording-revision-history[open] > summary::after { content: "−"; }
.recording-revision-content { padding-top: 14px; }
.recording-revision-content > label { display: block; font-weight: 600; }
.recording-revision-content > p,
.recording-revision-history > p { color: var(--slate); font-size: .9rem; margin: 8px 0 12px; }
.recording-revision-content .recording-revision-input { min-height: 112px; height: 112px; max-height: 300px; resize: vertical; }
.recording-revision-history-list { list-style: none; padding: 0; margin: 12px 0 0; max-height: 260px; overflow-y: auto; }
.recording-revision-history-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.recording-revision-history-list p { margin: 0 0 4px; }
.recording-revision-history-list time { color: var(--slate); font-size: .8rem; }

/* Branded portals use the organization's palette and typography. */
body.records-portal-host{--teal:var(--portal-deep,#176f66);--gold:var(--portal-accent,#ea9b3f);background:#edf3f5;font-family:var(--portal-body-font,"Manrope"),Arial,sans-serif}
body.records-portal-host .topbar{background:var(--portal-deep,#070d14)!important;border-bottom-color:rgba(255,255,255,.1)}
body.records-portal-host :is(h1,h2,h3,h4){font-family:var(--portal-heading-font,"Fraunces"),serif}
body.records-portal-host :is(button,input,select,textarea){font-family:var(--portal-body-font,"Manrope"),Arial,sans-serif}
body.records-portal-host :is(.records-desktop-nav-links>a.is-active,.records-desktop-nav-links>button.is-active,.records-desktop-nav-parent-active,.records-mobile-tabbar a.is-active){background:color-mix(in srgb,var(--portal-deep) 10%,white);color:var(--portal-deep)}

body.records-portal-host .records-desktop-app-actions .records-ai-header-trigger{border-color:rgba(255,255,255,.3);background:rgba(255,255,255,.1)}

html.records-brand-pending .shell{visibility:hidden}
html.records-brand-pending body{background:#edf3f5}
@media(min-width:981px){body.records-portal-host .topbar-inner{width:min(1180px,calc(100vw - 3rem))}}
body.records-portal-host .records-desktop-app-actions .records-portal-dashboard-link{min-height:40px;padding:.5rem .82rem;border:1px solid rgba(255,255,255,.16);border-radius: 4px;background:rgba(255,255,255,.06);color:#fff}
body.records-portal-host .records-desktop-app-actions .records-portal-dashboard-link:hover,body.records-portal-host .records-desktop-app-actions .records-portal-dashboard-link:focus-visible{background:rgba(255,255,255,.12);color:#fff;border-color:rgba(255,255,255,.28)}

body.records-portal-host .records-desktop-app-brand{font-family:Manrope,Arial,sans-serif}

/* Shared navigation button treatment, including the compact mobile header. */
.topbar .btn{border-radius:4px;font-weight:500;letter-spacing:normal;text-transform:none}

/* Website publishing belongs to the Library settings surface. */
.records-website-settings .website-embed-tabs{display:flex;gap:24px;border-bottom:1px solid #dce4e1;margin-bottom:20px}
.records-website-settings .website-embed-tabs button{font:600 13px/1.5 Manrope,sans-serif;border:0;border-bottom:2px solid transparent;border-radius:0;padding:10px 0;background:transparent;color:#65736e;cursor:pointer}
.records-website-settings .website-embed-tabs button[aria-pressed=true]{color:#176f66;border-bottom-color:#176f66}
.records-website-settings :is(.records-publication-settings,.calendar-embed-settings){display:flex;flex-direction:column;align-items:stretch;gap:16px;max-width:720px}
.records-website-settings .calendar-embed-settings h3{display:none}
.records-website-settings p{margin:0;color:var(--muted,#65736e);font-size:12px;line-height:1.6}
.records-website-settings label{font-size:12px;font-weight:600}
.records-website-settings :is(.publication-option,.embed-calendar-option){display:flex;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px solid #e5ebe8;font-size:13px;font-weight:500}
.records-website-settings input[type=checkbox]{appearance:auto;width:16px;height:16px;min-height:0;padding:0;margin:2px 0;flex:none;accent-color:#176f66}
.records-website-settings .embed-calendar-option small{display:block;font-size:11px;color:#718078;margin-top:3px}
.records-website-settings fieldset{border:0;padding:0;margin:0;min-width:0}
.records-website-settings legend{font-size:12px;font-weight:600;margin-bottom:6px}
.records-website-settings select{display:block;width:100%;max-width:360px;margin-top:6px;padding:9px 10px;border:1px solid #d5dfdc;border-radius:4px;background:#fff;font:13px Manrope,sans-serif;color:#233b35}
.records-website-settings .embed-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.records-website-settings :is(.btn,.embed-actions button){width:auto;align-self:flex-start;border:1px solid #cddbd5;border-radius:4px;padding:8px 12px;background:#fff;color:#235b50;font:600 12px/1.5 Manrope,sans-serif;box-shadow:none;cursor:pointer}
.records-website-settings .records-publication-settings > .btn{background:#176f66;border-color:#176f66;color:#fff}
.records-website-settings button:disabled{opacity:.45;cursor:default}
.records-website-settings button:focus-visible{outline:2px solid #176f66;outline-offset:3px}
.records-website-settings textarea{display:block;box-sizing:border-box;width:100%;min-height:92px;margin-top:6px;padding:10px;border:1px solid #d5dfdc;border-radius:4px;background:#f7f9f8;color:#334a42;font:12px/1.6 monospace;resize:vertical;overflow-wrap:anywhere}
.records-website-settings .calendar-embed-preview{width:100%;height:420px;border:1px solid #d5dfdc;border-radius:4px}
.records-website-settings p:empty{display:none}

body.records-portal-host .portal-brand-wordmark img{width:auto;height:48px;max-width:min(180px,40vw);object-fit:contain}.records-desktop-app-brand [hidden],.brand-home-link [hidden]{display:none!important}
/* Personal account heading is visible only in the profile view. */
.records-account-page:not(.desktop-account-admin-view) #account-section .records-profile-header {
  display: block !important;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.records-account-page #account-section .records-profile-header h1 {
  font: 700 clamp(1.65rem, 3vw, 2.3rem)/1.15 Manrope, sans-serif;
  letter-spacing: -.035em;
  margin: 0;
}
.records-account-page .profile-section-title {
  margin: 0;
  font: 700 1.1rem/1.4 Manrope, sans-serif;
}

.records-reminder-settings { margin: 1.5rem 0; border-top: 1px solid #d9e2df; padding-top: 1rem; }
.records-reminder-settings > summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; }
.records-reminder-settings fieldset { border: 0; padding: 0; margin: 1rem 0; min-width: 0; }
.records-reminder-settings label { display: block; margin: 1rem 0; color: #223b34; font-size: .95rem; font-weight: 600; letter-spacing: normal; text-transform: none; }
.records-reminder-settings input[type=checkbox] { width: auto; margin: 0 .5rem 0 0; accent-color: #226e5d; }
.records-reminder-settings select { display: block; width: 100%; max-width: 36rem; margin-top: .5rem; }
.records-reminder-settings button { padding: .65rem 1rem; border: 1px solid #b8ceca; border-radius: 6px; color: #174b43; background: #edf5f3; font: inherit; cursor: pointer; }
.records-reminder-settings button:disabled { opacity: .5; cursor: default; }
.records-reminder-settings p { max-width: 48rem; font-size: .9rem; line-height: 1.6; color: #52615b; }
.records-reminder-settings li { padding: .75rem 0; border-bottom: 1px solid #e3e9e6; font-size: .9rem; overflow-wrap: anywhere; }

/* Native public preview keeps focus within the dialog and restores its opener. */
dialog#embed-file-modal { width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; border: 0; box-sizing: border-box; }
dialog#embed-file-modal::backdrop { background: transparent; }
#embed-file-modal .file-modal-actions a, #embed-file-modal .file-modal-close { min-height: 44px; display: inline-flex; align-items: center; }
#embed-file-modal .file-modal-actions :focus-visible { outline: 2px solid white; outline-offset: -2px; }
.embed-body .embed-record-card:focus-visible { outline: 3px solid #176f66; outline-offset: 3px; }
@media (max-width: 620px) {
 #embed-file-modal .file-modal-header { flex-wrap: wrap; }
 #embed-file-modal .file-modal-actions { flex-wrap: wrap; overflow: visible; }
}

/* Keep the public text alternative readable without relying on a PDF plugin. */
.embed-body input::placeholder { color: #5d6979; opacity: 1; }
.embed-body input, .embed-body select { border-color: #778392; }
#embed-file-modal .file-modal-text { overflow-wrap: anywhere; white-space: pre-wrap; padding: clamp(1rem, 3vw, 2rem); color: #0f1620; background: #fff; font: 1rem/1.7 Manrope, Arial, sans-serif; max-height: 72dvh; overflow: auto; }
#embed-file-modal .file-modal-text:focus-visible { outline: 3px solid #176f66; outline-offset: -3px; }
#embed-file-modal .file-modal-frame[hidden], #embed-file-modal .file-modal-text[hidden] { display: none; }
/* Optional document actions must stay hidden until their output is available. */
#embed-file-modal .file-modal-actions [hidden],
#embed-file-modal #embed-tagged-status[hidden] { display: none !important; }
#embed-tagged-status { margin: 0; padding: 12px 16px; background: #fff; color: #18242d; }
#document-tagged-pdf[hidden] { display: none !important; }

.recording-row-details .recording-transcript-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-weight: 700;
}

.recording-transcript-badge::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: currentColor;
}

.recording-transcript-badge--pending { color: #725400; }
.recording-transcript-badge--ready { color: #176342; }
.recording-transcript-badge--failed { color: #a02929; }

/* The workspace supplies the organization identity and account navigation. */
.workspace-app-embedded .topbar :is(.records-desktop-app-brand,.brand-home-link,.topbar-logout,[data-records-desktop-signout],.records-portal-dashboard-link),
.workspace-app-embedded .records-desktop-app-actions > a[href="/account/"] { display:none; }
.workspace-app-embedded .topbar .records-desktop-appbar,
.workspace-app-embedded .topbar .dashboard-topbar-row { justify-content:flex-end; }

@media (min-width:981px) {
  .workspace-app-embedded :is(.records-shared-desktop-shell-page,.records-account-page) .shell {
    grid-template-rows:minmax(0,1fr);
  }
  .workspace-app-embedded :is(.records-shared-desktop-shell-page,.records-account-page) .shell > .topbar { display:none; }
}
@media (max-width:980px) {
  .workspace-app-embedded .records-mobile-shell-ready .shell > .topbar { display:none; }
  .workspace-app-embedded .shell > .topbar { background:white; color:#233443; }
  .workspace-app-embedded .topbar .menu-toggle span { background:currentColor; }
}

/* Records program settings (Library settings) and the sign-in reminder. */
.records-program-choices { display: grid; gap: 0.45rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.records-program-choices > p { margin: 0; }
.records-program .checkbox-row { display: flex; align-items: flex-start; gap: 0.55rem; font-weight: 500; line-height: 1.45; }
.records-program .checkbox-row input { margin-top: 0.2rem; flex: none; }
.records-program .actions input { flex: 1 1 16rem; min-width: 0; }
.records-program-reminder { width: min(32rem, calc(100vw - 2rem)); padding: 1.5rem; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 12px; background: #fff; color: #17212b; box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.22); }
.records-program-reminder::backdrop { background: rgba(15, 23, 32, 0.45); }
.records-program-reminder h2 { margin: 0 0 0.6rem; font-size: 1.35rem; }
.records-program-reminder ul { margin: 0.4rem 0 0.9rem; padding-left: 1.2rem; }
.records-program-reminder .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.records-program-officer { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }

/* Document Builder PDF window: optional cover page, styled like the header's buttons. */
.document-pdf-cover {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border-radius: 8px;
  padding: 0.32rem 0.55rem 0.32rem 0.45rem;
  color: rgba(255, 255, 255, 0.84);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 0.88rem;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.document-pdf-cover:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }
.document-pdf-cover:has(input:focus-visible) { outline: 2px solid #ffffff; outline-offset: 1px; }
.document-pdf-cover input { width: 0.95rem; height: 0.95rem; margin: 0; accent-color: #ffffff; cursor: pointer; }
.document-pdf-cover:has(input:disabled) { opacity: 0.55; cursor: progress; }

/* Document Builder trash */
.records-document-builder-page .document-trash-open,
.records-document-builder-page .document-trash-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  background: transparent;
  font: 700 0.86rem/1.3 Manrope, sans-serif;
  cursor: pointer;
}
.records-document-builder-page .document-trash-open {
  margin-top: 0.4rem;
  padding: 0.7rem 0.75rem;
  border-top: 1px solid rgba(15, 22, 32, 0.08);
  border-radius: 0 0 12px 12px;
  color: var(--slate);
}
.records-document-builder-page .document-trash-open:hover,
.records-document-builder-page .document-trash-open:focus-visible { color: var(--ink); background: #f4f7f8; }
.records-document-builder-page .document-trash-open svg,
.records-document-builder-page .document-trash-back svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.records-document-builder-page .document-trash-count {
  margin-left: auto;
  min-width: 22px;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #edf1f3;
  color: var(--ink-soft);
  font-size: 0.74rem;
  text-align: center;
}
.records-document-builder-page .document-trash-back {
  width: fit-content;
  padding: 0.2rem 0.1rem;
  color: var(--teal);
}
.records-document-builder-page .document-trash-back:hover { text-decoration: underline; }
.records-document-builder-page .document-trash-intro {
  margin: 0;
  color: var(--slate);
  font-size: 0.84rem;
  line-height: 1.45;
}
.records-document-builder-page .document-trash-item {
  display: grid;
  gap: 0.28rem;
  padding: 0.75rem;
  border: 1px solid rgba(15, 22, 32, 0.09);
  border-radius: 12px;
  background: #fbfcfc;
}
.records-document-builder-page .document-trash-item .document-list-title { color: var(--ink-soft); }
.records-document-builder-page .document-trash-meta {
  margin: 0;
  color: var(--slate);
  font-size: 0.8rem;
  line-height: 1.4;
}
.records-document-builder-page .document-trash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.3rem;
}
.records-document-builder-page .document-delete-note {
  margin: 0.15rem 0.25rem 0.4rem;
  color: var(--slate);
  font-size: 0.84rem;
  line-height: 1.45;
}
.document-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: min(520px, calc(100vw - 32px));
  padding: 0.75rem 0.9rem 0.75rem 1.05rem;
  border-radius: 12px;
  background: #101820;
  color: #ffffff;
  box-shadow: 0 14px 40px rgba(8, 14, 20, 0.28);
  font: 600 0.9rem/1.4 Manrope, sans-serif;
  transform: translate(-50%, 12px);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.document-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.document-toast span { overflow-wrap: anywhere; }
.document-toast button {
  flex: none;
  margin-left: auto;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font: 800 0.84rem/1 Manrope, sans-serif;
  cursor: pointer;
}
.document-toast button:hover,
.document-toast button:focus-visible { background: rgba(255, 255, 255, 0.12); }
@media (prefers-reduced-motion: reduce) { .document-toast { transition: none; } }

/* Public Library embed with the organization's website branding (logo or name, colors, fonts). */
.embed-identity { display: flex; align-items: center; gap: .75rem; padding: 0 0 .9rem; margin-bottom: 1rem; border-bottom: 2px solid var(--teal); }
.embed-identity.hidden { display: none; }
.embed-identity-mark { display: inline-flex; align-items: center; gap: .6rem; }
.embed-identity-mark img { width: auto; height: 48px; max-width: min(180px, 40vw); object-fit: contain; }
.embed-identity-mark span { font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.embed-identity-product { padding-left: .75rem; border-left: 1px solid var(--line); color: var(--ink-soft); font-weight: 600; }
.embed-website-brand .embed-head h1 { font-size: 1.4rem; }
