
/* ==========================================
   PACE — Main Stylesheet
   ========================================== */


/* ------------------------------------------
   01. Variables
   ------------------------------------------ */

:root {
  color-scheme: dark;

  --bg: #101114;
  --card: #1a1c20;
  --line: #34383b;
  --text: #f4f5f0;
  --muted: #a9aeae;
  --lime: #c6f66c;
  --red: #ff9a97;
}


/* ------------------------------------------
   02. Global Styles
   ------------------------------------------ */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

small,
.muted {
  color: var(--muted);
}


/* ------------------------------------------
   03. Layout
   ------------------------------------------ */

.shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 35px 20px 80px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;

  padding-bottom: 24px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.stack {
  display: grid;
  gap: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}


/* ------------------------------------------
   04. Typography
   ------------------------------------------ */

.brand {
  font-weight: 900;
  font-size: 42px;
  letter-spacing: -0.07em;
  line-height: 1;
}

.brand span {
  color: var(--lime);
}

h1 {
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: -0.05em;
  line-height: 1.1;
  margin: 0 0 12px;
}

h2 {
  font-size: 18px;
  margin: 0 0 15px;
}

.eyebrow {
  text-transform: uppercase;
  color: var(--lime);
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 800;
}


/* ------------------------------------------
   05. Cards & Containers
   ------------------------------------------ */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 24px;
  margin: 20px 0;
}

.narrow {
  max-width: 500px;
}

.team {
  border: 1px solid var(--line);
  background: #14161a;
  padding: 18px;
  border-radius: 5px;
}

.team strong {
  display: block;
  font-size: 19px;
}


/* ------------------------------------------
   06. Form Elements
   ------------------------------------------ */

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

/* Consistent input and dropdown appearance */

input,
select {
  display: block;
  width: 100%;
  height: 46px;
  min-height: 46px;
  margin-top: 7px;
  padding: 0 14px;

  background-color: #24262c;
  border: 1px solid #51545a;
  border-radius: 4px;
  color: var(--text);

  font: inherit;
  line-height: normal;
  box-sizing: border-box;
}

/* Custom dropdown arrow */

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding-right: 42px;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f4f5f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}

/* Keep native number input controls */

input[type="number"] {
  appearance: auto;
  -webkit-appearance: auto;
}

/* Focus states */

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}


/* ------------------------------------------
   07. Buttons
   ------------------------------------------ */

button,
.button {
  display: inline-block;
  padding: 12px 18px;
  min-height: 44px;

  background: var(--lime);
  color: #151812;
  border: 1px solid var(--lime);
  border-radius: 4px;

  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.ghost {
  background: transparent;
  color: var(--text);
  border-color: #565a5c;
}


/* ------------------------------------------
   08. Messages & Status
   ------------------------------------------ */

.error {
  color: var(--red);
}

.success {
  color: var(--lime);
}

.note {
  padding: 12px;
  border: 1px solid #69613e;
  background: #29271c;
  border-radius: 4px;
}

.pill {
  display: inline-block;
  font-size: 12px;
  border: 1px solid #47563a;
  color: var(--lime);
  padding: 3px 8px;
  border-radius: 4px;
}


/* ------------------------------------------
   09. Tables
   ------------------------------------------ */

table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 8px;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}


/* ------------------------------------------
   10. Responsive Styles
   ------------------------------------------ */

@media (max-width: 600px) {
  .shell {
    padding: 25px 15px 60px;
  }

  .card {
    padding: 17px;
  }
}

/* Clickable team cards */

.team-link {
  display: block;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.team-link:hover,
.team-link:focus-visible {
  border-color: var(--lime);
}

.team-link:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}


/* ------------------------------------------
   Team Roster Alignment
   ------------------------------------------ */

/* Keep athlete names left-aligned */
table th:first-child,
table td:first-child {
  text-align: left;
}

/* Center distance headers and PR times */
table th:not(:first-child),
table td:not(:first-child) {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

