/* ==========================================================================
   Techspire Summits - public site
   Header, hero, footer and page furniture for the hub and marketing pages.
   This layer owns the markup it styles (see front/layouts/master.blade.php),
   so it does not fight the purchased theme for the same elements.
   ========================================================================== */

.ts-site { --ts-header-h: 76px; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.ts-header {
  position: sticky; top: 0;
  z-index: var(--ts-z-header);
  background: var(--ts-surface);
  border-bottom: 1px solid var(--ts-border);
}
/* Over a dark hero the header starts transparent and solidifies on scroll,
   so the headline is never competing with a white bar. */
.ts-header--overlay {
  position: fixed; left: 0; right: 0;
  background: transparent; border-bottom-color: transparent;
  transition: background-color var(--ts-dur) var(--ts-ease),
              border-color var(--ts-dur) var(--ts-ease),
              box-shadow var(--ts-dur) var(--ts-ease);
}
.ts-header--overlay.is-stuck {
  background: var(--ts-surface);
  border-bottom-color: var(--ts-border);
  box-shadow: var(--ts-shadow-sm);
}

/* Utility strip: secondary contact details, never the primary navigation. */
.ts-utilitybar {
  background: var(--ts-navy-800);
  color: rgba(255,255,255,.82);
  font-size: var(--ts-text-sm);
}
.ts-utilitybar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--ts-space-6); min-height: 40px; flex-wrap: wrap;
}
.ts-utilitybar a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  /* WCAG 2.2 target size: the strip is compact, but every link still gets a
     24px tall hit area rather than the 22px the text alone would give. */
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
.ts-utilitybar a:hover { color: #FFFFFF; text-decoration: underline; }
.ts-utilitybar__group { display: flex; align-items: center; gap: var(--ts-space-5); flex-wrap: wrap; }
.ts-utilitybar__social { display: flex; align-items: center; gap: var(--ts-space-1); }
.ts-utilitybar__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--ts-radius-sm);
}
.ts-utilitybar__social a:hover { background: rgba(255,255,255,.12); }
@media (max-width: 991px) { .ts-utilitybar { display: none; } }

.ts-header__bar {
  display: flex; align-items: center; gap: var(--ts-space-6);
  min-height: var(--ts-header-h);
}

.ts-logo { display: inline-flex; align-items: center; flex: none; }
.ts-logo img { height: 40px; width: auto; display: block; }
@media (max-width: 575px) { .ts-logo img { height: 32px; } }

/* --------------------------------------------------------------------------
   Two lockups, one visible at a time.

   The header starts transparent over a dark hero and solidifies on scroll, so
   the mark has to change from the white lockup to the navy one at the same
   moment. Only rendered when a white logo has actually been uploaded --
   .ts-logo--swap says so -- otherwise the single mark stays put.

   Stacked in one grid cell and cross-faded rather than switched with
   `display`. Two reasons: a hard switch put the navy mark on a header that
   was still 80% transparent for the length of the 220ms background
   transition, and `display` cannot be transitioned at all. The pair is also
   why every rule below is qualified with `img`: `.ts-logo img` carries
   `display: block` at (0,1,1), which used to outrank a bare
   `.ts-logo__light { display: none }` at (0,1,0) -- so once .is-stuck landed
   and the overlay rules dropped out, both lockups were painted side by side.
   -------------------------------------------------------------------------- */
.ts-logo--swap { display: inline-grid; align-items: center; }
.ts-logo--swap img {
  grid-area: 1 / 1;
  transition: opacity var(--ts-dur) var(--ts-ease);
}
.ts-logo--swap img.ts-logo__dark  { opacity: 1; }
.ts-logo--swap img.ts-logo__light { opacity: 0; }
.ts-header--overlay:not(.is-stuck) .ts-logo--swap img.ts-logo__light { opacity: 1; }
.ts-header--overlay:not(.is-stuck) .ts-logo--swap img.ts-logo__dark  { opacity: 0; }

/* --------------------------------------------------------------------------
   Primary navigation. One row, never wrapping: below 1200px it collapses to
   the drawer instead of stacking on top of the hero.
   -------------------------------------------------------------------------- */
