:root {
  --bg: #f7f3ea;
  --ink: #1d2530;
  --soft-ink: #455364;
  --line: #d5c5ad;
  --panel: #fffefc;
  --accent: #b96e2f;
  --accent-2: #2c5f8a;
  --accent-3: #2e7a5f;
}

html {
  scroll-padding-top: 112px;
}

section[id],
footer[id] {
  scroll-margin-top: 112px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1000px 500px at 5% -10%, rgba(185, 110, 47, 0.2), transparent),
    radial-gradient(860px 560px at 100% 5%, rgba(44, 95, 138, 0.18), transparent),
    radial-gradient(900px 500px at 30% 100%, rgba(46, 122, 95, 0.12), transparent),
    var(--bg);
  line-height: 1.6;
}

body.theme-midnight {
  --bg: #101826;
  --ink: #f4f7fb;
  --soft-ink: #c5cfdd;
  --line: #415168;
  --panel: #172235;
  --accent: #d3a14d;
  --accent-2: #7fb0e4;
  --accent-3: #8ed0bc;
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(127, 176, 228, 0.18), transparent),
    radial-gradient(820px 520px at 100% 0%, rgba(211, 161, 77, 0.14), transparent),
    #101826;
}

body.theme-emerald {
  --bg: #eef6ee;
  --ink: #18251e;
  --soft-ink: #46584d;
  --line: #b8cfbf;
  --panel: #fbfffb;
  --accent: #b6863f;
  --accent-2: #236d57;
  --accent-3: #386f8d;
}

body.theme-burgundy {
  --bg: #f7f0ef;
  --ink: #2a1719;
  --soft-ink: #63474a;
  --line: #d5b8b8;
  --panel: #fffafa;
  --accent: #a66b2f;
  --accent-2: #7b2632;
  --accent-3: #394963;
}

body.theme-monochrome {
  --bg: #f4f5f6;
  --ink: #16191d;
  --soft-ink: #525961;
  --line: #c8cdd3;
  --panel: #ffffff;
  --accent: #6f7781;
  --accent-2: #202832;
  --accent-3: #4f6578;
}

body.theme-midnight .panel,
body.theme-midnight .hero-card,
body.theme-midnight .brief-box,
body.theme-midnight .table-wrap,
body.theme-midnight .client-card,
body.theme-midnight .news-card {
  background: linear-gradient(165deg, #1b273a, var(--panel) 56%, #24324a);
  border-color: var(--line);
}

body.theme-midnight .section-soft,
body.theme-midnight .site-footer,
body.theme-midnight .site-header {
  background: linear-gradient(90deg, rgba(18, 28, 44, 0.97), rgba(26, 39, 58, 0.96));
}

body.theme-midnight h2,
body.theme-midnight .kicker,
body.theme-midnight .social-link,
body.theme-midnight a {
  color: var(--accent-2);
}

body.admin-screen {
  --bg: #eef3f8;
  --ink: #172434;
  --soft-ink: #425466;
  --line: #b9cadb;
  --panel: #fbfdff;
  --accent: #7a5b2e;
  --accent-2: #285f93;
  --accent-3: #506a85;
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(40, 95, 147, 0.18), transparent),
    radial-gradient(820px 520px at 100% 0%, rgba(122, 91, 46, 0.14), transparent),
    #eef3f8;
}

body.partner-screen {
  --bg: #f1f5ed;
  --ink: #1f2a24;
  --soft-ink: #4c5d51;
  --line: #bdcdbb;
  --panel: #fcfffb;
  --accent: #a56c34;
  --accent-2: #2d7156;
  --accent-3: #83682f;
  background:
    radial-gradient(900px 520px at 5% -10%, rgba(45, 113, 86, 0.18), transparent),
    radial-gradient(820px 520px at 100% 0%, rgba(165, 108, 52, 0.15), transparent),
    #f1f5ed;
}

body.admin-screen .site-header {
  background: linear-gradient(90deg, rgba(233, 240, 248, 0.97), rgba(219, 231, 243, 0.96));
}

body.partner-screen .site-header {
  background: linear-gradient(90deg, rgba(237, 246, 235, 0.97), rgba(226, 238, 220, 0.96));
}

