:root {
  --lex-bg: #f4f6f5;
  --lex-surface: #ffffff;
  --lex-border: #d8dfdc;
  --lex-border-strong: #bcc8c3;
  --lex-ink: #202827;
  --lex-muted: #66736f;
  --lex-primary: #176b5b;
  --lex-primary-dark: #0f5145;
  --lex-primary-soft: #e4f1ed;
  --lex-danger: #a33d3d;
  --lex-danger-soft: #f9e7e6;
  --lex-warning: #805d13;
  --lex-warning-soft: #fff3d6;
  --lex-success: #2c6a45;
  --lex-success-soft: #e6f2e9;
  --lex-info: #365f88;
  --lex-info-soft: #e8f0f7;
  --lex-shadow: 0 1px 2px rgb(25 40 36 / 6%);
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  background: var(--lex-bg);
  color: var(--lex-ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

.landing-page {
  background: #f7f8f6;
}

.landing-container {
  width: min(100% - 2rem, 1240px);
  margin-inline: auto;
}

.landing-header {
  position: absolute;
  z-index: 5;
  top: 0;
  width: 100%;
  border-bottom: 1px solid rgb(255 255 255 / 20%);
}

.landing-nav {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 760;
  text-decoration: none;
}

.landing-brand:hover {
  color: #fff;
}

.landing-brand small {
  color: rgb(255 255 255 / 68%);
  font-size: 0.68rem;
  font-weight: 580;
}

.landing-brand .brand-mark {
  background: #fff;
  color: var(--lex-primary-dark);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.landing-company-link {
  color: rgb(255 255 255 / 78%);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.landing-company-link:hover {
  color: #fff;
}

.landing-login,
.landing-primary-action,
.landing-contact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 720;
  text-decoration: none;
}

.landing-login {
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 5px;
  color: #fff;
  font-size: 0.84rem;
}

.landing-login:hover {
  background: #fff;
  color: var(--lex-primary-dark);
}

.landing-login svg,
.landing-primary-action svg,
.landing-contact a svg {
  width: 17px;
  height: 17px;
}

.landing-hero {
  position: relative;
  display: flex;
  min-height: clamp(590px, 78vh, 760px);
  align-items: center;
  overflow: hidden;
  background: #17211f;
  color: #fff;
}

.landing-hero-image,
.landing-hero-shade {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
}

.landing-hero-image {
  object-fit: cover;
  object-position: center;
}

.landing-hero-shade {
  background:
    linear-gradient(
      90deg,
      rgb(12 21 19 / 93%) 0%,
      rgb(12 21 19 / 78%) 34%,
      rgb(12 21 19 / 20%) 70%,
      rgb(12 21 19 / 10%) 100%
    ),
    linear-gradient(0deg, rgb(7 15 13 / 35%) 0%, transparent 45%);
}

.landing-hero-content {
  position: relative;
  z-index: 2;
  padding-top: 84px;
}

.landing-eyebrow {
  margin: 0 0 1rem;
  color: #9dd4c5;
  font-size: 0.75rem;
  font-weight: 780;
  text-transform: uppercase;
}

.landing-hero h1 {
  max-width: 680px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.9rem, 7vw, 6.6rem);
  font-weight: 500;
  line-height: 0.96;
}

.landing-byline {
  margin: 0.75rem 0 0;
  color: #9dd4c5;
  font-size: 0.88rem;
  font-weight: 680;
}

.landing-lead {
  max-width: 600px;
  margin: 1.55rem 0 2rem;
  color: rgb(255 255 255 / 82%);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.65;
}

.landing-primary-action {
  min-height: 48px;
  padding: 0.72rem 1rem;
  background: #fff;
  border-radius: 5px;
  color: var(--lex-primary-dark);
}

.landing-primary-action:hover {
  background: #dfeee9;
  color: #123e36;
}

.landing-process {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.landing-section-heading {
  display: grid;
  max-width: 760px;
  gap: 0.3rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.landing-eyebrow-dark {
  color: var(--lex-primary);
}

.landing-section-heading h2,
.landing-contact h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4vw, 3.7rem);
  font-weight: 500;
  line-height: 1.08;
}

.landing-section-copy {
  max-width: 700px;
  margin: 1.15rem 0 0;
  color: var(--lex-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--lex-border-strong);
}

.landing-steps article {
  position: relative;
  min-width: 0;
  padding: 2rem clamp(1rem, 3vw, 2.5rem) 1rem 0;
}

.landing-steps article + article {
  padding-left: clamp(1rem, 3vw, 2.5rem);
  border-left: 1px solid var(--lex-border);
}

.landing-steps svg {
  width: 25px;
  height: 25px;
  margin-bottom: 1.5rem;
  color: var(--lex-primary);
  stroke-width: 1.6;
}

.landing-step-number {
  position: absolute;
  top: 2.15rem;
  right: clamp(1rem, 3vw, 2.5rem);
  color: #9ba7a3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.85rem;
}

.landing-steps h3 {
  margin-bottom: 0.7rem;
  font-size: 1.05rem;
  font-weight: 760;
}

.landing-steps p {
  max-width: 310px;
  margin: 0;
  color: var(--lex-muted);
  line-height: 1.65;
}

.landing-contact {
  background: #143f37;
  color: #fff;
}

.landing-contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.landing-contact h2 {
  max-width: 800px;
}

.landing-contact a {
  min-height: 48px;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgb(255 255 255 / 55%);
  color: #fff;
  white-space: nowrap;
}

.landing-contact a:hover {
  border-color: #9dd4c5;
  color: #c5e7dd;
}

.landing-contact-actions {
  display: grid;
  gap: 0.7rem;
}

.landing-footer {
  padding-block: 1.4rem;
  background: #0d2924;
  color: rgb(255 255 255 / 62%);
  font-size: 0.78rem;
}

.landing-footer .landing-container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.landing-footer a {
  color: rgb(255 255 255 / 70%);
}

.landing-footer a:hover {
  color: #fff;
}

a {
  color: var(--lex-primary);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--lex-primary-dark);
}

.app-container {
  max-width: 1480px;
  padding-inline: clamp(1rem, 2.5vw, 2.25rem);
}

.app-main {
  padding-block: 1.75rem 3rem;
}

.app-navbar {
  min-height: 62px;
  background: var(--lex-surface);
  border-bottom: 1px solid var(--lex-border);
  box-shadow: var(--lex-shadow);
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: 2rem;
  color: var(--lex-ink);
  font-size: 1.02rem;
  font-weight: 750;
}

.brand-mark {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: var(--lex-primary);
  border-radius: 5px;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 1.15rem;
}

.navbar-nav {
  gap: 0.2rem;
}

.app-navbar .nav-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border-radius: 5px;
  color: var(--lex-muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
  background: var(--lex-primary-soft);
  color: var(--lex-primary-dark);
}

/* Default size for inline Lucide icons (every {% icon %} svg carries .lucide).
   Context-specific rules below override this where a different size is needed. */
.lucide {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  vertical-align: middle;
}

.app-navbar .nav-link svg,
.icon-button svg,
.button-icon svg,
.metadata-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.user-identity {
  display: grid;
  max-width: 220px;
  font-size: 0.82rem;
  line-height: 1.25;
  text-align: right;
}

.user-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-identity small {
  color: var(--lex-muted);
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  background: transparent;
  border: 1px solid var(--lex-border);
  border-radius: 5px;
  color: var(--lex-muted);
}

.icon-button:hover {
  background: var(--lex-bg);
  border-color: var(--lex-border-strong);
  color: var(--lex-ink);
}

.navbar-toggler {
  display: inline-grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border-color: var(--lex-border);
  border-radius: 5px;
}

.navbar-toggler svg {
  width: 20px;
  height: 20px;
}

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

.page-title {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  font-weight: 720;
  line-height: 1.2;
}

.page-subtitle {
  max-width: 760px;
  margin: 0.3rem 0 0;
  color: var(--lex-muted);
  font-size: 0.9rem;
}

.section-title {
  margin: 0 0 0.9rem;
  font-size: 0.98rem;
  font-weight: 720;
}

.surface {
  background: var(--lex-surface);
  border: 1px solid var(--lex-border);
  border-radius: 7px;
  box-shadow: var(--lex-shadow);
}

.surface-body {
  padding: 1.15rem;
}

.filter-bar {
  margin-bottom: 1rem;
  padding: 0.85rem;
  background: var(--lex-surface);
  border: 1px solid var(--lex-border);
  border-radius: 7px;
}

.form-label {
  margin-bottom: 0.3rem;
  color: var(--lex-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.form-control,
.form-select {
  min-height: 40px;
  border-color: var(--lex-border-strong);
  border-radius: 5px;
  color: var(--lex-ink);
  font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--lex-primary);
  box-shadow: 0 0 0 3px rgb(23 107 91 / 14%);
}

textarea.form-control {
  min-height: 132px;
}

.management-form {
  max-width: 720px;
}

.btn {
  min-height: 38px;
  border-radius: 5px;
  font-size: 0.86rem;
  font-weight: 680;
}

.btn-sm {
  min-height: 32px;
}

.btn-primary {
  background: var(--lex-primary);
  border-color: var(--lex-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--lex-primary-dark);
  border-color: var(--lex-primary-dark);
}

.btn-outline-primary {
  border-color: var(--lex-primary);
  color: var(--lex-primary);
}

.btn-outline-primary:hover {
  background: var(--lex-primary);
  border-color: var(--lex-primary);
}

.btn-success {
  background: var(--lex-success);
  border-color: var(--lex-success);
}

.button-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.data-table {
  width: 100%;
  margin: 0;
  font-size: 0.86rem;
}

.data-table thead th {
  padding: 0.65rem 0.8rem;
  background: #f8faf9;
  border-bottom: 1px solid var(--lex-border-strong);
  color: var(--lex-muted);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 0.75rem 0.8rem;
  border-color: #e7ebe9;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #fbfcfc;
}

.primary-cell {
  min-width: 260px;
}

.primary-link {
  display: -webkit-box;
  overflow: hidden;
  color: var(--lex-ink);
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.primary-link:hover {
  color: var(--lex-primary);
}

.cell-muted,
.metadata {
  color: var(--lex-muted);
  font-size: 0.8rem;
}

.metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

.metadata-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.status-badge,
.label-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.label-option {
  padding: 0.75rem;
  background: #f8faf9;
  border: 1px solid var(--lex-border);
  border-radius: 5px;
  cursor: pointer;
}

.label-option:hover {
  border-color: var(--lex-border-strong);
}

.status-neutral,
.label-badge {
  background: #eef1f0;
  border-color: #dfe5e2;
  color: #4d5a56;
}

.status-success {
  background: var(--lex-success-soft);
  border-color: #c9dfcf;
  color: var(--lex-success);
}

.status-warning {
  background: var(--lex-warning-soft);
  border-color: #ecdba9;
  color: var(--lex-warning);
}

.status-danger {
  background: var(--lex-danger-soft);
  border-color: #edc9c6;
  color: var(--lex-danger);
}

.status-info {
  background: var(--lex-info-soft);
  border-color: #cad9e7;
  color: var(--lex-info);
}

.urgency-high {
  background: var(--lex-danger-soft);
  border-color: #edc9c6;
  color: var(--lex-danger);
}

.urgency-medium {
  background: var(--lex-warning-soft);
  border-color: #ecdba9;
  color: var(--lex-warning);
}

.urgency-low {
  background: var(--lex-success-soft);
  border-color: #c9dfcf;
  color: var(--lex-success);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1rem;
  align-items: start;
}

.detail-stack {
  display: grid;
  gap: 1rem;
}

.detail-list {
  display: grid;
  grid-template-columns: minmax(100px, 130px) minmax(0, 1fr);
  margin: 0;
}

.detail-list dt,
.detail-list dd {
  margin: 0;
  padding-block: 0.55rem;
  border-bottom: 1px solid #e7ebe9;
  font-size: 0.85rem;
}

.detail-list dt {
  color: var(--lex-muted);
  font-weight: 650;
}

.detail-list dd {
  overflow-wrap: anywhere;
}

.detail-list dt:last-of-type,
.detail-list dd:last-of-type {
  border-bottom: 0;
}

.prose {
  color: #35403d;
  font-size: 0.92rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.source-text {
  max-height: 520px;
  overflow: auto;
  white-space: normal;
}

.empty-state {
  display: grid;
  min-height: 190px;
  padding: 2rem;
  place-items: center;
  color: var(--lex-muted);
  text-align: center;
}

.empty-state svg {
  width: 28px;
  height: 28px;
  margin-bottom: 0.65rem;
}

.feed-list {
  display: grid;
  gap: 0.65rem;
}

.error-page {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  max-width: 560px;
  margin: 3rem auto;
  padding: 3rem 2rem;
  text-align: center;
}

.error-code {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--lex-primary);
}

.error-page .page-subtitle {
  margin-bottom: 0.5rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.feed-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 1rem 1.1rem;
  color: inherit;
  text-decoration: none;
}

.feed-item:hover {
  border-color: var(--lex-border-strong);
  color: inherit;
  box-shadow: 0 3px 12px rgb(25 40 36 / 7%);
}

.feed-title {
  margin: 0 0 0.35rem;
  font-size: 0.96rem;
  font-weight: 680;
  line-height: 1.35;
}

.feed-summary {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--lex-muted);
}

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

.metric-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 0.8rem;
  padding: 1rem;
  color: inherit;
  text-decoration: none;
}

.metric-card:hover {
  border-color: var(--lex-border-strong);
  color: inherit;
  box-shadow: 0 3px 12px rgb(25 40 36 / 7%);
}

.metric-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  grid-row: 1 / 3;
  place-items: center;
  border: 1px solid;
  border-radius: 6px;
}