.ts-nav { margin-left: auto; }
.ts-nav__list {
  display: flex; align-items: center; gap: var(--ts-space-1);
  list-style: none; margin: 0; padding: 0;
  flex-wrap: nowrap;
}
.ts-nav__link {
  display: inline-flex; align-items: center; gap: var(--ts-space-1);
  min-height: 44px;
  padding: var(--ts-space-2) var(--ts-space-4);
  border-radius: var(--ts-radius);
  font-family: var(--ts-font-display);
  font-size: var(--ts-text-base);
  font-weight: var(--ts-weight-medium);
  color: var(--ts-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--ts-dur-fast) var(--ts-ease),
              color var(--ts-dur-fast) var(--ts-ease);
}
.ts-nav__link:hover { background: var(--ts-bg-subtle); color: var(--ts-text); }

/* Current page is marked by weight and an underline, not colour alone. */
.ts-nav__item.is-active > .ts-nav__link { color: var(--ts-accent); font-weight: var(--ts-weight-semibold); }
.ts-nav__item.is-active > .ts-nav__link::after {
  content: ""; position: absolute; left: var(--ts-space-4); right: var(--ts-space-4);
  bottom: 6px; height: 2px; background: currentColor; border-radius: 2px;
}
.ts-nav__item { position: relative; }
.ts-nav__item > .ts-nav__link { position: relative; }