body.admin-screen .panel,
body.admin-screen .brief-box {
  background: linear-gradient(165deg, #fff, var(--panel) 56%, #e8f1fb);
}

body.admin-screen .section {
  padding: 1.5rem 0 2.25rem;
}

body.admin-screen .section-heading {
  margin-bottom: 0.8rem;
}

body.admin-screen h1 {
  margin-bottom: 0.35rem;
}

body.admin-screen h2 {
  font-size: clamp(1.55rem, 3vw, 2.05rem);
}

body.admin-screen h3 {
  color: #214f76;
  font-size: 1.26rem;
  margin-bottom: 0.55rem;
}

body.partner-screen .panel,
body.partner-screen .brief-box {
  background: linear-gradient(165deg, #fff, var(--panel) 56%, #edf7e9);
}

body.partner-screen .section {
  padding: 2rem 0;
}

body.partner-screen .section-heading {
  margin-bottom: 0.8rem;
}

body.partner-screen h1 {
  margin-bottom: 0.45rem;
}

body.partner-screen h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

body.partner-screen h3 {
  font-size: 1.22rem;
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

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

.site-header .row {
  flex-wrap: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: linear-gradient(90deg, rgba(243, 231, 214, 0.96), rgba(231, 241, 249, 0.95));
  border-bottom: 1px solid #cdb89e;
  transition: box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.55rem 0;
  position: relative;
}

.brand-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: contain;
}

.brand span {
  white-space: nowrap;
}

.brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.55rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 220ms ease;
}

.brand:hover::after {
  width: 100%;
}

.nav {
  display: flex;
  gap: 1.2rem;
}

.nav a {
  text-decoration: none;
  color: var(--soft-ink);
  font-weight: 600;
  font-size: 0.94rem;
  position: relative;
  padding: 0.95rem 0.25rem;
  transition: color 140ms ease, transform 140ms ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0.2rem;
  right: 0.2rem;
  bottom: 0.56rem;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav a:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
}

.nav a.active {
  color: var(--ink);
}

.btn {
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent-2), #1f3f61);
  color: #fff;
  border-radius: 999px;
  padding: 0.72rem 1.1rem;
  cursor: pointer;
  font-weight: 700;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border-color: var(--line);
}

.btn-danger {
  border-color: #9f3d3d;
  background: #9f3d3d;
  color: #fff;
}

.social-link {
  color: var(--accent-2);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.social-icon {
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-2);
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 170ms ease, background 170ms ease;
}

.social-icon svg {
  width: 1.12rem;
  height: 1.12rem;
  fill: currentColor;
}

.social-icon:hover {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 7px 16px rgba(40, 64, 87, 0.16);
  transform: translateY(-1px);
}

.login-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.login-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  padding: 0.62rem 1rem;
  transition: transform 150ms ease, box-shadow 170ms ease, background 170ms ease;
  white-space: nowrap;
}

.login-links a:hover {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 7px 16px rgba(40, 64, 87, 0.16);
  text-decoration: none;
  transform: translateY(-1px);
}

.social-link:hover,
.site-footer a:hover {
  text-decoration: underline;
}

.site-header .btn {
  transition: transform 150ms ease, box-shadow 170ms ease;
}

.site-header .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(40, 64, 87, 0.22);
}

.site-header.scrolled {
  background: linear-gradient(90deg, rgba(241, 223, 198, 0.97), rgba(220, 236, 247, 0.97));
  box-shadow: 0 10px 24px rgba(37, 48, 61, 0.16);
}

.hero {
  padding: 5.5rem 0 3.5rem;
  position: relative;
}

.kicker {
  margin-bottom: 0.5rem;
  color: var(--accent-2);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", serif;
  line-height: 1.1;
  margin-top: 0;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.3rem);
  margin-bottom: 0.75rem;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.9rem;
  color: #214f76;
}

h3 {
  font-size: 1.45rem;
  margin-bottom: 0.4rem;
}

.subtitle {
  max-width: 65ch;
  color: var(--soft-ink);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.hero-card,
.panel,
.brief-box {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(165deg, #fff, var(--panel) 52%, #ffeedc);
  padding: 1.1rem;
  box-shadow: 0 12px 30px rgba(36, 31, 24, 0.08);
}

body.partner-screen .panel,
body.partner-screen .brief-box {
  border-radius: 0.85rem;
  padding: 0.9rem;
  box-shadow: 0 10px 24px rgba(31, 42, 36, 0.08);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), var(--accent-3), transparent);
}

.actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
}

.section {
  padding: 3rem 0;
}

.firm-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4.5rem);
}

.firm-overview-copy {
  max-width: 680px;
}

.firm-overview-copy p {
  color: var(--soft-ink);
  font-size: 1.04rem;
  line-height: 1.8;
}

.firm-overview-visual {
  min-height: 410px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 22px 46px rgba(40, 27, 17, 0.18);
}

.firm-overview-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 410px;
  object-fit: cover;
  object-position: center 38%;
}

.section-soft {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 246, 233, 0.45));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-heading h2,
.section-heading p {
  margin-bottom: 0.35rem;
}

