* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --text: #1a1a1a;
  --text-secondary: #666;
  --text-muted: #999;
  --text-light: #bbb;
  --bg: #FAFAF8;
  --card: #fff;
  --border: #e5e5e0;
  --border-light: #eee;
  --hover: #f8f7f4;
  --accent: #1e40af;
  --accent-green: #047857;
  --accent-amber: #b45309;
  --accent-purple: #6d28d9;
  --accent-red: #b91c1c;
  --accent-cyan: #0e7490;
  --accent-pink: #be185d;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* NAV */
.nav {
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-title { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.nav-link {
  font-size: 13px; color: #888; text-decoration: none;
  font-family: system-ui, sans-serif;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
  padding-bottom: 1px;
}
.nav-link:hover { color: var(--text); border-bottom-color: var(--text); }

/* HERO */
.hero {
  padding: 48px 24px 32px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.hero-label {
  font-size: 12px; font-family: system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 2.5px;
  color: #b0a090; margin-bottom: 16px; font-weight: 500;
}
.hero h1 {
  font-size: 34px; font-weight: 700; line-height: 1.2;
  margin: 0 0 16px; letter-spacing: -0.5px;
}
.hero-sub {
  font-size: 16px; color: #777; line-height: 1.6;
  font-style: italic; margin: 0 0 8px;
}
.hero-stats {
  font-size: 13px; font-family: system-ui, sans-serif;
  color: #aaa; margin: 20px 0 0; letter-spacing: 0.5px;
}

/* SEARCH */
.search-wrap { max-width: 520px; margin: 0 auto 8px; padding: 0 24px; }
.search-input {
  width: 100%; padding: 14px 20px;
  border: 1px solid #ddd; border-radius: 4px;
  font-size: 15px; font-family: system-ui, sans-serif;
  background: var(--card); color: var(--text);
  outline: none; transition: all 0.3s;
}
.search-input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.05);
}
.search-count {
  font-size: 12px; font-family: system-ui, sans-serif;
  color: #aaa; margin-top: 8px; text-align: center;
}

/* TABS */
.tabs {
  max-width: 720px; margin: 0 auto;
  padding: 16px 24px 0;
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab-btn {
  padding: 12px 16px; border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-size: 13px; font-family: system-ui, sans-serif;
  color: #999; font-weight: 400;
  cursor: pointer; white-space: nowrap;
  transition: all 0.2s;
}
.tab-btn:hover { color: #555; border-bottom-color: #ccc; }
.tab-btn.active {
  color: var(--text); font-weight: 600;
  border-bottom-color: var(--text);
}
.tab-count { font-size: 10px; color: #bbb; margin-left: 3px; }

/* CONTENT */
.content {
  max-width: 720px; margin: 0 auto;
  padding: 8px 24px 64px;
}

/* ROW */
.row {
  border-bottom: 1px solid var(--border-light);
  padding: 20px 16px;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.row:hover {
  background: var(--hover);
  border-left-color: var(--text);
}
.row.clickable { cursor: pointer; }
.row-title { font-size: 19px; font-weight: 600; letter-spacing: -0.2px; margin: 0; }
.row-desc { margin: 6px 0 0; font-size: 15px; color: #777; line-height: 1.5; }
.row-meta {
  margin: 8px 0 0; font-size: 12px;
  font-family: system-ui, sans-serif;
  color: #bbb; font-style: italic;
}
.row-src {
  margin: 12px 0 0; font-size: 11px;
  font-family: system-ui, sans-serif;
  color: #bbb; font-style: italic;
}
.row-header {
  display: flex; justify-content: space-between;
  align-items: baseline;
}

/* EXPAND */
.expand-icon {
  font-size: 18px; font-family: system-ui; color: #ccc;
  font-weight: 300; display: inline-block;
  transition: transform 0.3s;
}
.expand-icon.open { transform: rotate(45deg); }
.expand-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
  opacity: 0;
}
.expand-body.open { max-height: 600px; opacity: 1; }
.expand-inner {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border-light);
}
.expand-why {
  font-size: 14px; color: #444; line-height: 1.7; margin: 0 0 14px;
}
.expand-regime {
  font-size: 13px; font-family: system-ui, sans-serif;
  color: #888; margin: 0 0 10px;
}
.expand-regime b { color: #666; }

/* TAG */
.tag {
  display: inline-block;
  font-size: 11px; font-family: system-ui, sans-serif;
  padding: 3px 10px; border-radius: 3px;
  font-weight: 500; transition: all 0.15s;
  cursor: default;
}
.tag:hover { color: #fff !important; }

/* PILL */
.pill {
  display: inline-block; font-size: 12px;
  font-family: system-ui, sans-serif;
  padding: 2px 10px; border-radius: 20px;
  border: 1px solid #ddd; color: #888;
  background: transparent; margin-right: 6px;
  margin-bottom: 4px; transition: all 0.15s;
}
.pill:hover { color: var(--text); background: #f0efec; }

/* TABLE */
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; font-family: system-ui, sans-serif;
}
.data-table thead tr { border-bottom: 2px solid var(--text); }
.data-table th {
  padding: 12px; text-align: left;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
}
.data-table td { padding: 14px 12px; color: #666; font-size: 12px; }
.data-table td:first-child { font-weight: 600; color: var(--text); }
.data-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s; cursor: pointer;
}
.data-table tbody tr:nth-child(even) { background: #fcfcfa; }
.data-table tbody tr:hover { background: var(--hover); }

/* ADMISSIBILITY */
.adm-card {
  border: 1px solid var(--border-light);
  border-radius: 6px; padding: 16px 20px;
  margin-bottom: 10px; transition: all 0.2s;
}
.adm-card:hover {
  border-color: #ccc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.adm-allowed {
  font-size: 13px; color: #047857; line-height: 1.6;
  margin: 8px 0 4px; font-family: system-ui, sans-serif;
}
.adm-notallowed {
  font-size: 13px; color: #b91c1c; line-height: 1.6;
  margin: 4px 0; font-family: system-ui, sans-serif;
}

/* ONTOLOGY */
.ont-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
  font-family: system-ui, sans-serif;
  font-size: 14px;
}
.ont-row:hover { background: var(--hover); }
.ont-source { font-weight: 600; color: var(--text); min-width: 120px; }
.ont-rel {
  font-size: 11px; color: var(--accent);
  background: rgba(30,64,175,0.06);
  padding: 2px 8px; border-radius: 3px;
  font-weight: 500; white-space: nowrap;
}
.ont-target { color: #555; }
.ont-arrow { color: #ccc; font-size: 16px; }

/* MAP */
.map-wrap {
  position: relative; max-width: 700px;
  margin: 0 auto 24px; background: #f5f4f0;
  border-radius: 8px; border: 1px solid var(--border);
  overflow: hidden;
}
.map-tooltip {
  position: absolute; top: 12px; right: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 16px 20px;
  max-width: 240px; box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  pointer-events: none;
  animation: tooltipFade 0.15s ease-out;
}
@keyframes tooltipFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.map-footer {
  margin: 0; padding: 8px 16px;
  font-size: 11px; font-family: system-ui, sans-serif;
  color: #aaa; text-align: center; background: #f0efeb;
}

/* REGIME CARD */
.regime-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 28px; margin-bottom: 24px;
  position: relative; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.regime-card h3 { font-size: 24px; margin: 0 0 4px; }
.regime-card .close-btn {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none;
  font-size: 20px; color: #ccc; cursor: pointer;
}
.regime-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px 32px; font-size: 13px;
  font-family: system-ui, sans-serif;
}
.regime-label {
  font-size: 11px; color: #aaa;
  text-transform: uppercase; letter-spacing: 1px;
}
.regime-value { color: var(--text); font-weight: 500; }
.regime-full { grid-column: 1/3; }

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px; text-align: center;
  background: var(--card);
}
.footer p { font-size: 13px; font-family: system-ui, sans-serif; color: #aaa; }
.footer a { color: #777; text-decoration: underline; }

/* SECTION HEADER */
.section-desc {
  font-size: 14px; color: #888;
  font-family: system-ui, sans-serif;
  margin-bottom: 16px;
}

/* DATA SOURCE */
.ds-card {
  border-bottom: 1px solid var(--border-light);
  padding: 16px; transition: all 0.2s;
}
.ds-card:hover {
  background: var(--hover);
  border-left: 3px solid var(--accent);
  padding-left: 13px;
}
.ds-name { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.ds-desc {
  font-size: 13px; color: #666; line-height: 1.5;
  font-family: system-ui, sans-serif; margin: 4px 0;
}
.ds-meta {
  font-size: 11px; color: #aaa;
  font-family: system-ui, sans-serif; margin-top: 6px;
}

/* ERROR */
.err-card {
  border-left: 3px solid var(--accent-red);
  padding: 16px 16px 16px 20px;
  margin-bottom: 10px; background: #fff;
  border-radius: 0 6px 6px 0;
  transition: all 0.2s;
}
.err-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.err-name { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.err-wrong { font-size: 13px; color: var(--accent-red); margin: 4px 0; font-family: system-ui, sans-serif; }
.err-detect { font-size: 13px; color: var(--accent-green); margin: 4px 0; font-family: system-ui, sans-serif; }

/* RESPONSIVE */
@media (max-width: 600px) {
  .hero h1 { font-size: 26px; }
  .tabs { padding: 12px 16px 0; }
  .tab-btn { padding: 10px 12px; font-size: 12px; }
  .content { padding: 8px 16px 48px; }
  .regime-grid { grid-template-columns: 1fr; }
  .regime-full { grid-column: 1; }
}

/* EMPTY */
.empty {
  color: #aaa; font-size: 14px;
  font-family: system-ui, sans-serif;
  text-align: center; padding: 48px;
}

/* LOADING */
.loading {
  text-align: center; padding: 48px;
  font-family: system-ui, sans-serif;
  color: #aaa;
}
