:root {
  --ink: #17231c;
  --muted: #647069;
  --paper: #f6f8f4;
  --card: #ffffff;
  --line: #dce3dc;
  --green: #176b45;
  --green-dark: #0c5032;
  --lime: #dff36b;
  --warning: #fff4cf;
  --error: #ffe6e3;
  --shadow: 0 14px 40px rgba(23, 35, 28, .08);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--green-dark); }
.site-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 0 5vw; background: #12251b; color: #fff; }
.site-header.signed-out { background: #8a231d; }
.site-header a, .link-button { color: #fff; text-decoration: none; }
.brand { font-weight: 850; letter-spacing: -.02em; }
nav { display: flex; gap: 1.15rem; align-items: center; flex-wrap: wrap; }
.current-user { padding-left: 1.15rem; border-left: 1px solid rgba(255, 255, 255, .4); white-space: nowrap; }
.inline-form { display: inline; margin: 0; }
.link-button { border: 0; padding: 0; background: transparent; font: inherit; cursor: pointer; }
.container { width: min(1100px, 90vw); margin: 3rem auto 5rem; min-height: calc(100vh - 190px); }
.site-footer { padding: 2rem 5vw; color: var(--muted); border-top: 1px solid var(--line); }
h1, h2, h3 { line-height: 1.14; letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 5vw, 4rem); margin: .2rem 0 1rem; }
h2 { font-size: 1.35rem; }
.eyebrow { color: var(--green); text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: .78rem; }
.lead { max-width: 720px; color: var(--muted); font-size: 1.18rem; }
.hero { padding: 3rem 0 4.5rem; }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.button, button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid var(--green); border-radius: 9px; padding: .72rem 1rem; background: var(--green); color: #fff; text-decoration: none; font: inherit; font-weight: 750; cursor: pointer; }
.button:hover, button:hover { background: var(--green-dark); }
.button.secondary, button.secondary { background: #fff; color: var(--green-dark); }
.button.google { width: 100%; background: #fff; color: var(--ink); border-color: var(--line); }
.feature-grid, .profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.profile-grid { grid-template-columns: 1fr 1fr; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; box-shadow: var(--shadow); }
.narrow { max-width: 540px; margin: 0 auto; }
.stacked-form { display: grid; gap: 1rem; }
label { font-weight: 700; }
input { width: 100%; margin-top: .35rem; padding: .78rem .85rem; border: 1px solid #bac7bd; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
input:focus { outline: 3px solid rgba(223, 243, 107, .65); border-color: var(--green); }
small, .muted { display: block; color: var(--muted); font-weight: 400; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.separator { display: flex; align-items: center; gap: .8rem; margin: 1.25rem 0; color: var(--muted); }
.separator::before, .separator::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.alert { border-radius: 9px; margin: 0 0 1.2rem; padding: .85rem 1rem; background: #e8f3ed; border: 1px solid #b7d5c4; }
.alert.warning { background: var(--warning); border-color: #ead27b; }
.alert.error { background: var(--error); border-color: #e9aba5; }
.page-heading, .tournament-card, .payment-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .9rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.status { display: inline-block; padding: .25rem .55rem; border-radius: 999px; background: #eef1ee; font-size: .75rem; font-weight: 850; }
.status.paid, .status.registered { background: #d9f2df; color: #155c35; }
.status.failed, .status.error { background: var(--error); color: #8a231d; }
.status.pending, .status.pending_payment, .status.created { background: var(--warning); color: #765b00; }
.empty-state { border: 1px dashed #abb9ae; border-radius: 12px; padding: 2rem; text-align: center; color: var(--muted); }
dl { display: grid; grid-template-columns: 110px 1fr; gap: .6rem; }
dt { color: var(--muted); } dd { margin: 0; font-weight: 700; }
.search-panel { margin-top: 1rem; }
.tournament-search { max-width: 680px; margin: 1.2rem 0; }
.search-form { display: grid; grid-template-columns: 1fr auto; gap: .6rem; }
.search-form input { margin: 0; }
.candidate-list { display: grid; gap: .6rem; }
.candidate { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding-top: .75rem; }
.candidate small { display: block; }
.tournament-list, .payment-list { display: grid; gap: 1rem; }
.tournament-card h2 { margin-bottom: .3rem; }
.tag { display: inline-block; padding: .22rem .5rem; background: var(--lime); border-radius: 4px; font-size: .75rem; font-weight: 800; }
.back-link { display: inline-block; margin-bottom: 1.5rem; }
.notice-card { border-left: 5px solid var(--lime); background: #fff; padding: 1rem 1.2rem; margin: 1rem 0; }
.registration-form { max-width: 760px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 1.2rem; font-weight: 800; margin-bottom: .8rem; }
.discipline-option { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.discipline-option input { width: auto; margin: 0 .4rem 0 0; }
.payment-card h2 { margin: .3rem 0 0; }
.payment-card ul { margin-bottom: 0; }
.danger { color: #8a231d !important; border-color: #c95c51 !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
@media (max-width: 760px) {
  .site-header, .page-heading, .tournament-card { align-items: flex-start; flex-direction: column; padding-top: 1rem; padding-bottom: 1rem; }
  .feature-grid, .profile-grid, .two-columns { grid-template-columns: 1fr; }
  .container { margin-top: 2rem; }
  .search-form { grid-template-columns: 1fr; }
}