.section-heading p {
  color: var(--soft-ink);
}

.section-link {
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-2);
  flex: 0 0 auto;
  font-size: 0.88rem;
  font-weight: 900;
  padding: 0.62rem 0.95rem;
  text-decoration: none;
}

.section-link:hover {
  background: #fff;
  box-shadow: 0 7px 16px rgba(40, 64, 87, 0.14);
}

.login-status {
  color: var(--accent-3);
  font-weight: 800;
}

.portal-note {
  color: var(--accent-2);
  font-weight: 800;
}

.grid-3,
.grid-2 {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-2 > .wide-panel {
  grid-column: 1 / -1;
}

.practice-card-image {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(20, 25, 31, 0.08), rgba(20, 25, 31, 0.82)),
    var(--practice-image) center / cover no-repeat;
}

.practice-card-image h3,
.practice-card-image p {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.42);
}

.practice-card-image p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
}

.corporate-card {
  --practice-image: url("./assets/companies-act.jpg?v=20260607");
}

.dispute-card {
  --practice-image: url("./assets/dispute-resolution.png?v=20260607");
}

.banking-card {
  --practice-image: url("./assets/banking-finance.png?v=20260607");
}

.property-card {
  --practice-image: url("./assets/construction-property.png?v=20260607");
}

.ip-card {
  --practice-image: url("./assets/intellectual-property.png?v=20260607");
}

.telecom-card {
  --practice-image: url("./assets/telecom-regulatory.png?v=20260607");
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  overflow: auto;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

th, td {
  border-bottom: 1px solid #ece5dd;
  text-align: left;
  padding: 0.75rem;
  font-size: 0.94rem;
}

th {
  background: #fff5e8;
}

.link-button {
  border: 0;
  padding: 0;
  color: var(--accent-2);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.table-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.consultation-form {
  display: grid;
  gap: 0.7rem;
  max-width: 700px;
}

.office-location-section {
  background:
    linear-gradient(90deg, rgba(250, 246, 239, 0.96), rgba(240, 246, 250, 0.92));
  border-top: 1px solid var(--line);
}

.office-location-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 0.9fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.office-location-copy {
  max-width: 480px;
}

.office-location-copy h2 {
  margin-bottom: 0.65rem;
}

.office-location-copy p {
  color: var(--soft-ink);
}

.office-location-note {
  font-size: 0.9rem;
}

.office-map-link {
  display: inline-flex;
  margin-top: 0.65rem;
  text-decoration: none;
}

.office-map-frame {
  width: 100%;
  max-width: 620px;
  height: 285px;
  justify-self: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 38px rgba(40, 64, 87, 0.14);
}

.office-map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

input, textarea, select {
  width: 100%;
  padding: 0.68rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: #fff;
  font: inherit;
}

textarea {
  min-height: 120px;
}

.stacked-form,
.portal-login {
  display: grid;
  gap: 0.75rem;
}

body.partner-screen .stacked-form {
  gap: 0.55rem;
}

body.partner-screen input,
body.partner-screen textarea,
body.partner-screen select {
  padding: 0.58rem 0.64rem;
  border-radius: 0.52rem;
}

body.partner-screen textarea {
  min-height: 86px;
}

body.admin-screen .stacked-form {
  gap: 0.5rem;
}

body.admin-screen input,
body.admin-screen textarea,
body.admin-screen select {
  padding: 0.56rem 0.64rem;
  border-radius: 0.5rem;
}

body.admin-screen textarea {
  min-height: 84px;
}

body.admin-screen .btn {
  padding: 0.58rem 0.88rem;
  font-size: 0.9rem;
}

.portal-login {
  max-width: 520px;
}

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

.file-field {
  color: var(--soft-ink);
  font-weight: 700;
}

.file-field input {
  margin-top: 0.35rem;
}

.form-message {
  color: var(--accent-3);
  font-weight: 800;
  margin: 0;
}

.request-panel {
  margin-top: 1rem;
}

.admin-workspace {
  gap: 0.85rem;
  align-items: start;
}

.admin-workspace > .panel,
.admin-workspace > .portal-dashboard {
  border-color: rgba(77, 111, 143, 0.34);
  border-radius: 0.8rem;
  padding: 0.85rem;
  box-shadow: 0 9px 22px rgba(23, 36, 52, 0.08);
}

.admin-workspace > .panel h3 {
  border-bottom: 1px solid rgba(77, 111, 143, 0.18);
  padding-bottom: 0.48rem;
}

.admin-workspace > .panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.96)),
    var(--panel);
}

.admin-section {
  scroll-margin-top: 124px;
  position: relative;
}

