.record-desk,
.record-drawer,
.registration-documents,
.student-portal-content {
  --desk-ink: #26212a;
  --desk-muted: #625766;
  --desk-accent: #71354f;
  --desk-line: #e8e1e6;
  --desk-tint: #f7eff3;
  color: var(--desk-ink);
}

.record-desk { text-align: left; }
.record-desk > .content-card { margin-top: 16px; }
.record-desk .content-card:hover { transform: none; box-shadow: 0 4px 18px rgba(52, 34, 47, .04); }
.record-desk-header {
  padding: clamp(16px, 2.8vw, 28px);
  border: 1px solid var(--desk-line);
  background: linear-gradient(125deg, #fff 38%, #faf1f5 100%);
  box-shadow: 0 6px 17px rgba(71, 38, 54, .05);
}
.record-desk-header .record-heading { min-width: 0; overflow-wrap: anywhere; }
.record-desk-header .record-heading strong { font-size: clamp(1.05rem, 2.3vw, 1.4rem); }
.record-desk .section-heading { flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; }
.record-desk .section-heading > div { display: block; text-align: left; }
.record-desk .section-heading h2 { color: var(--desk-ink); }
.record-desk .section-heading p,
.record-desk .section-heading > div > div {
  margin: 4px 0 0;
  color: var(--desk-muted);
  text-align: left;
  line-height: 1.55;
  font-size: .83rem;
}
.record-desk .section-heading .button svg,
.registration-documents [data-add-document] svg { width: 16px; height: 16px; }
.record-desk section[id] { scroll-margin-top: 95px; }
.record-section-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.record-section-tabs a {
  padding: 7px 11px;
  border: 1px solid var(--desk-line);
  border-radius: 7px;
  background: #fff;
  color: var(--desk-accent);
  font-size: .78rem;
  font-weight: 650;
}
.record-section-tabs a:hover { background: var(--desk-tint); }

.record-tile-grid,
.record-translation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 208px), 1fr));
  gap: 12px;
}
.record-tile {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--desk-line);
  border-radius: 14px;
  background: #fff;
  transition: background-color .16s, border-color .16s;
}
.record-tile:hover,
.record-tile:focus-within { border-color: #cfb2c2; background: #fdfbfd; }
.record-tile-top,
.record-language-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.record-tile-top { justify-content: space-between; }
.record-tile-icon {
  display: inline-grid;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 10px;
  color: var(--desk-accent);
  background: var(--desk-tint);
}
.record-tile-icon svg { width: 21px; height: 21px; }
.record-format {
  padding: 4px 7px;
  color: #544754;
  border: 1px solid var(--desk-line);
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 650;
  background: #faf8fa;
}
.record-tile-title { flex: 1; }
.record-tile h3,
.record-language h3 { margin: 0; font-size: .96rem; line-height: 1.45; overflow-wrap: anywhere; }
.record-tile-title p { margin: 4px 0 0; color: var(--desk-muted); font-size: .78rem; overflow-wrap: anywhere; }
.record-tile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.record-tile-actions svg { width: 15px; height: 15px; flex-shrink: 0; }
.record-tile-actions a { white-space: nowrap; }

.record-language {
  padding: 12px 15px 14px;
  border: 1px solid var(--desk-line);
  border-radius: 13px;
  background: #faf8fa;
}
.record-language-title .record-format { margin-left: auto; }
.record-language ul { padding: 0; list-style: none; margin: 11px 0 0; color: var(--desk-muted); }
.record-language li { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 7px 0; font-size: .83rem; }
.record-language li + li { border-top: 1px solid var(--desk-line); }
.record-language li small { display: block; margin-top: 3px; }
.record-language .button { white-space: nowrap; }
.record-language .button svg { width: 14px; height: 14px; flex: 0 0 auto; }
.record-desk .record-certified .section-heading { justify-content: flex-start; }
.record-certified form.filter-bar { flex-direction: row; align-items: flex-end; justify-content: flex-start; }
.record-certified .filter-bar .field { flex: 0 1 360px; text-align: left; }

.record-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 530px);
  height: 100%;
  max-height: none;
  max-width: none;
  margin: 0;
  padding: clamp(14px, 3.5vw, 24px);
  box-sizing: border-box;
  overflow: auto;
  border: 0;
  border-left: 1px solid var(--desk-line);
  background: #fff;
  box-shadow: -12px 0 32px #261b2a24;
}
.record-drawer::backdrop { background: #21142170; }
.record-drawer-header,
.record-drawer-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.record-drawer-header h2 { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.record-drawer-body { color: var(--desk-muted); margin: 18px 0; }
.record-drawer-body img { display: block; margin: 0 auto; max-width: 100%; max-height: 68vh; object-fit: contain; border-radius: 9px; }
.record-drawer-body img[hidden] { display: none; }
.record-drawer-actions { justify-content: flex-end; flex-wrap: wrap; }
.record-drawer [hidden] { display: none; }

.registration-documents:hover { transform: none; }
.registration-documents .upload-grid { direction: ltr; }
.registration-documents .upload-card { text-align: left; border-color: var(--desk-line); background: #fdfbfd; }
.registration-documents .upload-card:focus-within { outline: 2px solid #71354f; outline-offset: 3px; }
.registration-documents .document-editor-head h3 small { color: var(--desk-muted); font-weight: 500; }
.ocr-panel {
  margin: 17px 0 0;
  scroll-margin-top: 115px;
  padding: 15px;
  border: 1px solid var(--desk-line);
  border-radius: 12px;
  background: #faf7f9;
  text-align: left;
}
.ocr-panel [hidden] { display: none !important; }
.ocr-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ocr-heading h3 { margin: 0 0 4px; font-size: .95rem; }
.ocr-heading p, .ocr-status { margin: 0; font-size: .81rem; line-height: 1.5; color: var(--desk-muted); }
.ocr-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ocr-actions svg { width: 16px; height: 16px; }
.ocr-status { margin-top: 9px; overflow-wrap: anywhere; }
.ocr-status:empty { display: none; }
.ocr-results { margin-top: 12px; }
.ocr-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr)); gap: 9px; }
.ocr-choices { min-width: 0; border: 1px solid var(--desk-line); border-radius: 9px; background: #fff; padding: 6px 8px 8px; margin: 0; }
.ocr-choices legend { color: var(--desk-ink); font-size: .76rem; font-weight: 700; padding: 0 3px; }
.ocr-option { display: flex; align-items: flex-start; gap: 7px; padding: 4px 0; font-size: .78rem; cursor: pointer; }
.ocr-option input { width: 15px; height: 15px; min-height: 0; margin: 2px 0 0; flex: 0 0 15px; accent-color: var(--desk-accent); }
.ocr-option strong, .ocr-option small { display: block; overflow-wrap: anywhere; }
.ocr-option small, .ocr-current { color: var(--desk-muted); font-size: .72rem; }
.ocr-current, .ocr-conflict { margin: 0 0 4px; }
.ocr-conflict { color: #87491c; font-size: .72rem; }
.ocr-results > .button { margin-top: 10px; }
.ocr-sources { margin-top: 12px; font-size: .78rem; }
.ocr-sources summary { cursor: pointer; color: var(--desk-accent); font-weight: 650; }
.ocr-source { margin-top: 7px; padding: 8px; border-radius: 8px; background: #fff; border: 1px solid var(--desk-line); }
.ocr-source h4, .ocr-source p { margin: 0; overflow-wrap: anywhere; }
.ocr-source pre { margin: 5px 0 0; font-family: inherit; max-height: 14em; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.student-wizard-shell .wizard-step-list { direction: ltr; }
.student-wizard-shell .wizard-progress-top { flex-direction: row; }
.student-wizard-shell .wizard-progress-track span { margin-left: 0; margin-right: auto; }

.student-portal-content .student-welcome {
  background: linear-gradient(120deg, #faf1f5, #fff);
  border: 1px solid var(--desk-line);
  color: var(--desk-ink);
}
.student-portal-content .student-welcome h2,
.student-portal-content .student-welcome-number strong { color: var(--desk-ink); }
.student-portal-content .student-welcome p,
.student-portal-content .student-welcome-number span { color: var(--desk-muted); }
.student-portal-content .student-welcome-number { border-color: var(--desk-line); background: #fff; }
.student-portal-content .student-portrait { background: var(--desk-tint); color: var(--desk-accent); border-color: #ead9e3; }
.student-portal-content .student-tabs { max-width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.record-desk :is(a, button):focus-visible,
.record-drawer :is(a, button):focus-visible,
.student-portal-content a:focus-visible { outline: 2px solid #71354f; outline-offset: 3px; }

@media (max-width: 550px) {
  .record-desk .section-heading { flex-wrap: wrap; align-items: flex-start; }
  .record-desk .section-heading p { max-width: none; }
  .record-desk-header .record-actions { width: 100%; }
  .record-certified form.filter-bar { flex-wrap: wrap; }
  .record-certified .filter-bar .field { flex-basis: 100%; }
  .record-drawer { width: 100%; }
  .registration-documents .document-editor-head { flex-direction: column; align-items: flex-start; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .record-tile { transition: none; }
}
