/* Site chrome and templates (TC-WO-9). Reproduces Total's header style nine, top bar style three, full-screen
   mobile menu and blog/search/404 layouts from the TC-WO-9 baseline numbers (outputs/TC-WO-9/baseline/
   total-styles.json, total-overlay.json). Menu pill rules (44px, cap centring, aurora hovers) are in tuneup.css. */

/* ---- Top bar ------------------------------------------------------------- */
.tc-topbar {
  background: var(--color-top-bar);
  color: var(--color-text-1);
  font-size: 0.923em;
  text-align: center;
}

.tc-topbar__inner {
  padding: 5px 0 15px;
}

.tc-topbar__text {
  font-family: var(--font-condensed);
  font-weight: 900;
  font-size: 1.846em;
  line-height: 1.65;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---- Header -------------------------------------------------------------- */
.tc-header {
  position: relative;
  height: var(--header-h);
  padding: 0 var(--header-pad);
}

.tc-header__inner {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.tc-header__brand {
  display: flex;
  align-items: center;
  height: 100%;
  margin-right: 25px;
}

.tc-header__logo {
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 44.304px;
  line-height: 100%;
  text-transform: uppercase;
  text-decoration: none;
}

.tc-nav {
  margin-left: auto;
}

.tc-nav__list {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tc-nav__item {
  position: relative;
}

.tc-nav__item > a {
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: 16px;
  text-decoration: none;
}

.tc-nav__label {
  text-transform: uppercase;
}

.tc-nav__item:not(.tc-nav__item--plain) > a:is(:hover, :focus-visible) {
  background: var(--color-accent);
}

/* Venmo: a plain link (menu typography: Elza 300, 19.7px) with its money glyph on the same line. */
.tc-nav__item--plain > a > .tc-nav__label {
  font-size: 19.696px;
  font-weight: 300;
}

.tc-nav-toggle {
  display: none;
}

/* Below 960px the menu moves into the full-screen overlay; the header becomes a 95% container. */
@media (max-width: 959px) {
  .tc-header {
    padding: 0;
  }

  .tc-header__inner {
    width: var(--container);
    margin: 0 auto;
  }

  .tc-header__brand {
    margin-right: 0;
  }

  .tc-nav {
    display: none;
  }

  .tc-nav-toggle {
    display: flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-text-1);
    font-size: 22px;
    cursor: pointer;
  }
}

.tc-burger {
  position: relative;
  display: block;
  width: 22px;
  height: 17px;
}

.tc-burger > span,
.tc-burger > span::before,
.tc-burger > span::after {
  position: absolute;
  left: 0;
  display: block;
  width: 22px;
  height: 3px;
  background: currentColor;
}

.tc-burger > span {
  top: 50%;
  margin-top: -1.5px;
  transition: background 0.01s 0.15s;
}

.tc-burger > span::before,
.tc-burger > span::after {
  content: "";
  transition: top 0.15s 0.2s, transform 0.15s 0.05s;
}

.tc-burger > span::before {
  top: -7px;
}

.tc-burger > span::after {
  top: 7px;
}

.tc-nav-toggle[aria-expanded="true"] .tc-burger > span {
  background: transparent;
}

.tc-nav-toggle[aria-expanded="true"] .tc-burger > span::before,
.tc-nav-toggle[aria-expanded="true"] .tc-burger > span::after {
  top: 0;
  transition: top 0.15s, transform 0.15s 0.2s;
}

.tc-nav-toggle[aria-expanded="true"] .tc-burger > span::before {
  transform: rotate(45deg);
}

.tc-nav-toggle[aria-expanded="true"] .tc-burger > span::after {
  transform: rotate(-45deg);
}

/* ---- Full-screen mobile menu (assets/chrome.js) ---------------------------- */
.tc-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  background: var(--color-overlay);
  color: var(--c-black);
  font-family: var(--font-condensed);
  font-weight: 900;
  font-size: 120px;
  line-height: 100%;
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

@media (max-width: 767px) {
  .tc-overlay {
    font-size: 90px;
  }
}

.tc-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

html.tc-overlay-open {
  overflow: hidden; /* no scrolling behind the menu */
}

.tc-overlay__close {
  position: fixed;
  top: 20px;
  right: 20px;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 1em;
  line-height: 1;
  cursor: pointer;
}

.tc-overlay__close .tc-icon {
  display: flex;
}

.tc-overlay__close svg {
  width: 0.875em;
  height: 0.875em;
  vertical-align: 0;
}

.tc-overlay__content {
  display: table;
  width: 100%;
  height: 100%;
  text-align: center;
}

.tc-overlay__cell {
  display: table-cell;
  width: 100%;
  height: 100%;
  vertical-align: middle;
}

.tc-overlay__nav {
  margin: 0 30px;
}

.tc-overlay__nav ul {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9em;
}

.tc-overlay__nav li {
  display: block;
}

.tc-overlay__nav a {
  display: inline-block;
  padding: 5px 0;
  color: currentColor;
  text-decoration: none;
  transition: opacity 0.3s;
}

.tc-overlay__nav a:is(:hover, :focus-visible) {
  opacity: 0.4;
}

.tc-overlay__label {
  position: relative;
}

.tc-icon--w {
  width: 1.25em;
  margin-right: 10px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .tc-overlay,
  .tc-overlay__nav a,
  .tc-burger > span,
  .tc-burger > span::before,
  .tc-burger > span::after {
    transition: none;
  }
}

/* ---- Single post ----------------------------------------------------------- */
.tc-entry__header {
  margin-bottom: 10px;
}

.tc-entry__title,
.tc-card__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.846em;
  line-height: 1.375;
}

.tc-entry__meta {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  color: var(--color-text-3);
  font-size: 0.923em;
  line-height: 1.65;
}

.tc-entry__meta li {
  display: inline-block;
  margin-right: 20px;
}

.tc-entry__meta li:last-child {
  margin-right: 0;
}

.tc-entry__meta a {
  color: inherit;
}

.tc-meta__icon {
  margin-right: 10px;
}

.tc-entry__content {
  margin: 20px 0 40px;
}

.tc-entry__content::after,
.tc-card__excerpt::after,
.tc-result__excerpt::after {
  content: "";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}

.tc-entry__content > :last-child,
.tc-card__excerpt > :last-child,
.tc-result__excerpt > :last-child,
.tc-404__text > :last-child {
  margin-bottom: 0;
}

.tc-page__content {
  margin: 0;
}

/* Lists and the 404 end with Total's 20px primary bottom space (singles end on their content's 40px margin). */
:is(.archive, .blog, .search, .error404) .tc-content {
  padding-bottom: 20px;
}

/* ---- Archive entries (Total's large-image entry style) --------------------- */
.tc-card {
  position: relative;
}

.tc-card__inner > :last-child {
  margin-bottom: 0;
}

.tc-card__media {
  position: relative;
  margin-bottom: 20px;
}

.tc-card__header {
  margin-bottom: 10px;
}

.tc-card__title a,
.tc-result__title a {
  color: currentColor;
  text-decoration: none;
}

.tc-card__title a:hover,
.tc-result__title a:hover {
  color: var(--color-accent);
}

.tc-card .tc-entry__meta {
  margin-bottom: 20px;
}

.tc-card__excerpt {
  margin: 20px 0;
  text-wrap: pretty;
}

.tc-card__more {
  margin: 20px 0;
}

/* Total drops the last entry's divider margin, so the list ends on the divider line. */
.tc-entries > :last-child .tc-divider--entry {
  margin-bottom: 0;
}

.tc-embed iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.tc-button {
  display: inline-block;
  max-width: 100%;
  padding: 0.538em 1.077em;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: var(--color-button-text);
  font-family: var(--font-body);
  font-weight: 500; /* Total used 100, which read as orange on orange */
  line-height: 1.65;
  text-align: center;
  text-decoration: none;
}

.tc-button:hover {
  background: var(--color-accent-hover);
  color: var(--color-on-accent);
}

.tc-divider {
  display: block;
  clear: both;
  border-bottom: 1px solid var(--color-border);
}

.tc-divider--entry {
  margin: 40px 0;
}

.tc-divider--result {
  margin: 25px 0;
}

/* ---- Search results ------------------------------------------------------- */
.tc-result__inner {
  display: flex;
}

.tc-result__thumb {
  flex-shrink: 0;
  width: 100px;
  margin-right: 20px;
}

.tc-result__text {
  flex-grow: 1;
}

.tc-result__text > :last-child {
  margin-bottom: 0;
}

.tc-result__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.231em;
  line-height: 1.375;
}