.ts-header--overlay:not(.is-stuck) .ts-nav__link { color: rgba(255,255,255,.88); }
.ts-header--overlay:not(.is-stuck) .ts-nav__link:hover { background: rgba(255,255,255,.14); color: #FFFFFF; }
.ts-header--overlay:not(.is-stuck) .ts-nav__item.is-active > .ts-nav__link { color: #FFFFFF; }

/* Dropdown */
.ts-nav__sub {
  position: absolute; top: calc(100% - 4px); left: 0;
  min-width: 220px; padding: var(--ts-space-2);
  list-style: none; margin: 0;
  background: var(--ts-surface);
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius-md);
  box-shadow: var(--ts-shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--ts-dur-fast) var(--ts-ease),
              transform var(--ts-dur-fast) var(--ts-ease),
              visibility var(--ts-dur-fast);
}
.ts-nav__item:hover > .ts-nav__sub,
.ts-nav__item:focus-within > .ts-nav__sub {
  opacity: 1; visibility: visible; transform: none;
}
.ts-nav__sub .ts-nav__link { width: 100%; color: var(--ts-text-muted); }
.ts-nav__sub .ts-nav__link:hover { background: var(--ts-accent-soft); color: var(--ts-accent); }

.ts-header__actions { display: flex; align-items: center; gap: var(--ts-space-2); flex: none; }
.ts-header--overlay:not(.is-stuck) .ts-icon-btn { color: rgba(255,255,255,.9); }
.ts-header--overlay:not(.is-stuck) .ts-icon-btn:hover { background: rgba(255,255,255,.14); color: #FFFFFF; }

.ts-nav-toggle { display: none; }
@media (max-width: 1199px) {
  .ts-nav { display: none; }
  .ts-nav-toggle { display: inline-flex; }
}

/* --------------------------------------------------------------------------
   Mobile drawer
   -------------------------------------------------------------------------- */
.ts-drawer-scrim {
  position: fixed; inset: 0; z-index: var(--ts-z-overlay);
  background: rgba(2,6,23,.6);
  opacity: 0; visibility: hidden;
  transition: opacity var(--ts-dur) var(--ts-ease), visibility var(--ts-dur);
}
.ts-drawer-scrim.is-open { opacity: 1; visibility: visible; }

.ts-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  z-index: var(--ts-z-drawer);
  width: min(360px, 88vw);
  display: flex; flex-direction: column;
  background: var(--ts-surface);
  box-shadow: var(--ts-shadow-xl);
  transform: translateX(100%);
  transition: transform var(--ts-dur-slow) var(--ts-ease);
  /* Respect the notch and the gesture bar on phones. */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.ts-drawer.is-open { transform: none; }
.ts-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--ts-space-4);
  padding: var(--ts-space-4) var(--ts-space-5);
  border-bottom: 1px solid var(--ts-divider);
}
.ts-drawer__body { padding: var(--ts-space-4) var(--ts-space-5); overflow-y: auto; flex: 1; }
.ts-drawer__list { list-style: none; margin: 0; padding: 0; }
.ts-drawer__list a {
  display: block; min-height: 48px;
  padding: var(--ts-space-3) var(--ts-space-3);
  border-radius: var(--ts-radius);
  font-family: var(--ts-font-display);
  font-weight: var(--ts-weight-medium);
  color: var(--ts-text); text-decoration: none;
}
.ts-drawer__list a:hover { background: var(--ts-bg-subtle); }
.ts-drawer__list .is-active > a { color: var(--ts-accent); background: var(--ts-accent-soft); }
.ts-drawer__sub { list-style: none; margin: 0 0 0 var(--ts-space-4); padding: 0; }
.ts-drawer__sub a { font-weight: var(--ts-weight-regular); color: var(--ts-text-muted); }
.ts-drawer__foot { padding: var(--ts-space-5); border-top: 1px solid var(--ts-divider); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.ts-hero {
  position: relative;
  display: flex; align-items: center;
  min-height: min(88vh, 760px);
  padding-top: calc(var(--ts-header-h) + var(--ts-space-12));
  padding-bottom: var(--ts-space-16);
  background: var(--ts-navy-900);
  color: #FFFFFF;
  overflow: hidden;
}
.ts-hero__media { position: absolute; inset: 0; z-index: 0; }
.ts-hero__media img, .ts-hero__media video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* A fixed scrim, not a translucent one: contrast stays constant whatever
   the frame behind it is doing, which is what makes the headline legible. */
.ts-hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(2,6,23,.72) 0%, rgba(2,6,23,.55) 45%, rgba(2,6,23,.82) 100%),
    linear-gradient(90deg, rgba(2,6,23,.65) 0%, rgba(2,6,23,.2) 60%);
}
.ts-hero__inner { position: relative; z-index: 2; width: 100%; }
.ts-hero__content { max-width: 46rem; }
.ts-hero .ts-eyebrow { color: var(--ts-blue-300); }
.ts-hero h1 {
  font-size: var(--ts-text-5xl);
  color: #FFFFFF;
  margin-bottom: var(--ts-space-5);
}
.ts-hero p {
  font-size: var(--ts-text-lg);
  line-height: var(--ts-leading-relaxed);
  color: rgba(255,255,255,.86);
  max-width: 44ch;
  margin-bottom: var(--ts-space-8);
}
.ts-hero__meta {
  display: flex; flex-wrap: wrap; gap: var(--ts-space-6);
  margin-top: var(--ts-space-10);
  padding-top: var(--ts-space-6);
  border-top: 1px solid rgba(255,255,255,.18);
}
.ts-hero__meta-item { display: flex; flex-direction: column; gap: 2px; }
.ts-hero__meta-label {
  font-size: var(--ts-text-xs); text-transform: uppercase;
  letter-spacing: var(--ts-tracking-wide); color: rgba(255,255,255,.62);
}
.ts-hero__meta-value {
  font-family: var(--ts-font-display); font-size: var(--ts-text-lg);
  font-weight: var(--ts-weight-semibold); color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   Page banner (inner pages)
   -------------------------------------------------------------------------- */
.ts-pagehead {
  position: relative;
  padding-top: calc(var(--ts-header-h) + var(--ts-space-10));
  padding-bottom: var(--ts-space-10);
  background: var(--ts-navy-800);
  color: #FFFFFF;
  overflow: hidden;
}
.ts-pagehead__media { position: absolute; inset: 0; z-index: 0; opacity: .35; }
.ts-pagehead__media img { width: 100%; height: 100%; object-fit: cover; }
.ts-pagehead__inner { position: relative; z-index: 1; }
.ts-pagehead h1 { color: #FFFFFF; margin-bottom: var(--ts-space-3); }
.ts-pagehead p { color: rgba(255,255,255,.8); max-width: var(--ts-measure); }

.ts-breadcrumb { display: flex; flex-wrap: wrap; gap: var(--ts-space-2); list-style: none; margin: 0 0 var(--ts-space-4); padding: 0; font-size: var(--ts-text-sm); }
.ts-breadcrumb a { color: rgba(255,255,255,.75); text-decoration: none; }
.ts-breadcrumb a:hover { color: #FFFFFF; text-decoration: underline; }
.ts-breadcrumb li + li::before { content: "/"; margin-right: var(--ts-space-2); color: rgba(255,255,255,.4); }
.ts-breadcrumb [aria-current="page"] { color: #FFFFFF; }

/* --------------------------------------------------------------------------
   Content blocks
   -------------------------------------------------------------------------- */
.ts-stat-grid { display: grid; gap: var(--ts-space-6); grid-template-columns: repeat(auto-fit, minmax(min(100%,180px), 1fr)); }
.ts-stat { padding: var(--ts-space-6); background: var(--ts-surface); border: 1px solid var(--ts-border); border-radius: var(--ts-radius-md); }
.ts-stat__value {
  display: block; font-family: var(--ts-font-display);
  font-size: var(--ts-text-3xl); font-weight: var(--ts-weight-bold);
  color: var(--ts-accent); font-variant-numeric: tabular-nums; line-height: 1.1;
}
.ts-stat__label { font-size: var(--ts-text-sm); color: var(--ts-text-muted); }

.ts-person { text-align: left; position: relative; }
.ts-person__photo { aspect-ratio: 1; border-radius: var(--ts-radius-md); overflow: hidden; background: var(--ts-bg-subtle); margin-bottom: var(--ts-space-4); }
.ts-person__photo img { width: 100%; height: 100%; object-fit: cover; }
.ts-person__name { font-family: var(--ts-font-display); font-size: var(--ts-text-lg); font-weight: var(--ts-weight-semibold); margin-bottom: 2px; }
.ts-person__role { font-size: var(--ts-text-sm); color: var(--ts-text-muted); }

/* The whole card is the target, but only the name is in the tab order. */
.ts-person__name a {
  color: inherit; text-decoration: none;
  /* The overlay below makes the card the real target; this keeps the visible
     link itself at the 24px WCAG floor too. */
  display: inline-block; min-height: 24px;
}
.ts-person__name a::after { content: ""; position: absolute; inset: 0; border-radius: var(--ts-radius-md); }
.ts-person__name a:hover { color: var(--ts-accent); }
.ts-person__name a:focus-visible { outline: none; }
.ts-person:has(.ts-person__name a:focus-visible) { outline: 3px solid var(--ts-ring); outline-offset: 4px; border-radius: var(--ts-radius-md); }

.ts-logo-wall { display: grid; gap: var(--ts-space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%,180px), 1fr)); align-items: center; }
.ts-logo-wall img { width: 100%; height: auto; }

/* Definition-style schedule rows read better than a table on a phone. */
/* --------------------------------------------------------------------------
   Checkout. Billing form beside a summary that stays in view while the buyer
   works down the form. Below 960px the summary drops underneath, where a
   sticky panel would eat half a phone screen.
   -------------------------------------------------------------------------- */
.ts-checkout {
  display: grid;
  gap: var(--ts-space-8);
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 960px) {
  .ts-checkout { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--ts-space-10); }
  .ts-checkout__summary { position: sticky; top: calc(var(--ts-header-h, 72px) + var(--ts-space-6)); }
}

.ts-checkout__plan {
  font-family: var(--ts-font-display);
  font-size: var(--ts-text-lg);
  font-weight: var(--ts-weight-semibold);
  margin-bottom: 2px;
}
.ts-checkout__unit { color: var(--ts-text-muted); font-size: var(--ts-text-sm); margin-bottom: var(--ts-space-6); }
.ts-checkout__total { font-size: var(--ts-text-2xl); font-weight: var(--ts-weight-semibold); }

/* Stepper: two 44px buttons either side of a real number input, so the value
   can be typed as well as nudged. */
.ts-stepper { display: flex; align-items: stretch; gap: var(--ts-space-2); max-width: 220px; }
.ts-stepper__btn {
  flex: 0 0 auto;
  width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--ts-text-lg); line-height: 1;
  background: var(--ts-surface);
  color: var(--ts-text);
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius-sm);
  cursor: pointer;
  transition: background var(--ts-dur-fast) var(--ts-ease), border-color var(--ts-dur-fast) var(--ts-ease);
}
.ts-stepper__btn:hover:not(:disabled) { background: var(--ts-bg-subtle); border-color: var(--ts-accent); }
.ts-stepper__btn:disabled { opacity: .4; cursor: not-allowed; }
.ts-stepper__input { flex: 1 1 auto; min-width: 0; text-align: center; }

