:root {
  --bg: #f6f8f7;
  --panel: #ffffff;
  --ink: #162026;
  --muted: #667985;
  --line: #d9e1e5;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --danger: #b42318;
  --success-bg: #eaf8ef;
  --success: #166534;
  --error-bg: #fff1f1;
  --error: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-weight: 800;
  gap: 10px;
}

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

.brand-mark {
  align-items: center;
  background: var(--primary);
  border-radius: 7px;
  color: #fff;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.nav {
  align-items: center;
  display: flex;
  gap: 18px;
}

.nav a,
.link-button {
  color: var(--muted);
  font: inherit;
  font-weight: 650;
}

.link-button {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

.hero {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  min-height: calc(100vh - 128px);
}

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

h1 {
  font-size: 42px;
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 16px;
}

h2 {
  font-size: 20px;
  margin-bottom: 14px;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lede {
  color: var(--muted);
  font-size: 17px;
  max-width: 680px;
}

.button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 750;
  justify-content: center;
  padding: 10px 14px;
}

.button:hover {
  text-decoration: none;
}

.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.button.primary:hover {
  background: var(--primary-dark);
}

.button.danger {
  background: #fff;
  border-color: #f0b4ad;
  color: var(--danger);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.note,
.alert {
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.note {
  background: #eef7f6;
  border: 1px solid #c8e2df;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist li {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.checklist li:last-child {
  border-bottom: 0;
}

.page-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-head h1 {
  font-size: 32px;
  margin: 0;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.metric strong {
  display: block;
  font-size: 26px;
  margin-top: 4px;
}

.panel-head,
.row-item {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.panel-head {
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
}

.row-item {
  border-top: 1px solid var(--line);
  color: var(--ink);
  padding: 14px 0;
}

.row-item:first-of-type {
  border-top: 0;
}

.row-item.clickable:hover {
  text-decoration: none;
}

.row-item small,
.muted,
.meta {
  color: var(--muted);
}

.row-item small {
  display: block;
  margin-top: 2px;
}

.badge {
  background: #eef7f6;
  border: 1px solid #c8e2df;
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

.form {
  display: grid;
  gap: 14px;
}

.form.wide {
  max-width: none;
}

label {
  color: var(--ink);
  display: grid;
  font-weight: 750;
  gap: 6px;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #cfd8dd;
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 9px 10px;
  width: 100%;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.narrow {
  margin: 80px auto;
  max-width: 720px;
}

code {
  background: #edf2f4;
  border: 1px solid #d8e0e5;
  border-radius: 6px;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 3px 6px;
}

.article-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.article-preview .content {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 16px;
}

.article-preview .content h2 {
  margin-top: 26px;
}

.details {
  display: grid;
  gap: 8px;
  grid-template-columns: 110px minmax(0, 1fr);
  margin-bottom: 18px;
}

.details dt {
  color: var(--muted);
  font-weight: 700;
}

.details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.error-text {
  color: var(--error);
}

details {
  margin-top: 18px;
}

summary {
  cursor: pointer;
  font-weight: 750;
}

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

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .topbar,
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    flex-wrap: wrap;
  }

  .hero,
  .grid.two,
  .grid.three,
  .metrics,
  .article-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 32px;
  }
}