.admin-section::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  opacity: 0.72;
}

.compact-admin-panel p {
  margin: 0 0 0.6rem;
  color: var(--soft-ink);
}

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

.backup-admin-panel > h3,
.backup-admin-panel > p {
  margin-bottom: 0;
}

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

.backup-action-card {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 0.45rem;
  border: 1px solid rgba(77, 111, 143, 0.22);
  border-radius: 8px;
  background: rgba(244, 249, 253, 0.78);
  padding: 0.85rem;
}

.backup-action-card h4,
.backup-action-card p {
  margin: 0;
}

.backup-action-card p,
.backup-list-heading p {
  color: var(--soft-ink);
  font-size: 0.88rem;
}

.backup-list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(77, 111, 143, 0.18);
  padding-top: 0.85rem;
}

.backup-list-heading h4,
.backup-list-heading p {
  margin: 0;
}

.backup-list {
  margin-top: 0;
}

.backup-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
}

.backup-item-details {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.backup-item-details h4 {
  overflow-wrap: anywhere;
}

.backup-item-actions {
  justify-content: flex-end;
}

.backup-download {
  text-decoration: none;
}

.backup-invalid {
  border-color: rgba(159, 61, 61, 0.4) !important;
  background: rgba(255, 244, 244, 0.82) !important;
}

.admin-tabs {
  position: sticky;
  top: 56px;
  z-index: 12;
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  border: 1px solid rgba(77, 111, 143, 0.3);
  border-radius: 999px;
  background: rgba(251, 253, 255, 0.92);
  padding: 0.45rem;
  box-shadow: 0 12px 22px rgba(23, 36, 52, 0.1);
  backdrop-filter: blur(12px);
}

.admin-tabs button {
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--soft-ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  padding: 0.58rem 0.78rem;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.admin-tabs button:hover,
.admin-tabs button.active {
  background: linear-gradient(135deg, rgba(40, 95, 147, 0.14), rgba(122, 91, 46, 0.14));
  border-color: rgba(40, 95, 147, 0.24);
  color: var(--ink);
  transform: translateY(-1px);
}

.admin-workspace > .admin-section:not(.hidden) {
  animation: admin-panel-in 160ms ease;
}

@keyframes admin-panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-helper {
  color: var(--soft-ink);
  font-size: 0.92rem;
  margin-top: -0.2rem;
}

.content-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.content-form label {
  color: var(--soft-ink);
  display: grid;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 0.28rem;
}

.content-form label:has(textarea) {
  grid-row: span 2;
}

.content-form .form-message,
.content-form .btn {
  justify-self: start;
}

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

.theme-option {
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--panel);
  color: var(--ink);
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem;
}

.theme-option.selected {
  box-shadow: 0 0 0 2px var(--accent-2), 0 10px 22px rgba(23, 36, 52, 0.1);
}

.theme-option h4,
.theme-option p {
  margin: 0;
}

.theme-option p {
  color: var(--soft-ink);
  font-size: 0.78rem;
}

.theme-swatches {
  display: flex;
  gap: 0.28rem;
}

.theme-swatches span {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
}

.theme-option.theme-heritage {
  --bg: #f7f3ea;
  --ink: #1d2530;
  --soft-ink: #455364;
  --line: #d5c5ad;
  --panel: #fffefc;
  --accent: #b96e2f;
  --accent-2: #2c5f8a;
  --accent-3: #2e7a5f;
}

.theme-option.theme-midnight {
  --bg: #101826;
  --ink: #f4f7fb;
  --soft-ink: #c5cfdd;
  --line: #415168;
  --panel: #172235;
  --accent: #d3a14d;
  --accent-2: #7fb0e4;
  --accent-3: #8ed0bc;
}

.theme-option.theme-emerald {
  --bg: #eef6ee;
  --ink: #18251e;
  --soft-ink: #46584d;
  --line: #b8cfbf;
  --panel: #fbfffb;
  --accent: #b6863f;
  --accent-2: #236d57;
  --accent-3: #386f8d;
}

.theme-option.theme-burgundy {
  --bg: #f7f0ef;
  --ink: #2a1719;
  --soft-ink: #63474a;
  --line: #d5b8b8;
  --panel: #fffafa;
  --accent: #a66b2f;
  --accent-2: #7b2632;
  --accent-3: #394963;
}

.theme-option.theme-monochrome {
  --bg: #f4f5f6;
  --ink: #16191d;
  --soft-ink: #525961;
  --line: #c8cdd3;
  --panel: #ffffff;
  --accent: #6f7781;
  --accent-2: #202832;
  --accent-3: #4f6578;
}

.partner-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}