/* --------------------------------------------------------------------------
   Speaker detail. Portrait rail beside the biography on wide screens, stacked
   below 900px where a 320px rail would leave the prose too narrow to read.
   -------------------------------------------------------------------------- */
.ts-speaker-detail {
  display: grid;
  gap: var(--ts-space-10);
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .ts-speaker-detail { grid-template-columns: 320px minmax(0, 1fr); }
}
.ts-speaker-detail__photo {
  aspect-ratio: 1;
  border-radius: var(--ts-radius-md);
  overflow: hidden;
  background: var(--ts-bg-subtle);
}
.ts-speaker-detail__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Named links rather than bare glyphs: the destination is legible without
   relying on a brand icon the reader may not recognise. */
.ts-sociallinks {
  display: flex; flex-wrap: wrap; gap: var(--ts-space-2);
  list-style: none; margin: var(--ts-space-5) 0 0; padding: 0;
}
.ts-sociallinks a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding-inline: var(--ts-space-4);
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius-sm);
  color: var(--ts-text-muted);
  font-size: var(--ts-text-sm);
  text-decoration: none;
  transition: color var(--ts-dur-fast) var(--ts-ease),
              border-color var(--ts-dur-fast) var(--ts-ease);
}
.ts-sociallinks a:hover { color: var(--ts-accent); border-color: var(--ts-accent); }