.metric-icon svg,
.throughput-card > svg {
  width: 18px;
  height: 18px;
}

.metric-value {
  color: var(--lex-ink);
  font-size: 1.35rem;
  font-weight: 760;
  line-height: 1.1;
}

.metric-label {
  color: var(--lex-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

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

.throughput-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
}

.throughput-card > svg {
  color: var(--lex-primary);
}

.alert {
  border-radius: 6px;
  font-size: 0.88rem;
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 150px);
  place-items: center;
}

.login-panel {
  width: min(100%, 420px);
  padding: 1.6rem;
}

.login-brand {
  margin-bottom: 1.5rem;
  text-align: center;
}

.auth-secondary-action {
  margin-bottom: 1rem;
  font-size: 0.82rem;
  text-align: right;
}

.auth-secondary-action-centered {
  margin: 1rem 0 0;
  text-align: center;
}

.login-panel .form-text ul {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    padding-block: 0.75rem 0.4rem;
    border-top: 1px solid var(--lex-border);
  }

  .navbar-nav {
    margin-bottom: 0.8rem;
  }

  .app-navbar .nav-link {
    width: 100%;
  }

  .navbar-user {
    justify-content: space-between;
    padding: 0.7rem;
    background: var(--lex-bg);
    border-radius: 5px;
  }

  .user-identity {
    text-align: left;
  }

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

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