.partner-tabs {
  position: sticky;
  top: 56px;
  z-index: 12;
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  border: 1px solid rgba(38, 109, 87, 0.3);
  border-radius: 999px;
  background: rgba(251, 255, 251, 0.94);
  padding: 0.45rem;
  box-shadow: 0 12px 22px rgba(22, 56, 44, 0.11);
  backdrop-filter: blur(12px);
}

.partner-tabs button {
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--soft-ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  padding: 0.58rem 0.78rem;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.partner-tabs button:hover,
.partner-tabs button.active {
  border-color: rgba(38, 109, 87, 0.28);
  background: linear-gradient(135deg, rgba(38, 109, 87, 0.16), rgba(182, 134, 63, 0.16));
  color: var(--ink);
  transform: translateY(-1px);
}

.partner-dashboard > .partner-section:not(.hidden) {
  animation: admin-panel-in 160ms ease;
}

.partner-dashboard .profile-panel {
  min-height: 100%;
}

.partner-dashboard .wide-panel {
  grid-column: 1 / -1;
}

.cause-tab-content {
  display: grid;
  gap: 0.85rem;
}

.cause-tab-content.hidden,
.partner-section.hidden {
  display: none;
}

.partner-dashboard .toolbar {
  margin: 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.62);
}

.partner-dashboard .toolbar label {
  min-width: 170px;
}

.cause-entry-panel {
  gap: 0.7rem;
}

.cause-entry-panel label {
  display: grid;
  gap: 0.3rem;
  color: var(--soft-ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.cause-module-heading,
.cause-preview-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.cause-module-heading h2,
.cause-module-heading h3,
.cause-module-heading p,
.cause-preview-heading h3 {
  margin-bottom: 0.25rem;
}

.cause-list-module {
  display: grid;
  gap: 0.85rem;
}

.cause-list-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(165px, 0.75fr)) minmax(205px, 1fr) auto auto auto;
  align-items: end;
  gap: 0.65rem;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0;
}

