.ds-page-hero {
  padding: 64px 0 56px;
}

.ds-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 9999px;
  background: rgba(22, 51, 0, 0.06);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 32px;
  transition: background .2s, transform .2s;
}

.ds-back:hover {
  background: rgba(22, 51, 0, 0.12);
  transform: scale(1.03);
}

.ds-back::before { content: '←'; display: inline-block; }

.ds-page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(52px, 7.5vw, 104px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 12px 0 24px;
  color: var(--text);
  font-feature-settings: "calt" 1;
}
/* em pill styling defined in base.css */

.ds-page-hero .ds-page-sub {
  font-size: 18px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 60ch;
  margin: 0;
}

/* Tab bar */
.ds-tabs-wrap {
  padding: 48px 0 40px;
  position: sticky;
  top: 72px;
  z-index: 50;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(14px);
}

/* Tab bar — B2B industrial style. Squared segmented control with brand navy
   active state instead of the playful fully-rounded Wise pill. Reads more
   like a data console / specification tab than a consumer nav. */
.ds-tabs {
  display: flex;
  gap: 0;
  padding: 0;
  background: var(--bg-card);
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--line);
  overflow-x: auto;
  scrollbar-width: none;
  width: fit-content;
}
.ds-tabs::-webkit-scrollbar { display: none; }

.ds-tab {
  padding: 12px 26px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--line-soft);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
  border-radius: 0;
  font-feature-settings: "calt" 1;
  position: relative;
}

.ds-tab:first-child { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.ds-tab:last-child { border-right: none; border-top-right-radius: 6px; border-bottom-right-radius: 6px; }

.ds-tab:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.ds-tab.active {
  background: var(--accent-dark);
  color: var(--accent-on);
  border-right-color: var(--accent-dark);
}
.ds-tab.active + .ds-tab { border-left: 1px solid var(--accent-dark); margin-left: -1px; }

/* Panels */
.ds-panels {
  padding: 0 0 120px;
}

.ds-panel {
  display: none;
}
.ds-panel.active {
  display: block;
  animation: panelFade .4s cubic-bezier(.2,.8,.2,1);
}

@keyframes panelFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Grade header card */
.grade-header {
  background: var(--bg-card);
  border-radius: 40px;
  padding: 48px;
  box-shadow: 0 0 0 1px var(--line);
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}

.grade-title-block h2 {
  font-family: var(--font-display);
  font-size: clamp(44px, 5.5vw, 68px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  color: var(--text);
}

.grade-position {
  display: inline-block;
  padding: 7px 16px;
  background: var(--accent);
  color: var(--accent-on);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.grade-meta {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px 24px;
  font-size: 14px;
}

.grade-meta dt {
  color: var(--text-faint);
  font-weight: 500;
  margin: 0;
}

.grade-meta dd {
  margin: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

/* Data categories */
.ds-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ds-category {
  background: var(--bg-card);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 0 0 1px var(--line);
}

.ds-category.full {
  grid-column: 1 / -1;
}

.ds-cat-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-dark);
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ds-cat-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.ds-table {
  width: 100%;
  border-collapse: collapse;
}

.ds-table thead th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 18px 10px 0;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

.ds-table thead th:last-child { padding-right: 0; text-align: right; }

.ds-table tbody td {
  padding: 14px 18px 14px 0;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--line-soft);
}

.ds-table tbody td:nth-child(2) {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 12px;
}

.ds-table tbody td:nth-child(3) {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
}

.ds-table tbody td:last-child {
  text-align: right;
  padding-right: 0;
  color: var(--text-dim);
  font-size: 13px;
  font-family: var(--font-mono);
}

.ds-table tbody tr:last-child td {
  border-bottom: none;
}

/* Pill list */
.ds-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ds-pill {
  font-size: 13px;
  padding: 6px 14px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 9999px;
  font-weight: 600;
}

/* Bottom CTA */
.ds-panel-cta {
  margin-top: 32px;
  padding: 36px 48px;
  background: var(--text);
  color: var(--bg);
  border-radius: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.ds-panel-cta-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}

.ds-panel-cta-text span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 960px) {
  .grade-header { grid-template-columns: 1fr; gap: 28px; padding: 32px; border-radius: 28px; }
  .ds-categories { grid-template-columns: 1fr; }
  .ds-tabs-wrap { top: 68px; padding: 32px 0 24px; }
}

@media (max-width: 720px) {
  .ds-panel-cta { flex-direction: column; align-items: flex-start; padding: 28px; }
  .ds-table tbody td:nth-child(2), .ds-table thead th:nth-child(2) { display: none; }
}