.ts-session {
  display: grid; gap: var(--ts-space-2) var(--ts-space-6);
  grid-template-columns: minmax(140px, 200px) 1fr;
  padding: var(--ts-space-5) 0;
  border-bottom: 1px solid var(--ts-divider);
}
.ts-session__time { font-family: var(--ts-font-display); font-weight: var(--ts-weight-semibold); color: var(--ts-accent); font-variant-numeric: tabular-nums; }
.ts-session__title { font-family: var(--ts-font-display); font-size: var(--ts-text-lg); font-weight: var(--ts-weight-semibold); margin-bottom: var(--ts-space-1); }
.ts-session__meta { font-size: var(--ts-text-sm); color: var(--ts-text-muted); }
@media (max-width: 640px) { .ts-session { grid-template-columns: 1fr; } }

/* Pricing */
.ts-plan { display: flex; flex-direction: column; height: 100%; }
.ts-plan--featured { border-color: var(--ts-accent); box-shadow: var(--ts-shadow-lg); }
.ts-plan__price { font-family: var(--ts-font-display); font-size: var(--ts-text-4xl); font-weight: var(--ts-weight-bold); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ts-plan__period { font-size: var(--ts-text-sm); color: var(--ts-text-muted); }
.ts-plan__list { list-style: none; margin: var(--ts-space-6) 0; padding: 0; display: grid; gap: var(--ts-space-3); }
.ts-plan__list li { display: flex; align-items: flex-start; gap: var(--ts-space-3); font-size: var(--ts-text-sm); color: var(--ts-text-muted); }
.ts-plan__list svg { flex: none; margin-top: 2px; color: var(--ts-success); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.ts-footer { background: var(--ts-navy-900); color: rgba(255,255,255,.72); padding-top: var(--ts-space-16); }
.ts-footer h2, .ts-footer h3 { color: #FFFFFF; font-size: var(--ts-text-base); text-transform: uppercase; letter-spacing: var(--ts-tracking-wide); margin-bottom: var(--ts-space-5); }
.ts-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.ts-footer a:hover { color: #FFFFFF; text-decoration: underline; }
.ts-footer__grid { display: grid; gap: var(--ts-space-10); grid-template-columns: repeat(auto-fit, minmax(min(100%,220px), 1fr)); padding-bottom: var(--ts-space-12); }
/* width:auto so the intrinsic ratio wins. Without it the markup's
   width="180" applied alongside height:40px and squashed the lockup. */
.ts-footer__brand img { height: 40px; width: auto; margin-bottom: var(--ts-space-4); }
.ts-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ts-space-3); }
.ts-footer__list a { display: inline-block; min-height: 24px; }
.ts-footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--ts-space-4);
  align-items: center; justify-content: space-between;
  padding-block: var(--ts-space-6);
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: var(--ts-text-sm);
}
.ts-subscribe { display: flex; gap: var(--ts-space-2); flex-wrap: wrap; }
.ts-subscribe .ts-input { flex: 1 1 200px; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.2); color: #FFFFFF; }
.ts-subscribe .ts-input::placeholder { color: rgba(255,255,255,.5); }
.ts-subscribe .ts-input:focus { border-color: var(--ts-blue-300); box-shadow: 0 0 0 3px rgba(125,211,252,.2); }

