/* Toplist Theme — CMS-specific layer on top of the HTML baseline stylesheets
   (tokens.css, layout.css, components.css are byte-identical copies of the baseline; see
   docs/toplist-discovery/P09-VISUAL-REFERENCE-AND-COMPONENT-MAP.md).
   Only the accessible P03 palette tokens are used; no low-contrast colour is introduced.
   Motion: transform/opacity only; prefers-reduced-motion is honoured by components.css. */

/* ---------- Directional header (P14) ----------
   The baseline fixed header (layout.css: position fixed + body padding-top 50px, auto-hide by
   animating `top`) is replaced by an in-flow sticky header: it reserves exactly its own height (also
   when it wraps to two rows at tablet widths), so hiding/revealing never moves content. js/theme.js
   sets data-state = top | shown | hidden and --tl-header-h (measured resting height).
   Hidden = transform + visibility:hidden (after the slide), so hidden controls are neither Tab stops
   nor findable/announced. Reduced motion: no slide, the state still applies. */
body {
  padding-top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  transition: transform var(--t-header) ease, visibility 0s linear 0s;
  will-change: transform;
}

.site-header.is-hidden {
  top: 0;
}

.site-header[data-state="hidden"] {
  transform: translateY(calc(-100% - 2px));
  visibility: hidden;
  transition: transform var(--t-header) ease, visibility 0s linear var(--t-header);
}

.site-header.is-instant {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header[data-state="hidden"] {
    transition: none;
  }
}

/* Anchors, contents jumps and keyboard focus land below the (revealed) header. */
:root {
  scroll-padding-top: calc(var(--tl-header-h, var(--header-h)) + 12px);
}

/* ---------- Progressive enhancement (html.no-js until js/theme.js runs) ---------- */
.no-js .nav-toggle {
  display: none !important;
}

.bottom-nav[hidden] {
  display: none !important;
}

@media (max-width: 767.98px) {
  /* Without JS the mobile menu stays expanded and the header scrolls with the page,
     so nothing is covered and every link stays reachable. */
  .no-js .main-nav {
    display: block;
    max-height: none;
  }

  .no-js .site-header {
    position: static;
  }
}

