:root {
  color-scheme: light;
  font-family: "Manrope", system-ui, sans-serif;
  color: #0b1f33;
  background: #f4f7fb;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.topbar {
  height: 72px;
  padding: 0 clamp(18px, 3vw, 44px);
  display: flex;
  align-items: center;
  gap: 44px;
  background: #fff;
  border-bottom: 1px solid #dbe3ef;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; }
.brand span {
  display: grid; place-items: center; width: 42px; height: 42px; color: #fff;
  background: #4968e8; border-radius: 13px;
}
nav { display: flex; gap: 8px; flex: 1; }
nav a { padding: 12px 16px; border-radius: 12px; color: #5d687c; font-weight: 700; }
nav a:hover, nav a[aria-current="page"] { color: #3858dc; background: #eef2ff; }
.quiet { border: 0; background: none; color: #3858dc; font-weight: 700; cursor: pointer; }
main { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: clamp(40px, 7vw, 88px) 0; }
.shell-card, .auth-card, .match-action-card {
  background: #fff; border: 1px solid #d7dfeb; border-radius: 24px;
  box-shadow: 0 18px 60px rgba(11, 31, 51, .07);
}
.shell-card { padding: clamp(28px, 5vw, 60px); }
.startup { min-height: 240px; display: grid; place-items: center; align-content: center; color: #67758d; }
.spinner { width: 30px; height: 30px; border: 3px solid #dde4f1; border-top-color: #4968e8; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-card, .match-action-card { max-width: 660px; margin: 4vh auto; padding: clamp(28px, 6vw, 56px); }
.eyebrow { color: #4663e7; font-size: 13px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 8px 0 12px; font-size: clamp(32px, 6vw, 54px); line-height: 1.03; letter-spacing: -.04em; }
p { line-height: 1.6; }
label { display: block; margin: 26px 0 8px; font-weight: 700; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
input { min-width: 0; height: 52px; border: 1px solid #cfd8e7; border-radius: 13px; padding: 0 15px; }
button { min-height: 48px; border-radius: 13px; padding: 0 22px; border: 1px solid transparent; font-weight: 800; cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
.primary { background: #4663e7; color: #fff; }
.secondary { background: #fff1ec; color: #ad301d; border-color: #ffd7cc; }
.form-status { min-height: 24px; color: #52627b; }
.form-status.error { color: #ad301d; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: #8894a7; font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: #e0e6ef; flex: 1; }
.google-button { width: 100%; color: #27384f; background: #fff; border-color: #cfd8e7; }
.back-link { display: inline-block; margin-bottom: 28px; color: #4663e7; font-weight: 700; }
.match-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.pill, .league-pill { border: 1px solid #ccd7e8; background: #f6f8fc; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700; }
.league-pill { color: #2645c2; background: #eff3ff; border-color: #c4cff7; }
.muted { color: #67758d; }
.capacity { display: flex; align-items: baseline; gap: 8px; margin: 28px 0; }
.capacity strong { font-size: 26px; }
.response-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.action-hint {
  margin-top: 30px; padding: 18px 20px; display: flex; justify-content: space-between; gap: 20px;
  border: 1px solid #b9c7fb; background: #eff3ff; color: #2645c2; border-radius: 15px;
}
.placeholder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.placeholder-grid article { padding: 20px; border: 1px solid #dde4ef; border-radius: 15px; }
.placeholder-grid span, .placeholder-grid strong { display: block; }
.placeholder-grid span { color: #718096; font-size: 13px; margin-bottom: 8px; }
.page-stack { display: grid; gap: 24px; }
.page-heading {
  display: flex; align-items: end; justify-content: space-between; gap: 28px;
  padding: 4px 2px 8px;
}
.page-heading h1 { font-size: clamp(34px, 5vw, 58px); }
.page-heading p { margin-bottom: 0; }
.page-controls { display: flex; align-items: end; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.compact-field { margin: 0; color: #5c6980; font-size: 12px; font-weight: 800; }
.compact-field select {
  display: block; min-width: 190px; height: 46px; margin-top: 6px; padding: 0 38px 0 13px;
  border: 1px solid #cfd8e7; border-radius: 12px; background: #fff; color: #0b1f33; font-weight: 700;
}
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.data-card {
  min-width: 0; padding: clamp(20px, 3vw, 30px); background: #fff;
  border: 1px solid #d7dfeb; border-radius: 20px; box-shadow: 0 12px 38px rgba(11, 31, 51, .045);
}
.data-card.wide { grid-column: 1 / -1; }
.data-card h2 { margin: 0 0 22px; font-size: 22px; letter-spacing: -.025em; }
.rank-list { display: grid; }
.rank-row {
  min-height: 52px; display: grid; grid-template-columns: 36px minmax(120px, 1fr) repeat(2, minmax(64px, auto));
  align-items: center; gap: 10px; border-top: 1px solid #e2e7f0;
}
.rank-row:first-child { border-top: 0; }
.rank {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border-radius: 10px; background: #eef2ff; color: #4160df; font-weight: 800;
}
.rank-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rank-name:hover, td a:hover, .form-row a:hover { color: #3858dc; }
.rank-metric { min-width: 64px; text-align: right; }
.rank-metric small, .rank-metric strong { display: block; }
.rank-metric small { color: #7a8699; font-size: 10px; font-weight: 800; }
.form-list { display: grid; }
.form-row {
  min-height: 54px; display: grid; grid-template-columns: 36px minmax(120px, 1fr) auto 50px;
  align-items: center; gap: 12px; border-top: 1px solid #e2e7f0;
}
.form-row:first-child { border-top: 0; }
.form-pills { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: wrap; }
.form-pill {
  display: inline-grid; place-items: center; width: 25px; height: 25px;
  border: 1px solid #d3dbe8; border-radius: 7px; background: #f1f4f8; color: #66758b; font-size: 12px; font-weight: 800;
}
.form-pill.W { border-color: #adddd1; background: #eaf8f3; color: #087a62; }
.form-pill.D { border-color: #ecd099; background: #fff7e8; color: #a66a00; }
.form-pill.L { border-color: #efb7af; background: #fff0ee; color: #ba3b2b; }
.table-card { padding: 10px 20px 20px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 13px 12px; border-bottom: 1px solid #e0e6ef; text-align: right; white-space: nowrap; }
th { color: #66738a; font-size: 11px; letter-spacing: .04em; }
th:nth-child(2), td:nth-child(2) { min-width: 170px; text-align: left; }
th:first-child, td:first-child { width: 42px; padding-left: 2px; text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-title h2 { margin-bottom: 14px; }
.count-pill {
  display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px;
  border-radius: 999px; background: #eef2ff; color: #2645c2; font-size: 13px; font-weight: 800;
}
.match-list { display: grid; gap: 10px; }
.match-row {
  position: relative; min-height: 68px; display: grid; grid-template-columns: minmax(170px, 1fr) auto minmax(260px, 1fr);
  align-items: center; gap: 18px; padding: 12px 16px; border: 1px solid #d9e1ec; border-radius: 15px;
}
.match-date { display: grid; justify-items: start; }
.match-date small { margin-top: 3px; color: #78869a; }
.match-score { display: flex; align-items: baseline; justify-content: center; gap: 10px; font-size: 19px; }
.match-score strong { font-size: 22px; }
.match-score small { color: #65758c; font-size: 11px; }
.match-tags { display: flex; justify-content: flex-end; align-items: center; gap: 7px; }
.status-VALIDATED { order: 9; color: #17325d; background: #edf2fb; border-color: #bdcce2; }
.status-REGISTRATION { order: 9; color: #087a54; background: #eaf9f2; border-color: #bde6d3; }
.status-CANCELLED { order: 9; color: #657083; background: #f0f2f5; border-color: #d7dce4; }
.muted-match { background: #f4f5f7; color: #7d8591; }
.profile-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.summary-stat {
  min-height: 148px; padding: 22px; background: #fff; border: 1px solid #d7dfeb; border-radius: 18px;
}
.summary-stat span, .summary-stat small { display: block; color: #6c7990; }
.summary-stat strong { display: block; margin: 12px 0 4px; font-size: clamp(24px, 3vw, 35px); letter-spacing: -.04em; }
.profile-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 18px; }
.current-form-card { min-height: 120px; display: grid; place-items: center; align-content: center; gap: 18px; }
.current-form-card > strong { font-size: 34px; }
.skills-list { display: grid; gap: 12px; }
.skill-row { display: grid; grid-template-columns: 140px 1fr 24px; align-items: center; gap: 12px; font-size: 13px; }
.skill-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e3e8f0; }
.skill-track i { display: block; height: 100%; border-radius: inherit; background: #4663e7; }
.empty-state { margin: 18px 0; padding: 28px; color: #718096; text-align: center; background: #f6f8fb; border-radius: 13px; }
.error-card { text-align: center; }
.error-card button { margin-top: 12px; }
@media (max-width: 760px) {
  .topbar { height: 62px; padding: 0 14px; gap: 14px; }
  .brand { font-size: 0; }
  .brand span { width: 38px; height: 38px; font-size: 18px; }
  nav { overflow-x: auto; }
  nav a { padding: 10px; white-space: nowrap; font-size: 14px; }
  main { width: min(100% - 20px, 660px); padding: 24px 0; }
  .input-row, .response-buttons, .placeholder-grid, .dashboard-grid, .profile-summary, .profile-grid { grid-template-columns: 1fr; }
  .action-hint { align-items: flex-start; flex-direction: column; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .page-controls { justify-content: stretch; }
  .compact-field { flex: 1 1 100%; }
  .compact-field select { width: 100%; }
  .data-card.wide { grid-column: auto; }
  .rank-row { grid-template-columns: 34px minmax(100px, 1fr) repeat(2, 58px); gap: 6px; }
  .form-row { grid-template-columns: 34px 1fr auto; }
  .form-row .form-pills { grid-column: 2 / -1; justify-content: flex-start; padding-bottom: 10px; }
  .match-row { grid-template-columns: 1fr auto; }
  .match-score { justify-content: flex-end; }
  .match-tags { grid-column: 1 / -1; justify-content: flex-start; }
  .skill-row { grid-template-columns: 112px 1fr 24px; }
}
