:root {
  --ink: #17211d;
  --muted: #5f6d66;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --line: #d9dfd8;
  --forest: #163b31;
  --teal: #14746f;
  --gold: #c99535;
  --clay: #a9533b;
  --mist: #eef4f1;
  --shadow: 0 20px 60px rgba(23, 33, 29, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 4vw, 54px);
  color: #ffffff;
  background: rgba(12, 24, 21, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 190px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #0d211c;
  background: #f1d38d;
  border-radius: 8px;
  letter-spacing: 0;
}

.brand-logo {
  width: 96px;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 8px;
  margin: 0;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 34px);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.96rem;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: #ffffff;
}

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.header-action {
  color: #132a24;
  background: #f1d38d;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-picker {
  position: relative;
  margin: 0;
}

.language-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  min-width: 172px;
  padding: 0 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.language-button::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.language-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  display: grid;
  width: 250px;
  max-height: min(440px, calc(100vh - 120px));
  overflow: auto;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.language-menu[hidden] {
  display: none;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 8px;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.language-option:hover,
.language-option:focus-visible,
.language-option.is-active {
  background: var(--mist);
}

.language-flag {
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.hero {
  position: relative;
  min-height: 91vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 128px clamp(20px, 6vw, 80px) 72px;
  color: #ffffff;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image: url("https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=2200&q=82");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 19, 16, 0.92) 0%, rgba(8, 19, 16, 0.74) 45%, rgba(8, 19, 16, 0.2) 100%),
    linear-gradient(0deg, rgba(8, 19, 16, 0.7) 0%, rgba(8, 19, 16, 0) 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 8vw, 6.9rem);
  line-height: 0.93;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4.25rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button-primary {
  color: #10241f;
  background: #f1d38d;
}

.button-primary:hover,
.button-primary:focus-visible,
.header-action:hover,
.header-action:focus-visible {
  background: #ffd978;
}

.button-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.32);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.18);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-strip div {
  min-height: 128px;
  padding: 28px clamp(22px, 4vw, 54px);
  background: #ffffff;
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  margin-bottom: 10px;
  color: var(--forest);
  font-size: 1.08rem;
}

.trust-strip span {
  color: var(--muted);
  line-height: 1.55;
}

.section {
  padding: clamp(70px, 8vw, 116px) clamp(20px, 6vw, 80px);
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1.18fr);
  gap: clamp(36px, 6vw, 86px);
  align-items: start;
}

.section-copy {
  position: sticky;
  top: 112px;
}

.section-copy p,
.section-heading p,
.intake-copy p,
.contact-band p {
  color: var(--muted);
  line-height: 1.75;
}

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

.feature-card {
  min-height: 248px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 33, 29, 0.05);
}

.feature-card p,
.process-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 28px;
  color: var(--teal);
  background: var(--mist);
  border-radius: 8px;
}

.icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.process-section {
  color: #ffffff;
  background: var(--forest);
}

.process-section .eyebrow {
  color: #f1d38d;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 44px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.22);
}

.process-grid article {
  min-height: 270px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.07);
}

.process-grid span {
  display: inline-block;
  margin-bottom: 42px;
  color: #f1d38d;
  font-weight: 900;
}

.process-grid p {
  color: rgba(255, 255, 255, 0.72);
}

.intake-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1.18fr);
  gap: clamp(34px, 6vw, 86px);
  align-items: start;
  background: #f4f0e8;
}

.notice {
  margin-top: 28px;
  padding: 20px;
  color: #4d3621;
  background: #f7e7c0;
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  line-height: 1.6;
}

.case-form {
  padding: clamp(22px, 4vw, 38px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-row {
  margin-bottom: 18px;
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label,
legend {
  display: block;
  margin-bottom: 8px;
  color: #293d35;
  font-size: 0.94rem;
  font-weight: 800;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: #293d35;
  font-size: 0.94rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: #fbfcfb;
  border: 1px solid #cdd6d0;
  border-radius: 8px;
  outline: none;
}

input,
select {
  height: 48px;
  padding: 0 13px;
}

textarea {
  min-height: 138px;
  padding: 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 116, 111, 0.14);
}

.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.field-error {
  min-height: 20px;
  margin: 8px 0 0;
  color: #a13425;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.45;
}

.upload-box {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 112px;
  margin: 0;
  padding: 18px;
  color: var(--ink);
  background: #f8fbfa;
  border: 1.5px dashed #9eb8b0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.upload-box:hover,
.upload-box:focus-within {
  background: #eff7f4;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 116, 111, 0.1);
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  color: var(--teal);
  background: #e3f0ed;
  border-radius: 8px;
}

.upload-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.upload-box strong,
.upload-box small {
  display: block;
}

.upload-box strong {
  margin-bottom: 5px;
  color: var(--forest);
  font-size: 1rem;
}

.upload-box small {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.45;
}

.selected-files {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.selected-files li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  color: #33453e;
  background: #eef4f1;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 750;
}

.selected-files span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-files small {
  color: var(--muted);
  white-space: nowrap;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checkbox-group legend {
  padding: 0 6px;
}

.checkbox-group label,
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.45;
}

.checkbox-group input,
.consent input {
  width: 17px;
  min-width: 17px;
  height: 17px;
  margin-top: 2px;
}

.form-submit {
  width: 100%;
  margin-top: 22px;
  min-height: 52px;
  border: 0;
}

.form-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.form-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--teal);
  font-weight: 800;
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: #ffffff;
  background: #1f2c28;
}

.contact-band div:first-child {
  max-width: 720px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(20px, 6vw, 80px);
  color: rgba(255, 255, 255, 0.72);
  background: #111916;
  font-size: 0.92rem;
  line-height: 1.55;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #f1d38d;
}

.system-body,
.policy-body {
  min-height: 100vh;
  background: #f2f5f3;
}

.system-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 54px);
  color: #ffffff;
  background: var(--forest);
}