/* ---------- Header additions ---------- */
.brand-text {
  display: block;
  max-width: 220px;
  overflow: hidden;
  font: 700 22px/38px var(--font);
  color: var(--c-link);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cat-menu > summary {
  list-style: none;
}

.cat-menu > summary::-webkit-details-marker {
  display: none;
}

.cat-menu[open] > .cat-toggle .caret {
  transform: rotate(180deg);
}

.nav-right form {
  display: flex;
  margin: 0;
}

.nav-right [aria-current="true"] {
  color: var(--c-text);
  font-weight: 700;
  text-decoration: underline;
}

/* ---------- Columns without a side column ---------- */
.site-main {
  display: block;
  padding: 10px 10px 20px;
}

@media (min-width: 1200px) {
  /* P14: a missing right column keeps the reference's centre column (same x as article pages);
     only a missing left column lets the centre take its share. */
  .page:not(:has(> .col-left)) > .col-center {
    width: 75%;
  }

  .page:not(:has(> .col-left)):not(:has(> .col-right)) > .col-center {
    width: 100%;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  /* The left column is hidden here; the centre takes its share. */
  .layout-home > .col-center {
    width: 75%;
  }

  .layout-home:not(:has(> .col-right)) > .col-center {
    width: 100%;
  }
}

.side-heading {
  margin: 10px 0 12px;
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
  text-align: start;
}

.side-labels {
  line-height: 23px;
}

.side-widgets {
  margin: 10px 0 20px;
}

/* ---------- Cards and lists ---------- */
.group-title {
  margin: 0 0 15px;
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
}

.card-thumb img {
  height: 70px;
}

.mini-thumb img {
  height: 40px;
}

.card-meta {
  margin: 0 0 4px;
}

.empty-state {
  margin: 10px 0;
  color: var(--c-muted);
}

.search-results-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-result + .search-result {
  margin-top: 15px;
}

.search-result-type {
  margin: 0 0 2px;
  color: var(--c-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.search-summary {
  margin: 0 0 15px;
  color: var(--c-muted);
}

/* ---------- Archive / page headers ---------- */
.archive-header {
  position: relative;
  margin: 0 1px 20px;
  padding: 14px 18px 16px;
}

.archive-header h1 {
  margin: 0 0 10px;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.archive-type {
  margin: 0 0 4px;
  color: var(--c-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.archive-description {
  color: var(--c-text);
}

.post-header h1,
.entry-title,
.card-title,
.mini-title {
  overflow-wrap: anywhere;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  margin: 10px 1px 10px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 24px;
  color: var(--c-muted);
}

.breadcrumbs li {
  min-width: 0;
  overflow-wrap: anywhere;
}

.breadcrumbs li + li::before {
  content: "›" / "";
  margin: 0 6px;
}

.breadcrumbs a {
  display: inline-block;
  min-height: 24px;
}

/* P14: below 768 px the current item (repeated in full by the page h1) stays on the trail's line
   and is shortened with an ellipsis, so a long title no longer pushes a lone "›" onto a new line. */
@media (max-width: 767.98px) {
  .breadcrumbs li:last-child {
    flex: 1 1 8em;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow-wrap: normal;
  }
}

/* The baseline header box pulls itself up 20 px (it had no breadcrumb above it). */
.breadcrumbs + article > .post-header {
  margin-top: 0;
  padding-top: 14px;
}

/* ---------- Article additions ---------- */
.post-header .post-meta {
  margin: 0 0 6px;
}

.meta-sep {
  color: var(--c-muted);
}

.lead-more {
  margin: 0 0 10px;
}

.lead-more > summary {
  display: inline-block;
  min-height: 24px;
  color: var(--c-link);
  font: 600 var(--fs-lead) / var(--lh-lead) var(--font);
  cursor: pointer;
}

.lead-more > summary:hover {
  text-decoration: underline;
}

.lead-more[open] > summary {
  margin-bottom: 6px;
}

.entry-figure .zoom {
  display: block;
  cursor: zoom-in;
}

.entry-figure .zoom img {
  display: block;
  width: 100%;
  height: auto;
}

.media-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  padding: 10px;
  border: 1px dashed var(--c-input-border);
  border-radius: var(--r-thumb);
  background: var(--c-ad);
  color: var(--c-muted);
  font-size: 15px;
  text-align: center;
}

.v3-gallery-item .media-missing {
  aspect-ratio: 4 / 3;
}

.v3-gallery-grid {
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry-content {
  overflow-wrap: anywhere;
}

.entry-content img {
  max-width: 100%;
  height: auto;
}

.entry-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.post-cover,
.page-figure {
  margin: 0 1px 20px;
}

.post-cover img,
.page-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.adjacent ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.adjacent li + li {
  margin-top: 8px;
}

.adjacent-label {
  display: block;
  color: var(--c-muted);
  font-size: 12px;
}

.adjacent a {
  display: inline-block;
  min-height: 24px;
  overflow-wrap: anywhere;
}

.source-ref {
  margin-right: 4px;
}

.unavailable-box {
  margin-top: 10px;
}

/* ---------- Pager (real links) ---------- */
.pager ul {
  flex-wrap: wrap;
  justify-content: center;
}

.pager-link {
  display: block;
  min-width: 43px;
  height: 45px;
  margin-left: -1px;
  padding: 10px 16px;
  border: 1px solid var(--c-pager-border);
  background: var(--c-white);
  color: var(--c-link);
  font: 18px/24px var(--font);
  text-align: center;
}

.pager li:first-child .pager-link {
  margin-left: 0;
  border-radius: 20px 0 0 20px;
}

.pager li:last-child .pager-link {
  border-radius: 0 20px 20px 0;
}

a.pager-link:hover {
  background: #eeeeee;
  text-decoration: none;
}

.pager-link.is-current {
  position: relative;
  z-index: 1;
  background: var(--c-page-active);
  border-color: var(--c-page-active);
  color: var(--c-white);
}

.pager-link.is-disabled,
.pager-link.is-gap {
  color: var(--c-muted);
}

/* ---------- Forms, notices, buttons ---------- */
.field-row {
  margin: 0 0 var(--space-form);
}

.field-row label {
  display: block;
  margin: 0 0 6px;
  font-weight: 700;
}

.field-row input,
.field-row select {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--c-field-border);
  border-radius: var(--r-field);
  background: var(--c-white);
  color: var(--c-text);
  font: 15px/22px var(--font);
}

.field-row input:focus-visible,
.field-row select:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 1px;
  border-color: var(--c-focus);
}

.field-row input[aria-invalid="true"] {
  border-color: var(--c-error);
  border-width: 2px;
}

.field-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  margin: 0 0 var(--space-form);
}

.field-check input {
  width: 18px;
  height: 18px;
}

.btn-primary {
  display: inline-block;
  min-height: 40px;
  padding: 9px 20px;
  border: 1px solid #2e6da4;
  border-radius: var(--r-pill);
  background: var(--c-link);
  color: var(--c-white);
  font: 700 15px/20px var(--font);
  cursor: pointer;
}

.btn-primary:hover {
  background: #00557f;
}

.btn-block {
  width: 100%;
}

.btn-link {
  display: inline-block;
  min-height: 24px;
  font-weight: 700;
  text-decoration: underline;
}

.notice {
  margin: 0 0 var(--space-form);
  padding: 10px 14px;
  border: 1px solid var(--c-note-border);
  border-radius: var(--r-field);
  background: var(--c-note-bg);
}

.notice ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.notice-error {
  border-color: var(--c-error);
  background: var(--c-error-bg);
}

.notice-success {
  border-color: var(--c-green);
  background: var(--c-success-bg);
}

.notice:focus {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}

/* ---------- Auth, error and plain pages ---------- */
.auth-main .content,
.error-main .content {
  max-width: 480px;
  margin: 20px auto 30px;
}

.auth-box,
.error-box {
  padding: 20px 22px;
}

.auth-box h1,
.error-box h1 {
  margin: 0 0 8px;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 600;
}

.auth-sub {
  margin: 0 0 var(--space-form);
  color: var(--c-muted);
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin: var(--space-form) 0 0;
}

.auth-links a {
  display: inline-block;
  min-height: 24px;
  text-decoration: underline;
}

/* P14: auth two-column card + aside (reference account.css .auth-grid / .auth-aside). */
.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 360px);
  justify-content: center;
  gap: 30px;
  max-width: var(--footer-max);
  margin: 20px auto 40px;
  padding: 0 16px;
}

.auth-card {
  padding: 26px 28px 24px;
  background: var(--c-white);
}

.auth-aside {
  align-self: start;
  padding: 24px 22px;
  border-radius: var(--r-box);
  background: linear-gradient(160deg, #e8f3fa, #fff2ea);
}

.auth-aside img {
  display: block;
  margin: 0 auto 6px;
}

.auth-aside h2 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 26px;
}

.auth-aside .check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-aside .check-list li {
  display: flex;
  gap: 8px;
}

.auth-aside .check-list .icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: #0b7a43;
}

.auth-form .req {
  color: var(--c-danger);
  font-weight: 700;
}

.auth-form .field-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 var(--space-form);
}

