:root {
  color-scheme: light;
  --ink: #242333;
  --muted: #686579;
  --line: #d9d7e3;
  --panel: #ffffff;
  --bg: #f4f5f7;
  --brand: #514766;
  --brand-strong: #352e46;
  --accent: #b83d46;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 68px;
  padding: 0 32px;
  background: var(--brand-strong);
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand small {
  display: block;
  color: #d7d3e2;
  margin-top: 2px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .35);
  font-weight: 700;
}

nav {
  display: flex;
  gap: 18px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero > div,
.panel,
.status-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(28, 24, 39, .08);
}

.hero > div {
  padding: 42px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 10px;
  font-size: 19px;
  letter-spacing: 0;
}

.lead {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--brand);
  border-radius: 4px;
  background: #fff;
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

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

.button.small {
  min-height: 40px;
  padding: 0 14px;
  border-color: #8db8f2;
  background: #80b8ff;
  color: #fff;
}

.status-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.status-card span,
.status-card small,
.panel p {
  color: var(--muted);
}

.status-card strong {
  font-size: 24px;
}

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

.panel {
  padding: 24px;
}

.panel.wide {
  max-width: 920px;
}

.inline-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.lookup-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 16px;
  background: #fbfcfe;
}

.lookup-box legend {
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.lookup-status {
  min-height: 18px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.lookup-status.ok {
  color: #2f704b;
}

.lookup-status.warn {
  color: #8a5a00;
}

.lookup-status.error {
  color: var(--accent);
}

.lookup-result {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid #bfe5cb;
  border-radius: 6px;
  padding: 10px 12px;
  background: #f0fbf3;
  color: #2f704b;
  font-size: 14px;
}

.lookup-result[hidden] {
  display: none;
}

.lookup-result-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #2f704b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.lookup-result-detail {
  margin-left: 8px;
  color: var(--muted);
}

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

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.notice {
  border-left: 4px solid var(--accent);
  background: #fff7f7;
  color: #5c3034;
  padding: 12px;
  font-size: 14px;
}

.success {
  border-top: 4px solid #2f8f5b;
}

.error {
  border-top: 4px solid var(--accent);
}

.summary {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 22px 0;
}

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

.summary dd {
  margin: 0;
}

.timeline,
.documents {
  display: grid;
  gap: 10px;
  padding-left: 20px;
}

.timeline span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.muted {
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .topbar,
  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .hero,
  .grid.two,
  .field-row {
    grid-template-columns: 1fr;
  }

  .hero > div,
  .panel,
  .status-card {
    padding: 22px;
  }

  h1 {
    font-size: 28px;
  }
}