.cause-list-filters label {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.cause-list-preview {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.cause-preview-heading {
  align-items: baseline;
  margin-bottom: 0.55rem;
}

.cause-preview-heading span {
  color: var(--soft-ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.cause-list-preview pre {
  max-height: 260px;
  overflow: auto;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.5);
  padding: 0.8rem;
}

.empty-table-message {
  color: var(--soft-ink);
  text-align: center;
  padding: 1.4rem !important;
}

.partner-dashboard .table-wrap {
  border-radius: 0.75rem;
}

.partner-dashboard th,
.partner-dashboard td {
  padding: 0.58rem 0.62rem;
  font-size: 0.88rem;
}

.inline-cause-edit-row td {
  border-top: 0;
  padding: 0 0.6rem 0.75rem;
}

.inline-cause-edit-form {
  display: grid;
  gap: 0.75rem;
  border: 1px solid rgba(38, 109, 87, 0.3);
  border-left: 4px solid var(--accent-3);
  border-radius: 0.7rem;
  background: linear-gradient(135deg, rgba(238, 246, 238, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 10px 24px rgba(22, 56, 44, 0.1);
  padding: 0.85rem;
}

.inline-cause-edit-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.inline-cause-edit-heading span {
  color: var(--soft-ink);
  font-size: 0.8rem;
}

.inline-cause-edit-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 0.65rem;
}

.inline-cause-edit-fields label {
  display: grid;
  gap: 0.28rem;
  color: var(--soft-ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.inline-cause-edit-actions {
  justify-content: flex-end;
}

.partner-dashboard .brief-box pre {
  max-height: 180px;
  overflow: auto;
}

.portal-dashboard {
  display: grid;
  gap: 0.85rem;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  padding: 1rem;
  overflow: hidden;
  position: relative;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.58), transparent 54%),
    radial-gradient(420px 180px at 92% 15%, rgba(255, 255, 255, 0.28), transparent);
  pointer-events: none;
}

.admin-dashboard-hero {
  background: linear-gradient(135deg, #dfeaf5, #f8fbff 48%, #d1dce8);
}

.partner-dashboard-hero {
  background: linear-gradient(135deg, #e4f2dc, #fbfff8 48%, #d8ead0);
}

.dashboard-hero > * {
  position: relative;
  z-index: 1;
}

.dashboard-hero h2,
.dashboard-hero p {
  margin-bottom: 0.35rem;
}

.dashboard-emblem {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--accent-2);
  font-family: "Cormorant Garamond", serif;
  font-size: 2.1rem;
  font-weight: 800;
  box-shadow: 0 14px 24px rgba(31, 42, 36, 0.12);
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 0.82rem;
  padding: 0.82rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(31, 42, 36, 0.07);
  min-height: 118px;
  position: relative;
}

.metric-card strong {
  display: block;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  line-height: 1;
}

.metric-card span {
  display: block;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.42rem;
}

.metric-card p {
  color: var(--soft-ink);
  font-size: 0.82rem;
  margin: 0.35rem 0 0;
}

.metric-card[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0.65rem;
  bottom: calc(100% - 0.1rem);
  width: min(250px, 78vw);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.65rem 0.72rem;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  box-shadow: 0 12px 26px rgba(31, 42, 36, 0.16);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 6;
}

.metric-card[data-tooltip]:hover::after,
.metric-card[data-tooltip]:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-dot {
  position: absolute;
  right: 0.68rem;
  top: 0.68rem;
  width: 1.28rem;
  height: 1.28rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(45, 113, 86, 0.28);
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 900;
  cursor: help;
}

.tone-blue {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(218, 235, 249, 0.9));
}

.tone-gold {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(250, 232, 200, 0.9));
}

.tone-green {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(222, 241, 224, 0.92));
}

.dashboard-charts {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0.75rem;
}

.chart-panel {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(31, 42, 36, 0.07);
}

.chart-panel h3,
.chart-panel p {
  margin-bottom: 0.35rem;
}

.chart-panel-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.mini-chart {
  width: 100%;
  min-height: 150px;
}

.mini-chart rect {
  fill: var(--accent-2);
  opacity: 0.86;
}

.mini-chart line {
  stroke: var(--line);
  stroke-width: 2;
}

.mini-chart text {
  fill: var(--soft-ink);
  font: 700 11px "Manrope", sans-serif;
}

.donut-chart {
  width: 128px;
  flex: 0 0 128px;
}

.donut-chart circle {
  fill: none;
  stroke-width: 18;
  transform: rotate(-90deg);
  transform-origin: center;
}

.donut-track {
  stroke: rgba(69, 83, 100, 0.14);
}

.donut-blue {
  stroke: #2c5f8a;
}

.donut-gold {
  stroke: #b96e2f;
}

.donut-green {
  stroke: #2e7a5f;
}

.donut-chart text {
  fill: var(--ink);
  font: 800 18px "Manrope", sans-serif;
}

.partner-dashboard .compact-panel {
  padding: 0.75rem;
}

.partner-dashboard .compact-panel h3 {
  margin-bottom: 0.45rem;
}

.partner-dashboard .password-panel .stacked-form {
  gap: 0.45rem;
}

.partner-dashboard .password-panel input {
  padding: 0.5rem 0.58rem;
}

.partner-dashboard .password-panel .btn {
  justify-self: start;
  padding: 0.58rem 0.9rem;
}

.admin-list {
  display: grid;
  gap: 0.48rem;
  margin-top: 0.65rem;
}

.admin-item,
.client-card,
.news-card {
  border: 1px solid #eadfce;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.76);
  padding: 0.9rem;
}

.admin-item {
  display: grid;
  gap: 0.32rem;
}

body.admin-screen .admin-item,
body.admin-screen .client-card,
body.admin-screen .news-card {
  border-color: rgba(77, 111, 143, 0.22);
  border-radius: 0.62rem;
  padding: 0.7rem;
}

body.admin-screen .admin-item h4,
body.admin-screen .admin-item p {
  margin: 0;
}

body.admin-screen .admin-item p {
  color: var(--soft-ink);
  font-size: 0.88rem;
}

body.admin-screen .table-actions {
  gap: 0.45rem;
  padding-top: 0.18rem;
}

body.admin-screen .link-button {
  font-size: 0.88rem;
}

.muted-item {
  opacity: 0.68;
}

.status-pill {
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--soft-ink);
  font-size: 0.78rem;
  font-weight: 800;
  margin: 0;
  padding: 0.22rem 0.62rem;
}

.admin-item h4,
.client-card h3,
.news-card h3 {
  margin: 0 0 0.35rem;
}

.client-card blockquote {
  margin: 0.7rem 0 0;
  color: var(--soft-ink);
  border-left: 3px solid var(--accent);
  padding-left: 0.8rem;
}

.client-card {
  display: grid;
  align-content: start;
}

.client-logo-wrap {
  display: grid;
  place-items: center;
  width: 100%;
  height: 88px;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
  padding: 0.2rem 0 0.8rem;
}

.client-logo {
  display: block;
  width: min(180px, 82%);
  height: 64px;
  object-fit: contain;
}

.client-logo-placeholder {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(232, 220, 201, 0.78));
  color: var(--accent-2);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.homepage-client-preview .client-card {
  min-height: 220px;
}

.homepage-table-preview tbody tr:nth-child(n + 5) {
  display: none;
}

.judgments-showcase {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.75fr);
  gap: 1rem;
  align-items: stretch;
}