.auth-form .field-inline .field-check {
  margin: 0;
}

.auth-form .field-inline a {
  display: inline-block;
  min-height: 24px;
  text-decoration: underline;
}

.auth-switch {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--c-navbar-border);
  text-align: center;
}

.auth-switch a {
  text-decoration: underline;
}

/* Password reveal: the wrapper and button exist only when theme.js runs. */
.auth-form .pw {
  position: relative;
}

.auth-form .pw input {
  padding-inline-end: 84px;
}

.auth-form .pw-toggle {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 4px;
  min-width: 44px;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--c-link);
  font: 700 13px/1 var(--font);
  transform: translateY(-50%);
  cursor: pointer;
}

.auth-form .pw-toggle:hover {
  background: var(--c-page);
}

.auth-form .pw-toggle:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 1px;
}

@media (max-width: 991.98px) {
  .auth-grid {
    grid-template-columns: minmax(0, 520px);
  }
}

@media (max-width: 767.98px) {
  .auth-grid {
    margin: 14px auto 30px;
    padding: 0 10px;
  }

  .auth-card {
    padding: 20px 16px;
  }
}

.error-status {
  margin: 0;
  color: var(--c-accent-strong);
  font: 700 40px/44px var(--font);
}

.search-page-form {
  margin-top: 10px;
}

.page-main .content-page {
  max-width: var(--content-max);
  margin: 0 auto;
}

.footer-widgets {
  padding: 10px 15px;
}

/* ---------- Lightbox frame ---------- */
.lightbox-frame img {
  max-width: 100%;
  max-height: calc(100vh - 200px);
  cursor: zoom-out;
}

.lightbox-caption {
  margin: 10px 0 0;
  font-style: italic;
}

.lightbox-caption:empty {
  display: none;
}

/* ---------- P11: Toplist Page Builder article collection (theme override of the plugin markup) ----------
   Inside a builder page body (.v3-article-body) the card keeps the listing scale, not the article prose scale. */
.tl-pbc {
  margin-inline: 0;
  padding-inline: 0;
}

.tl-pbc + .tl-pbc {
  margin-top: 10px;
}

.tl-pbc__items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tl-pbc__item + .tl-pbc__item {
  margin-top: 15px;
}

.v3-article-body .tl-pbc {
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  text-align: start; /* cards never inherit the article body's justified text */
}