/* --------------------------------------------------------------------------
   Back-to-top
   -------------------------------------------------------------------------- */
.ts-to-top {
  position: fixed; right: var(--ts-space-4); bottom: var(--ts-space-4);
  z-index: var(--ts-z-sticky);
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ts-border); border-radius: 50%;
  background: var(--ts-surface); color: var(--ts-text);
  box-shadow: var(--ts-shadow-md); cursor: pointer;
  opacity: 0; visibility: hidden;
  transition: opacity var(--ts-dur) var(--ts-ease), visibility var(--ts-dur);
}
.ts-to-top.is-visible { opacity: 1; visibility: visible; }

/* When the drawer is open the page behind it must not scroll. */
body.ts-no-scroll { overflow: hidden; }

/* --------------------------------------------------------------------------
   Conference directory. auto-fit would stretch a lone card across the full
   container; capping the track keeps one, two or six cards the same size.
   -------------------------------------------------------------------------- */
.ts-card-grid {
  display: grid;
  gap: var(--ts-space-6);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
@media (min-width: 768px) {
  .ts-card-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .ts-card-grid--capped { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   Delegate account area
   ========================================================================== */
.ts-account {
  display: grid;
  gap: var(--ts-space-8);
  /* minmax(0,1fr), not 1fr: a plain 1fr track is minmax(auto,1fr) and a wide
     child -- the invoice table -- forces the whole grid wider than the
     viewport, dragging the sidebar out with it. */
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 992px) {
  .ts-account { grid-template-columns: 260px minmax(0, 1fr); gap: var(--ts-space-10); }
}

.ts-account-nav {
  background: var(--ts-surface);
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius-md);
  padding: var(--ts-space-3);
}
@media (min-width: 992px) { .ts-account-nav { position: sticky; top: calc(var(--ts-header-h) + var(--ts-space-4)); } }

.ts-account-nav__user {
  display: flex; align-items: center; gap: var(--ts-space-3);
  padding: var(--ts-space-3);
  margin-bottom: var(--ts-space-2);
  border-bottom: 1px solid var(--ts-divider);
}
.ts-account-nav__user img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.ts-account-nav__name { font-family: var(--ts-font-display); font-weight: var(--ts-weight-semibold); font-size: var(--ts-text-sm); }
/* An email can be long; let it wrap rather than push the card sideways. */
.ts-account-nav__email { font-size: var(--ts-text-xs); color: var(--ts-text-muted); overflow-wrap: anywhere; }

.ts-account-nav ul { list-style: none; margin: 0; padding: 0; }
.ts-account-nav a {
  display: flex; align-items: center; gap: var(--ts-space-3);
  min-height: 44px;
  padding: var(--ts-space-2) var(--ts-space-3);
  border-radius: var(--ts-radius);
  font-family: var(--ts-font-display);
  font-size: var(--ts-text-sm);
  font-weight: var(--ts-weight-medium);
  color: var(--ts-text-muted);
  text-decoration: none;
  transition: background-color var(--ts-dur-fast) var(--ts-ease),
              color var(--ts-dur-fast) var(--ts-ease);
}
.ts-account-nav a:hover { background: var(--ts-bg-subtle); color: var(--ts-text); }
.ts-account-nav a[aria-current="page"] {
  background: var(--ts-accent-soft);
  color: var(--ts-accent);
  font-weight: var(--ts-weight-semibold);
}
.ts-account-nav svg { flex: none; }
/* Sign out is separated from the navigation items above it. */
.ts-account-nav__signout { margin-top: var(--ts-space-2); padding-top: var(--ts-space-2); border-top: 1px solid var(--ts-divider); }
.ts-account-nav__signout a { color: var(--ts-danger); }
.ts-account-nav__signout a:hover { background: var(--ts-danger-soft); color: var(--ts-danger); }

/* Definition list used for profile/ticket detail, instead of a fake table. */
.ts-detail-list { display: grid; gap: 0; margin: 0; }
.ts-detail-list > div {
  display: grid;
  gap: var(--ts-space-1) var(--ts-space-6);
  grid-template-columns: 1fr;
  padding: var(--ts-space-4) 0;
  border-bottom: 1px solid var(--ts-divider);
}
@media (min-width: 640px) { .ts-detail-list > div { grid-template-columns: 190px minmax(0, 1fr); } }
.ts-detail-list > div:last-child { border-bottom: 0; }
.ts-detail-list dt { color: var(--ts-text-muted); font-size: var(--ts-text-sm); }
.ts-detail-list dd { margin: 0; color: var(--ts-text); overflow-wrap: anywhere; }
.ts-detail-list dd.is-empty { color: var(--ts-text-subtle); }

/* --------------------------------------------------------------------------
   Blog listing: content column plus a sidebar that drops below it on tablet.
   -------------------------------------------------------------------------- */
.ts-blog-layout { display: grid; gap: var(--ts-space-8); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 992px) {
  .ts-blog-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--ts-space-10); }
}

