/* Route-level compositions for public pages. */
.page-shell {
  --page-mark: #2563eb;
  position: relative;
  padding-top: 30px;
}

.page-shell > nav {
  display: flex;
  min-height: 34px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-muted);
}

.page-shell > header {
  position: relative;
  max-width: none;
  margin-bottom: 34px;
  padding: 3px 0 25px 20px;
  border-bottom: 0;
}

.page-shell > header::before {
  position: absolute;
  top: 4px;
  bottom: 25px;
  left: 0;
  width: 4px;
  border-radius: 2px;
  background: var(--page-mark);
  content: "";
}

.page-shell > header::after {
  display: none;
}

.page-shell > header h1 {
  max-width: 900px;
  font-size: 2.25rem;
  line-height: 1.14;
}

.page-shell > header p {
  max-width: 780px;
}

.page-shell > section > h2,
.page-shell > section > div:first-child > h2 {
  position: relative;
}

.page-shell > section > h2::before,
.page-shell > section > div:first-child > h2::before {
  display: inline-block;
  width: 3px;
  height: 16px;
  margin-right: 9px;
  border-radius: 2px;
  background: var(--page-mark);
  content: "";
  vertical-align: -2px;
}

.page-shell :where(table, input, textarea, select) {
  font-variant-numeric: tabular-nums;
}

.page-shell thead th {
  height: 42px;
  border-color: var(--c-border);
  color: var(--c-muted);
}

.page-shell tbody td {
  height: 43px;
}

.page-shell .overflow-x-auto {
  scrollbar-color: #9db8e8 transparent;
}

.page-shell > footer,
.page-content-shell > footer {
  width: 100%;
}

/* Model radar */
.page-models {
  --page-mark: #0f6bdc;
}

.page-models > section:first-of-type > div > a {
  position: relative;
  overflow: hidden;
  border-top: 3px solid #3b82f6;
}

.page-models > section:first-of-type > div > a:nth-child(3n + 2) {
  border-top-color: #0891b2;
}

.page-models > section:first-of-type > div > a:nth-child(3n) {
  border-top-color: #16a34a;
}

.page-models > section:nth-of-type(2) > div {
  border-top: 3px solid var(--page-mark);
}

/* Single model datasheet */
.page-model-detail {
  --page-mark: #0f6bdc;
}

.page-model-detail > section:first-of-type {
  border-top: 3px solid var(--page-mark);
}

.page-model-detail > section:first-of-type > div:first-child > div {
  min-width: 0;
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--c-border);
}

.page-model-detail > section:nth-of-type(2) > div.overflow-x-auto {
  border-top: 3px solid var(--page-mark);
}

/* Dense price comparison terminal */
.page-price {
  --page-mark: #2563eb;
}

.page-price > header + div {
  scrollbar-width: thin;
}

.page-price > header + div a {
  min-height: 38px;
  align-items: center;
}

.page-price > section {
  min-width: 0;
  border-top: 3px solid var(--page-mark);
}

.page-price > header + div + div {
  border-left: 3px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  box-shadow: none;
}

/* Category directory */
.page-category {
  --page-mark: #2563eb;
}

.page-category > section:first-of-type > div:last-child {
  align-items: stretch;
}

.page-category > section:nth-of-type(n + 2) {
  padding-top: 28px;
  border-top: 1px solid var(--c-border);
}

.page-category > section:nth-of-type(2) > div > div {
  border-top: 3px solid #60a5fa;
}

/* Station profile */
.page-station {
  --page-mark: #0f766e;
  max-width: 72rem;
}

.page-station > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 28px;
  padding-top: 17px;
  padding-bottom: 28px;
}

.page-station > header h1,
.page-station > header p {
  grid-column: 1;
}

.page-station > header > div:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  margin-top: 0;
}

.page-station > header > div:last-child a {
  min-height: 48px;
  border-radius: 8px;
}

.page-station > section:first-of-type {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  padding: 0;
  border-top: 3px solid var(--page-mark);
}

.page-station > section:first-of-type > div {
  min-height: 86px;
  padding: 15px;
  border: 0;
  border-right: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  border-radius: 0;
  background: var(--c-surface);
}

