:root {
  --navy: #0b2545;
  --navy-dark: #071a33;
  --lime: #c6ff2f;
  --lime-dark: #9fd400;
  --text: #14213d;
  --muted: #5b6b8c;
  --border: #d7deeb;
  --bg: #f5f7fb;
  --white: #ffffff;
  --error: #b3261e;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
}

a {
  color: var(--navy);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  padding: 1rem 1.25rem;
}

.site-header .brand {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.logout-form {
  margin: 0;
}

.content {
  max-width: 32rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.1rem;
  margin: 2rem 0 0.75rem;
}

p {
  color: var(--text);
}

.error {
  color: var(--error);
  font-weight: 600;
}

.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stacked-form label {
  font-weight: 600;
  margin-top: 0.75rem;
}

.stacked-form input[type="text"],
.stacked-form input[type="email"] {
  width: 100%;
  padding: 0.85rem 0.9rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--text);
}

.stacked-form input:focus {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

.field-group {
  border: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

fieldset.field-group {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem 1rem;
}

fieldset.field-group legend {
  font-weight: 700;
  padding: 0 0.35rem;
}

.checkbox-label,
.radio-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.1rem;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-label input,
.radio-label input {
  width: 1.35rem;
  height: 1.35rem;
  accent-color: var(--navy);
}

#surface_other {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.85rem 0.9rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

button,
.primary-button {
  display: inline-block;
  text-align: center;
  min-height: 3rem;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 0.6rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.primary-button {
  background: var(--lime);
  color: var(--navy-dark);
  margin-top: 1.5rem;
}

.primary-button:hover,
.primary-button:active {
  background: var(--lime-dark);
}

.block-button {
  display: block;
  width: 100%;
}

.link-button {
  background: none;
  border: none;
  color: var(--white);
  min-height: auto;
  padding: 0.4rem 0.1rem;
  font-weight: 600;
  text-decoration: underline;
}

.match-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.match-list-item a {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 1rem;
  text-decoration: none;
  color: var(--text);
}

.match-players {
  display: block;
  font-weight: 700;
}

.match-tournament {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.empty-state {
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 0.6rem;
  padding: 1.25rem;
  text-align: center;
}

.match-settings {
  margin-top: 1.5rem;
}

.match-settings dt {
  font-weight: 700;
  margin-top: 0.75rem;
}

.match-settings dd {
  margin: 0.1rem 0 0;
  color: var(--muted);
}

.placeholder-note {
  margin-top: 2rem;
  font-style: italic;
  color: var(--muted);
}