.ts-pagination { margin-top: var(--ts-space-10); }
.ts-pagination .pagination { display: flex; flex-wrap: wrap; gap: var(--ts-space-2); list-style: none; margin: 0; padding: 0; }
.ts-pagination .page-link,
.ts-pagination .page-item > span,
.ts-pagination .page-item > a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px;      /* pointer target floor */
  padding: 0 var(--ts-space-3);
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius);
  background: var(--ts-surface);
  color: var(--ts-text-muted);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.ts-pagination .page-item.active > span,
.ts-pagination .page-item.active .page-link {
  background: var(--ts-accent); border-color: var(--ts-accent); color: #FFFFFF;
}
.ts-pagination .page-item.disabled > span { opacity: .45; }
.ts-pagination svg { width: 16px; height: 16px; }

/* Previous / next article navigation. */
.ts-postnav {
  display: grid; gap: var(--ts-space-4);
  grid-template-columns: 1fr;
  margin-top: var(--ts-space-10);
}
@media (min-width: 640px) { .ts-postnav { grid-template-columns: 1fr 1fr; } }
.ts-postnav__link {
  display: block;
  padding: var(--ts-space-4) var(--ts-space-5);
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius-md);
  background: var(--ts-surface);
  text-decoration: none;
  transition: border-color var(--ts-dur-fast) var(--ts-ease),
              box-shadow var(--ts-dur-fast) var(--ts-ease);
}
.ts-postnav__link:hover { border-color: var(--ts-accent-border); box-shadow: var(--ts-shadow-md); }
.ts-postnav__link--next { text-align: right; }
.ts-postnav__label {
  display: block; margin-bottom: 2px;
  font-size: var(--ts-text-xs); text-transform: uppercase;
  letter-spacing: var(--ts-tracking-wide); color: var(--ts-text-subtle);
}
.ts-postnav__title {
  display: block;
  font-family: var(--ts-font-display); font-weight: var(--ts-weight-semibold);
  color: var(--ts-text);
}

/* ==========================================================================
   Invoice
   ========================================================================== */