.tc-result__excerpt {
  margin: 15px 0 0;
}

/* ---- Pagination (Total's joined boxes; current page on surface 2) ------------ */
.tc-pagination {
  clear: both;
  margin-top: 30px;
}

.tc-pagination ul {
  display: inline-flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tc-pagination li {
  border: 1px solid var(--color-border);
}

.tc-pagination li + li {
  border-left-width: 0;
}

.tc-pagination li:first-child,
.tc-pagination li:first-child .page-numbers {
  border-radius: 5px 0 0 5px;
}

.tc-pagination li:last-child,
.tc-pagination li:last-child .page-numbers {
  border-radius: 0 5px 5px 0;
}

.tc-pagination li > .page-numbers {
  display: block;
  padding: 0.615em 0.769em;
  color: var(--color-text-1);
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
}

.tc-pagination .page-numbers.current,
.tc-pagination a.page-numbers:hover {
  background: var(--color-surface-2);
  color: var(--color-on-accent);
}

.tc-pagination .page-numbers .tc-icon {
  font-size: 0.75em;
  line-height: 1px; /* Total's icon box is only as tall as the glyph (12px) */
}

.tc-icon--flip svg {
  transform: scaleX(-1);
}

.tc-pagination .page-numbers svg {
  vertical-align: 0;
}

/* ---- 404 ---------------------------------------------------------------- */

.tc-404 {
  padding: 30px 0;
  text-align: center;
}

.tc-404__title {
  margin: 0 0 10px;
  font-size: 1.846em;
}

.tc-404__text {
  font-size: 1.077em;
}

/* Page colour chosen per record (was Total's per-page background; post 2036). Class from inc/chrome.php. */
.tc-page-bg--sand {
  background-color: var(--c-sand);
}