.v3-article-body .tl-pbc p {
  margin: 0 0 4px;
}

.v3-article-body .tl-pbc .card-excerpt {
  margin: 0;
}

.v3-article-body .tl-pbc .card-thumb img {
  width: 118px;
  height: 70px;
  object-fit: cover;
}

.tl-pbc--grid .tl-pbc__items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 15px;
}

.tl-pbc--grid .tl-pbc__item + .tl-pbc__item {
  margin-top: 0;
}

.tl-pbc--grid .card {
  flex-direction: column;
  height: 100%;
}

.tl-pbc--grid .card-thumb {
  width: auto;
  padding: 0 0 8px;
}

.tl-pbc--grid .card-thumb img,
.v3-article-body .tl-pbc--grid .card-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 118 / 70;
  object-fit: cover;
}

/* P17.1: pagination and "View all" of a Toplist PB collection. The markup and its classes are the
   plugin's public partial (toplist::page-builder.partials.navigation); the theme only styles it, in
   the same joined-pill treatment as the archive .pager. Plain GET links; the current page carries
   aria-current. Items wrap instead of overflowing on narrow screens or zoom. */
.tl-pbc-nav {
  margin: 0 0 20px;
  text-align: center;
}

.tl-pbc-nav__pages {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 6px;
  max-width: 100%;
  margin: 10px 0;
  padding: 0;
  padding-inline-start: 1px; /* room for the -1px joined border when a row wraps */
  list-style: none;
}

.tl-pbc-nav__item {
  margin: 0;
}

.tl-pbc-nav__link {
  display: block;
  min-width: 43px;
  min-height: 45px;
  margin-left: -1px;
  padding: 10px 16px;
  border: 1px solid var(--c-pager-border);
  background: var(--c-white);
  color: var(--c-link);
  font: 18px/24px var(--font);
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.tl-pbc-nav__item:first-child .tl-pbc-nav__link {
  margin-left: 0;
  border-radius: 20px 0 0 20px;
}

.tl-pbc-nav__item:last-child .tl-pbc-nav__link {
  border-radius: 0 20px 20px 0;
}

.tl-pbc-nav__item:only-child .tl-pbc-nav__link {
  border-radius: 20px;
}

a.tl-pbc-nav__link:hover {
  background: #eeeeee;
  color: var(--c-link-hover);
  text-decoration: none;
}

.tl-pbc-nav__link:focus-visible {
  position: relative;
  z-index: 2;
}

.tl-pbc-nav__link--current {
  position: relative;
  z-index: 1;
  background: var(--c-page-active);
  border-color: var(--c-page-active);
  color: var(--c-white);
}

a.tl-pbc-nav__link--current:hover {
  background: var(--c-page-active);
  color: var(--c-white);
}

.tl-pbc-nav__browse,
.v3-article-body .tl-pbc-nav__browse {
  margin: 0;
}

.tl-pbc-nav__all {
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* P14: home welcome illustration (reference .welcome-grid); the text column may shrink, and below
   576 px the decorative image stacks above the lead instead of squeezing it. */
.welcome-grid {
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 0 16px;
  align-items: start;
}

@media (max-width: 575.98px) {
  .welcome-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .welcome-grid img {
    width: 112px;
    height: 112px;
    margin: 0 auto 8px;
  }
}

/* ---------- Narrow screens / zoom (320 CSS px, 400 %) ---------- */
@media (max-width: 479.98px) {
  .archive-header,
  .auth-box,
  .error-box {
    padding: 12px 12px 14px;
  }

  .card-thumb {
    width: 98px;
  }

  .card-thumb img {
    width: 88px;
    height: 56px;
  }

  .v3-article-body .tl-pbc--list .card-thumb img {
    width: 88px;
    height: 56px;
  }
}

/* ---------- Account shell (theme::account.layout, Core CORE-40 account-shell contract) ----------
   Layout follows the reference account.css (.account-page / .account-shell / .account-nav / .account-main).
   Core's account page bodies and Core's own sidebar/flash partials keep their tn-* classes; they are styled
   here with this theme's tokens, scoped to .account-page so nothing leaks to public pages. */
.account-page {
  padding: 20px 16px 50px;
}

.account-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  max-width: var(--footer-max);
  margin: 0 auto;
}

.account-nav {
  position: sticky;
  top: 64px;
  padding: 16px 12px;
  background: var(--c-white);
}

.account-main {
  min-width: 0;
}

.account-page .tn-acc-user {
  padding: 0 6px 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--c-navbar-border);
}