.ts-invoice__head {
  display: grid; gap: var(--ts-space-6);
  grid-template-columns: 1fr;
  padding-bottom: var(--ts-space-6);
  margin-bottom: var(--ts-space-6);
  border-bottom: 1px solid var(--ts-divider);
}
@media (min-width: 640px) {
  .ts-invoice__head { grid-template-columns: 1fr auto; align-items: start; }
  .ts-invoice__meta { text-align: right; }
}
.ts-invoice__from { font-size: var(--ts-text-sm); color: var(--ts-text-muted); line-height: var(--ts-leading-relaxed); }
.ts-invoice__meta h2 { font-size: var(--ts-text-2xl); margin-bottom: var(--ts-space-3); }
.ts-invoice__meta dl { display: grid; gap: var(--ts-space-2); margin: 0; }
.ts-invoice__meta dt { font-size: var(--ts-text-xs); text-transform: uppercase; letter-spacing: var(--ts-tracking-wide); color: var(--ts-text-subtle); }
.ts-invoice__meta dd { margin: 0; font-weight: var(--ts-weight-medium); }

.ts-invoice__parties {
  display: grid; gap: var(--ts-space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  margin-bottom: var(--ts-space-8);
}
.ts-invoice__parties h3 {
  font-size: var(--ts-text-xs); text-transform: uppercase;
  letter-spacing: var(--ts-tracking-wide); color: var(--ts-text-subtle);
  margin-bottom: var(--ts-space-2);
}
.ts-invoice__parties p { margin: 0; line-height: var(--ts-leading-relaxed); }

.ts-invoice__total { font-weight: var(--ts-weight-bold); font-size: var(--ts-text-lg); }
.ts-invoice tfoot th, .ts-invoice tfoot td { border-top: 2px solid var(--ts-border-strong); }

/* --------------------------------------------------------------------------
   Print. Everything except the invoice card is hidden, so the printed page is
   the document itself -- no header, no navigation, no footer.
   -------------------------------------------------------------------------- */
@media print {
  body * { visibility: hidden; }
  #ts-invoice, #ts-invoice * { visibility: visible; }
  #ts-invoice {
    position: absolute; inset: 0 auto auto 0;
    width: 100%; margin: 0;
    border: 0; box-shadow: none;
  }
  .ts-invoice__actions, .ts-header, .ts-footer, .ts-pagehead,
  .ts-account-nav, .ts-to-top, .ts-utilitybar { display: none !important; }
  .ts-table-wrap { border: 0; }
  .ts-table th, .ts-table td { border-color: #999 !important; }
  @page { margin: 16mm; }
}

@media (max-width: 640px) {
  /* A 970px hero on an 812px screen is a full screen of scrolling before any
     content appears. Size it to its own content instead of a viewport
     fraction. Declared here, not in components.css: site.css defines .ts-hero
     and loads later, so an equally specific rule there is the one that wins. */
  .ts-hero {
    min-height: auto;
    padding-block: calc(var(--ts-header-h) + var(--ts-space-10)) var(--ts-space-12);
  }
  .ts-hero__meta { gap: var(--ts-space-5); margin-top: var(--ts-space-8); padding-top: var(--ts-space-5); }
  /* One full-width action reads better than two half-width buttons. */
  .ts-hero .ts-btn-row .ts-btn,
  .ts-btn-row:has(.ts-btn--lg) .ts-btn { flex: 1 1 100%; }

  /* Keep the whole hero inside one screen: at the desktop display size the
     headline alone ran to four lines and pushed everything else below the
     fold. */
  .ts-hero h1 { font-size: var(--ts-text-4xl); margin-bottom: var(--ts-space-4); }
  .ts-hero p { font-size: var(--ts-text-base); margin-bottom: var(--ts-space-6); }
  .ts-hero .ts-eyebrow { margin-bottom: var(--ts-space-2); }
  .ts-hero .ts-btn--lg { min-height: 48px; }
}

/* Same for the public site footer. */
.ts-footer__list a, .ts-footer__bottom a {
  display: inline-block;
  padding-block: var(--ts-space-2);
}
.pbn-logo { display: inline-flex; align-items: center; min-height: 44px; }

.ts-detail-list dd a {
  display: inline-flex; align-items: center;
  min-height: 44px;              /* a mail/tel/edit link is something people tap */
  padding-block: var(--ts-space-2);
}
