/* GTS Connect - brand tokens taken from the GTS gala site */
:root {
  --cream: #fffaf2;
  --cream-2: #f8eedf;
  --ink: #2b0f4c;
  --night: #1d0836;
  --plum: #2b0f4c;
  --plum-2: #4a1f78;
  --plum-3: #6b2f9e;
  --orange: #ec6a1e;
  --orange-2: #f59a3c;
  --gold: #c8963e;
  --gold-2: #e7c17a;
  --muted: #5d4a72;
  --line: rgba(43, 15, 76, 0.12);
  --line-soft: rgba(43, 15, 76, 0.07);
  --white: #fff;
  --ok: #1f7a4d;
  --ok-bg: #e7f5ec;
  --bad: #b3261e;
  --bad-bg: #fdecea;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(29, 8, 54, 0.05), 0 10px 30px -18px rgba(29, 8, 54, 0.35);
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--plum-3);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--orange);
}
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 700;
}
h3 {
  font-size: 1.02rem;
  font-weight: 700;
}
p {
  margin: 0 0 1em;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.875rem;
}
.center {
  text-align: center;
}
.nowrap {
  white-space: nowrap;
}
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.main {
  flex: 1;
  padding-block: clamp(20px, 4vw, 40px) 64px;
}
.narrow {
  max-width: 720px;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}
:focus-visible {
  outline: 3px solid var(--orange-2);
  outline-offset: 2px;
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.6em;
}

/* ---------- Header ---------- */
.top {
  background: linear-gradient(180deg, var(--night), #24093f);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
}
.top-in {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover {
  color: #fff;
}
/* The official GTS mark (public/img/gts-mark.png, from globaltalentsolutionhub.com). */
.mark {
  display: block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-size: 1.02rem;
  font-weight: 800;
}
.brand-text small {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.nav {
  display: none;
  gap: 4px;
  margin-left: 12px;
}
.nav a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav a:hover,
.nav a.on {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}
.menu {
  position: relative;
}
.menu > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
  font-size: 0.9rem;
}
.menu > summary::-webkit-details-marker {
  display: none;
}
.menu-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: none;
}
.menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: 0 18px 40px -12px rgba(29, 8, 54, 0.45);
  border: 1px solid var(--line);
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.menu-list a,
.menu-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  background: none;
  border: 0;
  cursor: pointer;
}
.menu-list a:hover,
.menu-list button:hover {
  background: var(--cream-2);
  color: var(--ink);
}
.menu-list hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 6px 0;
  width: 100%;
}

