:root {
  --bg: #f6f0e6;
  --bg-accent: #fff9f1;
  --ink: #17242d;
  --muted: #596b75;
  --line: rgba(23, 36, 45, 0.12);
  --panel: rgba(255, 252, 246, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --teal: #0f6c72;
  --teal-soft: rgba(15, 108, 114, 0.12);
  --gold: #c78c3a;
  --rose: #b45b4d;
  --shadow: 0 18px 50px rgba(23, 36, 45, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(199, 140, 58, 0.18), transparent 28rem),
    radial-gradient(circle at top right, rgba(15, 108, 114, 0.12), transparent 24rem),
    linear-gradient(180deg, #f8f3ea 0%, #f3ede3 48%, #efe7dc 100%);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1320px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 3rem;
}

.hero,
.panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-strong) 100%);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-end;
  padding: 2.2rem;
  border-radius: calc(var(--radius) + 8px);
}

.hero-copy h1,
.panel-head h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.hero-copy h1 {
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 0.94;
}

.eyebrow,
.panel-kicker,
.summary-value-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  color: var(--teal);
  margin: 0 0 0.45rem;
}

.subtitle,
.dataset-meta,
.status-line,
.schema-description,
.catalog-provenance {
  color: var(--muted);
}

.subtitle {
  max-width: 44rem;
  margin: 0.9rem 0 0;
  line-height: 1.6;
}

.catalog-provenance {
  margin: 0.8rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, #135d62 0%, #0b8088 100%);
  box-shadow: 0 12px 28px rgba(15, 108, 114, 0.2);
}

.secondary-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
}

.primary-button:hover,
.secondary-button:hover,
.sortable-button:hover {
  transform: translateY(-1px);
}

button:disabled,
.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.layout {
  margin-top: 1.35rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.2rem;
}

.submission-layout {
  margin-top: 1.35rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.2rem;
}

.summary-panel,
.table-panel {
  grid-column: 1 / 2;
  min-width: 0;
}

.schema-panel {
  grid-column: 2 / 3;
  grid-row: 1 / span 2;
  min-width: 0;
}

.editor-panel,
.validation-panel,
.cid-panel,
.preview-panel,
.queue-panel,
.metrics-panel {
  grid-column: 1 / 2;
  min-width: 0;
}

.sidebar-panel {
  grid-column: 2 / 3;
  grid-row: 1 / span 4;
  min-width: 0;
}

.panel {
  border-radius: var(--radius);
  padding: 1.3rem;
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
}

.summary-card {
  border: 1px solid rgba(15, 108, 114, 0.11);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 249, 240, 0.82));
  border-radius: 20px;
  padding: 1rem 1.05rem;
}

.summary-number {
  font-size: 2rem;
  line-height: 1;
  margin: 0;
  font-weight: 600;
}

.table-head {
  align-items: end;
}

.search-shell {
  display: grid;
  gap: 0.35rem;
  min-width: min(340px, 100%);
  font-size: 0.88rem;
  color: var(--muted);
}

.search-shell input {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  outline: none;
}

.search-shell input:focus {
  border-color: rgba(15, 108, 114, 0.4);
  box-shadow: 0 0 0 4px rgba(15, 108, 114, 0.08);
}

.compact-button {
  min-height: 2.3rem;
  padding: 0.55rem 0.85rem;
}

.editor-label,
.field-shell span {
  display: block;
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.yaml-editor,
.field-shell input,
.field-shell textarea {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: inherit;
  outline: none;
}

.yaml-editor {
  min-height: 28rem;
  padding: 1rem;
  resize: vertical;
  font-family: "SFMono-Regular", "Menlo", "Monaco", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

.field-shell input,
.field-shell textarea {
  padding: 0.85rem 0.95rem;
}

.yaml-editor:focus,
.field-shell input:focus,
.field-shell textarea:focus {
  border-color: rgba(15, 108, 114, 0.4);
  box-shadow: 0 0 0 4px rgba(15, 108, 114, 0.08);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.field-shell {
  min-width: 0;
}

.field-shell-wide {
  grid-column: 1 / -1;
}

.sidebar-section + .sidebar-section {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(23, 36, 45, 0.08);
}

.stack-shell {
  display: grid;
  gap: 1rem;
}

.foldable-menu {
  width: 100%;
}

.foldable-menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(15, 108, 114, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  list-style: none;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.foldable-menu-toggle::-webkit-details-marker {
  display: none;
}

.foldable-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(15, 108, 114, 0.2);
}

.foldable-menu-toggle:focus-visible {
  outline: none;
  border-color: rgba(15, 108, 114, 0.4);
  box-shadow: 0 0 0 4px rgba(15, 108, 114, 0.08);
}

.foldable-menu-icon {
  display: inline-grid;
  gap: 0.18rem;
  flex: 0 0 auto;
}

.foldable-menu-icon span {
  display: block;
  width: 0.8rem;
  height: 2px;
  border-radius: 999px;
  background: var(--teal);
}

.foldable-menu-label {
  font-size: 0.94rem;
  font-weight: 600;
}

.foldable-menu-content {
  margin-top: 0.55rem;
}

.visitor-menu-panel {
  margin-top: 1rem;
  padding: 0.75rem;
}

.sidebar-title {
  margin: 0 0 0.55rem;
  font-weight: 600;
}

.question-list,
.proposal-queue,
.metrics-list {
  display: grid;
  gap: 0.8rem;
}

.question-card,
.proposal-card,
.detail-card {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 108, 114, 0.11);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 249, 240, 0.82));
}

