section.cover {}

:root {
  --product-ink: #1f2937;
  --product-muted: #5f6b7a;
  --product-line: #e5eaf1;
  --product-panel: #ffffff;
  --product-soft: #f8fbff;
  --product-accent: #7a1f2b;
  --product-accent-soft: #fff6f7;
}

body {
  color: var(--product-ink);
  background: #f5f7fb;
}

.app-nav,
.sidebar,
.markdown-section {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sidebar {
  width: 320px;
  padding: 18px 14px 28px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #fbfcfe 0%, #f6f8fb 100%);
  border-right: 1px solid var(--product-line);
}

.app-name {
  padding: 8px 10px 14px;
  border-bottom: 1px solid var(--product-line);
  margin-bottom: 10px;
}

.app-name-link {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #223247;
}

.sidebar-nav {
  padding: 8px 6px 0;
}

.sidebar-nav > ul {
  margin: 0;
  padding: 0;
}

.sidebar-nav > ul > li {
  list-style: none;
  margin: 4px 0 8px;
}

.sidebar-nav > ul > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  width: calc(100% - 40px);
}

.sidebar ul li a {
  display: inline-flex;
  align-items: center;
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
  margin: 2px 0;
  padding: 8px 12px;
  border-radius: 10px;
  color: #2c3b4d;
}

.sidebar-nav > ul > li > a,
.sidebar-nav > ul > li > ul > li > a {
  font-size: 15px;
  font-weight: 700;
  color: #223247;
}

.sidebar ul li > ul {
  margin-top: 4px;
}

.sidebar ul li.sidebar-collapsible {
  position: relative;
}

.sidebar-node-toggle {
  position: absolute;
  top: 8px;
  right: 4px;
  width: 20px;
  height: 20px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid #d7e0ea;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  color: #52667f;
  cursor: pointer;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
  font-size: 0;
  line-height: 1;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
}

.sidebar-node-toggle::before {
  content: '▼';
  display: inline-block;
  width: 8px;
  height: 8px;
  font-size: 8px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
}

.sidebar-node-toggle:focus-visible {
  outline: 2px solid rgba(122, 31, 43, 0.18);
  outline-offset: 1px;
}

.sidebar-node-toggle[aria-expanded='false']::before {
  content: '▶';
  width: 8px;
  height: 8px;
  font-size: 8px;
  transform: translateX(0.5px);
}

.sidebar-node-toggle[aria-expanded='true']::before {
  content: '▼';
  width: 8px;
  height: 8px;
  font-size: 8px;
  transform: translateY(0.5px);
}

.sidebar-node-toggle:hover {
  background: #f8fbff;
  border-color: #c8d5e3;
}

.sidebar-node-toggle:active {
  transform: translateY(0.5px);
}

.sidebar ul li.sidebar-collapsible.is-collapsed > ul {
  display: none;
}

.sidebar ul li.active > a,
.sidebar ul li a:hover {
  background: #ffffff;
  color: var(--product-accent);
  text-decoration: none;
}

.sidebar-nav > ul > li.active > a,
.sidebar-nav > ul > li > ul > li.active > a {
  font-size: 15px;
  font-weight: 700;
}

.content {
  left: 320px;
}

.markdown-section {
  max-width: 980px;
  padding: 34px 42px 80px;
}

.markdown-section > h1:first-child {
  margin-top: 0;
}

.markdown-section a {
  color: #8b2030;
  font-weight: 600;
}

.markdown-section h1 {
  display: block;
  margin: 0 0 20px;
  font-size: 34px;
  line-height: 1.18;
  color: #16263b;
}

.markdown-section h2,
.markdown-section h3,
.markdown-section h4 {
  color: #1f2f46;
}

.markdown-section p,
.markdown-section li,
.markdown-section td,
.markdown-section th {
  color: #334155;
}

.markdown-section blockquote {
  border-left: 4px solid #e4d1d5;
  background: #fffafb;
  color: #5f5160;
}

.markdown-section table {
  display: table;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--product-line);
  border-radius: 14px;
  overflow: hidden;
}

.markdown-section table tr:nth-child(2n) {
  background: #fbfcfe;
}

.markdown-section table th,
.markdown-section table td {
  border: 0;
  border-bottom: 1px solid #edf1f5;
}

.markdown-section table tr:last-child td {
  border-bottom: 0;
}