.account-page .tn-acc-user strong {
  display: block;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.account-page .tn-acc-user span {
  display: block;
  color: var(--c-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.account-page .tn-acc-nav {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.account-page .tn-acc-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 4px 4px 10px 10px;
  color: var(--c-link);
  font: 15px/20px var(--font);
  text-decoration: none;
}

.account-page .tn-acc-nav a:hover {
  background: var(--c-page);
}

.account-page .tn-acc-nav a[aria-current="page"] {
  background: var(--c-toc-active);
  color: var(--c-green);
  font-weight: 700;
}

.account-page .tn-acc-badge {
  min-width: 20px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--c-danger);
  color: var(--c-white);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.account-page .tn-acc-card {
  margin: 0 0 20px;
  padding: 18px 22px 22px;
  border-radius: var(--r-box);
  background: var(--c-white);
  box-shadow: var(--shadow-box);
}

.account-page .tn-acc-card h1 {
  margin: 0 0 8px;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 600;
}

.account-page .tn-acc-card h2 {
  margin: 0 0 14px;
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
}

.account-page .tn-acc-muted,
.account-page .tn-hint {
  color: var(--c-muted);
}

.account-page .tn-hint {
  margin-top: 4px;
  font-size: 13px;
}

.account-page .tn-field {
  max-width: 560px;
  margin: 0 0 var(--space-form);
}

.account-page .tn-field > label {
  display: block;
  margin: 0 0 6px;
  font-weight: 700;
}

.account-page .tn-field input:not([type="checkbox"]):not([type="radio"]),
.account-page .tn-field select,
.account-page .tn-field textarea {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--c-field-border);
  border-radius: var(--r-field);
  background: var(--c-white);
  color: var(--c-text);
  font: 15px/22px var(--font);
}

.account-page .tn-field input:focus-visible,
.account-page .tn-field select:focus-visible,
.account-page .tn-field textarea:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 1px;
  border-color: var(--c-focus);
}

.account-page .tn-field--error input,
.account-page .tn-field input[aria-invalid="true"] {
  border-color: var(--c-error);
  border-width: 2px;
}

.account-page .tn-error {
  margin: 4px 0 0;
  color: var(--c-error);
  font-size: 13px;
}

.account-page .tn-btn {
  display: inline-block;
  min-height: 40px;
  padding: 9px 20px;
  border: 1px solid var(--c-accent-strong-border);
  border-radius: var(--r-pill);
  background: var(--c-accent-strong);
  color: var(--c-white);
  font: 700 15px/20px var(--font);
  text-decoration: none;
  cursor: pointer;
}

.account-page .tn-btn:hover {
  background: var(--c-accent-strong-hover);
}

.account-page .tn-btn-ghost {
  border-color: var(--c-pager-border);
  background: var(--c-white);
  color: var(--c-link);
}

.account-page .tn-btn-ghost:hover {
  background: var(--c-page);
}

.account-nav .tn-btn-ghost {
  color: var(--c-danger);
}

.account-page .tn-alert {
  margin: 0 0 var(--space-form);
  padding: 10px 14px;
  border: 1px solid var(--c-note-border);
  border-radius: var(--r-field);
  background: var(--c-note-bg);
}

.account-page .tn-alert-status {
  border-color: var(--c-green);
  background: var(--c-success-bg);
}

.account-page .tn-errors {
  margin: 0 0 var(--space-form);
  padding: 10px 14px 10px 32px;
  border: 1px solid var(--c-error);
  border-radius: var(--r-field);
  background: var(--c-error-bg);
}

.account-page .tn-dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 16px;
  margin: 0;
}

.account-page .tn-dl dt {
  color: var(--c-muted);
}

.account-page .tn-dl dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
  .account-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .account-nav {
    position: static;
    padding: 8px;
    border-radius: 14px;
  }

  .account-page .tn-acc-user {
    display: none;
  }

  /* Compact horizontal tab bar on tablet/mobile (reference account.css). */
  .account-page .tn-acc-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .account-page .tn-acc-nav::-webkit-scrollbar {
    display: none;
  }

  .account-page .tn-acc-nav a {
    min-height: 40px;
    border-radius: var(--r-pill);
    white-space: nowrap;
    font-size: 14px;
  }
}

@media (max-width: 479.98px) {
  .account-page {
    padding: 12px 8px 40px;
  }

  .account-page .tn-acc-card {
    padding: 12px 12px 14px;
  }

  .account-page .tn-dl {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (forced-colors: active) {
  .media-missing,
  .notice {
    border: 1px solid CanvasText;
  }

  .pager-link.is-current,
  .tl-pbc-nav__link--current,
  .account-page .tn-acc-nav a[aria-current="page"] {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}
