/* City SC Utah — College Recruiting portal
   Colors + type from the 2026/27 City SC Branding Guidelines.
   Brand colors: Blue #00299B, Orange #FF6900, Off-white #ECECEC, White.
   Navy's printed hex in the guide is a typo (#FFFFFF), so dark bands use
   brand blue until navy is confirmed (see DESIGN.md brief). --ink is a dark
   text color only.
   Logo-only colors (red/yellow/sunburst) stay inside the crest image.
   Fonts: League Spartan (display), Titillium Web (secondary headings, UI, body). */
:root {
  --blue: #00299b;
  --blue-dark: #001f78;
  --band: var(--blue);           /* dark bands: header, hero, footer */
  --ink: #13213c;                /* dark text */
  --navy: var(--ink);            /* legacy alias */
  --blue-ink: var(--ink);
  --orange: #ff6900;
  --orange-dark: #e05c00;
  --offwhite: #ececec;
  --stripes: repeating-linear-gradient(135deg, var(--orange) 0 6px, transparent 6px 12px);

  --bg: var(--offwhite);
  --surface: #ffffff;
  --text: var(--ink);
  --muted: #535c70;
  --line: #d6d9e0;
  --line-strong: #c3c8d2;
  --on-dark-muted: rgba(255, 255, 255, .78);
  --on-dark-line: rgba(255, 255, 255, .22);
  --ok: #138a4a;
  --warn: #9a4a00;
  --bad: #c0262e;

  --radius: 12px;        /* cards */
  --radius-ctl: 10px;    /* buttons, inputs */
  --radius-media: 14px;
  --shadow: 0 1px 2px rgba(19, 33, 60, .05);
  --shadow-hover: 0 10px 28px rgba(19, 33, 60, .12);
  --focus: 0 0 0 3px #fff, 0 0 0 6px var(--orange);

  --content: 1200px;
  --gutter: 32px;
  --section: 88px;

  --font: "Titillium Web", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "League Spartan", "Titillium Web", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 17px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  /* Footer stays at the bottom on short pages. */
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }
body > .footer { margin-top: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; }
/* Block display only where needed. A global img{display:block} breaks how
   html2canvas lines text up, which pushed all PDF text too low. */
.brand img, .player-card .photo img, .pf-photo-img, .pf-photo-empty img, .pf-crest,
.home-collage img, .home-photos img, #shot-preview img, .sheet svg { display: block; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.625rem, 3.2vw + 1.5rem, 4rem); font-weight: 800; text-transform: uppercase; }
h2 { font-size: clamp(1.5rem, .8vw + 1.15rem, 2rem); font-weight: 800; text-transform: uppercase; margin-bottom: 24px; }
h3 { font-size: 1.15rem; font-weight: 700; }

/* ---------- Header ---------- */
.site-header {
  background: var(--band);
  color: #fff;
  position: relative;
  border-bottom: 1px solid var(--on-dark-line);
}
.site-header .inner {
  max-width: var(--content); margin: 0 auto; padding: 12px var(--gutter);
  min-height: 76px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand img { width: 48px; height: 48px; }
.brand strong { display: block; font-family: var(--display); font-weight: 800; font-size: 1.05rem; line-height: 1.1; letter-spacing: .05em; text-transform: uppercase; }
.brand span { display: block; font-size: .78rem; font-weight: 600; color: var(--on-dark-muted); letter-spacing: .12em; text-transform: uppercase; }
.site-nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.site-nav a {
  color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
  min-height: 40px; padding: 0 14px; border-radius: 8px;
  display: inline-flex; align-items: center; position: relative;
}
.site-nav a:hover { background: rgba(255,255,255,.12); }
.site-nav a[aria-current="page"] { background: rgba(255,255,255,.14); }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; background: var(--orange); border-radius: 2px;
}
/* The one primary header action (visitors' Sign up) gets the filled treatment. */
.site-nav a.nav-cta { background: #fff; color: var(--blue); font-weight: 700; }
.site-nav a.nav-cta:hover { background: var(--offwhite); }

/* ---------- Layout ---------- */
main { max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter) var(--section); }
main > :first-child:not(.hero):not(.back-link) { margin-top: 48px; }

