:root {
  color-scheme: light;
  --page: #f5f7f8;
  --surface: #ffffff;
  --ink: #162124;
  --muted: #526166;
  --line: #d9e0e2;
  --accent: #0b6f73;
  --accent-strong: #084f52;
  --gold: #b7892f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

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

.app-header__inner {
  width: min(1120px, calc(100% - 40px));
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header h1,
.baseline h2 {
  margin: 0;
  letter-spacing: 0;
}

.app-header h1 {
  font-size: 24px;
  font-weight: 650;
}

.app-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.env-pill {
  display: inline-flex;
  min-width: 48px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  border-radius: 4px;
  padding: 4px 10px;
  color: #6d4d12;
  background: #fff7e5;
  font-size: 12px;
  font-weight: 700;
}

.app-nav {
  width: min(1120px, calc(100% - 40px));
  min-height: 42px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
}

.app-nav a {
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.app-nav a:hover,
.app-nav a:focus {
  text-decoration: underline;
}

.language-select {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.language-select select {
  min-height: 34px;
  max-width: 220px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  padding: 4px 28px 4px 10px;
}

.language-select select:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.app-main {
  width: min(1120px, calc(100% - 40px));
  margin: 48px auto;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-header h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.page-header p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-primary:hover,
.button-primary:focus {
  background: var(--accent-strong);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.empty-state,
.form-shell,
.table-shell {
  border: 1px solid var(--line);
  background: var(--surface);
}

.empty-state {
  padding: 28px;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.empty-state p {
  max-width: 640px;
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.55;
}

.table-shell {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 4px;
  background: #eef6f6;
  color: var(--accent-strong);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.form-shell {
  max-width: 760px;
  padding: 28px;
}

.form-field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.form-field label {
  font-weight: 750;
}

.form-field input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  color: var(--ink);
  font: inherit;
}

.form-field input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.form-field span[data-valmsg-for],
.validation-summary {
  color: #9f2f2f;
  font-size: 13px;
}

.field-help {
  color: var(--muted);
  font-size: 13px;
}

.notice {
  display: grid;
  gap: 4px;
  margin: 22px 0;
  border-left: 3px solid var(--gold);
  background: #fffaf0;
  padding: 14px 16px;
  color: #5c4314;
}

.notice span {
  line-height: 1.45;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.baseline {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 32px;
  align-items: start;
}

.baseline__intro {
  max-width: 560px;
}

.baseline h2 {
  font-size: 34px;
  line-height: 1.12;
  font-weight: 700;
}

.baseline p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.status-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--surface);
}

.status-grid div {
  min-width: 0;
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.status-grid div:nth-child(2n) {
  border-right: 0;
}

.status-grid div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.status-grid dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 650;
}

@media (max-width: 760px) {
  .app-header__inner,
  .app-nav,
  .app-main {
    width: min(100% - 28px, 1120px);
  }

  .app-header__inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
  }

  .app-header__actions,
  .language-select {
    width: 100%;
  }

  .app-header__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .language-select {
    align-items: flex-start;
    flex-direction: column;
  }

  .language-select select {
    width: 100%;
    max-width: none;
  }

  .env-pill {
    align-self: flex-start;
  }

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

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

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

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table th,
  .data-table td,
  .data-table tr {
    display: block;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }

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

  .data-table td {
    display: grid;
    grid-template-columns: minmax(110px, 40%) 1fr;
    gap: 12px;
    border-bottom: 0;
    padding: 8px 14px;
  }

  .data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

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

  .status-grid div,
  .status-grid div:nth-child(2n),
  .status-grid div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .status-grid div:last-child {
    border-bottom: 0;
  }
}