.judgments-visual {
  min-height: 390px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #171410;
  box-shadow: 0 14px 34px rgba(40, 30, 18, 0.16);
}

.judgments-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
  object-position: 48% 42%;
}

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

.clients-archive-grid .client-card {
  min-height: 250px;
}

.judgments-archive-table {
  box-shadow: 0 14px 34px rgba(40, 64, 87, 0.08);
}

.judgments-archive-visual {
  width: 100%;
  height: clamp(280px, 38vw, 460px);
  margin: 1.4rem 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #171410;
  box-shadow: 0 18px 42px rgba(40, 30, 18, 0.18);
}

.judgments-archive-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 47%;
}

.news-scroller {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  padding: 0.25rem 0 0.9rem;
}

.news-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: news-carousel 28s linear infinite;
}

.news-scroller:hover .news-track,
.news-scroller:focus-within .news-track {
  animation-play-state: paused;
}

.news-scroller .form-message {
  margin: 0;
}

.news-card {
  width: min(360px, 82vw);
  flex: 0 0 min(360px, 82vw);
  min-height: 170px;
  overflow: hidden;
  background: linear-gradient(165deg, #fff, #f7fbff 58%, #fff2df);
}

.news-image {
  width: calc(100% + 1.8rem);
  height: 132px;
  object-fit: cover;
  display: block;
  margin: -0.9rem -0.9rem 0.8rem;
}

@keyframes news-carousel {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 0.5rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-track {
    animation: none;
  }

  .news-scroller {
    overflow-x: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }
}

.news-card time {
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.check {
  display: flex;
  gap: 0.6rem;
  align-items: start;
}

.toolbar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  align-items: end;
}

.toolbar label {
  min-width: 190px;
  font-weight: 600;
  color: var(--soft-ink);
}

pre {
  white-space: pre-wrap;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.15rem 0;
  background: linear-gradient(90deg, #ece3d5, #f4ecdf);
}

.site-footer h3 {
  margin: 0 0 0.32rem;
  font-size: 1.08rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
  text-decoration: none;
}

.footer-brand:hover {
  text-decoration: none;
}

.footer-brand h3 {
  margin: 0;
}

.footer-logo {
  width: 50px;
  height: 47px;
  flex: 0 0 50px;
  object-fit: contain;
}

.site-footer p {
  margin: 0 0 0.32rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.site-footer a {
  color: var(--accent-2);
  font-weight: 700;
}

.footer-login-links {
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.42rem;
}

.footer-social-icons {
  gap: 0.4rem;
  margin: 0.22rem 0 0.42rem;
}

.footer-social-icons .social-icon {
  width: 2rem;
  height: 2rem;
}

.footer-login-links a {
  color: var(--ink);
  font-size: 0.8rem;
  padding: 0.42rem 0.68rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 0.8rem;
  align-items: start;
}

.hidden {
  display: none;
}

body.partner-private .site-header .nav,
body.partner-private .site-header .social-link,
body.partner-private .site-header .social-icons,
body.partner-private .site-header .btn,
body.partner-private main > section:not(#portal),
body.partner-private .site-footer,
body.admin-private .site-header .nav,
body.admin-private .site-header .social-link,
body.admin-private .site-header .social-icons,
body.admin-private .site-header .btn,
body.admin-private main > section:not(#admin),
body.admin-private .site-footer {
  display: none;
}

body.partner-private #portal,
body.admin-private #admin {
  min-height: calc(100vh - 56px);
}

.partner-card {
  display: grid;
  gap: 0.75rem;
}

.directory-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.directory-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-2);
  font-size: 0.88rem;
  font-weight: 900;
  padding: 0.55rem 0.85rem;
  text-decoration: none;
}

.directory-links a:hover {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 7px 16px rgba(40, 64, 87, 0.14);
}

.directory-partner-card {
  justify-items: center;
  text-align: center;
  padding: 0.5rem;
}

.partner-circle-frame {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  padding: 7px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 16px 30px rgba(30, 49, 67, 0.2);
}

.partner-circle-photo,
.partner-circle-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.86);
}

.partner-circle-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  font-family: "Cormorant Garamond", serif;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(160deg, #315d86, #3d8b74 58%, #b96e2f);
}

.directory-partner-card h3 {
  margin: 0.5rem 0 0;
}