/* Page titles: simple and light on every page except the homepage. */
.back-link { margin: 32px 0 0; }
.back-link a { font-weight: 600; text-decoration: none; }
.hero { padding: 48px 0 8px; margin: 0 0 48px; }
.back-link + .hero { padding-top: 16px; }
.hero h1 { font-size: clamp(2rem, 2vw + 1.4rem, 2.9rem); margin-bottom: 12px; }
.hero p { color: var(--muted); max-width: 680px; margin: 0; font-size: 1.05rem; }

/* Homepage banner: the opening dark band. The box-shadow + clip-path trick
   paints the band full-width while content stays aligned to the column. */
.home-hero {
  position: relative; background: var(--band); color: #fff;
  box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax);
  padding: 72px 0 80px; margin: 0 0 var(--section);
}
.home-hero h1 { color: #fff; font-size: clamp(2.625rem, 3.2vw + 1.5rem, 4rem); margin-bottom: 18px; max-width: 12ch; }
.home-hero p { color: var(--on-dark-muted); font-size: 1.15rem; line-height: 1.6; max-width: 540px; }
.home-hero .eyebrow {
  color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 999px;
  padding: 6px 14px 5px; margin-bottom: 22px; font-size: .78rem; line-height: 1.3;
}
.home-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.home-actions { margin-top: 32px; }
.btn.on-dark { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.75); }
.btn.on-dark:hover { background: rgba(255,255,255,.12); }
.home-collage { position: relative; aspect-ratio: 1 / 1; }
.home-collage img {
  position: absolute; object-fit: cover; border-radius: var(--radius-media);
  border: 1px solid var(--on-dark-line); box-shadow: 0 18px 40px rgba(0,0,0,.28);
}
.home-collage .photo-a { left: 0; top: 0; width: 62%; height: 88%; object-position: 50% 35%; }
.home-collage .photo-b { right: 0; bottom: 0; width: 50%; height: 66%; object-position: 50% 30%; border: 4px solid var(--band); }
/* Brand stripe texture at the edge of the banner, away from the text. */
.home-collage::before {
  content: ""; position: absolute; right: -24px; top: -24px; width: 45%; height: 45%;
  background: var(--stripes); opacity: .55; border-radius: var(--radius-media);
}
.home-steps { margin-bottom: var(--section); }
.step-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  background: var(--orange); color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 1.1rem; margin-bottom: 14px;
}
.step h3 { font-size: 1.3rem; text-transform: uppercase; margin-bottom: 6px; }
.step p { margin: 0; }
.home-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.home-photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-media); border: 1px solid var(--line); }

.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--orange); margin-bottom: 8px;
}