@media (max-width: 767.98px) {
  .landing-container {
    width: min(100% - 1.4rem, 1240px);
  }

  .landing-nav {
    min-height: 66px;
  }

  .landing-login {
    min-height: 38px;
    padding-inline: 0.7rem;
  }

  .landing-login svg {
    display: none;
  }

  .landing-company-link {
    display: none;
  }

  .landing-hero {
    min-height: 680px;
    align-items: flex-end;
  }

  .landing-hero-image {
    object-position: 63% center;
  }

  .landing-hero-shade {
    background:
      linear-gradient(
        0deg,
        rgb(10 20 18 / 97%) 0%,
        rgb(10 20 18 / 84%) 45%,
        rgb(10 20 18 / 22%) 100%
      );
  }

  .landing-hero-content {
    padding-block: 150px 3rem;
  }

  .landing-hero h1 {
    font-size: clamp(3.4rem, 18vw, 4.8rem);
  }

  .landing-lead {
    margin-block: 1.2rem 1.6rem;
    font-size: 1rem;
    line-height: 1.55;
  }

  .landing-steps {
    grid-template-columns: 1fr;
  }

  .landing-steps article,
  .landing-steps article + article {
    padding: 1.5rem 0;
    border-left: 0;
    border-bottom: 1px solid var(--lex-border);
  }

  .landing-step-number {
    top: 1.65rem;
    right: 0;
  }

  .landing-contact-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .landing-contact a {
    justify-self: start;
  }

  .landing-contact-actions {
    justify-items: start;
  }

  .landing-footer .landing-container {
    flex-direction: column;
  }

  .app-main {
    padding-block: 1.15rem 2rem;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header .btn {
    align-self: flex-start;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tbody {
    display: grid;
    gap: 0.65rem;
    padding: 0.65rem;
  }

  .responsive-table tbody tr {
    padding: 0.75rem;
    background: var(--lex-surface);
    border: 1px solid var(--lex-border);
    border-radius: 6px;
  }

  .responsive-table tbody td {
    display: grid;
    grid-template-columns: minmax(90px, 32%) minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.38rem 0;
    border: 0;
  }

  .responsive-table tbody td::before {
    color: var(--lex-muted);
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 740;
    text-transform: uppercase;
  }

  .responsive-table .primary-cell {
    display: block;
    min-width: 0;
    padding-top: 0;
  }

  .responsive-table .primary-cell::before,
  .responsive-table .empty-table-cell::before {
    display: none;
  }

  .responsive-table .empty-table-cell {
    display: block;
    padding: 1.25rem;
    text-align: center;
  }

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

  .detail-list dt {
    padding-bottom: 0.15rem;
    border-bottom: 0;
  }

  .detail-list dd {
    padding-top: 0;
  }

  .feed-item {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .throughput-grid {
    grid-template-columns: 1fr;
  }
}