/* Bottom tab bar on phones */
.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: #fff;
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 2px 7px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.66rem;
  font-weight: 600;
}
.tabbar a.on {
  color: var(--orange);
}
.tabbar .badge {
  position: absolute;
  top: 3px;
  left: calc(50% + 6px);
  min-width: 17px;
  height: 17px;
  font-size: 0.64rem;
}
.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
body.has-tabbar {
  padding-bottom: 62px;
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
  .tabbar {
    display: none;
  }
  body.has-tabbar {
    padding-bottom: 0;
  }
  .menu-name {
    display: block;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: linear-gradient(135deg, #d9560f, var(--orange) 55%, #f08a2c);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(236, 106, 30, 0.9);
}
.btn-primary:hover {
  color: #fff;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: var(--night);
}
.btn-gold:hover {
  color: var(--night);
}
.btn-plum {
  background: var(--plum-2);
  color: #fff;
}
.btn-plum:hover {
  color: #fff;
  background: var(--plum-3);
}
.btn-ghost {
  background: transparent;
  color: var(--plum);
  border-color: rgba(43, 15, 76, 0.22);
}
.btn-ghost:hover {
  color: var(--plum);
  border-color: var(--plum-3);
}
.btn-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-light:hover {
  color: #fff;
  border-color: #fff;
}
.btn-danger {
  background: transparent;
  color: var(--bad);
  border-color: rgba(179, 38, 30, 0.35);
}
.btn-danger:hover {
  color: #fff;
  background: var(--bad);
}
.btn-sm {
  min-height: 36px;
  padding: 0.3rem 0.95rem;
  font-size: 0.85rem;
}
.btn-block {
  width: 100%;
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--plum-3);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn.danger {
  color: var(--bad);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ---------- Cards and layout ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 26px);
}
.card + .card,
.stack > * + * {
  margin-top: 18px;
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.card-head h2,
.card-head h3 {
  margin: 0;
}
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}
.page-head h1 {
  margin: 0;
}
.page-head p {
  margin: 6px 0 0;
}
.grid {
  display: grid;
  gap: 18px;
}
.cols-2,
.cols-3,
.cols-4 {
  grid-template-columns: minmax(0, 1fr);
}
/* Grid and split children may shrink below their content's width; without this, one
   long line (a name, an address) pushes the whole page sideways on a phone. */
.grid > *,
.split > *,
.tiles > * {
  min-width: 0;
}
@media (min-width: 640px) {
  .cols-2,
  .cols-3,
  .cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 980px) {
  .cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.tiles {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 980px) {
  .tiles {
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}
@media (min-width: 980px) {
  .split {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    align-items: start;
  }
}
.empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.6);
}
.empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

/* ---------- Flash + notices ---------- */
.flash {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.flash-ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.flash-error {
  background: var(--bad-bg);
  color: var(--bad);
}
.notice {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #fff4e8;
  border: 1px solid rgba(236, 106, 30, 0.25);
  margin-bottom: 18px;
}
.notice strong {
  display: block;
}

/* ---------- Forms ---------- */
.field {
  margin-bottom: 16px;
}
.field > label,
.label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.optional {
  font-weight: 500;
  color: var(--muted);
}
input[type='text'],
input[type='email'],
input[type='password'],
input[type='tel'],
input[type='url'],
input[type='number'],
input[type='search'],
input[type='datetime-local'],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  min-height: 46px;
}
textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--plum-3);
  box-shadow: 0 0 0 3px rgba(107, 47, 158, 0.16);
}
input[type='file'] {
  font: inherit;
  font-size: 0.9rem;
  max-width: 100%;
}
.hint {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 5px;
}
.error {
  font-size: 0.86rem;
  color: var(--bad);
  font-weight: 600;
  margin-top: 5px;
}
.has-error input,
.has-error textarea,
.has-error select {
  border-color: var(--bad);
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
  font-size: 0.93rem;
}
.check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--orange);
  flex-shrink: 0;
}
.form-row {
  display: grid;
  gap: 0 16px;
}
@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 8px;
}
legend {
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0;
  margin-bottom: 12px;
}
.form-section + .form-section {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 22px;
}
.inline-form {
  display: inline;
}
.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.search-bar input[type='search'] {
  flex: 2 1 220px;
}
.search-bar select {
  flex: 1 1 180px;
}

/* ---------- Avatars, tags, pills ---------- */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--cream-2);
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
}
.avatar-initials {
  background: linear-gradient(140deg, var(--plum-3), var(--plum));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.avatar-xs {
  width: 30px;
  height: 30px;
  font-size: 0.7rem;
}
.avatar-sm {
  width: 42px;
  height: 42px;
  font-size: 0.85rem;
}
.avatar-md {
  width: 64px;
  height: 64px;
  font-size: 1.2rem;
}
.avatar-lg {
  width: 120px;
  height: 120px;
  font-size: 2.2rem;
  border: 4px solid #fff;
  box-shadow: var(--shadow);
}
.avatar-org {
  border-radius: 14px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tag {
  background: var(--cream-2);
  color: var(--plum-2);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 0.8rem;
  font-weight: 600;
}
/* Tap-to-add suggestions under a field */
.suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.suggest-label {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
.chip {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line, #e3d9ec);
  background: #fff;
  color: var(--plum-2);
  cursor: pointer;
}
.chip:hover {
  border-color: var(--plum-3);
}
.chip[aria-pressed='true'] {
  background: var(--plum-2);
  border-color: var(--plum-2);
  color: #fff;
}
.chip[aria-pressed='true']::before {
  content: '\2713\00a0';
}
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--cream-2);
  color: var(--muted);
}
.pill-open,
.pill-pending {
  background: #fff1dd;
  color: #a4530a;
}
.pill-scheduled {
  background: #ece2f8;
  color: var(--plum-2);
}
.pill-completed,
.pill-active,
.pill-delivered {
  background: var(--ok-bg);
  color: var(--ok);
}
.pill-declined,
.pill-cancelled,
.pill-suspended {
  background: var(--bad-bg);
  color: var(--bad);
}
.pill-kind {
  background: var(--night);
  color: var(--gold-2);
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 18px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs a {
  flex-shrink: 0;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}
.tabs a.on {
  background: var(--plum);
  border-color: var(--plum);
  color: #fff;
}
.tabs a span {
  opacity: 0.7;
  font-weight: 600;
}

/* ---------- Member cards ---------- */
.member-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.member-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-2);
  color: inherit;
}
.member-top {
  display: flex;
  gap: 12px;
  align-items: center;
}
.member-top h3 {
  margin: 0;
  font-size: 1rem;
}
.member-top p {
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.35;
}
.member-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.dot-open::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2aa567;
  margin-right: 6px;
}