.profile-link {
  color: var(--accent-2);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-link:hover {
  text-decoration: underline;
}

.portrait-frame {
  width: 170px;
  height: 220px;
  border-radius: 26px;
  padding: 6px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 14px 30px rgba(30, 49, 67, 0.25);
}

.photo-placeholder-portrait {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(160deg, #315d86, #3d8b74 58%, #b96e2f);
}

.profile-photo {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.partner-title {
  color: var(--accent-2);
  font-weight: 800;
  margin: 0;
}

.partner-public-details {
  display: grid;
  gap: 0.25rem;
}

.partner-public-details a,
.partner-public-details p {
  color: var(--soft-ink);
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.partner-public-details a {
  text-decoration: none;
}

.partner-public-details a:hover {
  text-decoration: underline;
}

.directory-hero {
  padding: 4rem 0 2rem;
}

.directory-toolbar {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.filter-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--soft-ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  padding: 0.58rem 0.9rem;
}

.filter-pill.active,
.filter-pill:hover {
  background: linear-gradient(135deg, var(--accent-2), #1f3f61);
  color: #fff;
}

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

.lawyer-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.lawyer-card .portrait-frame {
  width: 124px;
  height: 158px;
  border-radius: 20px;
}

.lawyer-card .photo-placeholder-portrait,
.lawyer-card .profile-photo {
  border-radius: 15px;
}

.lawyer-card .btn,
.briefing-card .btn {
  display: inline-flex;
  justify-content: center;
  margin-top: 0.45rem;
  text-decoration: none;
}

.lawyer-profile {
  display: grid;
  gap: 1.1rem;
}

.lawyer-profile-intro {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  align-items: center;
}

.profile-large {
  width: 210px;
  height: 270px;
}

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

.profile-detail-grid ul,
.briefing-body p {
  margin-top: 0;
}

.briefing-card {
  display: grid;
  gap: 0.45rem;
  overflow: hidden;
}

.briefing-image {
  width: calc(100% + 2.2rem);
  height: 170px;
  object-fit: cover;
  margin: -1.1rem -1.1rem 0.45rem;
}

.briefing-detail {
  max-width: 900px;
}

.briefing-hero-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  box-shadow: 0 12px 28px rgba(36, 31, 24, 0.1);
  margin: 1rem 0;
}

.briefing-body {
  font-size: 1.02rem;
}

.profile-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.profile-preview .portrait-frame {
  width: 120px;
  height: 150px;
  border-radius: 20px;
}

.profile-preview .photo-placeholder-portrait,
.profile-preview .profile-photo {
  border-radius: 15px;
}

.inline-edit-form {
  border-top: 1px solid var(--line);
  margin-top: 0.75rem;
  padding-top: 0.85rem;
}

@media (max-width: 980px) {
  .office-location-layout {
    grid-template-columns: 1fr;
  }

  .office-location-copy {
    max-width: none;
  }

  .office-map-frame {
    max-width: none;
    height: 240px;
    justify-self: stretch;
  }

  .backup-actions,
  .backup-item {
    grid-template-columns: 1fr;
  }

  .backup-list-heading {
    align-items: start;
  }

  .backup-item-actions {
    justify-content: flex-start;
  }

  .brand {
    gap: 0.5rem;
    font-size: 0.88rem;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .firm-overview-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .firm-overview-copy {
    max-width: none;
  }

  .firm-overview-visual,
  .firm-overview-visual img {
    min-height: 280px;
  }

  .hero-grid,
  .grid-3,
  .grid-2,
  .footer-grid,
  .lawyer-directory,
  .briefings-grid,
  .clients-archive-grid,
  .profile-detail-grid,
  .lawyer-profile-intro {
    grid-template-columns: 1fr;
  }

  .judgments-showcase {
    grid-template-columns: 1fr;
  }

  .judgments-visual,
  .judgments-visual img {
    min-height: 240px;
    max-height: 320px;
  }

  .judgments-visual img {
    object-position: 50% 45%;
  }

  .judgments-archive-visual {
    height: 260px;
  }

  .section-heading,
  .form-row {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

  .section-link {
    justify-self: start;
  }

  .news-scroller {
    grid-auto-columns: minmax(250px, 86%);
  }

  .partner-dashboard {
    grid-template-columns: 1fr;
  }

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

  .inline-cause-edit-fields {
    grid-template-columns: 1fr;
  }

  .inline-cause-edit-heading {
    align-items: start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .cause-module-heading,
  .cause-preview-heading {
    display: grid;
  }

  .dashboard-cards,
  .dashboard-charts,
  .theme-options,
  .content-form {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    align-items: flex-start;
  }

  .nav {
    display: none;
  }

  .social-link {
    display: none;
  }

  .login-links {
    margin-left: auto;
  }
}