.product-hero {
  margin: 8px 0 24px;
  padding: 26px 28px;
  border-radius: 20px;
  border: 1px solid #e3eaf3;
  background: linear-gradient(135deg, #f8fbff 0%, #f3f7fc 100%);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
}

.product-hero-home {
  background: linear-gradient(135deg, #fcf7f8 0%, #f5f8fd 100%);
}

.product-hero-soft {
  background: linear-gradient(135deg, #fbfcfe 0%, #f6f8fb 100%);
}

.product-hero-compact {
  padding: 22px 24px;
}

.product-school-hero {
  background: linear-gradient(135deg, #f7f1f1 0%, #fbf7f7 100%);
}

.product-hero h2,
.product-page-intro h2 {
  margin: 6px 0 10px;
}

.product-hero-eyebrow,
.product-section-label,
.product-route-step,
.product-entry-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.product-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.product-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #dbe4ef;
  color: #294766;
  font-size: 13px;
  font-weight: 600;
}

.product-route-grid,
.product-entry-grid {
  display: grid;
  gap: 16px;
  margin: 18px 0 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.product-route-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.product-entry-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.product-route-card,
.product-entry-card,
.product-page-intro > div:first-child {
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e6ebf2;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.product-route-card-accent,
.product-entry-card:hover {
  border-color: #e5c9cf;
  background: linear-gradient(180deg, #fffdfd 0%, #fff7f8 100%);
}

.product-route-card h3,
.product-entry-card strong {
  margin: 6px 0 8px;
  font-size: 18px;
  color: #1f2f46;
}

.product-entry-card {
  display: block;
  text-decoration: none;
}

.product-entry-card p {
  margin: 6px 0 0;
}

.product-page-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr);
  gap: 16px;
  margin: 8px 0 24px;
  align-items: stretch;
}

.product-action-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #ead6da;
  background: linear-gradient(180deg, #fffafb 0%, #fff6f7 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
}

.product-action-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #efdde0;
  text-decoration: none;
  font-weight: 600;
}

.linked-section {
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: linear-gradient(180deg, #fcfdff 0%, #f7f9fc 100%);
}

.linked-grid {
  display: grid;
  gap: 16px;
  margin: 14px 0 18px;
}

.linked-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.linked-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.linked-card {
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e6ebf2;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.linked-card h4 {
  margin: 4px 0 8px;
}

.linked-card ul {
  margin: 8px 0 0 18px;
}

.linked-eyebrow {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #476282;
}

.linked-metric {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 700;
  color: #1f3a5f;
}

.linked-note {
  color: #5b6472;
  font-size: 14px;
}

.linked-error {
  color: #a61b1b;
  margin: 0;
}

.explorer-shell {
  border-color: #d8e4f2;
  background: linear-gradient(180deg, #f9fbff 0%, #f3f7fc 100%);
}

.explorer-page-note {
  margin-bottom: 18px;
}

.explorer-page-note p {
  margin: 8px 0 0;
}

.explorer-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.explorer-header h3 {
  margin: 0 0 6px;
}

.explorer-reset {
  flex-shrink: 0;
  border: 1px solid #c9d8ea;
  background: #ffffff;
  color: #1f3a5f;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.explorer-reset:hover {
  background: #f3f7fc;
}

.explorer-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.explorer-filters-dense {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
}

.explorer-filter,
.explorer-toggle {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #314a67;
}

.explorer-filter select,
.explorer-filter input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #cfd9e6;
  background: #fff;
  padding: 10px 12px;
  color: #223247;
  box-sizing: border-box;
}

.explorer-toggle {
  min-height: 44px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #cfd9e6;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.explorer-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.explorer-summary-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #e1e9f3;
}

.explorer-summary-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.explorer-summary-pill,
.explorer-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef4fb;
  color: #2f537a;
  font-size: 12px;
  font-weight: 700;
}

.explorer-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.explorer-chip-strong {
  background: #e8eefc;
  color: #29429e;
}

.explorer-data-note {
  margin-bottom: 16px;
}

.explorer-result-card {
  min-height: 220px;
}

.explorer-result-card-compact {
  min-height: 0;
}

.explorer-inline-metric {
  margin-top: 6px;
  font-size: 24px;
}

.explorer-result-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.explorer-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf4fb;
  color: #29517c;
  font-size: 12px;
  font-weight: 700;
}

.explorer-result-meta {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf1f5;
  font-size: 14px;
  color: #475569;
}

.explorer-empty {
  border-style: dashed;
  text-align: center;
}

.explorer-table-wrap {
  overflow-x: auto;
  border: 1px solid #e1e9f3;
  border-radius: 14px;
  background: #fff;
}

.explorer-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.explorer-table th,
.explorer-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.explorer-table th {
  position: sticky;
  top: 0;
  background: #f8fbff;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.explorer-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.explorer-page-status,
.explorer-page-ellipsis {
  color: #5b6472;
  font-size: 14px;
}

.explorer-page-btn {
  min-width: 40px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #c9d8ea;
  border-radius: 10px;
  background: #fff;
  color: #1f3a5f;
  font-weight: 600;
  cursor: pointer;
}

.explorer-page-btn.is-active {
  background: #8b2030;
  border-color: #8b2030;
  color: #fff;
}

.explorer-page-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 960px) {
  .sidebar {
    width: 100%;
  }

  .content {
    left: 0;
  }

  .markdown-section {
    padding: 24px 20px 64px;
  }

  .product-page-intro,
  .explorer-header,
  .explorer-summary-bar,
  .explorer-result-topline {
    flex-direction: column;
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
}
