:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #5d6a64;
  --subtle: #7b8781;
  --line: #d9dfdc;
  --paper: #f4f6f3;
  --panel: #ffffff;
  --green: #315b44;
  --steel: #425e6b;
  --brick: #8f5145;
  --amber: #8a641e;
  --purple: #67537a;
  --blue-soft: #e9f2f6;
  --green-soft: #e9f2ec;
  --amber-soft: #f5eee0;
  --purple-soft: #f0ecf4;
}

* {
  box-sizing: border-box;
}

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

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

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

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.header-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--subtle);
  font-size: 0.85rem;
}

.header-meta span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
}

.directory {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.app-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(390px, 0.85fr);
  gap: 18px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.app-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.app-code {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
}

.app-code.qc {
  background: var(--steel);
}

.app-code.foundry {
  background: var(--brick);
}

.app-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.app-main p {
  color: var(--muted);
  line-height: 1.4;
}

.status {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.status.beta {
  color: var(--steel);
  background: var(--blue-soft);
}

.status.pre-release {
  color: var(--amber);
  background: var(--amber-soft);
}

.status.concept {
  color: var(--purple);
  background: var(--purple-soft);
}

.app-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.env-link {
  display: grid;
  gap: 3px;
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9faf8;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.env-link:hover,
.env-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(49, 91, 68, 0.45);
  background: var(--green-soft);
  outline: none;
}

.env-link.primary {
  border-color: rgba(49, 91, 68, 0.28);
}

.env-link span {
  color: var(--subtle);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.env-link strong {
  align-self: end;
  font-size: 0.94rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.env-link.disabled {
  color: var(--subtle);
  background: #f0f2f0;
  cursor: default;
}

.env-link.disabled strong {
  font-weight: 700;
}

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

  .header-meta {
    justify-content: flex-start;
  }

  .app-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .shell {
    width: min(100% - 22px, 1120px);
    padding: 22px 0;
  }

  .app-row {
    padding: 13px;
  }

  .app-links {
    grid-template-columns: 1fr;
  }

  .app-main {
    grid-template-columns: 1fr;
  }
}
