:root {
  --ink: #202020;
  --muted: #6a625c;
  --line: #ded6cf;
  --paper: #ffffff;
  --soft: #f7f4f1;
  --accent: #7b2d26;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
}

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1170px, calc(100% - 32px));
  min-height: 150px;
  margin: 0 auto;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: min(370px, 56vw);
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.public-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 26px;
}

.public-nav a {
  color: var(--ink);
  font-family: Lato, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.public-nav a:hover {
  color: var(--accent);
}

.page-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 40px auto;
}

.portal-shell {
  display: grid;
  gap: 14px;
}

.panel {
  max-width: 720px;
  padding: 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.panel h1 {
  margin-top: 0;
  font-size: 34px;
}

.case-title {
  margin: 0 0 10px;
  font-size: 22px;
}

.client-dashboard {
  display: grid;
  gap: 24px;
}

.client-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.client-header h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

.client-header p {
  margin: 0;
}

.client-kicker {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.client-stack {
  display: grid;
  gap: 14px;
}

.client-card {
  padding: 18px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.client-card h2 {
  margin: 0;
  font-size: 20px;
}

.case-workspace {
  max-width: 720px;
}

.portal-actions {
  margin: 0;
}

.client-card p {
  margin-top: 0;
}

.client-card ul {
  margin-bottom: 0;
  padding-left: 20px;
}

.portal-list {
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.portal-list-compact {
  margin-top: 6px;
}

.portal-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.portal-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.portal-row:first-child {
  border-top: 0;
}

.portal-row h3 {
  margin: 0;
  font-size: 16px;
}

.portal-row p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.portal-row span {
  display: inline-block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.document-list {
  margin-top: 4px;
}

.document-row {
  min-height: 28px;
  padding: 3px 0;
}

.portal-row .document-name {
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
}

.document-size {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 13px;
}

.portal-row-article {
  align-items: flex-start;
}

.language-links {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.language-links a,
.text-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.language-links a:hover,
.text-link:hover {
  text-decoration: underline;
}

.case-link {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-height: 34px;
  padding: 6px 0;
  color: var(--ink);
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.case-link:first-child {
  border-top: 0;
}

.case-link span,
.case-date {
  color: var(--muted);
}

.case-link span {
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
}

.case-link span:first-child {
  color: var(--muted);
  flex: 0 0 96px;
}

.case-link:hover span:last-child {
  color: var(--accent);
}

.client-status {
  display: grid;
  gap: 12px;
  margin: 0;
}

.client-status div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.client-status div:first-child {
  padding-top: 0;
  border-top: 0;
}

.client-status dt {
  color: var(--muted);
}

.client-status dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.mvita-form {
  display: grid;
  gap: 16px;
}

.mvita-field {
  display: grid;
  gap: 6px;
}

.mvita-field label {
  font-weight: 700;
}

.mvita-field input,
.mvita-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bfb6ae;
  border-radius: 4px;
  font: inherit;
}

.mvita-field textarea {
  min-height: 150px;
  resize: vertical;
}

.mvita-button {
  justify-self: start;
  min-height: 42px;
  padding: 10px 22px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 4px;
  font: inherit;
  cursor: pointer;
}

.mvita-button:hover {
  background: #5f211c;
}

.mvita-messages {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.mvita-message {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}

.errorlist {
  margin: 4px 0 0;
  padding-left: 20px;
  color: var(--accent);
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal:target {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 32, 32, 0.42);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

@media (max-width: 720px) {
  .site-header-inner {
    align-items: flex-start;
    flex-direction: column;
    min-height: 70px;
  }

  .panel {
    padding: 22px;
  }

  .client-header {
    flex-direction: column;
  }

  .portal-row {
    flex-direction: column;
    gap: 8px;
  }

  .portal-section-header {
    flex-direction: column;
    gap: 4px;
  }

  .case-link {
    gap: 10px;
  }

  .case-link span {
    flex-basis: auto;
  }
}