.page-station > section:first-of-type > div:nth-child(4n) {
  border-right: 0;
}

.page-station > section:nth-of-type(2) tbody {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-station > section:nth-of-type(2) tr {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  border-right: 1px solid var(--c-border);
}

.page-station > section:nth-of-type(2) tr:nth-child(2n) {
  border-right: 0;
}

.page-station > section:nth-of-type(2) td {
  display: flex;
  height: auto;
  min-height: 46px;
  align-items: center;
}

.page-station > section:nth-of-type(n + 3) {
  padding-top: 4px;
}

.page-station > section:has(table) > div {
  border-top: 3px solid color-mix(in srgb, var(--page-mark) 80%, #ffffff);
}

/* Rankings as ledgers, not stacked generic cards */
.page-rankings {
  --page-mark: #1d4ed8;
}

.page-rankings > section:nth-of-type(-n + 3) {
  padding-top: 28px;
  border-top: 1px solid var(--c-border);
}

.page-rankings > section:nth-of-type(-n + 3) > div:last-child {
  border-top: 3px solid var(--page-mark);
}

.page-rankings > section:nth-of-type(-n + 3) tbody tr:first-child {
  background: color-mix(in srgb, #f59e0b 9%, var(--c-surface));
}

.page-rankings > section:nth-of-type(4) {
  padding: 28px 0;
  border-block: 1px solid var(--c-border);
}

/* Review index */
.page-reviews {
  --page-mark: #0369a1;
}

.page-reviews > section:first-of-type > div {
  counter-reset: review-step;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: 8px;
}

.page-reviews > section:first-of-type > div > div {
  counter-increment: review-step;
  border: 0;
  border-right: 1px solid var(--c-border);
  border-radius: 0;
  box-shadow: none;
}

.page-reviews > section:first-of-type > div > div:last-child {
  border-right: 0;
}

.page-reviews > section:nth-of-type(2) a {
  border-top: 3px solid #60a5fa;
}

.page-reviews > section:nth-of-type(3) > div {
  columns: 3 230px;
  column-gap: 30px;
}

.page-reviews > section:nth-of-type(3) > div > div {
  break-inside: avoid;
  margin-bottom: 20px;
  padding-left: 13px;
  border-left: 2px solid var(--c-border);
}

.page-reviews .station-link {
  display: inline-block;
  padding-block: 3px;
}

/* Reset timeline */
.page-resets {
  --page-mark: #2563eb;
  max-width: 72rem;
}

.page-resets > div.space-y-12 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.page-resets > div.space-y-12 > * {
  min-width: 0;
  margin-top: 0;
}

.page-resets > section:last-of-type > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: 8px;
}

.page-resets > section:last-of-type > div > div {
  margin: 0;
  border: 0;
  border-right: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  border-radius: 0;
  box-shadow: none;
}

.page-resets-detail {
  --page-mark: #2563eb;
}

.page-resets-detail > section,
.page-resets-detail > div {
  border-top-color: var(--page-mark);
}

/* Verify workbench */
.page-verify {
  --page-mark: #2563eb;
  max-width: 72rem;
}

.page-verify [data-verify-form] {
  border-top: 3px solid var(--page-mark);
  padding: 28px;
}

.page-verify [data-verify-form] input {
  min-height: 46px;
}

.page-verify [data-model][aria-pressed="true"] {
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.24);
}

.page-verify [data-verify-result] > div,
.page-report [data-report] > div {
  border-radius: 8px;
}

.page-verify > section:nth-of-type(1) {
  border-left: 4px solid #0ea5e9;
  border-radius: 0 8px 8px 0;
}

.page-verify > section:nth-of-type(3) > div {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: 8px;
}

.page-verify > section:nth-of-type(3) > div > div {
  border: 0;
  border-right: 1px solid var(--c-border);
  border-radius: 0;
}

/* Submission workspace */
.page-submit {
  --page-mark: #0f6bdc;
  max-width: 72rem;
}

.page-submit > section {
  max-width: none;
}

.page-submit > section:first-of-type > div:last-of-type {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: 8px;
}

.page-submit > section:first-of-type > div:last-of-type > div {
  border: 0;
  border-right: 1px solid var(--c-border);
  border-radius: 0;
  box-shadow: none;
}

.page-submit > section:first-of-type > div:last-of-type > div:last-child {
  border-right: 0;
}

.page-submit > section:nth-of-type(3) {
  border-top: 3px solid var(--page-mark);
}

.page-submit [data-submit-form] :where(input, textarea) {
  min-height: 46px;
}

.page-submit [data-submit-form] textarea {
  min-height: 112px;
}

/* Availability dashboard */
.page-status {
  --page-mark: #0f766e;
  max-width: 72rem;
}

.page-status > section:first-of-type {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-top: 3px solid var(--page-mark);
  border-radius: 8px;
}

.page-status > section:first-of-type > div {
  border: 0;
  border-right: 1px solid var(--c-border);
  border-radius: 0;
  box-shadow: none;
}

.page-status > section:first-of-type > div:last-child {
  border-right: 0;
}

.page-status > section:nth-of-type(2) {
  border-left: 4px solid #f59e0b;
  border-radius: 0 8px 8px 0;
}

.page-status > section:nth-of-type(3) > div:last-child > a {
  border-left: 3px solid #f59e0b;
}

/* Generated report */
.page-report {
  --page-mark: #2563eb;
  max-width: 64rem;
}

.page-report [data-report] {
  min-height: 320px;
  border-top: 3px solid var(--page-mark);
}

/* Long-form content stored outside templates */
.page-content-shell > main {
  max-width: 64rem;
  padding-top: 38px;
}

.page-content-shell > main > h1,
.page-content-shell > main > header h1 {
  position: relative;
  padding: 4px 0 24px 20px;
  border-bottom: 1px solid var(--c-border);
  font-size: 2.25rem;
  line-height: 1.16;
}

.page-content-shell > main > h1::before,
.page-content-shell > main > header h1::before {
  position: absolute;
  top: 4px;
  bottom: 24px;
  left: 0;
  width: 4px;
  border-radius: 2px;
  background: var(--c-accent);
  content: "";
}

.page-content-shell main > div.space-y-8 > section {
  padding-block: 22px;
  border-top: 1px solid var(--c-border);
}

.page-content-shell .article-body {
  max-width: 760px;
  margin-inline: auto;
  font-size: 15px;
}

.page-content-shell .article-body h2 {
  margin-top: 42px;
  color: var(--c-fg);
}

.page-content-shell .article-body h3 {
  margin-top: 28px;
  color: var(--c-fg);
}

.page-content-shell .article-body pre {
  max-width: 100%;
  overflow-x: auto;
}

.page-content-shell .content-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.page-content-shell .content-table-scroll table {
  min-width: 620px;
  margin: 0;
}

.page-content-shell .article-body a {
  overflow-wrap: anywhere;
}

.page-notfound {
  min-height: calc(100vh - 64px);
  background: var(--c-hero);
}

.page-notfound h1 {
  padding-bottom: 12px;
  border-bottom: 4px solid var(--c-accent);
  color: var(--c-accent-strong);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 960px) {
  .page-models {
    display: grid;
    max-width: 72rem;
    grid-template-columns: 270px minmax(0, 1fr);
    column-gap: 38px;
    align-items: start;
  }

  .page-models > nav,
  .page-models > section:nth-of-type(2),
  .page-models > p,
  .page-models > footer {
    grid-column: 1 / -1;
  }

  .page-models > header {
    position: sticky;
    top: 92px;
    grid-column: 1;
    grid-row: 2;
    padding-right: 24px;
  }

  .page-models > section:first-of-type {
    grid-column: 2;
    grid-row: 2;
  }

  .page-models > section:first-of-type > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .page-models > section:first-of-type > div > a {
    width: auto;
  }

  .page-model-detail {
    display: grid;
    max-width: 72rem;
    grid-template-columns: 300px minmax(0, 1fr);
    column-gap: 38px;
    align-items: start;
  }

  .page-model-detail > nav,
  .page-model-detail > footer {
    grid-column: 1 / -1;
  }

  .page-model-detail > header {
    grid-column: 1;
    grid-row: 2;
  }

  .page-model-detail > section:first-of-type {
    grid-column: 1;
    grid-row: 3;
  }

  .page-model-detail > section:nth-of-type(n + 2),
  .page-model-detail > p {
    grid-column: 2;
  }

  .page-model-detail > section:nth-of-type(2) {
    grid-row: 2 / span 2;
  }

  .page-price {
    display: grid;
    max-width: 72rem;
    grid-template-columns: 230px minmax(0, 1fr);
    column-gap: 34px;
    align-items: start;
  }

  .page-price > nav,
  .page-price > header,
  .page-price > footer {
    grid-column: 1 / -1;
  }

  .page-price > header + div {
    position: sticky;
    top: 92px;
    display: flex;
    grid-column: 1;
    grid-row: 3 / span 2;
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
    padding: 14px;
    border: 1px solid var(--c-border);
    border-top: 3px solid var(--page-mark);
    border-radius: 8px;
    background: var(--c-surface);
  }

  .page-price > header + div a {
    width: 100%;
  }

  .page-price > header + div + div,
  .page-price > section {
    grid-column: 2;
  }

  .page-category {
    display: grid;
    max-width: 72rem;
    grid-template-columns: 280px minmax(0, 1fr);
    column-gap: 38px;
    align-items: start;
  }

  .page-category > nav,
  .page-category > section:nth-of-type(n + 2),
  .page-category > footer {
    grid-column: 1 / -1;
  }

  .page-category > header {
    position: sticky;
    top: 92px;
    grid-column: 1;
    grid-row: 2;
    padding-right: 20px;
  }

  .page-category > section:first-of-type {
    grid-column: 2;
    grid-row: 2;
  }

  .page-category > section:first-of-type > div:last-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-verify {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    column-gap: 40px;
    align-items: start;
  }

  .page-verify > nav,
  .page-verify > footer {
    grid-column: 1 / -1;
  }

  .page-verify > header {
    position: sticky;
    top: 92px;
    grid-column: 1;
    grid-row: 2;
    padding-right: 18px;
  }

  .page-verify > [data-verify-app],
  .page-verify > section {
    grid-column: 2;
  }

  .page-verify > [data-verify-app] {
    grid-row: 2;
  }

  .page-submit {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    column-gap: 40px;
    align-items: start;
  }

  .page-submit > nav,
  .page-submit > footer {
    grid-column: 1 / -1;
  }

  .page-submit > header {
    grid-column: 1;
    grid-row: 2;
  }

  .page-submit > section:first-of-type {
    grid-column: 2;
    grid-row: 2;
  }

  .page-submit > section:nth-of-type(2) {
    grid-column: 1;
    grid-row: 3;
    margin-top: 0;
  }

  .page-submit > section:nth-of-type(3) {
    grid-column: 2;
    grid-row: 3 / span 2;
    margin-top: 0;
  }

  .page-submit > section:nth-of-type(4) {
    grid-column: 1;
    grid-row: 4;
    margin-top: 20px;
  }

  .page-status {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    column-gap: 38px;
    align-items: start;
  }

  .page-status > nav,
  .page-status > footer {
    grid-column: 1 / -1;
  }

  .page-status > header {
    grid-column: 1;
    grid-row: 2;
  }

  .page-status > section:first-of-type {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-status > section:first-of-type > div:last-child {
    grid-column: span 2;
  }

  .page-status > section:nth-of-type(2) {
    grid-column: 1;
    grid-row: 3;
    margin-top: 0;
  }

  .page-status > section:nth-of-type(3) {
    grid-column: 2;
    grid-row: 3;
    margin-top: 0;
  }

  .page-rankings > section:nth-of-type(-n + 3) {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    column-gap: 34px;
    align-items: start;
  }

  .page-rankings > section:nth-of-type(-n + 3) > div:first-child,
  .page-rankings > section:nth-of-type(-n + 3) > p {
    grid-column: 1;
  }

  .page-rankings > section:nth-of-type(-n + 3) > div:last-child {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .page-content-shell main > div.space-y-8 > section {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    column-gap: 36px;
  }

  .page-content-shell main > div.space-y-8 > section > h2 {
    grid-column: 1;
    margin: 0;
  }

  .page-content-shell main > div.space-y-8 > section > :not(h2) {
    grid-column: 2;
  }
}

@media (max-width: 959px) {
  .page-shell > header h1,
  .page-content-shell > main > h1,
  .page-content-shell > main > header h1 {
    font-size: 1.875rem;
  }

  .page-price > header + div {
    padding-bottom: 6px;
  }

  .page-resets > div.space-y-12 {
    grid-template-columns: 1fr;
  }

  .page-station > section:first-of-type {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-station > section:first-of-type > div:nth-child(2n) {
    border-right: 0;
  }

  .page-status > section:first-of-type {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-status > section:first-of-type > div {
    min-width: 0;
    border-right: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
  }

  .page-status > section:first-of-type > div:nth-child(2n) {
    border-right: 0;
  }

  .page-status > section:first-of-type > div:last-child {
    grid-column: 1 / -1;
    border-right: 0;
  }
}

@media (max-width: 639px) {
  .page-shell {
    padding-top: 22px;
  }

  .page-shell > nav {
    margin-bottom: 20px;
  }

  .page-shell > header {
    margin-bottom: 26px;
    padding-left: 14px;
  }

  .page-shell > header h1,
  .page-content-shell > main > h1,
  .page-content-shell > main > header h1 {
    font-size: 1.625rem;
    line-height: 1.22;
  }

  .page-models > section:first-of-type > div {
    padding-right: 12px;
  }

  .page-station > header {
    display: block;
  }

  .page-station > header > div:last-child {
    margin-top: 18px;
  }

  .page-station > header > div:last-child a {
    width: 100%;
  }

  .page-station > section:first-of-type {
    grid-template-columns: 1fr;
  }

  .page-station > section:first-of-type > div,
  .page-station > section:first-of-type > div:nth-child(2n) {
    min-height: 0;
    border-right: 0;
  }

  .page-station > section:nth-of-type(2) tbody {
    display: block;
  }

  .page-station > section:nth-of-type(2) tr {
    grid-template-columns: 96px minmax(0, 1fr);
    border-right: 0;
  }

  .page-reviews > section:first-of-type > div {
    grid-template-columns: 1fr;
  }

  .page-reviews > section:first-of-type > div > div {
    border-right: 0;
    border-bottom: 1px solid var(--c-border);
  }

  .page-reviews > section:first-of-type > div > div:last-child {
    border-bottom: 0;
  }

  .page-reviews > section:nth-of-type(3) > div {
    columns: 1;
  }

  .page-resets > section:last-of-type > div {
    grid-template-columns: 1fr;
  }

  .page-resets > section:last-of-type > div > div {
    border-right: 0;
  }

  .page-verify [data-verify-form] {
    padding: 18px;
  }

  .page-verify > section:nth-of-type(1) {
    padding: 18px;
  }

  .page-verify > section:nth-of-type(1) .grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .page-verify > section:nth-of-type(3) > div {
    grid-template-columns: 1fr;
  }

  .page-verify > section:nth-of-type(3) > div > div {
    border-right: 0;
    border-bottom: 1px solid var(--c-border);
  }

  .page-submit > section:first-of-type > div:last-of-type {
    grid-template-columns: 1fr;
  }

  .page-submit > section:first-of-type > div:last-of-type > div {
    border-right: 0;
    border-bottom: 1px solid var(--c-border);
  }

  .page-status > section:first-of-type {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-status > section:first-of-type > div {
    border-right: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
  }

  .page-status > section:first-of-type > div:nth-child(2n) {
    border-right: 0;
  }

  .page-status > section:first-of-type > div:last-child {
    grid-column: 1 / -1;
    border-right: 0;
  }

  .page-content-shell > main {
    padding-top: 26px;
  }

  .page-content-shell .article-body {
    font-size: 14px;
    line-height: 1.82;
  }

  .page-notfound {
    min-height: calc(100vh - 60px);
  }
}