.card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow); padding: 24px;
}
.grid { display: grid; gap: 20px; }
.grid.teams { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.players { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden, [hidden] { display: none !important; }

.footer {
  background: var(--band); color: var(--on-dark-muted);
  border-top: 4px solid var(--orange);
  text-align: center; font-size: .9rem; font-weight: 600; letter-spacing: .04em;
  padding: 40px var(--gutter) 48px;
}

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2;
  min-height: 46px; padding: 0 22px;
  border: 0; border-radius: var(--radius-ctl); cursor: pointer;
  background: var(--blue); color: #fff; text-decoration: none;
  transition: background-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.btn:hover { background: var(--blue-dark); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
/* Orange actions carry dark text so they pass contrast. */
.btn.accent { background: var(--orange); color: var(--ink); }
.btn.accent:hover { background: var(--orange-dark); }
.btn.ghost { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); }
.btn.ghost:hover { background: rgba(0,41,155,.07); }
.btn.ghost:focus-visible { box-shadow: inset 0 0 0 1.5px var(--blue), var(--focus); }
.btn.danger { background: var(--bad); }
.btn.danger:hover { background: #a11f26; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .85rem; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-ctl); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:hover, select:hover, textarea:hover { border-color: #9aa1b0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,41,155,.18); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--blue); flex: none; }
input[type="file"] { min-height: 0; padding: 8px; }
textarea { min-height: 110px; resize: vertical; }
.field { margin-bottom: 16px; }
.form-grid { display: grid; gap: 0 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; text-transform: uppercase; margin-bottom: 12px; color: var(--ink); }
.notice { padding: 14px 16px; border-radius: var(--radius-ctl); font-size: .95rem; margin-bottom: 20px; border: 1px solid transparent; }
.notice.info { background: #e9eefc; color: var(--ink); border-color: #cdd7f6; }
.notice.ok { background: #e3f5ea; color: #0b5e31; border-color: #c4e8d2; }
.notice.warn { background: #fff4dc; color: #6b3d00; border-color: #f4dfae; }
.notice.bad { background: #fde6e7; color: #8a1a20; border-color: #f6c9cc; }
.auth-wrap { max-width: 460px; margin: 0 auto; }
main > .auth-wrap:first-child { margin-top: 64px; }

/* ---------- Team cards ---------- */
.team-card {
  display: block; text-decoration: none; color: inherit; position: relative; overflow: hidden;
  padding-top: 28px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.team-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
.team-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--orange); }
.team-card .tag { font-size: .78rem; font-weight: 700; color: var(--orange-dark); letter-spacing: .1em; text-transform: uppercase; }
.team-card h3 { margin: 6px 0 6px; font-size: 1.5rem; text-transform: uppercase; }

/* ---------- Player cards ---------- */
.player-card {
  text-decoration: none; color: inherit; padding: 0; overflow: hidden; display: block;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.player-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
.player-card .photo { aspect-ratio: 4/5; background: var(--blue); position: relative; overflow: hidden; }
.player-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.player-card .num {
  font-family: var(--display);
  position: absolute; top: 12px; left: 14px; font-weight: 800; font-size: 1.7rem; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.player-card .body { padding: 16px 20px 18px; }
.player-card .body strong { display: block; font-family: var(--display); font-weight: 800; font-size: 1.2rem; line-height: 1.15; text-transform: uppercase; margin-bottom: 4px; }
.player-card .body span { color: var(--muted); font-size: .9rem; font-weight: 600; }

.initials {
  font-family: var(--display);
  width: 100%; height: 100%; display: grid; place-items: center;
  font-weight: 800; font-size: 3rem; color: #fff; letter-spacing: .04em;
  background: linear-gradient(160deg, var(--blue), var(--blue-dark));
}

/* ---------- Coaches ---------- */
.coach-list { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: var(--section) !important; }
.coach { display: flex; flex-direction: column; gap: 4px; }
.coach strong { font-size: 1.1rem; }
.coach .role { font-size: .78rem; font-weight: 700; color: var(--orange-dark); text-transform: uppercase; letter-spacing: .08em; }
.coach a { font-weight: 600; text-decoration: none; }
.coach a:hover { text-decoration: underline; }

/* ---------- Player profile (also the PDF source) ----------
   Layout: header card (photo | identity | crest), two columns of sections,
   full-width About / Achievements / More about me, striped footer strip.
   Decorative shapes are inline SVG so html2canvas renders them in the PDF. */
.profile-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; max-width: 1000px; margin-left: auto; margin-right: auto; }
.profile-toolbar > a { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.profile-toolbar .btn svg { width: 20px; height: 20px; flex: none; }
.sheet {
  position: relative; background: #fff; color: var(--text);
  border-radius: var(--radius-media); border: 1px solid var(--line); box-shadow: var(--shadow-hover); overflow: hidden;
  width: 100%; max-width: 1000px; margin: 0 auto; font-size: 16px;
}

/* Header */
.pf-head {
  position: relative; display: grid; grid-template-columns: 250px minmax(0, 1fr) 128px;
  grid-template-areas: "photo id crest"; gap: 0 36px; align-items: center;
  padding: 50px 40px 40px; background: #f6f7fb; overflow: hidden;
}
.pf-head-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pf-head-stripes { position: absolute; right: 0; bottom: 0; width: 170px; height: 150px; }
.pf-head-stripes svg { width: 100%; height: 100%; display: block; }
.pf-head::after { /* orange rule along the bottom of the identity area */
  content: ""; position: absolute; left: 330px; right: 0; bottom: 0; height: 4px; background: var(--orange);
}
.pf-photo {
  grid-area: photo; position: relative; z-index: 1; width: 250px; height: 312px;
  border-radius: 14px; overflow: hidden; background: var(--blue);
  border: 5px solid #fff; box-shadow: 0 12px 30px rgba(0, 21, 80, .28), 0 6px 0 0 var(--orange);
}
.pf-photo-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.pf-photo-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--blue), var(--blue-dark)); }
.pf-photo-empty img { width: 66%; height: auto; }
.pf-id { grid-area: id; position: relative; z-index: 1; min-width: 0; }
.pf-eyebrow {
  display: inline-block; font-family: var(--display); font-weight: 700; font-size: .95rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink); padding-bottom: 10px; border-bottom: 3px solid var(--orange); margin-bottom: 14px;
}
.pf-sep { color: var(--orange); padding: 0 4px; }
.pf-name {
  font-family: var(--display); font-weight: 800; text-transform: uppercase; color: var(--ink);
  font-size: clamp(2.4rem, 4.2vw, 4.1rem); line-height: .95; letter-spacing: -.02em; margin: 0 0 18px;
  overflow-wrap: anywhere; hyphens: auto;
}
.pf-name span { display: block; }
.pf-name.is-long { font-size: clamp(2rem, 3.2vw, 3.1rem); }
.pf-name.is-xlong { font-size: clamp(1.7rem, 2.6vw, 2.5rem); }
.pf-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 16px; }
.pf-num {
  display: inline-block; background: var(--orange); color: #fff; font-family: var(--display); font-weight: 800;
  font-size: 2.3rem; line-height: 1; padding: 12px 22px 7px; border-radius: 10px; transform: skewX(-10deg);
  box-shadow: 0 6px 16px rgba(255, 105, 0, .3); letter-spacing: -.01em;
}
.pf-pill {
  display: inline-block; font-family: var(--display); font-weight: 700; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); background: #fff; border: 2px solid #b9c0cf; border-radius: 10px; padding: 9px 14px 6px;
}
.pf .commit-badge { margin: 0; font-size: .85rem; padding: 9px 14px 6px; }
.pf-class { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: .28em; text-transform: uppercase; color: var(--ink); }
.pf-crest { grid-area: crest; position: relative; z-index: 1; width: 128px; height: 128px; align-self: start; filter: drop-shadow(0 6px 12px rgba(0, 21, 80, .25)); }

/* Body */
.pf-body { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 28px; padding: 32px 40px 36px; }
.pf-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.pf-full { grid-column: 1 / -1; }
.pf-sec { background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(19, 33, 60, .08); overflow: hidden; border: 1px solid #e6e9f0; }
.pf-sec-title {
  display: flex; align-items: center; gap: 12px; margin: 0;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue)); color: #fff;
  font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase;
  padding: 11px 18px 8px; border-radius: 12px 12px 0 0;
}
.pf-icon { width: 24px; height: 24px; flex: none; margin-top: -3px; }
.pf-sec-body { padding: 12px 18px 16px; }
.pf-rows { margin: 0; }
.pf-row { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 12px; padding: 8px 12px; border-radius: 6px; }
.pf-row:nth-child(even) { background: #f1f3f8; }
.pf-row dt { color: var(--muted); font-weight: 400; }
.pf-row dd { margin: 0; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.pf-row dd a { font-weight: 700; }
.highlight-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 8px; border: 1.5px solid var(--blue);
  font-weight: 700; font-size: .92rem; text-decoration: none; color: var(--blue);
}
.highlight-link:hover { background: rgba(0,41,155,.07); }
.pf .highlight-link { margin: 12px 12px 0; }
.pf-contact { display: flex; flex-direction: column; gap: 2px; padding: 6px 12px; overflow-wrap: anywhere; }
.pf-contact + .pf-contact { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.pf-contact strong { color: var(--ink); font-size: 1.05rem; }
.pf-contact-role { color: var(--muted); font-size: .9rem; }
.pf-contact a { font-weight: 600; text-decoration: none; }
.pf-contact a:hover { text-decoration: underline; }
.pf-text { margin: 0; padding: 4px 12px; line-height: 1.6; }
.pf-empty { margin: 0; padding: 6px 12px; color: var(--muted); }

/* Footer strip */
.pf-foot { height: 18px; }
.pf-foot-art { width: 100%; height: 100%; display: block; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
/* ---------- Admin ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line-strong); margin-bottom: 24px; }
.tabs button {
  font: inherit; font-weight: 700; background: none; border: 0; cursor: pointer;
  min-height: 46px; padding: 0 16px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--blue); border-color: var(--orange); }
.table-wrap { overflow-x: auto; padding: 8px 12px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.badge.pending { background: #fff4dc; color: var(--warn); }
.badge.approved { background: #e3f5ea; color: var(--ok); }
.badge.rejected, .badge.changes { background: #fde6e7; color: var(--bad); }
.badge.draft, .badge.hidden { background: #eceff5; color: var(--muted); }
.badge.committed { background: var(--orange); color: var(--ink); }
.role-switch { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.role-switch select { width: auto; padding: 6px 10px; }
dialog { border: 0; border-radius: var(--radius-media); padding: 0; max-width: 760px; width: calc(100% - 32px); box-shadow: 0 24px 64px rgba(0,0,0,.3); color: var(--text); }
dialog::backdrop { background: rgba(19,33,60,.5); }
dialog .dlg-body { padding: 28px; max-height: 75vh; overflow: auto; }
dialog .dlg-foot { padding: 16px 28px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
input:disabled, select:disabled, textarea:disabled { background: #f1f2f5; color: var(--muted); cursor: not-allowed; }
.contact-row { border: 1px solid var(--line); border-radius: var(--radius-ctl); padding: 16px 16px 12px; margin-bottom: 12px; background: #fafbfc; }
.contact-row.removed { opacity: .45; }
.contact-row.removed input { text-decoration: line-through; }

/* Committed badge */
.commit-badge {
  display: inline-block; background: var(--orange); color: var(--ink);
  font-family: var(--display); font-weight: 800; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 12px 4px; border-radius: 999px; margin-bottom: 10px;
}
.commit-badge.card { position: absolute; left: 12px; bottom: 12px; margin: 0; font-size: .7rem; padding: 5px 10px 3px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }

/* ---------- Mock banner & toast ---------- */
.mock-banner { background: #fff1e6; color: #6b2f00; text-align: center; font-size: .85rem; font-weight: 600; padding: 7px 16px; }
.mock-banner a { color: inherit; font-weight: 700; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: var(--radius-ctl); font-weight: 600;
  box-shadow: var(--shadow-hover); max-width: calc(100% - 32px);
}
.toast.bad { background: var(--bad); }
.toast.ok { background: var(--ok); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  :root { --gutter: 28px; --section: 72px; }
  .grid.players { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.teams, .coach-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .home-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .home-collage { aspect-ratio: 4 / 3; max-width: 560px; }
  .home-collage .photo-a { width: 58%; height: 92%; }
  .home-collage .photo-b { width: 48%; height: 72%; }
}
@media (max-width: 768px) {
  :root { --gutter: 22px; --section: 56px; }
  .home-hero { padding: 48px 0 56px; }
  .home-hero p { font-size: 1.05rem; }
  .home-photos { grid-template-columns: 1fr; gap: 16px; }
  .grid.players { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-top: 36px; margin-bottom: 36px; }
  .site-header .inner { min-height: 0; padding-top: 14px; padding-bottom: 14px; }
}
@media (max-width: 640px) {
  .grid.teams, .coach-list { grid-template-columns: 1fr; }
  .grid { gap: 16px; }
  .player-card .body { padding: 12px 14px 14px; }
  .player-card .body strong { font-size: 1.02rem; }
  .card { padding: 20px; }
  .site-nav { margin-left: 0; width: 100%; }
  dialog .dlg-body { padding: 20px; }
  dialog .dlg-foot { padding: 14px 20px; }
}
@media screen and (max-width: 860px) {
  /* Stacked header: swap the side panel for a blue banner behind the photo row. */
  .sheet:not(.pdf-render) .pf-art-side { display: none; }
  .sheet:not(.pdf-render) .pf-head::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 170px;
    background: linear-gradient(90deg, var(--blue-dark), var(--blue));
  }
  .sheet:not(.pdf-render) .pf-head { grid-template-columns: 200px minmax(0, 1fr); grid-template-areas: "photo crest" "id id"; gap: 24px 24px; padding: 44px 28px 32px; }
  .sheet:not(.pdf-render) .pf-photo { width: 200px; height: 250px; }
  .sheet:not(.pdf-render) .pf-crest { justify-self: end; width: 104px; height: 104px; }
  .sheet:not(.pdf-render) .pf-head::after { left: 28px; }
  .sheet:not(.pdf-render) .pf-name { font-size: clamp(2.3rem, 8vw, 3.6rem); }
  .sheet:not(.pdf-render) .pf-body { padding: 28px 28px 32px; }
}
@media screen and (max-width: 640px) {
  .sheet:not(.pdf-render) .pf-head { grid-template-columns: 140px minmax(0, 1fr); padding: 40px 18px 26px; gap: 20px 16px; }
  .sheet:not(.pdf-render) .pf-photo { width: 140px; height: 175px; border-width: 4px; }
  .sheet:not(.pdf-render) .pf-crest { width: 80px; height: 80px; }
  .sheet:not(.pdf-render) .pf-head::after { left: 18px; }
  .sheet:not(.pdf-render) .pf-head-stripes { width: 110px; height: 96px; }
  .sheet:not(.pdf-render) .pf-head::before { height: 120px; }
  .sheet:not(.pdf-render) .pf-eyebrow { font-size: .8rem; letter-spacing: .14em; }
  .sheet:not(.pdf-render) .pf-name { font-size: clamp(2.1rem, 11vw, 3rem); }
  .sheet:not(.pdf-render) .pf-name.is-long { font-size: clamp(1.7rem, 7.6vw, 2.4rem); }
  .sheet:not(.pdf-render) .pf-name.is-xlong { font-size: clamp(1.4rem, 6.2vw, 2rem); }
  .sheet:not(.pdf-render) .pf-num { font-size: 1.8rem; padding: 10px 16px 6px; }
  .sheet:not(.pdf-render) .pf-class { font-size: 1.05rem; letter-spacing: .2em; }
  .sheet:not(.pdf-render) .pf-body { grid-template-columns: 1fr; padding: 22px 16px 26px; gap: 20px; }
  .sheet:not(.pdf-render) .pf-col { gap: 20px; }
  .sheet:not(.pdf-render) .pf-sec-title { font-size: 1.02rem; padding: 10px 14px 7px; }
  .sheet:not(.pdf-render) .pf-sec-body { padding: 10px 10px 14px; }
}
}

/* ---------- Print ---------- */
@media print {
  @page { size: letter; margin: 0; }
  body { background: #fff; }
  .site-header, .profile-toolbar, .footer, .no-print { display: none !important; }
  main { padding: 0; max-width: none; }
  main > :first-child { margin-top: 0 !important; }
  .sheet { box-shadow: none; border: 0; border-radius: 0; max-width: none; }
  /* Same compact desktop layout as the PDF. */
  .pf-head { grid-template-columns: 200px minmax(0, 1fr) 104px; gap: 0 28px; padding: 44px 32px 32px; }
  .pf-head::after { left: 264px; }
  .pf-photo { width: 200px; height: 250px; }
  .pf-crest { width: 104px; height: 104px; filter: none; }
  .pf-name { font-size: 3.3rem; }
  .pf-name.is-long { font-size: 2.6rem; }
  .pf-name.is-xlong { font-size: 2.1rem; }
  .pf-body { padding: 24px 32px 28px; gap: 18px 22px; }
  .pf-sec { break-inside: avoid; box-shadow: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet a::after { content: ""; }
}

/* PDF render clone: always the desktop layout at Letter width (816px),
   no card chrome, compact so a typical profile fits one Letter page. */
.sheet.pdf-render { max-width: none; width: 816px; border-radius: 0; border: 0; box-shadow: none; font-size: 14px; }
.sheet.pdf-render .pf-head { grid-template-columns: 170px minmax(0, 1fr) 92px; gap: 0 26px; padding: 40px 30px 26px; }
.sheet.pdf-render .pf-head::after { left: 226px; }
.sheet.pdf-render .pf-photo { width: 170px; height: 212px; }
.sheet.pdf-render .pf-crest { width: 92px; height: 92px; filter: none; }
.sheet.pdf-render .pf-eyebrow { margin-bottom: 10px; }
.sheet.pdf-render .pf-name { font-size: 2.9rem; margin-bottom: 14px; }
.sheet.pdf-render .pf-name.is-long { font-size: 2.4rem; }
.sheet.pdf-render .pf-name.is-xlong { font-size: 1.95rem; }
.sheet.pdf-render .pf-tags { margin-bottom: 12px; }
.sheet.pdf-render .pf-num { transform: none; font-size: 1.7rem; padding: 7px 16px 5px; }
.sheet.pdf-render .pf-pill, .sheet.pdf-render .commit-badge { padding: 7px 12px 5px; }
.sheet.pdf-render .pf-class { font-size: 1.05rem; }
.sheet.pdf-render .pf-body { padding: 20px 30px 22px; gap: 14px 20px; }
.sheet.pdf-render .pf-col { gap: 14px; }
.sheet.pdf-render .pf-sec { box-shadow: none; }
.sheet.pdf-render .pf-sec-title { font-size: 1rem; padding: 9px 14px 7px; }
.sheet.pdf-render .pf-icon { width: 20px; height: 20px; }
.sheet.pdf-render .pf-sec-body { padding: 8px 12px 10px; }
.sheet.pdf-render .pf-row { padding: 4px 10px; line-height: 1.35; }
.sheet.pdf-render .pf-contact { padding: 4px 10px; line-height: 1.35; }
.sheet.pdf-render .pf-text { padding: 2px 10px; line-height: 1.45; }
.sheet.pdf-render .highlight-link { padding: 6px 12px; margin-top: 8px; }

/* Registration form editor */
.fe-section { margin-bottom: 20px; }
.fe-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.fe-row.is-hidden .fe-main input[data-f="label"] { color: var(--muted); background: #f4f5f7; }
.fe-move { display: flex; flex-direction: column; gap: 4px; }
.fe-move .btn.sm { min-height: 28px; padding: 0 10px; }
.fe-main input { min-height: 40px; }
.fe-opts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.fe-check { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-weight: 600; }
.fe-add { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.fe-add summary { cursor: pointer; font-weight: 700; color: var(--blue); }
.fe-save-bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow-hover);
}
@media (max-width: 640px) {
  .fe-row { grid-template-columns: auto minmax(0, 1fr); }
  .fe-opts { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------- College Directory ---------- */
.beta-badge { display: inline-block; vertical-align: middle; font-family: var(--font); font-size: .9rem; font-weight: 700; letter-spacing: .04em; text-transform: none; background: #ffe6d3; color: #8a3a00; padding: 4px 12px; border-radius: 8px; margin-left: 8px; }
.dir-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.dir-tab { font: inherit; font-weight: 700; font-size: 1rem; min-height: 46px; padding: 0 18px; border-radius: var(--radius-ctl); border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.dir-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.dir-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: #eceff5; color: var(--ink); font-size: .85rem; }
.dir-tab[aria-selected="true"] .dir-count { background: rgba(255,255,255,.2); color: #fff; }
.dir-filters { margin-bottom: 20px; }
.dir-search { position: relative; display: block; margin-bottom: 18px; }
.dir-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.dir-search input { padding-left: 44px; min-height: 50px; font-size: 1.02rem; }
.dir-filter-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.dir-filter-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 12px; }
.dir-more summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); list-style: none; padding: 4px 0; }
.dir-more summary::-webkit-details-marker { display: none; }
.dir-filter-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.link-btn { font: inherit; font-weight: 600; background: none; border: 0; padding: 6px 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.dir-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.dir-school h3 { font-size: 1.3rem; margin: 0 0 4px; text-transform: none; letter-spacing: 0; }
.dir-school-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.dir-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dir-tag { font-size: .75rem; font-weight: 700; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; background: #e9eefc; color: var(--blue); }
.dir-save { font: inherit; font-weight: 700; font-size: .88rem; flex: none; min-height: 38px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink); cursor: pointer; }
.dir-save.is-saved { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.dir-tuition { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #f4f6fb; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.dir-tuition div { display: flex; flex-direction: column; }
.dir-tuition strong { font-size: 1.05rem; color: var(--ink); }
.dir-program { border-top: 1px solid var(--line); padding: 12px 0; }
.dir-program-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.dir-program-head h4 { margin: 0; font-family: var(--display); font-size: 1rem; text-transform: uppercase; color: var(--blue); }
.dir-coaches { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dir-coach { display: flex; flex-direction: column; overflow-wrap: anywhere; }
.dir-coach a { font-weight: 600; text-decoration: none; font-size: .95rem; }
.dir-coach a:hover { text-decoration: underline; }
.dir-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.dir-link { font-size: .88rem; font-weight: 700; text-decoration: none; }
.dir-link:hover { text-decoration: underline; }
.dir-more-wrap { display: flex; justify-content: center; margin-top: 24px; }
.dir-admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.dir-stat { background: #f4f6fb; border-radius: 10px; padding: 12px 14px; }
.dir-stat strong { display: block; font-family: var(--display); font-size: 1.6rem; color: var(--ink); }
.switch-row { display: flex; gap: 12px; align-items: flex-start; }
.progress { height: 10px; background: #e6e9f0; border-radius: 999px; overflow: hidden; margin: 12px 0; }
.progress > span { display: block; height: 100%; width: 0; background: var(--orange); transition: width .2s ease; }
@media (max-width: 900px) { .dir-results { grid-template-columns: 1fr; } .dir-admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .dir-filter-row, .dir-filter-row.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .dir-filter-row, .dir-filter-row.four { grid-template-columns: 1fr; } .dir-tuition { grid-template-columns: 1fr; } }
.dir-per { font-family: var(--font); font-weight: 600; font-size: .85rem; color: var(--muted); }
.dir-tuition-note { grid-column: 1 / -1; margin: 2px 0 0; font-size: .78rem; color: var(--muted); line-height: 1.4; }
