:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #14212b;
  --muted: #60717f;
  --line: #dbe3ea;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --gold: #c9972b;
  --blue: #2563eb;
  --red: #dc2626;
  --green: #16a34a;
  --shadow: 0 18px 45px rgba(20, 33, 43, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), transparent 32%),
    linear-gradient(315deg, rgba(201, 151, 43, 0.11), transparent 36%),
    var(--bg);
}

a {
  color: inherit;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand img {
  width: clamp(74px, 12vw, 126px);
  height: clamp(74px, 12vw, 126px);
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(20, 33, 43, 0.1);
}

.eyebrow,
.kicker {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 0.95;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  white-space: nowrap;
}

.status span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.14);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  align-items: end;
  gap: 28px;
  padding: 34px;
  border: 1px solid rgba(219, 227, 234, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.intro h2 {
  max-width: 720px;
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.02;
}

.intro p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.search {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.search input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-weight: 600;
  outline: none;
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.app-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(20, 33, 43, 0.07);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 118, 110, 0.34);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.app-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-size: 1.25rem;
  font-weight: 900;
}

.tag {
  overflow: hidden;
  max-width: 110px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef3f5;
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-card h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  line-height: 1.15;
}

.app-card p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.open-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  margin-top: auto;
  padding: 0 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.open-link:hover,
.open-link:focus-visible {
  background: var(--accent-strong);
}

.app-card[data-color="gold"] .app-icon {
  background: var(--gold);
}

.app-card[data-color="blue"] .app-icon {
  background: var(--blue);
}

.app-card[data-color="red"] .app-icon {
  background: var(--red);
}

.app-card[data-color="green"] .app-icon {
  background: var(--green);
}

.empty {
  display: none;
  grid-column: 1 / -1;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.74);
  text-align: center;
  font-weight: 700;
}

.empty.is-visible {
  display: block;
}

@media (max-width: 1060px) {
  .app-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 22px, 1160px);
    padding-top: 22px;
  }

  .topbar,
  .intro {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .brand {
    width: 100%;
  }

  .brand img {
    width: 72px;
    height: 72px;
  }

  .status {
    justify-content: center;
  }

  .intro {
    padding: 24px;
  }

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

  .app-card {
    min-height: 230px;
  }
}