.detail-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.detail-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.5;
}

.detail-list li + li {
  margin-top: 0.4rem;
}

.inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.metric-value {
  margin: 0.2rem 0 0;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.1;
}

.metric-caption {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-breakdown strong {
  color: var(--ink);
}

.toggle-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.toggle-shell input {
  margin: 0;
}

.table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.plans-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.plans-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(249, 243, 232, 0.96);
  border-bottom: 1px solid var(--line);
}

.plans-table th,
.plans-table td {
  padding: 0.9rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(23, 36, 45, 0.08);
}

.plans-table tbody tr:hover {
  background: rgba(15, 108, 114, 0.045);
}

.sortable-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 600;
}

.sort-indicator {
  color: var(--teal);
  font-size: 0.82rem;
}

.sticky-col-1,
.sticky-col-2 {
  position: sticky;
  z-index: 2;
  background: inherit;
}

.sticky-col-1 {
  left: 0;
  min-width: 180px;
}

.sticky-col-2 {
  left: 180px;
  min-width: 160px;
}

.plans-table thead .sticky-col-1,
.plans-table thead .sticky-col-2 {
  z-index: 4;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-yes {
  color: #0d5b52;
  background: rgba(34, 154, 111, 0.14);
}

.badge-no {
  color: #8b4036;
  background: rgba(180, 91, 77, 0.14);
}

.badge-neutral {
  color: var(--muted);
  background: rgba(89, 107, 117, 0.12);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag,
.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 108, 114, 0.15);
  background: var(--bg-accent);
  font-size: 0.8rem;
  color: var(--ink);
  text-decoration: none;
}

.cell-text-wrap {
  display: block;
  max-width: 17rem;
  max-height: 6.5rem;
  overflow: auto;
  padding-right: 0.25rem;
  white-space: pre-wrap;
  line-height: 1.5;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 115, 133, 0.45) rgba(20, 33, 43, 0.06);
}

.cell-text-wrap::-webkit-scrollbar {
  width: 0.45rem;
}

.cell-text-wrap::-webkit-scrollbar-track {
  background: rgba(20, 33, 43, 0.06);
  border-radius: 999px;
}

.cell-text-wrap::-webkit-scrollbar-thumb {
  background: rgba(99, 115, 133, 0.45);
  border-radius: 999px;
}

.status-line {
  margin: 0 0 0.95rem;
}

.schema-list {
  display: grid;
  gap: 0.8rem;
}

.schema-item {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(23, 36, 45, 0.08);
}

.schema-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.schema-title {
  margin: 0;
  font-weight: 600;
}

.schema-aliases {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.muted-link {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

.muted-link:hover {
  text-decoration: underline;
}

.privacy-card {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 108, 114, 0.09);
  background: rgba(255, 255, 255, 0.68);
}

.privacy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.45rem;
}

.privacy-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.privacy-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.privacy-status-on {
  color: #0d5b52;
  background: rgba(34, 154, 111, 0.14);
}

.privacy-status-off {
  color: var(--muted);
  background: rgba(89, 107, 117, 0.12);
}

.privacy-description,
.privacy-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.privacy-description,
.privacy-message {
  font-size: 0.88rem;
}

.privacy-message {
  margin-top: 0.6rem;
}

.privacy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.privacy-actions button {
  flex: 0 0 auto;
  min-height: 2.3rem;
  padding: 0.55rem 0.85rem;
}

.yaml-example-shell {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(23, 36, 45, 0.08);
}

.yaml-label {
  margin: 0 0 0.55rem;
  font-weight: 600;
}

.yaml-example {
  margin: 0;
  overflow: auto;
  padding: 1rem;
  border-radius: 18px;
  background: #f7f2e8;
  border: 1px solid rgba(23, 36, 45, 0.08);
  font-family: "SFMono-Regular", "Menlo", "Monaco", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
}

