:root {
  color-scheme: light;
  --bg: #eef4f8;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --text: #14202d;
  --muted: #5d6b78;
  --line: rgba(80, 115, 140, 0.22);
  --accent: #1b7fbf;
  --accent-2: #21a67a;
  --shadow: 0 22px 70px rgba(35, 65, 95, 0.16);
  --radius: 8px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10151b;
  --panel: rgba(24, 32, 42, 0.72);
  --panel-strong: rgba(31, 42, 54, 0.92);
  --text: #edf5fb;
  --muted: #a8b6c4;
  --line: rgba(190, 215, 235, 0.18);
  --accent: #64b7f0;
  --accent-2: #6fe0b2;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 16% 12%, rgba(45, 142, 190, 0.22), transparent 34%),
    radial-gradient(circle at 85% 2%, rgba(41, 174, 131, 0.18), transparent 30%),
    linear-gradient(135deg, var(--bg), color-mix(in srgb, var(--bg) 78%, #ffffff 22%));
  color: var(--text);
}

.hero,
main,
footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 28px 0 18px;
}

.topbar,
.hero-body,
.summary,
.quick,
.catalog {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.35);
}

.topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 18px;
  border-radius: var(--radius);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: inset 0 1px 7px rgba(255, 255, 255, 0.42), 0 10px 24px rgba(0, 0, 0, 0.16);
}

button,
.open-link {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.theme-toggle {
  width: 42px;
  font-size: 18px;
}

.hero-body {
  margin-top: 14px;
  padding: clamp(28px, 6vw, 72px);
  border-radius: var(--radius);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 800;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 16px;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.search-wrap {
  max-width: 760px;
  margin-top: 28px;
}

input[type="search"] {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 16px;
}

main {
  display: grid;
  gap: 16px;
  padding-bottom: 24px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: var(--radius);
  overflow: hidden;
}

.summary div {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.summary div:last-child {
  border-right: 0;
}

.summary strong {
  display: block;
  font-size: 28px;
}

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

.quick,
.catalog {
  padding: 20px;
  border-radius: var(--radius);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.quick-grid,
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-btn {
  padding: 0 14px;
}

.filter-btn.active {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}

.card {
  min-height: 214px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: 0 16px 34px rgba(20, 40, 60, 0.08);
  transition: transform 160ms ease, border-color 160ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card h3 {
  margin: 0;
  font-size: 20px;
}

.badge,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.card p {
  flex: 1;
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
}

.open-link {
  display: grid;
  place-items: center;
  padding: 0 12px;
  font-weight: 750;
}

.open-link.primary {
  border-color: transparent;
  color: white;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
}

.empty {
  display: none;
  margin: 18px 0 0;
  color: var(--muted);
}

footer {
  padding: 0 0 28px;
  color: var(--muted);
}

code {
  color: var(--accent);
}

@media (max-width: 700px) {
  .hero,
  main,
  footer {
    width: min(100% - 20px, 1180px);
  }

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

  .summary div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .section-heading {
    display: block;
  }
}