.system-header-actions {
  display: flex;
  gap: 10px;
}

.system-main {
  padding: clamp(26px, 5vw, 64px);
}

.login-screen {
  min-height: calc(100vh - 82px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-screen[hidden] {
  display: none;
}

.login-box {
  width: min(440px, 100%);
  padding: 30px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-box h1 {
  margin-bottom: 22px;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.login-box .button {
  width: 100%;
  margin-top: 16px;
}

.system-hero {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.system-hero h1 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(2.3rem, 5vw, 4.6rem);
}

.system-hero p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.65;
}

.system-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 12px;
  min-width: min(100%, 440px);
}

.system-stats div,
.system-toolbar,
.case-card,
.policy-page {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 33, 29, 0.05);
}

.system-stats div {
  padding: 20px;
}

.system-stats strong {
  display: block;
  color: var(--forest);
  font-size: 2rem;
}

.system-stats span {
  color: var(--muted);
  font-weight: 800;
}

.system-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(160px, 220px));
  gap: 14px;
  align-items: end;
  margin-bottom: 20px;
  padding: 18px;
}

.toolbar-field label {
  margin-bottom: 7px;
}

.cases-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 18px;
  align-items: start;
}

.cases-table-wrap {
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 33, 29, 0.05);
}

.cases-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.cases-table th,
.cases-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.cases-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  color: #344940;
  background: #eef4f1;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cases-table tr {
  cursor: pointer;
}

.cases-table tbody tr:hover,
.cases-table tbody tr.is-selected {
  background: #f7fbf9;
}

.cases-table td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.table-link {
  padding: 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  font-weight: 900;
  cursor: pointer;
}

.inline-select,
.inline-input {
  min-width: 118px;
  height: 38px;
  padding: 0 9px;
}

.inline-input {
  min-width: 130px;
}

.case-panel {
  position: sticky;
  top: 24px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 33, 29, 0.05);
}

.case-panel h2 {
  margin-bottom: 8px;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.case-panel p,
.panel-details dd {
  color: var(--muted);
  line-height: 1.6;
}

.panel-date {
  margin-bottom: 20px;
}

.panel-details {
  display: grid;
  gap: 1px;
  margin: 0 0 22px;
  background: var(--line);
}

.panel-details div {
  min-width: 0;
  padding: 12px;
  background: #fbfcfb;
}

.panel-details dt {
  margin-bottom: 4px;
  color: #344940;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 750;
}

.case-panel section {
  margin-top: 18px;
}

.panel-files {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.panel-files li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--mist);
  border-radius: 8px;
}

.panel-files a,
.panel-details a,
.policy-page a {
  color: var(--teal);
  font-weight: 850;
}

.note-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.note-form .button {
  width: 100%;
}

.notes-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.notes-list li {
  padding: 12px;
  background: var(--mist);
  border-radius: 8px;
}

.notes-list p {
  margin: 0 0 6px;
  color: var(--ink);
}

.notes-list small {
  color: var(--muted);
  font-weight: 800;
}

.panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.danger-button {
  color: #ffffff;
  background: #a13425;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 18px;
}

.pagination span {
  color: var(--muted);
  font-weight: 800;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.policy-page {
  width: min(860px, calc(100% - 36px));
  margin: clamp(24px, 6vw, 70px) auto;
  padding: clamp(24px, 5vw, 54px);
}

.policy-page h1 {
  margin-bottom: 22px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  color: var(--ink);
}

.policy-page h2 {
  margin-top: 30px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.policy-page p {
  color: var(--muted);
  line-height: 1.75;
}

.policy-back {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--teal);
  font-weight: 900;
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
  }

  .main-nav {
    display: none;
  }

  .brand {
    min-width: 0;
  }

  .trust-strip,
  .split,
  .intake-section,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .section-copy {
    position: static;
  }

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

  .contact-band,
  .site-footer,
  .system-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .system-toolbar,
  .cases-workspace {
    grid-template-columns: 1fr;
  }

  .case-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 12px 16px;
  }

  .brand {
    font-size: 0.88rem;
  }

  .brand-mark,
  .brand-logo {
    width: 76px;
    height: auto;
    margin: 0;
  }

  .header-action {
    display: none;
  }

  .header-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .language-picker {
    width: 100%;
  }

  .language-button {
    width: 100%;
  }

  .language-menu {
    left: 0;
    right: auto;
    width: 100%;
  }

  .hero {
    min-height: 88vh;
    padding: 112px 18px 50px;
  }

  h1 {
    font-size: clamp(2.45rem, 16vw, 4rem);
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .trust-strip div,
  .section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .feature-card,
  .process-grid article,
  .case-form {
    padding: 22px;
  }

  .two-columns,
  .checkbox-group {
    grid-template-columns: 1fr;
  }

  .upload-box {
    align-items: flex-start;
  }

  .selected-files li {
    flex-direction: column;
    gap: 4px;
  }

  .system-header,
  .system-header-actions,
  .pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .system-stats {
    grid-template-columns: 1fr;
  }
}