.empty-state {
  padding: 2.4rem 1rem;
  text-align: center;
  color: var(--muted);
}

.reveal {
  animation: rise-in 500ms ease both;
}

.delay-1 {
  animation-delay: 70ms;
}

.delay-2 {
  animation-delay: 140ms;
}

.delay-3 {
  animation-delay: 210ms;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .layout,
  .submission-layout {
    grid-template-columns: 1fr;
  }

  .summary-panel,
  .table-panel,
  .schema-panel,
  .editor-panel,
  .validation-panel,
  .cid-panel,
  .preview-panel,
  .queue-panel,
  .metrics-panel,
  .sidebar-panel {
    grid-column: auto;
    grid-row: auto;
  }

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

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
    padding-top: 0.7rem;
  }

  .hero,
  .panel {
    padding: 1rem;
    border-radius: 22px;
  }

  .hero,
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions,
  .search-shell {
    width: 100%;
  }

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

  .sticky-col-1 {
    min-width: 150px;
  }

  .sticky-col-2 {
    left: 150px;
    min-width: 140px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.home-page {
  background: linear-gradient(180deg, #f4f6f9 0%, #edf1f5 100%);
  color: #14212b;
}

body.home-page.drawer-open {
  overflow: hidden;
}

.home-shell {
  min-height: 100vh;
  padding: 1.5rem;
}

.home-main {
  width: min(1720px, 100%);
  margin: 0 auto;
}

.home-menu-button,
.home-drawer-close {
  appearance: none;
  border: 1px solid #d4dbe3;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #14212b;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.home-menu-button:hover,
.home-drawer-close:hover,
.home-page .primary-button:hover,
.home-page .secondary-button:hover,
.home-page .sortable-button:hover {
  transform: translateY(-1px);
}

.home-menu-button:focus-visible,
.home-drawer-close:focus-visible,
.home-page .search-shell input:focus-visible,
.home-page .primary-button:focus-visible,
.home-page .secondary-button:focus-visible,
.home-drawer-details summary:focus-visible {
  outline: none;
  border-color: rgba(20, 33, 43, 0.28);
  box-shadow: 0 0 0 4px rgba(20, 33, 43, 0.08);
}

.home-menu-button {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 45;
  min-height: 2.85rem;
  padding: 0.78rem 1.05rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 34px rgba(20, 33, 43, 0.08);
}

.home-empty-state,
.home-table-stage {
  width: 100%;
  padding-top: 4.6rem;
}

.home-empty-state {
  min-height: calc(100vh - 3rem);
  display: grid;
  place-items: center;
}

.home-empty-card {
  width: min(540px, 100%);
  padding: 3rem;
  border-radius: 32px;
  border: 1px solid #dbe1e8;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 72px rgba(20, 33, 43, 0.08);
  text-align: center;
}

.home-empty-kicker,
.home-drawer-kicker {
  margin: 0 0 0.65rem;
  color: #607080;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-empty-card h1,
.home-drawer-header h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.home-empty-card h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.98;
}

.home-empty-card p:last-child {
  margin: 1rem 0 0;
  color: #5a6a79;
  line-height: 1.65;
}

.home-table-wrapper {
  border-radius: 28px;
  border-color: #d6dde6;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 22px 64px rgba(20, 33, 43, 0.06);
}

.home-page .plans-table {
  min-width: 1080px;
}

.home-page .plans-table thead th {
  background: #f7f9fc;
  border-bottom-color: #d6dde6;
}

.home-page .plans-table th,
.home-page .plans-table td {
  padding: 1rem 0.95rem;
  border-bottom-color: rgba(20, 33, 43, 0.08);
}

.home-page .cell-text-wrap {
  max-width: 15rem;
  max-height: 5.5rem;
  line-height: 1.45;
}

.home-page .plans-table tbody tr:hover {
  background: rgba(20, 33, 43, 0.03);
}

.home-page .sticky-col-1,
.home-page .sticky-col-2 {
  background: #ffffff;
}

.home-page .plans-table thead .sticky-col-1,
.home-page .plans-table thead .sticky-col-2 {
  background: #f7f9fc;
}

.home-page .sortable-button {
  gap: 0.55rem;
  color: #14212b;
  font-weight: 600;
}

.home-page .sort-indicator {
  color: #6f7f90;
}

.home-page .badge {
  min-height: 1.75rem;
  font-size: 0.78rem;
}

.home-page .badge-yes {
  color: #155c4a;
  background: rgba(21, 92, 74, 0.1);
}

.home-page .badge-no {
  color: #8a4039;
  background: rgba(138, 64, 57, 0.1);
}

.home-page .badge-neutral {
  color: #637385;
  background: rgba(99, 115, 133, 0.11);
}

.home-page .tag,
.home-page .source-link {
  min-height: 1.7rem;
  border-color: rgba(20, 33, 43, 0.12);
  background: #f6f8fb;
}

.home-page .empty-state {
  padding: 3rem 1rem;
  color: #5d6c7b;
}

.home-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(20, 33, 43, 0.38);
  opacity: 0;
  transition: opacity 180ms ease;
}

body.home-page.drawer-open .home-drawer-backdrop {
  opacity: 1;
}

.home-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: min(440px, calc(100vw - 1.5rem));
  height: 100vh;
  padding: 1.15rem;
  border-left: 1px solid #d7dee7;
  background: #f7f9fc;
  box-shadow: -28px 0 68px rgba(20, 33, 43, 0.14);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 220ms ease;
}

body.home-page.drawer-open .home-drawer {
  transform: translateX(0);
}

.home-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.home-drawer-header h2 {
  font-size: 1.7rem;
  line-height: 1;
}

.home-drawer-close {
  min-height: 2.5rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.home-drawer-top,
.home-drawer-details {
  border: 1px solid #d7dee7;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(20, 33, 43, 0.04);
}

.home-drawer-top {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 0.95rem;
}

.home-page .search-shell {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  color: #607080;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-page .search-shell input {
  min-height: 3rem;
  border-radius: 16px;
  border-color: #d7dee7;
  background: #ffffff;
  color: #14212b;
}

.home-drawer-actions {
  display: grid;
  gap: 0.7rem;
}

.home-page .primary-button,
.home-page .secondary-button {
  width: 100%;
  min-height: 2.8rem;
  border-radius: 16px;
  padding: 0.8rem 1rem;
  box-shadow: none;
}

.home-page .primary-button {
  border-color: #14212b;
  background: #14212b;
  color: #ffffff;
}

.home-page .secondary-button {
  border-color: #d7dee7;
  background: #ffffff;
  color: #14212b;
}

.home-drawer-details + .home-drawer-details {
  margin-top: 0.95rem;
}

.home-drawer-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1rem 1.05rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: #14212b;
}

.home-drawer-details summary::-webkit-details-marker {
  display: none;
}

.home-drawer-details summary::after {
  content: "+";
  color: #607080;
  font-size: 1rem;
  font-weight: 600;
}

.home-drawer-details[open] summary::after {
  content: "-";
}

.home-drawer-block {
  display: grid;
  gap: 1rem;
  padding: 0 1.05rem 1.05rem;
  border-top: 1px solid #e7ecf2;
}

.home-page .dataset-meta,
.home-page .catalog-provenance {
  margin: 0;
  color: #5d6c7b;
  line-height: 1.6;
}

.home-page .summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.home-page .summary-card {
  border-radius: 18px;
  border-color: #e2e8ef;
  background: #f8fafc;
  padding: 0.9rem 0.95rem;
}

.home-page .summary-value-label {
  margin-bottom: 0.35rem;
  color: #607080;
  font-size: 0.7rem;
}

.home-page .summary-number {
  font-size: 1.7rem;
}

.home-page .schema-list {
  gap: 0.9rem;
}

.home-page .schema-item {
  padding-bottom: 0.9rem;
  border-bottom-color: #e7ecf2;
}

.home-page .schema-title {
  color: #14212b;
}

.home-page .schema-description,
.home-page .schema-aliases {
  color: #5d6c7b;
}

.home-page .yaml-example-shell {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.home-page .yaml-label {
  margin: 0;
  color: #14212b;
  font-weight: 600;
}

.home-page .yaml-example {
  max-height: 18rem;
  border-radius: 18px;
  border-color: #e1e7ee;
  background: #f8fafc;
}

.home-page .privacy-card {
  border-radius: 18px;
  border-color: #e2e8ef;
  background: #f8fafc;
}

@media (max-width: 900px) {
  .home-shell {
    padding: 1rem;
  }

  .home-menu-button {
    top: 1rem;
    right: 1rem;
  }

  .home-empty-state,
  .home-table-stage {
    padding-top: 4rem;
  }

  .home-empty-card {
    padding: 2.25rem 1.75rem;
  }
}

@media (max-width: 760px) {
  .home-shell {
    padding: 0.8rem;
  }

  .home-menu-button {
    top: 0.8rem;
    right: 0.8rem;
    min-height: 2.7rem;
  }

  .home-empty-state,
  .home-table-stage {
    padding-top: 3.6rem;
  }

  .home-empty-state {
    min-height: calc(100vh - 1.6rem);
  }

  .home-empty-card {
    padding: 2rem 1.35rem;
    border-radius: 24px;
  }

  .home-drawer {
    width: 100vw;
    padding: 0.85rem;
  }

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