/* =============================================================
   SFA Tournaments case study — page-only components.
   Built on app.css + case-v3.css tokens. SFA's orange marks the
   "you are here" state in diagrams and nothing else.
   ============================================================= */

.sfa { --sfa: #ff5b1a; --sfa-soft: #fff1ea; }

/* the rules that made it hard: a grid of small cards */
.sfa-rules { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: var(--wide); counter-reset: rule; }
.sfa-rules li { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 22px 24px 26px; counter-increment: rule; }
.sfa-rules li::before { content: counter(rule, decimal-leading-zero); display: block; font: 500 .75rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--sfa); }
.sfa-rules h3 { margin-top: .9rem; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; color: var(--fg); }
.sfa-rules p { margin-top: .4rem; font-size: .9375rem; line-height: 1.5; color: var(--fg-muted); }
@media (max-width: 900px) { .sfa-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .sfa-rules { grid-template-columns: 1fr; } }

/* information architecture: three columns, entry -> tournament page -> team actions */
.sfa-ia { margin-top: 2.5rem; max-width: var(--wide); background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 28px; }
.sfa-ia__t { font-size: 1.0625rem; font-weight: 600; color: var(--fg); }
.sfa-ia__cols { display: grid; grid-template-columns: 1fr auto 1.35fr auto 1fr; gap: 14px; align-items: start; margin-top: 1.5rem; }
.sfa-ia__arrow { align-self: center; color: var(--fg-faint); font-size: 1.25rem; }
.sfa-ia__k { font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: .6rem; }
.sfa-ia ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sfa-node { display: block; padding: 10px 12px; border-radius: 12px; background: var(--bg-elev); font-size: .875rem; line-height: 1.35; color: var(--fg); }
.sfa-node small { display: block; margin-top: 2px; font-size: .78rem; color: var(--fg-muted); }
.sfa-node--root { background: #111; color: #fff; }
.sfa-node--root small { color: rgba(255,255,255,.65); }
.sfa-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.sfa-tabs .sfa-node { border-left: 3px solid var(--sfa); }
@media (max-width: 860px) {
  .sfa-ia__cols { grid-template-columns: 1fr; }
  .sfa-ia__arrow { justify-self: center; transform: rotate(90deg); }
}

/* state x tab matrix */
.sfa-matrix-wrap { margin-top: 2.5rem; max-width: var(--wide); overflow-x: auto; border: 1px solid var(--line); border-radius: 24px; background: #fff; }
.sfa-matrix { width: 100%; min-width: 720px; border-collapse: collapse; font-size: .875rem; line-height: 1.4; }
.sfa-matrix th, .sfa-matrix td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.sfa-matrix thead th { font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-faint); background: var(--bg-elev); }
.sfa-matrix tbody th { font-weight: 600; color: var(--fg); white-space: nowrap; }
.sfa-matrix tbody th small { display: block; font-weight: 400; color: var(--fg-muted); }
.sfa-matrix td { color: var(--fg-muted); }
.sfa-matrix tr:last-child th, .sfa-matrix tr:last-child td { border-bottom: 0; }
.sfa-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 500; white-space: nowrap; }
.sfa-pill--cta { background: var(--sfa); color: #fff; }
.sfa-pill--pending { background: #fff4d6; color: #8a5a00; }
.sfa-pill--invited { background: #e6efff; color: #1f4fbf; }
.sfa-pill--joined { background: #e3f6e8; color: #1c7a3a; }

/* one status card, five states */
.sfa-states { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; max-width: var(--wide); align-items: start; }
.sfa-states li { margin: 0; }
.sfa-states figure { margin: 0; padding: 10px; border-radius: 20px; background: #0b0b0d; }
.sfa-states img { display: block; width: 100%; height: auto; border-radius: 12px; }
.sfa-states b { display: block; margin-top: .85rem; font-size: .9375rem; font-weight: 600; color: var(--fg); }
.sfa-states span { display: block; margin-top: .2rem; font-size: .875rem; line-height: 1.45; color: var(--fg-muted); }
@media (max-width: 980px) { .sfa-states { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .sfa-states { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* decisions: text cards with the trade-off underneath */
.sfa-calls { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: var(--wide); }
.sfa-calls li { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 24px 24px 26px; display: flex; flex-direction: column; }
.sfa-calls h3 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; color: var(--fg); }
.sfa-calls p { margin-top: .6rem; font-size: .9375rem; line-height: 1.55; color: var(--fg-muted); }
.sfa-calls .cv-cost { margin-top: auto; padding-top: 1rem; }
@media (max-width: 900px) { .sfa-calls { grid-template-columns: 1fr; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* the wider redesign: empty slots, filled in later */
.sfa-more { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: var(--wide); }
.sfa-more__item { margin: 0; }
.sfa-more__slot { margin: 0; aspect-ratio: 4 / 5; border-radius: 24px; background: #fff; border: 1px dashed var(--line);
  position: relative; overflow: hidden; }
.sfa-more__slot:has(img) { border-style: solid; background: var(--bg-elev) radial-gradient(circle at 50% 50%, rgba(17,17,17,.06) 0 1.3px, transparent 1.7px) 0 0 / 16px 16px; }
.sfa-more__slot img { position: absolute; inset: 24px; width: calc(100% - 48px); height: calc(100% - 48px); object-fit: contain; filter: drop-shadow(0 20px 26px rgba(40,30,20,.2)); }
.sfa-more__item b { display: block; margin-top: .85rem; font-size: 1rem; font-weight: 600; color: var(--fg); }
.sfa-more__item span { display: block; margin-top: .2rem; font-size: .9rem; line-height: 1.45; color: var(--fg-muted); }
@media (max-width: 760px) { .sfa-more { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
