/* Team mode: only what shared/styles/base.css does not already have */

.logo {
  white-space: nowrap;
}

.side .logo {
  gap: 6px;
  font-size: 1.25rem;
}

.t-hero {
  margin: 24px 0 8px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.sec-title {
  margin: 28px 0 12px;
  font-size: 1.0625rem;
}

/* Competition list */
.comp-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.comp {
  display: block;
  color: inherit;
  text-decoration: none;
}

.comp h1,
.comp h2 {
  margin: 10px 0 4px;
  font-size: 1.25rem;
}

.comp--head h1 {
  font-size: 1.625rem;
}

.comp__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.src {
  color: var(--muted);
  font-size: 0.8125rem;
}

.src--organizer {
  color: var(--orange-deep);
  font-weight: 600;
}

.comp__counts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.875rem;
}

.comp__counts b {
  color: var(--ink);
}

/* Join choice */
.join__choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.choice {
  display: grid;
  gap: 4px;
  justify-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: transform 0.15s var(--ease);
}

.choice:active {
  transform: translateY(1px);
}

.choice:focus-visible {
  outline: 2px solid var(--orange-deep);
  outline-offset: 2px;
}

.choice i {
  color: var(--orange);
  font-size: 1.75rem;
}

.choice span {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Person and team cards */
.tcard {
  margin-bottom: 12px;
}

.tcard__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tcard__top strong {
  font-size: 1.0625rem;
}

.tcard__top .meta {
  margin: 2px 0 0;
}

.chips span.is-match {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-weight: 600;
}

.team-cups {
  display: inline-flex;
  flex: none;
}

.team-cups .cup {
  width: 30px;
  height: 36px;
}

.team-cups .cup + .cup {
  margin-left: -10px;
}

.my-team {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: inherit;
  text-decoration: none;
}

.my-team > div {
  flex: 1;
  min-width: 0;
}

.my-team .meta {
  margin: 2px 0 0;
}

.my-team > i {
  color: var(--muted);
}

/* Chat and team pages */
.chat__info {
  margin: 0;
  padding: 8px 16px;
  color: var(--muted);
  font-size: 0.875rem;
}

.msg__who {
  display: block;
  margin-bottom: 2px;
  color: var(--orange-deep);
  font-size: 0.75rem;
  font-weight: 600;
}

.team-info {
  margin: 8px 0;
  padding: 0;
}

.team-info summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  font-size: 0.9375rem;
}

.team-info summary::-webkit-details-marker {
  display: none;
}

.team-info[open] summary {
  border-bottom: 1px solid var(--line);
}

.team-info > :not(summary) {
  margin: 12px 16px;
}

.mates {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.mates li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mates .meta {
  margin: 0;
  overflow-wrap: anywhere;
}

/* In a team, a filled role is a good thing: no strike-through */
.team-info .role.is-filled .role__name {
  color: var(--ink);
  text-decoration: none;
}

.invite {
  display: grid;
  gap: 6px;
  padding-bottom: 4px;
}

.invite .meta {
  margin: 0;
}

.invite__row {
  display: flex;
  gap: 8px;
}

.invite__row input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 0.8125rem;
}

.invite > .btn {
  justify-self: start;
}

/* Who said yes to teaming up */
.votes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 8px;
  padding: 0 16px;
  font-size: 0.8125rem;
}

.votes__label {
  color: var(--muted);
}

.votes ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.votes li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 6px;
  border: 1px dashed #b9ad98;
  border-radius: var(--r-pill);
  color: var(--muted);
}

.votes li.is-yes {
  border: 1px solid var(--orange);
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-weight: 600;
}

.votes i {
  font-size: 1rem;
}

/* Ending a chat politely */
.leave {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.leave .meta,
.leave .field__label {
  margin: 0;
}

.leave__quote {
  margin: 4px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--orange);
  border-radius: 0 var(--r-input) var(--r-input) 0;
  background: var(--bg);
}

/* Labels line up with the first row of chips */
.brief > div {
  grid-template-columns: 7.5em minmax(0, 1fr);
  align-items: baseline;
}

.brief .chips {
  margin-top: 0;
}

