:root {
  --bg: #0a0f1b;
  --bg-elevated: #101829;
  --card: #131d31;
  --card-hi: #18243b;
  --line: rgba(148, 163, 184, .12);
  --text: #e6ecf6;
  --muted: #95a4bd;
  --dim: #6b7891;
  --accent: #6d9eff;
  --accent-2: #22d3ee;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(109, 158, 255, .35); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; }

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  opacity: .14;
  z-index: -1;
  pointer-events: none;
}
.ambient-one { width: 560px; height: 560px; background: #22d3ee; top: -220px; left: -180px; animation: float1 18s ease-in-out infinite; }
.ambient-two { width: 700px; height: 700px; background: #6d9eff; bottom: -340px; right: -240px; animation: float2 22s ease-in-out infinite; }
@keyframes float1 { 50% { transform: translate(120px, 80px) scale(1.08); } }
@keyframes float2 { 50% { transform: translate(-120px, -70px) scale(.96); } }

.hero {
  min-height: 720px;
  padding: 0 24px 120px;
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, rgba(109, 158, 255, .18), transparent 55%),
    radial-gradient(ellipse 60% 45% at 85% 35%, rgba(34, 211, 238, .10), transparent 45%);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.topbar {
  max-width: 1180px;
  margin: 0 auto 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(16, 24, 41, .72);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #07101f; font-size: 18px;
}
.top-links { display: flex; gap: 8px; }
.top-links a { padding: 8px 12px; border-radius: 999px; color: var(--muted); transition: .2s; }
.top-links a:hover { background: rgba(255,255,255,.06); color: var(--text); }

.hero-content { max-width: 850px; margin: 0 auto; text-align: center; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  color: var(--accent-2);
  font-weight: 800;
  margin: 0 0 14px;
}
h1 { font-size: clamp(46px, 8vw, 86px); line-height: .98; letter-spacing: -.055em; margin: 0 0 22px; }
h1 span { background: linear-gradient(95deg, #c7d6ff, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy { color: var(--muted); font-size: 19px; max-width: 640px; margin: 0 auto 34px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 54px; flex-wrap: wrap; }
.button {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 12px;
  border: 1px solid var(--line); transition: .2s; font-weight: 650; cursor: pointer;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: linear-gradient(135deg, #6d9eff, #22d3ee); border-color: transparent; color: #06111f; }
.button-ghost { background: rgba(255,255,255,.03); }
.button-small { padding: 9px 16px; font-size: 14px; }
.hero-stats { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-stats > div {
  min-width: 120px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(19, 29, 49, .55); backdrop-filter: blur(8px);
}
.hero-stats strong { display: block; font-size: 28px; letter-spacing: -.04em; }
.hero-stats span { font-size: 13px; color: var(--muted); }

.section-shell { max-width: 1180px; margin: 0 auto; padding: 90px 24px; border-bottom: 1px solid var(--line); }
.section-heading { max-width: 720px; margin-bottom: 38px; }
.section-heading h2 { font-size: clamp(30px, 5vw, 42px); letter-spacing: -.035em; margin: 10px 0 12px; }
.section-heading p { color: var(--muted); font-size: 17px; max-width: 640px; }
.catalog-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }

.map-wrap {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.section-map { width: 100%; height: auto; display: block; }
.map-cell { cursor: pointer; transition: .18s; }
.map-cell:hover { filter: brightness(1.25); transform-box: fill-box; transform-origin: center; transform: scale(1.03); }
.map-label { fill: #fff; pointer-events: none; font-size: 11px; font-weight: 700; }
.map-count { fill: rgba(255,255,255,.8); pointer-events: none; font-size: 10px; }
.legend { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.legend-dot { width: 12px; height: 12px; border-radius: 4px; }

.filters {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  display: grid; gap: 14px; margin-bottom: 20px;
}
.search-box {
  position: relative; display: flex; align-items: center;
}
.search-box input {
  width: 100%; padding: 14px 44px 14px 44px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text); outline: none; transition: .2s;
}
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109,158,255,.12); }
.search-box .filter-icon { position: absolute; left: 14px; color: var(--dim); font-size: 20px; }
.search-box kbd {
  position: absolute; right: 12px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line);
  color: var(--dim); background: var(--bg); font-family: inherit; font-size: 12px;
}
.filter-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.filter-row label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.filter-row select {
  padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); outline: none; cursor: pointer;
}
.result-meta { display: flex; align-items: center; justify-content: space-between; color: var(--muted); margin-bottom: 16px; min-height: 26px; }
.active-filter { font-size: 13px; color: var(--accent-2); }

.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1020px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards-grid { grid-template-columns: 1fr; } .filter-row { grid-template-columns: 1fr; } .top-links { display: none; } }

.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; cursor: pointer; transition: .2s; animation: cardIn .45s both; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,.045), transparent 45%); pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: rgba(109,158,255,.35); box-shadow: var(--shadow); }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-section { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.card-section::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: currentColor; }
.card h3 { font-size: 17px; line-height: 1.3; margin: 0; letter-spacing: -.02em; }
.card-cost { margin-top: 10px; color: var(--muted); font-size: 13px; }
.card-badge {
  flex-shrink: 0; padding: 5px 9px; border-radius: 8px; background: rgba(255,255,255,.07);
  font-size: 12px; font-weight: 800; letter-spacing: -.01em;
}
.card-badge.A { background: rgba(74, 222, 128, .14); color: var(--green); }
.card-badge.B { background: rgba(251, 191, 36, .14); color: var(--amber); }
.card-badge.C { background: rgba(248, 113, 113, .14); color: var(--red); }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); font-size: 11px; background: rgba(255,255,255,.02); }
.tag.medicine { border-color: rgba(248,113,113,.25); color: #fda4af; }
.tag.legal { border-color: rgba(109,158,255,.25); color: #93c5fd; }
.tag.finance { border-color: rgba(251,191,36,.25); color: #fde68a; }
.card-count { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); font-size: 12px; background: rgba(255,255,255,.02); }
.empty-state { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-icon { font-size: 48px; color: var(--dim); margin-bottom: 12px; }

.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: start; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }
.about-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.about-list li { color: var(--muted); }
.about-list .check { color: var(--green); font-weight: 800; margin-right: 8px; }
.notice-card {
  background: linear-gradient(160deg, rgba(248,113,113,.10), rgba(251,191,36,.06));
  border: 1px solid rgba(248,113,113,.22); border-radius: var(--radius); padding: 24px;
}
.notice-label { color: var(--red); font-weight: 800; letter-spacing: .04em; margin: 0 0 10px; text-transform: uppercase; font-size: 12px; }
.notice-card p { color: #f1f5f9; margin: 0 0 18px; }
.notice-card a { color: var(--accent); }

.footer {
  max-width: 1180px; margin: 0 auto; padding: 40px 24px 80px; display: flex;
  justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line);
}
.footer div { display: grid; gap: 2px; }
.footer strong { color: var(--text); }

.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal[open], .modal.is-open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 7, 14, .78); backdrop-filter: blur(5px); }
.modal-panel {
  position: relative; width: min(820px, 100%); max-height: min(840px, 92vh); overflow-y: auto;
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 22px;
  padding: 32px; box-shadow: var(--shadow); animation: modalIn .25s both;
}
@keyframes modalIn { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer; font-size: 22px;
}
.modal h2 { font-size: 28px; letter-spacing: -.03em; margin: 10px 0 8px; }
.modal h3 { font-size: 14px; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin: 26px 0 8px; }
.modal p { color: #d7e1ef; }
.modal-source { font-size: 13px; color: var(--muted); word-break: break-all; background: rgba(255,255,255,.03); padding: 12px; border-radius: 10px; border: 1px solid var(--line); }
.modal-source a { color: var(--accent-2); word-break: break-all; }
