:root {
  --navy: #07104f;
  --navy-deep: #030936;
  --blue: #1c2d82;
  --blue-light: #9fb7f0;
  --ink: #151a2c;
  --ink-soft: #62687a;
  --paper: #f5f5f2;
  --surface: #ffffff;
  --line: #d9dce5;
  --line-strong: #bfc4d3;
  --success: #22644f;
  --danger: #a82d2d;
  --radius: 5px;
  --shadow: 0 28px 70px rgba(3, 9, 54, 0.22);
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
}

button,
input,
select {
  font: inherit;
}

button,
.upload-button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  z-index: 20;
  top: 12px;
  left: 18px;
  transform: translateY(-160%);
  padding: 13px 18px;
  background: var(--navy);
  color: white;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 clamp(24px, 4.5vw, 76px);
  border-bottom: 1px solid #e7e8ed;
  background: white;
  position: relative;
  z-index: 5;
}

.brand {
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 2vw, 29px);
  line-height: 0.95;
  letter-spacing: 0.01em;
}

.brand-lockup small {
  margin-top: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.header-context {
  color: #4c5160;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px 24px;
}

.language-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.language-picker select {
  min-width: 100px;
  min-height: 36px;
  padding: 6px 24px 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
}

.language-picker select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.user-chip {
  max-width: 290px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main {
  flex: 1;
}

.login-layout {
  min-height: calc(100vh - 174px);
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(360px, 500px);
  gap: clamp(48px, 7vw, 118px);
  align-items: center;
  overflow: hidden;
  position: relative;
  padding: clamp(62px, 8vh, 104px) clamp(24px, 7vw, 112px);
  background:
    radial-gradient(circle at 82% 22%, rgba(57, 99, 189, 0.5), transparent 0 23%, transparent 46%),
    linear-gradient(116deg, var(--navy-deep) 0%, var(--navy) 54%, #0d216b 100%);
  isolation: isolate;
}

.login-layout::before {
  width: 570px;
  height: 760px;
  content: "";
  position: absolute;
  z-index: -1;
  top: -175px;
  right: 9%;
  border: 1px solid rgba(164, 194, 255, 0.21);
  box-shadow:
    62px 42px 0 -1px rgba(12, 30, 99, 0.15),
    62px 42px 0 0 rgba(164, 194, 255, 0.18),
    124px 84px 0 -1px rgba(12, 30, 99, 0.12),
    124px 84px 0 0 rgba(164, 194, 255, 0.12);
  transform: rotate(34deg) skewY(-9deg);
}

.login-layout::after {
  width: 580px;
  height: 580px;
  content: "";
  position: absolute;
  z-index: -1;
  right: -190px;
  bottom: -300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(86, 130, 229, 0.3), transparent 67%);
}

.login-copy,
.login-card {
  position: relative;
  z-index: 1;
}

.login-copy {
  max-width: 760px;
  color: white;
}

.eyebrow {
  display: block;
  margin-bottom: 15px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.login-copy .eyebrow {
  color: var(--blue-light);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.login-copy h1 {
  max-width: 690px;
  margin-bottom: 28px;
  font-size: clamp(44px, 5.2vw, 70px);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.hero-rule {
  width: 124px;
  height: 2px;
  display: block;
  margin: 0 0 27px;
  background: rgba(255, 255, 255, 0.88);
}

.login-copy > p {
  max-width: 690px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.65;
}

.trust-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 38px 0 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  list-style: none;
  color: rgba(255, 255, 255, 0.82);
}

.trust-list li {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 18px 20px 18px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  line-height: 1.4;
}

.trust-list li + li {
  padding-left: 20px;
}

.trust-list li:last-child {
  border-right: 0;
}

.trust-list li > span:first-child {
  color: var(--blue-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.trust-list li > span:last-child {
  color: rgba(255, 255, 255, 0.86);
  font-family: inherit;
  font-size: 13px;
}

.login-card,
.panel,
.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.login-card {
  padding: clamp(34px, 4vw, 52px);
  border-top: 5px solid var(--navy);
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: 30px;
  line-height: 1.15;
}

.muted {
  color: var(--ink-soft);
  line-height: 1.55;
}

.login-card label {
  display: grid;
  gap: 9px;
  margin-top: 24px;
  color: #353a4b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  outline: none;
  background: white;
  color: var(--ink);
  padding: 0 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(28, 45, 130, 0.11);
}

.form-message {
  min-height: 21px;
  margin: 14px 0 4px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.button {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  padding: 0 19px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.button:hover:not(:disabled, [aria-disabled="true"]) {
  background: var(--blue);
  color: white;
}

.button:disabled,
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}

.button-primary {
  background: var(--navy);
  color: white;
}

.button-secondary {
  border-color: var(--navy);
  background: white;
  color: var(--navy);
}

.button-quiet {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--navy);
}

.login-card .button-primary {
  width: 100%;
  min-height: 54px;
  margin-top: 10px;
}

.privacy-note {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.auth-link {
  width: 100%;
  justify-content: center;
}

.app-view {
  width: min(1380px, calc(100% - 64px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.welcome-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.welcome-row h1 {
  margin-bottom: 8px;
  color: var(--navy);
  font-size: clamp(32px, 3.3vw, 44px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.welcome-row p {
  margin-bottom: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0 22px;
}

.metric-card {
  min-height: 106px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-top: 3px solid var(--navy);
}

.metric-card span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 700;
}

.metric-card .metric-date {
  font-size: 22px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(275px, 310px) minmax(0, 1fr);
  gap: 22px;
}

.panel {
  min-height: 540px;
  overflow: hidden;
}

.panel-heading {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.panel-heading .eyebrow {
  margin-bottom: 5px;
}

.panel-heading h2 {
  margin-bottom: 0;
  color: var(--navy);
  font-size: 23px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.matter-count {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 9px;
  color: var(--ink-soft);
  font-size: 12px;
}

.search-field {
  display: block;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.search-field input {
  min-height: 43px;
  background: #f8f8fa;
  font-size: 13px;
}

.matter-list {
  display: block;
  max-height: 650px;
  overflow: auto;
}

.matter-item {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  padding: 19px 20px;
  text-align: left;
  border-radius: 0;
  overflow-wrap: anywhere;
}

.matter-item:hover {
  background: #f2f3f8;
}

.matter-item.is-active {
  background: var(--navy);
  color: white;
  box-shadow: inset 4px 0 0 var(--blue-light);
}

.matter-item strong,
.matter-item span,
.matter-item small {
  display: block;
}

.matter-list .empty-state {
  min-height: 210px;
  padding: 25px;
  font-size: 13px;
}

.matter-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.matter-page-status {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

.matter-pagination .button {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 11px;
}

.search-clear {
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  min-height: 40px;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.search-clear:hover {
  color: var(--navy-deep);
}

.matters-panel > .search-clear {
  margin: 0 18px 6px;
}

.document-heading {
  align-items: flex-start;
  padding-top: 24px;
}

.document-heading > div {
  min-width: 0;
}

.document-heading .eyebrow {
  overflow-wrap: anywhere;
}

.selected-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 14px;
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.matter-status {
  border: 1px solid #ccd9d3;
  border-radius: 20px;
  background: #f0f7f3;
  padding: 3px 10px;
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
}

.matter-status[data-status="pending"] {
  color: #755313;
  background: #fcf7e9;
  border-color: #e8d7a9;
}

.matter-status[data-status="closed"],
.matter-status[data-status="archived"] {
  color: var(--ink-soft);
  background: #f4f4f7;
  border-color: var(--line);
}

.matter-item strong {
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.matter-item.is-active strong,
.matter-item.is-active small {
  color: var(--blue-light);
}

.matter-item span {
  font-weight: 700;
  line-height: 1.4;
}

.matter-item small {
  margin-top: 8px;
  color: var(--ink-soft);
}

.upload-button {
  white-space: nowrap;
  flex: 0 0 auto;
  gap: 8px;
}

.upload-help {
  margin: 0;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfd;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.upload-progress {
  margin: 18px 24px;
  padding: 14px 16px;
  border: 1px solid #cbd4ee;
  border-radius: 4px;
  background: #f5f7fd;
}

.upload-progress p {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.upload-progress progress {
  width: 100%;
  height: 8px;
  accent-color: var(--blue);
}

.document-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 1.5fr) minmax(130px, 1fr) minmax(130px, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 18px 24px 12px;
}

.document-toolbar label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.document-toolbar input,
.document-toolbar select {
  min-height: 43px;
  padding: 0 11px;
  font-size: 13px;
}

.document-results-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 14px;
  min-height: 28px;
}

.document-results-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.notice {
  margin: 18px 24px 0;
  border-left: 3px solid var(--blue);
  background: #edf0fa;
  padding: 12px 14px;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.5;
}

.notice.is-error {
  border-left-color: var(--danger);
  background: #fae9e8;
  color: #762020;
}

.publication-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: #f8f9fc;
}

.publication-toolbar p {
  margin: 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.publication-toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.publication-toolbar select {
  width: auto;
  min-height: 39px;
  padding-right: 28px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.empty-state,
.loading-state {
  min-height: 295px;
  display: grid;
  place-content: center;
  padding: 45px;
  color: var(--ink-soft);
  text-align: center;
}

.empty-state .button {
  justify-self: center;
  margin-top: 20px;
}

.empty-state.is-loading .empty-icon {
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--blue);
  font-size: 0;
  width: 32px;
  height: 32px;
  animation: loading-spin 900ms linear infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

.empty-state h3 {
  margin: 12px 0 8px;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 700;
}

.empty-state p {
  max-width: 390px;
  margin-bottom: 0;
  line-height: 1.55;
}

.empty-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  color: var(--blue);
  font-size: 26px;
}

.document-list {
  padding: 8px 24px 28px;
}

.document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.document-row.is-pending {
  border-left: 3px solid var(--blue);
  padding-left: 12px;
}

.document-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.file-mark {
  width: 42px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  background: #f1f3f9;
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.document-copy {
  min-width: 0;
}

.document-copy strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.45;
}

.document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 12px;
}

.source-tag {
  color: var(--success);
  font-weight: 700;
}

.visibility-tag {
  font-weight: 700;
}

.visibility-tag.is-pending {
  color: var(--blue);
}

.visibility-tag.is-published {
  color: var(--success);
}

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

.document-row .button {
  min-width: 104px;
}

.access-panel {
  min-height: auto;
  margin-top: 22px;
}

.access-content {
  padding: 24px;
}

.access-explanation {
  margin-bottom: 22px;
  border-left: 3px solid var(--blue);
  background: #edf0fa;
  padding: 13px 15px;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.55;
}

.access-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.access-selector {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.access-selector label {
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.access-selector input {
  min-height: 43px;
  font-size: 13px;
}

.access-selector select {
  width: 100%;
  height: 218px;
  padding: 5px;
  font-size: 13px;
}

.access-selector option {
  padding: 8px;
}

.access-content > .notice {
  margin: 20px 0 0;
}

.access-summary {
  margin: 23px 0 14px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
}

.access-matter-list {
  max-height: 640px;
  overflow: auto;
  border: 1px solid var(--line);
}

.access-matter {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.access-matter:last-child {
  border-bottom: 0;
}

.access-matter-choice {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  cursor: pointer;
}

.access-matter-choice input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  accent-color: var(--navy);
}

.access-matter-choice strong,
.access-matter-choice span span,
.access-matter-choice small {
  display: block;
}

.access-matter-choice strong {
  margin-bottom: 4px;
  color: var(--navy);
}

.access-matter-choice small {
  margin-top: 4px;
  color: var(--ink-soft);
}

.access-existing {
  margin: 8px 0 0 31px;
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}

.access-members {
  display: grid;
  gap: 7px;
  margin: 12px 0 0 31px;
  color: var(--ink-soft);
  font-size: 12px;
}

.access-members > strong {
  color: var(--ink);
}

.access-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.access-member .button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 10px;
  white-space: nowrap;
}

.stale-access {
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 25px;
}

.stale-access-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.stale-access-heading h3 {
  margin-bottom: 7px;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}

.stale-access-heading p {
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.stale-access > .notice {
  margin: 12px 0;
}

.stale-access-list {
  max-height: 440px;
  overflow: auto;
  border: 1px solid var(--line);
}

.stale-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.stale-member:last-child {
  border-bottom: 0;
}

.stale-member > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-size: 12px;
}

.stale-member strong {
  color: var(--navy);
  font-size: 13px;
}

.stale-member small {
  color: var(--ink-soft);
}

.site-footer {
  min-height: 76px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 0 clamp(24px, 4.5vw, 76px);
  border-top: 1px solid #e7e8ed;
  background: white;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1050px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .login-copy {
    max-width: 820px;
  }

  .login-card {
    width: min(560px, 100%);
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .access-selectors {
    grid-template-columns: 1fr;
  }

  .panel {
    min-height: auto;
  }

  .matter-list {
    max-height: 260px;
  }

  .matter-item {
    padding: 15px 20px;
  }
}

@media (max-width: 700px) {
  .site-header {
    min-height: 92px;
    padding: 0 18px;
    gap: 12px;
  }

  .header-tools {
    gap: 6px 10px;
    max-width: 65%;
    padding: 10px 0;
  }

  .language-picker {
    flex-wrap: wrap;
    gap: 3px 6px;
  }

  .language-picker > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .language-picker select {
    min-width: 88px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-context,
  .brand-lockup small,
  .user-chip {
    display: none;
  }

  .login-layout {
    min-height: auto;
    padding: 52px 18px 62px;
  }

  .login-copy h1 {
    font-size: clamp(41px, 12vw, 58px);
  }

  .trust-list {
    grid-template-columns: 1fr;
  }

  .trust-list li,
  .trust-list li + li {
    min-height: auto;
    grid-template-columns: 42px 1fr;
    align-items: center;
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .login-card {
    padding: 32px 23px;
  }

  .app-view {
    width: min(100% - 32px, 1440px);
    padding-top: 28px;
  }

  .welcome-row,
  .site-footer,
  .document-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .welcome-row {
    gap: 15px;
  }

  .welcome-row .button {
    align-self: flex-end;
    margin-top: -2px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 20px;
  }

  .metric-card {
    min-height: 95px;
    padding: 15px;
  }

  .metric-card:last-child {
    grid-column: 1 / -1;
    min-height: 72px;
    flex-direction: row;
    align-items: center;
  }

  .metric-card span {
    line-height: 1.5;
    letter-spacing: 0.07em;
  }

  .metric-card .metric-date {
    font-size: 19px;
    white-space: nowrap;
  }

  .panel-heading,
  .publication-toolbar,
  .document-toolbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .document-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .document-search {
    grid-column: 1 / -1;
  }

  .document-list {
    padding-left: 18px;
    padding-right: 18px;
  }

  .upload-help {
    padding-left: 18px;
    padding-right: 18px;
  }

  .notice,
  .upload-progress {
    margin-left: 18px;
    margin-right: 18px;
  }

  .empty-state {
    padding: 32px 22px;
  }

  .document-row {
    gap: 13px;
  }

  .document-main {
    align-items: flex-start;
    gap: 12px;
  }

  .document-actions {
    padding-left: 54px;
  }

  .upload-button,
  .document-row .button {
    width: 100%;
  }

  .publication-toolbar,
  .publication-toolbar label,
  .document-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .publication-toolbar select {
    width: 100%;
  }

  .document-row {
    grid-template-columns: 1fr;
  }

  .access-content {
    padding: 18px;
  }

  .access-member {
    align-items: flex-start;
    flex-direction: column;
  }

  .stale-member {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    justify-content: center;
    padding: 24px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