/* ---------- Profile ---------- */
.profile-hero {
  background: linear-gradient(160deg, var(--plum), var(--plum-2));
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 34px);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.profile-hero::after {
  content: '';
  position: absolute;
  right: -120px;
  top: -160px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 46px solid rgba(231, 193, 122, 0.16);
  pointer-events: none;
}
.profile-hero h1 {
  margin: 0 0 4px;
  color: #fff;
}
.profile-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}
.profile-hero .pill {
  background: rgba(255, 255, 255, 0.16);
  color: var(--gold-2);
  margin-bottom: 8px;
}
.profile-main {
  flex: 1 1 260px;
  position: relative;
  z-index: 1;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.facts li {
  font-size: 0.93rem;
  overflow-wrap: anywhere;
}
.facts span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.gift {
  background: linear-gradient(135deg, #fff7e6, #fdeccb);
  border: 1px solid var(--gold-2);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}
.gift b {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--plum);
  line-height: 1.1;
}
.prose p:last-child {
  margin-bottom: 0;
}
.prose {
  overflow-wrap: anywhere;
}

/* ---------- Stat tiles ---------- */
.tile {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.tile b {
  display: block;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--plum);
}
.tile span {
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 600;
}
.tile small {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}
.tile-hero {
  background: linear-gradient(160deg, var(--plum), var(--plum-2));
  border: 0;
}
.tile-hero b {
  color: var(--gold-2);
}
.tile-hero span,
.tile-hero small {
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Lists ---------- */
.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rows > li {
  border-top: 1px solid var(--line-soft);
}
.rows > li:first-child {
  border-top: 0;
}
.row-link {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  text-decoration: none;
  color: inherit;
}
.row-link:hover {
  color: inherit;
  background: var(--cream);
}
.row-body {
  flex: 1;
  min-width: 0;
}
.row-body strong {
  display: block;
  font-size: 0.95rem;
}
.row-body span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-side {
  text-align: right;
  font-size: 0.78rem;
  color: var(--muted);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.unread strong {
  font-weight: 800;
}
.unread .row-body strong::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  margin-right: 8px;
}

.thread-row {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}
.thread-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.thread-top strong {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thread-top span {
  font-size: 0.78rem;
  color: var(--muted);
  flex-shrink: 0;
}
.thread-text {
  font-size: 0.86rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thread-text b {
  color: var(--ink);
  font-weight: 600;
}
.unread .thread-top strong {
  font-weight: 800;
}
.unread .thread-top strong::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  margin-right: 8px;
}
.row-side {
  max-width: 46%;
}

/* ---------- Conversation ---------- */
.thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0;
}
.msg {
  display: flex;
  gap: 10px;
  max-width: min(640px, 92%);
}
.msg-body {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 4px 18px 18px 18px;
  padding: 10px 14px;
  overflow-wrap: anywhere;
}
.msg-body p {
  margin: 0 0 0.6em;
}
.msg-body p:last-child {
  margin: 0;
}
.msg-meta {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 4px;
}
.msg.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.msg.mine .msg-body {
  background: #f1e8fb;
  border-color: #e0d0f3;
  border-radius: 18px 4px 18px 18px;
}
.msg.mine .msg-meta {
  text-align: right;
}
.msg-system {
  align-self: center;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--cream-2);
  border-radius: 999px;
  padding: 4px 14px;
  text-align: center;
}
.when-card {
  border: 1px solid var(--gold-2);
  background: linear-gradient(135deg, #fff7e6, #fdeccb);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.when-card strong {
  font-size: 1.1rem;
}
details.fold {
  border-top: 1px solid var(--line-soft);
  padding: 12px 0;
}
details.fold:first-of-type {
  border-top: 0;
  padding-top: 0;
}
details.fold > summary {
  cursor: pointer;
  font-weight: 700;
}
details.fold[open] > summary {
  margin-bottom: 12px;
}

/* ---------- Posts ---------- */
.post h2 {
  margin-bottom: 4px;
}
.post h2 a {
  color: inherit;
  text-decoration: none;
}
.post h2 a:hover {
  color: var(--orange);
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--night);
  margin: 12px 0;
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  margin-top: 8px;
}
.post-image {
  border-radius: var(--radius-sm);
  margin: 12px 0;
  max-height: 520px;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
tr:last-child td {
  border-bottom: 0;
}
td .small {
  display: block;
}
.compact select,
.compact input {
  min-height: 34px;
  padding: 4px 8px;
  font-size: 0.85rem;
  width: auto;
}
.compact input[type='number'] {
  width: 76px;
}
.compact input[type='url'] {
  flex: 1 1 220px;
  min-width: 0;
}

/* Phones: the signed-out header has two buttons, so the logo drops its small
   tagline line there to make room (signed-in pages keep it). */
.top-right .btn {
  white-space: nowrap;
}
@media (max-width: 440px) {
  .top-in {
    gap: 10px;
  }
  .top-in:has(.top-right .btn) .brand-text small {
    display: none;
  }
  .top-right {
    gap: 6px;
  }
  .top-right .btn-sm {
    padding-inline: 12px;
  }
}
@media (max-width: 340px) {
  .top-right .btn-light {
    display: none;
  }
}

/* Delivered masterclasses: recording link and the host's "add a link" form */
.past-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 0 4px 12px 56px;
}
.inline-edit > summary {
  list-style: none;
  display: inline;
}
.inline-edit > summary::-webkit-details-marker {
  display: none;
}
.inline-edit[open] {
  flex-basis: 100%;
}
.inline-edit form {
  margin-top: 8px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (max-width: 520px) {
  .past-actions {
    padding-left: 4px;
  }
}

/* ---------- Bar chart ---------- */
.bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  align-items: end;
  height: 180px;
  margin-top: 8px;
}
.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.bar-pair {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}
.bar {
  width: 42%;
  max-width: 16px;
  border-radius: 4px 4px 0 0;
  min-height: 2px;
}
.bar-a {
  background: var(--gold-2);
}
.bar-b {
  background: var(--plum-3);
}
.bar-col small {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 4px;
}
.legend {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}
.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
}

