/* Test competition page. Uses the site's --lgs-* tokens from conversion-refresh.css. */

.tc { background: var(--lgs-slate-50); }

.tc-hero { padding: clamp(3rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem); background: #ffffff; border-bottom: 1px solid var(--lgs-slate-200); }
.tc-hero .container { max-width: 760px; text-align: center; }
.tc-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; margin: 0 0 1rem; color: var(--lgs-navy-950); text-wrap: balance; }
.tc-hero p { margin: 0 auto; max-width: 34rem; color: var(--lgs-slate-600); font-size: 1.075rem; line-height: 1.6; }
.tc-privacy { margin-top: 1rem !important; font-size: 0.9rem !important; color: var(--lgs-slate-500) !important; }

.tc-app { padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(3rem, 6vw, 5rem); }
.tc-app .container { max-width: 1040px; }

/* Preview notice */
.tc-note { margin: 0 0 1.25rem; padding: 0.8rem 1rem; font-size: 0.9rem; line-height: 1.5; color: var(--lgs-slate-700); background: var(--lgs-blue-50); border: 1px solid #cfe0fb; border-left: 3px solid var(--lgs-blue-600); border-radius: 8px; }
.tc-note strong { color: var(--lgs-navy-950); }

/* Steps */
.tc-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; list-style: none; margin: 0 0 1.25rem; padding: 0; }
.tc-step {
  width: 100%; min-height: 48px; display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.85rem;
  font: inherit; font-weight: 600; font-size: 0.95rem; color: var(--lgs-slate-700);
  background: #ffffff; border: 1px solid var(--lgs-slate-200); border-radius: 8px; cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}
.tc-step:hover:not(:disabled) { border-color: var(--lgs-slate-300); }
.tc-step:active:not(:disabled) { transform: scale(0.98); }
.tc-step:disabled { opacity: 0.5; cursor: not-allowed; }
.tc-step.is-current { color: #ffffff; background: var(--lgs-navy-900); border-color: var(--lgs-navy-900); }
.tc-step-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font-size: 0.8rem; background: var(--lgs-slate-100); color: var(--lgs-slate-700); flex-shrink: 0; }
.tc-step.is-current .tc-step-num { background: rgba(255, 255, 255, 0.16); color: #ffffff; }

/* Cards and forms */
.tc-card { background: #ffffff; border: 1px solid var(--lgs-slate-200); border-radius: 12px; padding: clamp(1.25rem, 3vw, 2rem); box-shadow: 0 1px 2px rgba(11, 23, 39, 0.04); }
.tc-h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 0.75rem; color: var(--lgs-navy-950); }
.tc-h2:focus { outline: none; }
.tc-lede { margin: 0 0 1.25rem; color: var(--lgs-slate-600); max-width: 44rem; line-height: 1.6; }
.tc-form { max-width: 640px; margin: 0 auto; }
.tc-field { margin-bottom: 1rem; min-width: 0; }
.tc-field label, .tc-marks legend { display: block; margin-bottom: 0.35rem; font-size: 0.875rem; font-weight: 600; color: var(--lgs-slate-800); }
.tc-field input, .tc-field select {
  width: 100%; min-height: 44px; padding: 0.55rem 0.75rem; font: inherit; color: var(--lgs-slate-900);
  background: #ffffff; border: 1px solid var(--lgs-slate-300); border-radius: 8px;
}
.tc-field input:focus-visible, .tc-field select:focus-visible { outline: 2px solid var(--lgs-blue-600); outline-offset: 1px; border-color: var(--lgs-blue-600); }
.tc-field input[aria-invalid="true"] { border-color: var(--lgs-red-600); }
.tc-hint { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--lgs-slate-500); }
.tc-error { min-height: 1.25rem; margin: 0.25rem 0 0.5rem; font-size: 0.9rem; font-weight: 600; color: var(--lgs-red-600); }
.tc-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tc-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.tc-end { justify-content: flex-end; margin-top: 1.5rem; }
.tc-inline { display: flex; align-items: center; gap: 0.75rem; max-width: 22rem; }
.tc-inline label { margin: 0; white-space: nowrap; }
.tc-empty { padding: 1.25rem; margin: 0; color: var(--lgs-slate-600); background: var(--lgs-slate-50); border: 1px dashed var(--lgs-slate-300); border-radius: 8px; }

/* Tables */
.tc-table-wrap { overflow-x: auto; margin-bottom: 1.25rem; border: 1px solid var(--lgs-slate-200); border-radius: 8px; }
.tc-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tc-table th, .tc-table td { padding: 0.65rem 0.85rem; text-align: left; border-bottom: 1px solid var(--lgs-slate-100); white-space: nowrap; }
.tc-table thead th { font-size: 0.8rem; font-weight: 700; text-transform: none; color: var(--lgs-slate-600); background: var(--lgs-slate-50); }
.tc-table tbody tr:last-child td, .tc-table tbody tr:last-child th { border-bottom: 0; }
.tc-table tbody th { font-weight: 600; color: var(--lgs-slate-900); }
.tc-num { font-variant-numeric: tabular-nums; }
.tc-right { text-align: right !important; }
.tc-board .is-podium { background: var(--lgs-blue-50); }
.tc-link { padding: 0.35rem 0.5rem; min-height: 36px; font: inherit; font-weight: 600; color: var(--lgs-blue-600); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.tc-link:hover { text-decoration: underline; }

/* Scoring */
.tc-score { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.25rem; align-items: start; }
.tc-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.tc-tab { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 44px; padding: 0.4rem 0.8rem; font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--lgs-slate-700); background: #ffffff; border: 1px solid var(--lgs-slate-200); border-radius: 8px; cursor: pointer; transition: border-color 0.15s ease, transform 0.1s ease; }
.tc-tab:hover { border-color: var(--lgs-slate-300); }
.tc-tab:active { transform: scale(0.98); }
.tc-tab-code { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; color: var(--lgs-slate-500); }
.tc-tab.is-current { color: #ffffff; background: var(--lgs-navy-900); border-color: var(--lgs-navy-900); }
.tc-tab.is-current .tc-tab-code { color: #b6c3d6; }
.tc-tabs-wide .tc-tab { flex-direction: row; align-items: center; }
.tc-gym-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.4rem; }
.tc-gym { width: 100%; min-height: 48px; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; padding: 0.45rem 0.75rem; font: inherit; text-align: left; color: var(--lgs-slate-900); background: #ffffff; border: 1px solid var(--lgs-slate-200); border-radius: 8px; cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease; }
.tc-gym:hover { border-color: var(--lgs-slate-300); }
.tc-gym.is-current { border-color: var(--lgs-blue-600); background: var(--lgs-blue-50); box-shadow: inset 3px 0 0 var(--lgs-blue-600); }
.tc-gym-bib { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--lgs-slate-500); }
.tc-gym-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-gym .s { font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--lgs-slate-500); }
.tc-gym .s.is-done { color: var(--lgs-emerald-600); }
.tc-fill { width: 100%; }

.tc-entry-head { margin-bottom: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--lgs-slate-100); }
.tc-entry-app { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lgs-blue-600); }
.tc-entry-name { margin: 0.15rem 0 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; color: var(--lgs-navy-950); }
.tc-marks { margin: 0 0 0.5rem; padding: 0; border: 0; min-width: 0; }
.tc-mark-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr)); gap: 0.75rem; }
.tc-mark-grid .tc-field { margin-bottom: 0; }
.tc-field input.is-dropped { color: var(--lgs-slate-500); background: var(--lgs-slate-100); text-decoration: line-through; }
.tc-trim { min-height: 1.2rem; }
.tc-summary { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 0.75rem; margin: 1rem 0 0; padding: 0.9rem 1rem; background: var(--lgs-navy-950); border-radius: 10px; }
.tc-summary dt { font-size: 0.75rem; font-weight: 600; color: #94a3b8; }
.tc-summary dd { margin: 0.1rem 0 0; }
.tc-sum-val { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; color: #e2e8f0; }
.tc-total-val { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #ffffff; }

/* Hall screen preview */
.tc-hall { padding: clamp(1.25rem, 3vw, 2rem); color: #ffffff; background: var(--lgs-navy-950); border: 1px solid var(--lgs-navy-700); border-radius: 12px; }
.tc-hall-title { margin: 0; font-size: 0.95rem; font-weight: 600; color: #94a3b8; }
.tc-hall-sub { margin: 0.1rem 0 1rem; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.tc-hall-wait { margin: 2rem 0; font-size: 1.2rem; color: #94a3b8; }
.tc-hall-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.tc-hall-list li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.7rem 0.9rem; background: rgba(255, 255, 255, 0.06); border-radius: 8px; }
.tc-hall-rank { font-size: 1.3rem; font-weight: 800; color: #93c5fd; font-variant-numeric: tabular-nums; }
.tc-hall-name { font-size: 1.15rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-hall-score { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Parent phone preview */
.tc-phone-wrap { display: grid; gap: 1rem; justify-items: start; }
.tc-phone { width: min(100%, 320px); padding: 1.25rem; background: #ffffff; border: 8px solid var(--lgs-navy-900); border-radius: 28px; box-shadow: 0 24px 48px -28px rgba(11, 23, 39, 0.5); }
.tc-phone-comp { margin: 0; font-size: 0.75rem; font-weight: 600; color: var(--lgs-slate-500); }
.tc-phone-name { margin: 0.2rem 0 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; color: var(--lgs-navy-950); }
.tc-phone-club { margin: 0 0 0.75rem; font-size: 0.85rem; color: var(--lgs-slate-600); }
.tc-phone-list { list-style: none; margin: 0; padding: 0; }
.tc-phone-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-top: 1px solid var(--lgs-slate-100); font-size: 0.95rem; }
.tc-phone-total { margin: 0.75rem 0 0; padding: 0.7rem 0.8rem; font-weight: 700; font-size: 0.95rem; color: var(--lgs-navy-950); background: var(--lgs-blue-50); border-radius: 8px; }

/* Award sheet */
.tc-sheet { position: relative; padding: clamp(1.25rem, 3vw, 2rem); background: #ffffff; border: 1px solid var(--lgs-slate-300); border-radius: 8px; overflow: hidden; }
.tc-sheet h3 { margin: 0 0 0.25rem; font-size: 1.3rem; font-weight: 800; color: var(--lgs-navy-950); }
.tc-sheet-mark { position: absolute; top: 50%; left: 50%; margin: 0; font-size: clamp(3rem, 12vw, 6rem); font-weight: 800; letter-spacing: 0.12em; color: rgba(11, 23, 39, 0.06); transform: translate(-50%, -50%) rotate(-12deg); pointer-events: none; user-select: none; }
.tc-sheet-list { position: relative; list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.tc-sheet-list li { display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: baseline; padding: 0.7rem 0; border-bottom: 1px solid var(--lgs-slate-200); }
.tc-sheet-place { font-weight: 800; font-size: 1.1rem; color: var(--lgs-blue-600); }
.tc-sheet-name { font-weight: 600; }

/* Closing call to action */
.tc-cta { padding: clamp(2.5rem, 5vw, 4rem) 0; color: #ffffff; background: var(--lgs-navy-950); }
.tc-cta .container { max-width: 680px; text-align: center; }
.tc-cta h2 { margin: 0 0 0.75rem; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; color: #ffffff; text-wrap: balance; }
.tc-cta p { margin: 0 auto 1.5rem; max-width: 30rem; color: #b6c3d6; line-height: 1.6; }
.tc-cta .tc-actions { justify-content: center; }
.tc-cta .btn-secondary { color: #ffffff; background: transparent; border-color: rgba(255, 255, 255, 0.3); }
.tc-cta .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }

@media (max-width: 860px) {
  .tc-score { grid-template-columns: 1fr; }
  .tc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tc-row { grid-template-columns: 1fr; }
  .tc-inline { max-width: none; }
  .tc-table th, .tc-table td { padding: 0.55rem 0.6rem; font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tc-step, .tc-tab, .tc-gym { transition: none; }
}

@media print {
  body * { visibility: hidden !important; }
  #tcSheet, #tcSheet * { visibility: visible !important; }
  #tcSheet { position: absolute; inset: 0 auto auto 0; width: 100%; border: 0; }
  .no-print { display: none !important; }
}