/* A team's one-line idea */
.pitch {
  margin: 10px 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.pitch--big {
  margin-top: 4px;
  font-size: 1.0625rem;
}

.pitch-form textarea {
  min-height: 0;
}

.pitch-form .btn {
  justify-self: start;
}

/* Clickable cups for a team */
.team-cups.avatar-btn {
  border: 0;
  background: none;
}

.team-cups--big .cup {
  width: 54px;
  height: 64px;
}

.team-cups--big .cup + .cup {
  margin-left: -16px;
}

.chips--sm {
  margin: 4px 0 0;
}

.chips--sm span {
  padding: 1px 9px;
  font-size: 0.8125rem;
}

.modal .mates {
  margin-top: 8px;
}

@media (max-width: 520px) {
  .brief > div {
    grid-template-columns: 6.5em minmax(0, 1fr);
    gap: 8px;
  }
}

.hint-inline {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

/* Competition list: where switch and search */
.comp-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
}

.seg__btn {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.seg__btn.is-on {
  background: var(--ink);
  color: var(--bg);
}

.seg__btn:focus-visible {
  outline: 2px solid var(--orange-deep);
  outline-offset: 2px;
}

.comp-search {
  flex: 1;
  min-width: 200px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: #fffdf8;
  font: inherit;
}

.comp h2 {
  overflow-wrap: anywhere;
}

.comp__when {
  margin: 10px 0 0;
  line-height: 1.5;
  color: var(--ink);
  font-size: 0.875rem;
}

.comp__when i {
  margin-right: 6px;
  color: var(--orange-deep);
  vertical-align: -2px;
}

.comp__sum {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.comp--head .chips,
.comp--head .btnrow {
  margin-top: 12px;
}

.comp--head .btnrow {
  align-items: center;
}

.comp--head .btn i {
  margin-left: 4px;
}

/* Page numbers under the competition list */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 20px 0 0;
}

.pager__btn {
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.pager__btn:hover {
  border-color: var(--ink);
}

.pager__btn.is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.pager__btn:focus-visible {
  outline: 2px solid var(--orange-deep);
  outline-offset: 2px;
}

.pager__gap {
  color: var(--muted);
}

.credit {
  margin: 24px 0 8px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.sample-note {
  margin: -6px 0 12px;
  font-size: 0.8125rem;
}

/* Team size on competition cards */
.comp__size {
  margin: 6px 0 0;
  color: var(--orange-deep);
  font-size: 0.875rem;
  font-weight: 600;
}

.comp__size i {
  margin-right: 6px;
  vertical-align: -2px;
}

/* A competition's facts: dates, team size, eligibility */
.facts {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.facts > li {
  display: flex;
  gap: 8px;
}

.facts > li > i {
  flex: none;
  margin-top: 3px;
  color: var(--orange-deep);
}

.facts b {
  margin-right: 4px;
  font-weight: 600;
}

.facts__size {
  color: var(--orange-deep);
  font-weight: 600;
}

.tracks {
  display: grid;
  gap: 2px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-weight: 400;
}

/* Category filter */
.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.cats .cat span {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 400;
}

.cats .cat.is-on span {
  color: inherit;
  opacity: 0.7;
}

.orig summary {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
}

.side__foot {
  margin-top: auto;
}

/* "Other" role written by hand */
.other-input {
  flex: 1 1 160px;
  min-width: 140px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #b9ad98;
  border-radius: var(--r-pill);
  background: #fffdf8;
  font: inherit;
  font-size: 0.9375rem;
}

/* ---------- Curious about: picked ones, then "Show more topics" ---------- */

.choose {
  margin-top: 10px;
}

.choose summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px dashed #b9ad98;
  border-radius: var(--r-pill);
  cursor: pointer;
  list-style: none;
  font-size: 0.875rem;
  color: var(--muted);
}

.choose summary::-webkit-details-marker {
  display: none;
}

.choose summary:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.choose summary i {
  transition: transform 0.2s;
}

.choose[open] summary i {
  transform: rotate(180deg);
}

.choose__less,
.choose[open] .choose__more {
  display: none;
}

.choose[open] .choose__less {
  display: inline;
}

.choose__group {
  margin: 16px 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- Settings card (My order): sections with the title on the left ---------- */

.settings {
  overflow: hidden; /* the stripes follow the card's rounded corners */
  container-type: inline-size;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
}

.set {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
}

.set + .set,
.settings > form + .set {
  border-top: 1px solid var(--line);
}

@container (min-width: 700px) {
  .set {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 32px;
  }
}

/* Sealed until you team up: soft orange diagonal stripes, like tape over a cup lid */
.set--sealed {
  background: repeating-linear-gradient(-45deg, rgb(226 92 20 / 0.09) 0 10px, transparent 10px 20px), var(--surface);
}

.set__info h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.set__info h2 i {
  color: var(--orange-deep);
}

.set__info p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.set__body {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.set__body > p {
  margin: 0;
}

.set__body .btnrow {
  align-items: center;
  gap: 16px;
}

.set__error {
  margin: 0;
  padding: 0 clamp(18px, 3vw, 28px) 18px;
}

.save-state {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 1.5em;
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.save-state i {
  color: #3f7d4e;
}

/* ---------- Your participation card in a competition ---------- */

.mycard {
  display: grid;
  gap: 8px;
}

.mycard__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.mycard__top h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.0625rem;
}

.mycard p {
  margin: 0;
}

.mycard__line {
  line-height: 1.6;
}

.mycard__line .meta {
  margin-right: 6px;
}

/* "Sign in to …" with the sign-in buttons */
.signin-prompt {
  display: grid;
  gap: 4px;
}

.signin-prompt > p {
  margin: 0;
  color: var(--muted);
}

/* When you usually work: a small week grid (days across, morning / afternoon / evening down) */
.avail {
  display: grid;
  grid-template-columns: auto repeat(7, minmax(30px, 44px));
  gap: 6px;
  align-items: center;
  justify-content: start;
  font-size: 0.8125rem;
}

.avail__day {
  text-align: center;
  color: var(--muted);
}

.avail__part {
  padding-right: 6px;
  color: var(--muted);
  white-space: nowrap;
}

.avail__cell {
  position: relative;
  cursor: pointer;
}

.avail__cell input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.avail__cell span {
  display: block;
  height: 32px;
  border: 1px solid #b9ad98;
  border-radius: 8px;
  background: #fffdf8;
  transition: background-color 0.15s, border-color 0.15s;
}

.avail__cell input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
}

.avail__cell input:focus-visible + span {
  outline: 2px solid var(--orange-deep);
  outline-offset: 2px;
}

/* ---------- Invitations (spec §10) ---------- */

.invite-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0;
}

.invite-state i {
  margin-right: 6px;
  color: var(--orange-deep);
}

.invite-state--in {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--r-input);
  background: var(--orange-soft);
}

.invite-state--in p {
  margin: 0;
}

.invite-note,
.req__note {
  margin: 0;
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.req-title {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.reqs {
  display: grid;
  gap: 8px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.req {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  background: var(--surface);
}

.req__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.req__body small {
  color: var(--muted);
}

.req__act {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 560px) {
  .req {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .req__act {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* The number of invitations waiting for you, on the menu */
.nav a {
  position: relative;
}

.nav__badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--orange);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