/* ---------- Landing ---------- */
.hero {
  background: radial-gradient(900px 500px at 85% -10%, rgba(231, 193, 122, 0.22), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(236, 106, 30, 0.25), transparent 60%),
    linear-gradient(170deg, var(--night), var(--plum-2));
  color: #fff;
  padding: clamp(48px, 9vw, 96px) 0 clamp(56px, 9vw, 104px);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: -180px;
  bottom: -260px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  border: 70px solid rgba(231, 193, 122, 0.12);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(2.1rem, 6.5vw, 3.6rem);
  font-weight: 800;
  max-width: 15ch;
  margin-bottom: 0.4em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--orange-2), var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead {
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  max-width: 54ch;
  color: rgba(255, 255, 255, 0.88);
}
.hero .actions {
  margin-top: 26px;
  position: relative;
  z-index: 1;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 40px;
}
.hero-stats b {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--gold-2);
  line-height: 1.1;
}
.hero-stats span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}
.section {
  padding: clamp(40px, 7vw, 72px) 0;
}
.section-alt {
  background: var(--cream-2);
}
.role-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1.5px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.role-card:hover {
  transform: translateY(-2px);
  border-color: var(--orange-2);
  color: inherit;
}
.role-card h3 {
  margin: 0;
  color: var(--plum);
}
.role-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.role-card .go {
  margin-top: auto;
  padding-top: 8px;
  font-weight: 700;
  color: var(--orange);
  font-size: 0.9rem;
}
.steps {
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 52px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: var(--night);
  font-weight: 800;
}
.auth {
  max-width: 480px;
  margin-inline: auto;
}
.auth-wide {
  max-width: 620px;
}

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  font-size: 0.84rem;
  color: var(--muted);
}
.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
}
.foot a {
  color: var(--muted);
}

@media print {
  .top,
  .tabbar,
  .foot,
  .no-print,
  .flash {
    display: none !important;
  }
  body {
    background: #fff;
    padding: 0 !important;
  }
  .card,
  .tile {
    box-shadow: none;
  }
}
