:root {
  --navy: #00468B;
  --navy-dark: #002a5c;
  --navy-deep: #001a3d;
  --royal: #0a5bb5;
  --red: #EE3E42;
  --red-dark: #c62828;
  --bg: #e8eef6;
  --card: #ffffff;
  --text: #1a1f2e;
  --muted: #5c6b7a;
  --border: #c5d0de;
  --ok: #1b7a4a;
  --warn: #b45309;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0, 40, 90, 0.12);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.14) 0%, transparent 55%),
    linear-gradient(180deg, #002a5c 0%, #00468B 28%, #3a7cc0 62%, #d6e4f5 100%);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.07;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff 40%, transparent 41%),
    radial-gradient(2px 2px at 30% 40%, #fff 40%, transparent 41%),
    radial-gradient(1.5px 1.5px at 50% 15%, #fff 40%, transparent 41%),
    radial-gradient(2px 2px at 70% 35%, #fff 40%, transparent 41%),
    radial-gradient(1.5px 1.5px at 85% 25%, #fff 40%, transparent 41%),
    radial-gradient(2px 2px at 20% 60%, #fff 40%, transparent 41%),
    radial-gradient(1.5px 1.5px at 60% 55%, #fff 40%, transparent 41%),
    radial-gradient(2px 2px at 90% 70%, #fff 40%, transparent 41%);
}
.app { min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 1; }
:where(button, input, textarea, select) { font: inherit; }
a { color: var(--navy); }

.splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  /* r20: same background as every page (r14 star edges + grain over the royal-blue -> periwinkle fade); also inlined in index.html for first paint */
  background-color: #0b0880;
  background-image: url('/img/bg/splash-star-full.png?v=B1.38'), url('/img/bg/splash-star-full.png?v=B1.38'), url('/img/bg/noise.png?v=r14'),
    linear-gradient(180deg, #0b0880 0%, #0d0a83 5%, #100d86 10%, #202493 30%, #4253a9 60%, #5062b0 70%, #697bbd 90%, #7083c1 95%, #7688c3 100%);
  background-repeat: no-repeat space, no-repeat space, repeat, no-repeat;
  background-size: var(--sp-star-w) var(--sp-star-h), var(--sp-star-w) var(--sp-star-h), 128px 128px, 100% 100%;
  background-position: left var(--sp-star-x) top 0, right var(--sp-star-x) top 0, 0 0, 0 0;
  /* r32: whole stars, same as every page (vars on body) */
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.splash.burst { opacity: 0; transform: scale(1.08); pointer-events: none; }
.splash-logo {
  position: relative; width: min(220px, 46vw); aspect-ratio: 1; z-index: 1;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,0.35));
}
.splash-logo .ring,
.splash-logo .center {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.splash-logo .ring {
  background-image: url('/img/ahl-logo-ring.png');
  animation: spin-ring 1.6s linear infinite;
}
.splash-logo .center { background-image: url('/img/ahl-logo-center.png'); }
.splash-logo.burst-logo { animation: logo-burst 0.55s ease forwards; }
.splash-caption {
  position: relative; z-index: 1; margin-top: 22px;
  color: #fff; font-weight: 700; letter-spacing: 0.12em;
  font-size: 13px; text-transform: uppercase; opacity: 0.92;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
@keyframes spin-ring { to { transform: rotate(360deg); } }
@keyframes logo-burst {
  0% { transform: scale(1); opacity: 1; }
  55% { transform: scale(1.35); opacity: 0.85; filter: drop-shadow(0 0 40px rgba(255,255,255,0.55)); }
  100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .splash-logo .ring { animation: none !important; }
  .splash-logo.burst-logo { animation: none !important; opacity: 0; }
  .splash.burst { transition: opacity 0.2s ease; }
}

.topbar {
  /* Solid navy only — never the banner image (zooms the logo behind Alerts). */
  background: #002a5c;
  color: #fff; padding: 0;
  position: sticky; top: 0; z-index: 40;
  border-bottom: 2px solid rgba(255,255,255,0.18);
  box-shadow: 0 6px 20px rgba(0,20,50,0.25);
  overflow: hidden;
}
.topbar-inner {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 8px;
  flex-wrap: nowrap; min-width: 0;
  overflow: hidden;
  background: transparent !important;
  background-image: none !important;
}
.topbar img.logo {
  height: 28px; width: 28px; object-fit: contain; flex: 0 0 auto;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}
.topbar .brand { font-weight: 700; font-size: 13px; letter-spacing: 0.02em; white-space: nowrap; flex: 0 0 auto; }
.topbar .spacer { flex: 1 1 auto; min-width: 2px; }
.topbar .user.hide-phone { display: none; }
.topbar .btn.ghost.small { padding: 6px 8px; font-size: 12px; flex: 0 0 auto; white-space: nowrap; }
@media (min-width: 520px) {
  .topbar .brand { max-width: none; font-size: 14px; }
  .topbar .user.hide-phone { display: block; font-size: 12px; opacity: 0.9; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.screen > h2, .screen-title { color: #fff !important; text-shadow: 0 1px 3px rgba(0,0,0,0.35); }
.screen > p { color: rgba(255,255,255,0.85) !important; }
.btn {
  border: none; border-radius: 10px; padding: 10px 14px; cursor: pointer;
  background: var(--navy); color: #fff; font-weight: 600;
}
.btn:active { transform: scale(0.98); }
.btn.secondary { background: #fff; color: var(--navy); border: 1px solid var(--border); }
.btn.danger { background: var(--red); }
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.small { padding: 7px 10px; font-size: 13px; }
.screen { max-width: 960px; margin: 0 auto; padding: 20px 16px 48px; width: 100%; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; border: 1px solid rgba(255,255,255,0.55);
}
.hidden { display: none !important; }
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(58,124,192,0.35) 0%, transparent 55%),
    linear-gradient(180deg, #001a3d 0%, #002a5c 40%, #00468B 75%, #3a7cc0 100%);
}
.login-card { width: min(420px, 100%); }
.login-card img { display: block; margin: 0 auto 12px; height: 72px; }
.login-card h1 { text-align: center; color: var(--navy); margin: 0 0 4px; font-size: 22px; }
.login-card .sub { text-align: center; color: var(--muted); margin-bottom: 18px; font-size: 14px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
input[type=text], input[type=password], input[type=email], textarea, select {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border); background: #fff;
}
.hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.error { color: var(--red-dark); font-size: 13px; margin-top: 10px; }
.home-hero {
  text-align: center; padding: 0 0 8px; margin: 14px 0 8px;
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow);
  background: #001a3d;
}
.home-hero .banner {
  display: block; width: 100%; height: auto; max-height: 180px; object-fit: cover; object-position: center;
}
.home-hero .hero-copy {
  padding: 14px 12px 18px;
  background: linear-gradient(180deg, rgba(0,42,92,0.95), rgba(0,70,139,0.98));
  color: #fff;
}
.home-hero h1 { margin: 0 0 4px; color: #fff; font-size: 26px; letter-spacing: 0.03em; }
.home-hero p { margin: 0; color: rgba(255,255,255,0.85); }
.folder {
  margin: 24px auto; max-width: 280px; text-align: center; cursor: pointer;
  padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: transform .15s ease;
}
.folder:hover { transform: translateY(-2px); }
.folder-icon {
  width: 88px; height: 68px; margin: 0 auto 10px; position: relative;
  background: linear-gradient(180deg, #f6d27a, #e8b84a); border-radius: 8px 8px 10px 10px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.5);
}
.folder-icon:before {
  content: ""; position: absolute; left: 10px; top: -12px; width: 36px; height: 16px;
  background: #f0c35a; border-radius: 6px 6px 0 0;
}
.folder strong { display: block; color: var(--navy); font-size: 16px; }
.forms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.form-tile {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 12px;
  text-align: center; cursor: pointer; min-height: 110px; display: flex; flex-direction: column;
  justify-content: center; gap: 6px; box-shadow: 0 4px 14px rgba(0,40,90,0.08);
}
.form-tile .badge {
  display: inline-block; background: var(--navy); color: #fff; border-radius: 999px;
  padding: 4px 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
}
.form-tile span { font-size: 13px; color: var(--muted); }
.status-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.status-item {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  display: flex; gap: 10px; align-items: center; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,40,90,0.06);
}
.status-item .meta { flex: 1; min-width: 0; }
.status-item .meta strong { display: block; font-size: 14px; }
.status-item .meta small { color: var(--muted); }
.pill {
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 4px 8px; white-space: nowrap;
  background: #e8eef6; color: var(--navy);
}
.pill.sent { background: #fff4e5; color: var(--warn); }
.pill.await { background: #fff1f0; color: var(--red-dark); }
.pill.done { background: #e7f7ee; color: var(--ok); }
.pill.sub { background: #e7f0ff; color: var(--navy); }
.contract-toolbar {
  position: sticky; top: 64px; z-index: 30; background: rgba(230,238,248,0.94);
  backdrop-filter: blur(8px); padding: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  border-radius: 10px;
}
.page-stage {
  container-type: inline-size;
  position: relative; margin: 12px auto; width: 100%; max-width: 820px;
  background: #fff; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.page-stage img.page-bg { width: 100%; height: auto; display: block; user-select: none; pointer-events: none; }
.field-overlay {
  position: absolute; border: 1.5px dashed rgba(0,70,139,0.55); background: rgba(0,120,255,0.08);
  border-radius: 3px; overflow: hidden;
}
.field-overlay.locked { border-color: transparent; background: transparent; pointer-events: none; }
.field-overlay.sig { background: rgba(238,62,66,0.08); border-color: rgba(238,62,66,0.55); cursor: pointer; }
.field-overlay.sig.signed { background: rgba(27,122,74,0.08); border-color: rgba(27,122,74,0.55); }
.field-overlay input, .field-overlay textarea {
  width: 100%; height: 100%; border: none; background: transparent; padding: 1px 3px;
  font-size: 11px; color: #0a1a33;
}
.field-overlay img.sig-preview { width: 100%; height: 100%; object-fit: contain; background: transparent; }
.amend-fab {
  position: fixed; right: 14px; bottom: 18px; z-index: 50;
  background: var(--red); color: #fff; border: none; border-radius: 999px;
  padding: 12px 16px; font-weight: 700; box-shadow: 0 10px 24px rgba(238,62,66,0.35);
  max-width: calc(100vw - 28px);
}
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10,20,40,0.55); z-index: 80;
  display: flex; align-items: flex-end; justify-content: center; padding: 12px;
}
.modal {
  background: #fff; width: min(560px, 100%); border-radius: 16px 16px 12px 12px;
  padding: 16px; max-height: 92vh; overflow: auto;
}
.modal h2 { margin: 0 0 8px; font-size: 18px; color: var(--navy); }
.modal .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sig-pad-wrap { border: 1px solid var(--border); border-radius: 12px; background: #fff; touch-action: none; }
.sig-pad-wrap canvas { width: 100%; height: 180px; display: block; border-radius: 12px; }
.tabs { display: flex; gap: 6px; margin: 10px 0; }
.tabs button { flex: 1; }
.tabs button.active { outline: 2px solid var(--navy); }
.photo-preview {
  max-width: 100%; max-height: 160px; display: block; margin: 8px auto;
  background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 50%/16px 16px;
}
.notif-dot {
  display: inline-block; min-width: 18px; height: 18px; border-radius: 999px; background: var(--red);
  color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; margin-left: 4px;
}
.section-title { color: #fff; text-shadow: 0 1px 3px rgba(0,30,70,0.45); margin: 28px 0 8px; }
@media (min-width: 720px) {
  .modal-backdrop { align-items: center; }
  .modal { border-radius: 16px; }
  .home-hero .banner { max-height: 220px; }
}

/* Field text scales with the page: 10pt on a 612pt-wide page */
.field-overlay { font-size: max(7px, 1.65cqw); }
.field-overlay input { font-size: inherit; padding: 0 2px; line-height: 1; }
/* SPC cover panel: blank is rotated 90deg, text reads bottom-to-top */
.field-overlay.rot { container-type: size; }
.field-overlay.rot input {
  position: absolute; left: 0; top: 100%;
  width: 100cqh; height: 100cqw;
  transform-origin: 0 0; transform: rotate(-90deg);
}
/* Auto-fit text (app.js fitField): same size/baseline as the executed PDF; never clipped, no ellipsis.
   The input is sized/positioned in px by JS, so it may extend a little above the dashed blank. */
.field-overlay.fit { overflow: visible; }
.field-overlay.fit input {
  position: absolute; left: 0; width: 100%; box-sizing: border-box; margin: 0;
  padding: 0; border: 0; text-overflow: clip; white-space: nowrap;
  font-family: Helvetica, Arial, "Liberation Sans", sans-serif; color: #0a1a33;
  pointer-events: none; /* the blank (overlay) takes the tap and focuses the input */
}
.field-overlay.fit:not(.locked) { cursor: text; z-index: 3; } /* a text blank wins taps over a neighbouring signature box's enlarged tap zone */
.field-overlay.fit input { color: transparent; caret-color: #0a1a33; -webkit-text-fill-color: transparent; z-index: 1; }
.field-overlay.fit input::selection { background: rgba(0,120,255,0.25); }
.field-overlay.fit .fit-text {
  position: absolute; left: 0; width: 100%; box-sizing: border-box; margin: 0; padding: 0;
  white-space: pre; overflow: visible; pointer-events: none;
  font-family: Helvetica, Arial, "Liberation Sans", sans-serif; color: #0a1a33;
}
.field-overlay.fit.rot .fit-text { top: 100%; transform-origin: 0 0; }
.field-overlay.fit .fit-text { top: 0; height: 0; padding: 0 !important; }
.field-overlay.fit .fit-line { position: absolute; left: 0; right: 0; white-space: pre; box-sizing: border-box; }
/* editing: readable edit box over the blank (same value; laid out like the PDF again on blur) */
.field-overlay.fit.editing { z-index: 20; }
.field-overlay.fit.editing .fit-text { visibility: hidden; }
.field-overlay.fit.editing input {
  color: #0a1a33 !important; -webkit-text-fill-color: #0a1a33 !important; pointer-events: auto;
  font-size: 16px !important; line-height: 26px !important; height: 28px !important; padding: 0 6px !important;
  top: auto !important; bottom: calc(100% + 3px); text-align: left !important; /* just above the blank: never covers the next blank on the line */
  min-width: max(100%, 5.5em); width: auto !important; max-width: 92vw;
  background: #fff; border: 1.5px solid var(--navy, #00468B) !important; border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 30, 70, 0.25); transform: none !important;
}
.field-overlay.fit.rot.editing input { top: 50% !important; bottom: auto; left: -40px; width: min(260px, 70vw) !important; }
.field-overlay.fit.rot input { top: 100%; left: 0; transform-origin: 0 0; }
.field-overlay.fit.has-value:not(.locked) { border-width: 1px; border-style: dotted; border-color: rgba(0,70,139,0.32); background: rgba(0,120,255,0.04); }
/* optional witness signature: softer prompt; when locked and unsigned it is simply blank */
.field-overlay.sig.optional:not(.signed):not(.waiting) { border-style: dotted; background: rgba(0,70,139,0.05); border-color: rgba(0,70,139,0.45); }
.field-overlay.sig.optional:not(.signed) .sig-hint { color: #3b5578; font-weight: 600; }
.field-overlay.sig.blank-optional { border: 0 !important; background: transparent !important; }

.topbar .user { font-size: 11px; opacity: 0.9; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
.topbar .user.hide-phone { display: none; }
@media (min-width: 520px) { .topbar .user.hide-phone { display: block; } }

/* ---- Signature boxes: clearer states + bigger tap targets on phones ---- */
.field-overlay.sig { overflow: visible; z-index: 2; display: flex; align-items: center; }
.field-overlay.sig::after { content: ""; position: absolute; left: -2px; right: -2px; top: -5px; bottom: -5px; }
.field-overlay.sig .sig-hint { font-size: max(8px, 1.5cqw); color: #a33; padding: 0 3px; white-space: nowrap; overflow: hidden; font-weight: 600; pointer-events: none; }
.field-overlay.sig.waiting { border: 1px dotted rgba(90,100,120,0.45); background: rgba(120,130,150,0.06); }
.field-overlay.sig.waiting .sig-hint { color: #6b7686; font-weight: 500; }
.field-overlay.sig.signed .sig-hint { display: none; }
.field-overlay.sig img.sig-preview { pointer-events: none; }
.screen { padding-bottom: 96px; }
.amend-fab { font-size: 13px; padding: 10px 14px; }
.pill.appr { background: #e3f5e9; color: #146c3c; border: 1px solid #9fd5b3; }
.approved-banner { background: #e9f8ef; border: 1px solid #9fd5b3; color: #0f5130; border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.approved-banner a:not(.btn) { color: #0f5130; font-weight: 700; }
.hint.light { color: rgba(255,255,255,0.85); }
.attest { background: #fff7e6; border: 1px solid #f3d29a; padding: 8px 10px; border-radius: 8px; color: #6b4a00; }
.alert-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.alert-item[data-contract]:not([data-contract=""]) { cursor: pointer; }
.alert-item.unread { font-weight: 600; }
.alert-open { color: var(--navy); font-weight: 700; white-space: nowrap; }

/* ---- Process Contracts ---- */
.proc-panel { margin: 10px 0; padding: 14px; }
.proc-head { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.proc-row { display: flex; gap: 12px; align-items: center; }
.stamp-thumb-wrap { flex: 0 0 116px; height: 78px; border-radius: 10px; border: 1px solid var(--border); background: #fbfaf7; display: grid; place-items: center; overflow: hidden; }
.stamp-thumb { max-width: 108px; max-height: 72px; mix-blend-mode: multiply; }
.proc-date { flex: 1; min-width: 0; }
.proc-date label { margin-top: 0; }
.proc-date input[type=date] { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--border); font-size: 16px; background: #fff; }
.proc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.proc-actions .btn { flex: 1 1 auto; min-height: 44px; }
.proc-actions .btn.small { flex: 0 0 auto; min-height: 36px; }
.proc-hint { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.4; }
.proc-hint.placing { color: #fff; background: var(--navy); padding: 8px 10px; border-radius: 10px; font-weight: 600; }
.linklike { background: none; border: none; color: inherit; text-decoration: underline; padding: 0 0 0 6px; cursor: pointer; font: inherit; }
.proc-page { touch-action: pan-x pan-y pinch-zoom; }
.proc-page.placing { outline: 3px dashed #EE3E42; outline-offset: 2px; cursor: crosshair; }
.proc-page img.page-bg { width: 100%; height: 100%; object-fit: contain; }
.page-num { position: absolute; right: 6px; bottom: 4px; font-size: 10px; color: #8a94a3; pointer-events: none; }
.marks-layer { position: absolute; inset: 0; }
.cr-mark { position: absolute; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.cr-mark img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; pointer-events: none; -webkit-user-drag: none; }
.cr-mark.sel { outline: 2px dashed rgba(0,70,139,0.85); outline-offset: 2px; }
.mark-tools { display: none; position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px); gap: 4px; z-index: 5; }
.cr-mark.sel .mark-tools { display: flex; }
.mark-tools button { width: 34px; height: 34px; border-radius: 999px; border: none; background: var(--navy); color: #fff; font-size: 18px; font-weight: 700; box-shadow: 0 4px 10px rgba(0,0,0,0.25); }
.mark-tools button[data-act=del] { background: var(--red); }
.proc-bottom { position: sticky; bottom: 0; z-index: 35; display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 14px -4px 0; background: rgba(255,255,255,0.97); border-radius: 14px 14px 0 0; box-shadow: 0 -6px 18px rgba(0,30,70,0.18); }
.proc-bottom .proc-count { flex: 1; font-size: 13px; color: var(--muted); }
.proc-bottom .btn { min-height: 46px; }
.home-link { display: flex; align-items: center; gap: 6px; background: none; border: none; color: #fff; padding: 2px 4px; margin: 0; cursor: pointer; border-radius: 8px; flex: 0 0 auto; font: inherit; }
.home-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.home-link:active { background: rgba(255,255,255,0.12); }

/* Home banner: always show the WHOLE logo with breathing room (no cover-cropping).
   The banner is shown with object-fit: contain; a blurred copy of the same starry
   banner fills any side space so the navy look continues edge to edge. */
.home-hero .banner-wrap {
  position: relative; overflow: hidden; background: #001a3d;
  padding: clamp(10px, 3vw, 18px) 0 clamp(12px, 3vw, 20px);
}
.home-hero .banner-wrap::before {
  content: ""; position: absolute; inset: -24px;
  background: url('/img/ahl-header-banner.jpg') center / cover no-repeat;
  filter: blur(16px) saturate(1.1) brightness(0.9);
}
.home-hero .banner-wrap .banner {
  position: relative; display: block; margin: 0 auto;
  width: 100%; height: auto; max-width: 820px;
  max-height: none !important; object-fit: contain !important;
}
@media (min-width: 720px) { .home-hero .banner-wrap .banner { max-height: 260px !important; width: auto; max-width: 100%; } }
/* reserve the page's shape before the page image loads so tap targets never collapse */
.page-stage { aspect-ratio: 612 / 792; }
.page-stage img.page-bg { height: 100%; object-fit: contain; }
.home-hero .banner-wrap::before { background-size: 100% 100%; inset: -30px; filter: blur(18px) saturate(1.1); }
.home-hero .banner-wrap .banner {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 8%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 8%, #000 90%, transparent 100%);
  mask-composite: intersect;
}
/* phones: make the logo bigger by trimming only the side stars; top/bottom of the logo never crop
   (height/width ratio is always taller than the banner's, so cover scales by height). */
@media (max-width: 719px) {
  .home-hero .banner-wrap .banner { width: 100%; height: clamp(130px, 40vw, 170px); object-fit: cover !important; object-position: center; }
}

/* ---- Contract list: one row per contract with a progress string ---- */
.contract-row { display: block; padding: 12px 14px; }
.contract-row .row-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; margin-bottom: 8px; }
.contract-row .row-head strong { font-size: 15px; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.contract-row .row-head small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.progress { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; }
.progress .step { font-size: 12px; line-height: 1.2; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.progress .step.done { color: #7b8794; background: #f1f3f6; }
.progress .step.done .tick { color: #1b8a4c; font-weight: 800; margin-right: 4px; }
.progress .step.current { color: #fff; background: var(--navy); font-weight: 700; box-shadow: 0 2px 6px rgba(0,70,139,0.3); }
.progress .step.todo { color: #9aa5b1; background: transparent; border: 1px dashed #d3dae3; }
.progress .sep { color: #b6c0cc; font-size: 12px; padding: 0 1px; }

/* ---- Addendum: official page(s) shown right after the form ---- */
.addendum-block { margin: 22px auto 0; max-width: 820px; }
.addendum-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(90deg, #001a3d, #00468B); color: #fff; border-radius: 12px;
  padding: 10px 12px; box-shadow: var(--shadow); border-bottom: 3px solid #EE3E42;
}
.addendum-kicker { font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 13px; }
.addendum-sum { font-size: 12px; opacity: 0.85; margin-top: 2px; overflow-wrap: anywhere; }
.addendum-head .btn { flex: 0 0 auto; }
.addendum-page { margin-top: 10px; }
.addendum-page img.page-bg { object-fit: contain; }
.addendum-chip { white-space: nowrap; }
.addendum-link { color: var(--navy); font-weight: 700; padding: 0; }
.addendum-modal .add-item { border: 1px solid var(--border); border-radius: 12px; padding: 8px; margin: 8px 0; background: #f6f9fd; }
.addendum-modal .add-item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.addendum-modal .add-num { font-weight: 800; color: var(--navy); min-width: 20px; }
.addendum-modal .add-kind { flex: 1; padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: 16px; }
.addendum-modal .add-del { width: 36px; height: 36px; border-radius: 999px; border: none; background: #fde8e8; color: var(--red-dark); font-weight: 800; }
.addendum-modal .add-text { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px; font-size: 16px; resize: vertical; background: #fff; }
.addendum-modal .add-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.addendum-modal .add-file-current { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; background: #fff7e6; border: 1px solid #f3d29a; border-radius: 8px; padding: 6px 8px; margin: 4px 0 6px; overflow-wrap: anywhere; }
.addendum-modal .add-remove-file { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 13px; white-space: nowrap; }
.toast {
  position: fixed; left: 50%; top: 76px; z-index: 120; transform: translate(-50%, -16px); opacity: 0; pointer-events: none;
  background: #0f5130; color: #fff; border-radius: 12px; padding: 10px 14px; font-size: 14px; line-height: 1.35;
  box-shadow: 0 10px 26px rgba(0,0,0,0.28); width: max-content; max-width: calc(100vw - 32px); transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- Submit to AHL CR: emailed-copy status ---- */
.mail-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.mail-badge.sent { background: #e3f5e9; color: #146c3c; border-color: #9fd5b3; }
.mail-badge.test { background: #fff4e0; color: #8a5300; border-color: #f0cf8f; }
.mail-badge.pending { background: #e7f0ff; color: var(--navy); border-color: #b9cff0; }
.mail-badge.failed { background: #fde8e8; color: var(--red-dark); border-color: #f2b1b1; }
.mail-badge.none { background: #f1f3f6; color: #6b7686; border-color: #d3dae3; }
.row-mail { display: flex; align-items: center; gap: 6px; margin-top: 8px; min-width: 0; }
.row-mail-text { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.step-mail { margin-left: 3px; font-weight: 800; }
.step-mail.sent { color: #1b8a4c; } .step-mail.test { color: #b56b00; } .step-mail.pending { color: var(--navy); } .step-mail.failed { color: var(--red-dark); }
.submitted-banner { background: #e7f0ff; border: 1px solid #b9cff0; color: #0b3a73; border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: 14px; font-weight: 600; }
.submitted-banner .email-line { margin-top: 6px; font-weight: 400; font-size: 13px; display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
.cr-mail { margin: 10px 0; padding: 10px 12px; }
.cr-mail-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cr-mail-text { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.35; }
.cr-mail-text .muted { color: #8a94a3; }
.submit-done { text-align: center; }
.submit-done .submit-check { width: 56px; height: 56px; margin: 4px auto 8px; border-radius: 999px; background: #1b8a4c; color: #fff; font-size: 30px; font-weight: 800; display: grid; place-items: center; }
.submit-done h2 { color: var(--navy); }
.submit-mail { text-align: left; border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.4; }
.submit-mail.sent { background: #e3f5e9; color: #0f5130; }
.submit-mail.test { background: #fff4e0; color: #6b4a00; }
.submit-mail.pending { background: #e7f0ff; color: #0b3a73; }
.submit-mail.failed { background: #fde8e8; color: #8a1f1f; }
.submit-done .actions { justify-content: center; }

/* ---- Addendum auto-polish preview ("Here's how it will read") ---- */
.polish-list { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 6px; }
.polish-item { border: 1px solid #d6dbe4; border-radius: 10px; padding: 10px 12px; background: #fff; }
.polish-item.same { background: #f7f9fc; }
.polish-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.polish-kind { font-weight: 700; font-size: 14px; color: #0b2a5b; }
.polish-ok { font-size: 12px; color: #1d7a3e; font-weight: 600; }
.polish-orig { font-size: 13px; color: #6b7280; background: #f3f4f6; border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; }
.polish-orig s { text-decoration: line-through; text-decoration-color: rgba(107,114,128,.55); }
.polish-item.kept .polish-orig s { text-decoration: none; }
.polish-orig span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: #9ca3af; margin-bottom: 2px; }
.polish-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: #1d7a3e; margin: 0 0 3px; display: block; }
.polish-item.kept .polish-label { color: #6b7280; }
.polish-text { overflow: hidden; width: 100%; box-sizing: border-box; font-size: 16px; line-height: 1.35; padding: 8px 10px; border: 1.5px solid #9fd3b1; border-radius: 8px; background: #f2fbf5; resize: vertical; font-family: inherit; }
.polish-item.kept .polish-text, .polish-item.same .polish-text { border-color: #d6dbe4; background: #fff; }
.seg { display: inline-flex; border: 1px solid #c7cdd8; border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.seg-btn { border: 0; background: #fff; color: #374151; font-size: 12px; font-weight: 600; padding: 6px 10px; min-height: 32px; cursor: pointer; }
.seg-btn.on { background: #0b2a5b; color: #fff; }

/* club-name carry-through: brief highlight when a follower blank updates from the source */
@keyframes clubSynced { 0% { background: rgba(255, 214, 10, .55); } 100% { background: transparent; } }
.field-overlay.fit.synced { animation: clubSynced 1.2s ease-out; }

/* ---- Final approved copy viewer (club) ---- */
.approved-viewer-head { display: flex; gap: 12px; align-items: center; background: #eaf7ef; border: 1px solid #a7dcb9; border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.approved-viewer-head h2 { margin: 0 0 2px; font-size: 18px; color: #0b2a5b; }
.approved-viewer-head p { margin: 0; font-size: 13px; color: #374151; line-height: 1.4; }
.approved-seal { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: #1d7a3e; color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700; }
.approved-progress { cursor: default; margin-bottom: 10px; }
.approved-pages { display: flex; flex-direction: column; gap: 12px; padding-bottom: 96px; }
.approved-page { margin: 0; background: #fff; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.18); overflow: hidden; }
.approved-page img { display: block; width: 100%; height: auto; background: #fff; }
.approved-page figcaption { font-size: 11px; color: #6b7280; text-align: center; padding: 4px 0 6px; border-top: 1px solid #eef0f4; }
.approved-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid #d6dbe4; box-shadow: 0 -2px 10px rgba(0,0,0,.08); max-width: 820px; margin: 0 auto; }
.approved-actions .btn { flex: 1; text-align: center; justify-content: center; min-height: 46px; display: inline-flex; align-items: center; text-decoration: none; }
.share-link { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; margin: 8px 0; user-select: all; }
.share-modal .actions .btn { text-decoration: none; }

/* ---- Delete draft (club home) ---- */
.contract-row { position: relative; }
.contract-row.has-trash { padding-right: 52px; }
.row-trash {
  position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; border: 1px solid #e3e8ef; background: #fff; color: #7b8794; cursor: pointer;
}
.row-trash:hover, .row-trash:focus-visible { color: var(--red); border-color: #f3c4c4; background: #fff5f5; outline: none; }
.row-trash:active { transform: scale(.95); }

/* ---- In-app confirmation modal ---- */
.confirm-backdrop { z-index: 120; align-items: center; }
.confirm-modal { max-width: 400px; border-radius: 16px; padding: 22px 20px 18px; text-align: left; }
.confirm-modal h2 { font-size: 19px; margin: 0 0 8px; }
.confirm-body { margin: 0; color: #374151; font-size: 15px; line-height: 1.5; }
.confirm-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 12px; }
.confirm-icon.danger { background: #fdecec; color: var(--red); }
.confirm-icon svg { width: 22px; height: 22px; }
.confirm-actions { display: flex; gap: 10px; margin-top: 20px; }
.confirm-actions .btn { flex: 1; min-height: 46px; font-size: 15px; }

/* ---- Home folder tiles (Sign Contracts / League Documents) ---- */
.folders { display: grid; grid-template-columns: repeat(2, minmax(0, 280px)); justify-content: center; gap: 12px; margin: 24px auto; }
.folders .folder { margin: 0; max-width: none; }
.folder .folder-sub { color: var(--muted); font-size: 13px; }

/* ---- League Documents ---- */
.folders.single { grid-template-columns: minmax(0, 280px); margin: 24px auto 0; }
.doc-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.doc-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px; cursor: pointer; box-shadow: 0 2px 10px rgba(0,40,90,0.06); }
.doc-card:active { transform: scale(.99); }
.doc-icon { width: 44px; height: 54px; flex-shrink: 0; border-radius: 6px; background: linear-gradient(180deg, #fff, #f1f4f8); border: 1px solid #d6dbe4; position: relative; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; }
.doc-icon:before { content: ""; position: absolute; top: -1px; right: -1px; width: 14px; height: 14px; background: linear-gradient(225deg, #f4f6f9 50%, #d6dbe4 50%); border-bottom-left-radius: 3px; }
.doc-icon span { font-size: 10px; font-weight: 800; color: #fff; background: var(--red); border-radius: 3px; padding: 1px 4px; letter-spacing: .03em; }
.doc-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-meta strong { color: var(--navy); font-size: 15px; line-height: 1.25; }
.doc-meta span { font-size: 13px; color: #4b5563; }
.doc-meta small { font-size: 12px; color: var(--muted); }
.doc-meta small.doc-updated { font-size: 11.5px; color: #5b6b80; letter-spacing: .01em; margin-top: -1px; }
.doc-chev { font-size: 26px; color: #9aa5b1; }

.doc-toolbar { position: sticky; top: 50px; z-index: 30; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.97); border: 1px solid var(--border); border-radius: 12px; padding: 6px; margin: -6px 0 10px; box-shadow: 0 2px 10px rgba(0,40,90,0.08); }
.doc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.doc-title strong { font-size: 14px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-title small { font-size: 11px; color: var(--muted); }
.icon-btn { width: 40px; height: 40px; flex-shrink: 0; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid #d6dbe4; background: #fff; color: var(--navy); font-size: 20px; cursor: pointer; text-decoration: none; padding: 0; }
.icon-btn:active { background: #eef3f9; }
.doc-search { position: sticky; top: 58px; z-index: 29; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px; margin-bottom: 10px; box-shadow: 0 8px 24px rgba(0,40,90,0.14); max-height: 64vh; display: flex; flex-direction: column; }
.doc-search.hidden { display: none; }
.doc-search-row { display: flex; gap: 8px; }
.doc-search-row input { flex: 1; min-width: 0; font-size: 16px; padding: 10px 12px; border: 1.5px solid #c7cdd8; border-radius: 10px; }
.doc-search-status { font-size: 13px; color: #374151; margin: 8px 2px 4px; }
.doc-results { list-style: none; margin: 0; padding: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.doc-result { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid #eef0f4; background: none; padding: 9px 4px; cursor: pointer; font: inherit; }
.doc-result:active { background: #f3f6fa; }
.doc-result-page { display: block; font-size: 11px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 2px; }
.doc-result-snip { display: block; font-size: 13px; color: #374151; line-height: 1.4; }
.doc-result-snip mark, .doc-search-status mark { background: #ffe066; color: inherit; border-radius: 2px; padding: 0 1px; font-weight: 700; }
.doc-pages { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 80px; }
.doc-page { position: relative; width: calc(100% * var(--zoom, 1)); background: #fff; margin: 0 0 10px; box-shadow: 0 1px 4px rgba(0,0,0,.18); border-radius: 4px; overflow: hidden; }
.doc-page img { display: block; width: 100%; height: 100%; }
.doc-hl-layer { position: absolute; inset: 0; pointer-events: none; }
.doc-hl { position: absolute; background: rgba(255, 214, 0, .38); border-radius: 2px; mix-blend-mode: multiply; }
.doc-hl.cur { background: rgba(255, 120, 0, .45); outline: 2px solid #ff7a00; outline-offset: 1px; }
.doc-page-no { position: absolute; right: 6px; bottom: 6px; font-size: 10px; color: #6b7280; background: rgba(255,255,255,.85); border-radius: 6px; padding: 1px 6px; }
.doc-pager { position: fixed; left: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 35; background: rgba(11,42,91,.85); color: #fff; font-size: 12px; border-radius: 999px; padding: 5px 10px; pointer-events: none; }
.doc-matchbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(52px + env(safe-area-inset-bottom)); z-index: 36; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #c7cdd8; border-radius: 14px; padding: 6px 8px; box-shadow: 0 6px 22px rgba(0,40,90,.25); white-space: nowrap; }
.doc-matchbar.hidden { display: none; }
.doc-matchbar #mPos { font-size: 13px; color: #111827; min-width: 92px; text-align: center; }

/* Addendum signature boxes (tap targets over the server-drawn PLAYER / CLUB lines) */
.addendum-page { container-type: inline-size; }
.field-overlay.sig.add-sig { border-style: dashed; border-width: 1.5px; border-radius: 4px; justify-content: center; }
.field-overlay.sig.add-sig .sig-hint { font-size: max(10px, 2.2cqw); }
.field-overlay.sig.add-sig.signed { background: transparent; border-color: rgba(27,122,74,0.35); border-style: solid; }
.field-overlay.sig.add-sig.waiting { cursor: default; }
.add-sig-modal .same-sig-preview { display: flex; align-items: center; gap: 12px; border: 1px solid #d8e0ea; border-radius: 10px; padding: 10px 12px; background: #fff; margin: 4px 0 14px; }
.add-sig-modal .same-sig-preview img { max-height: 56px; max-width: 60%; object-fit: contain; }
.add-sig-modal .same-sig-preview span { color: var(--navy); font-weight: 600; font-size: 15px; }
.add-sig-modal .actions { flex-direction: column; align-items: stretch; }
.add-sig-modal .actions .btn { width: 100%; }

/* =====================================================================================
   Responsive layout (round 6): phones, Fold cover / inner, tablets, desktop.
   Breakpoints: <=359 compact (Fold cover) · >=600 · >=680 home 2-col · >=740 document side panel ·
   >=760 contract list + detail · >=1000 top nav + desktop container · >=1100 table rows · >=1400 large pages.
   ===================================================================================== */
:root {
  --topbar-h: 58px; --maxw: 1200px; --gutter: 16px;
  --sat: env(safe-area-inset-top, 0px); --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px);
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.app { overflow-x: clip; min-height: 100dvh; }
/* iOS: inputs below 16px make Safari zoom the page on focus */
:where(input[type=text], input[type=password], input[type=email], input[type=search], input[type=date], input[type=tel], input[type=number], textarea, select) { font-size: 16px; }

/* ---- tap targets: >= 44px on touch screens; a little tighter for a mouse ---- */
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; line-height: 1.2; }
.btn.small { min-height: 44px; }
.icon-btn { width: 44px; height: 44px; }
.row-trash { width: 44px; height: 44px; right: 6px; bottom: 6px; }
.contract-row.has-trash { padding-right: 58px; }
.mark-tools button { width: 44px; height: 44px; }
.seg-btn { min-height: 44px; padding: 8px 12px; }
.addendum-modal .add-del { width: 44px; height: 44px; }
.alert-item { padding: 12px 0; min-height: 44px; }
.doc-result { min-height: 44px; padding: 10px 6px; }
.linklike { min-height: 32px; }
@media (hover: hover) and (pointer: fine) {
  .btn { min-height: 40px; }
  .btn.small { min-height: 36px; }
  .icon-btn { width: 40px; height: 40px; }
  .row-trash { width: 36px; height: 36px; right: 8px; bottom: 8px; }
  .mark-tools button { width: 32px; height: 32px; font-size: 16px; }
  .seg-btn { min-height: 32px; padding: 6px 10px; }
  .status-item, .doc-card, .form-tile, .folder, .side-item { transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
  .status-item:hover, .doc-card:hover, .form-tile:hover { border-color: #9db8dc; box-shadow: 0 6px 18px rgba(0,40,90,0.14); }
  .form-tile:hover { transform: translateY(-2px); }
  .doc-result:hover { background: #f3f6fa; }
}

/* ---- top bar: safe areas, centred content, desktop navigation ---- */
.topbar { padding-top: var(--sat); }
.topbar-inner { max-width: var(--maxw); margin: 0 auto; min-height: 56px; padding: 6px max(8px, var(--sar)) 6px max(8px, var(--sal)); }
.topbar .btn.ghost.small { min-height: 44px; padding: 8px 11px; font-size: 13px; }
.home-link { min-height: 44px; }
.toast { top: calc(var(--topbar-h) + 10px); }
.contract-toolbar { top: calc(var(--topbar-h) + 4px); }
@media (min-width: 1000px) {
  .topbar-inner { gap: 10px; padding-top: 8px; padding-bottom: 8px; }
  .topbar img.logo { height: 36px; width: 36px; }
  .topbar .brand { font-size: 16px; letter-spacing: 0.01em; }
  .topbar .user.hide-phone { max-width: 240px; font-size: 13px; }
}

/* ---- page container: centred, safe-area aware ---- */
.screen {
  padding: 16px max(var(--gutter), var(--sar)) calc(96px + var(--sab)) max(var(--gutter), var(--sal));
}
@media (min-width: 1000px) { .screen { max-width: var(--maxw); padding-top: 24px; } }
@media (min-width: 1400px) { :root { --maxw: 1360px; } }

/* ---- fixed / floating elements respect the home indicator and the notch ---- */
.amend-fab { bottom: calc(18px + var(--sab)); right: calc(14px + var(--sar)); max-width: calc(100vw - 28px - var(--sal) - var(--sar)); min-height: 44px; }
.modal-backdrop { padding: 12px max(12px, var(--sar)) calc(12px + var(--sab)) max(12px, var(--sal)); }
.modal { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px - var(--sab)); }
.login-wrap { min-height: 100dvh; padding: max(20px, var(--sat)) max(20px, var(--sar)) max(20px, var(--sab)) max(20px, var(--sal)); }
.sig-pad-wrap canvas { height: clamp(150px, 26vh, 220px); touch-action: none; }
@media (min-width: 720px) { .modal { width: min(620px, 100%); } }
/* phones in landscape (short screens): modal centred and scrollable, compact signature pad */
@media (max-height: 520px) and (orientation: landscape) {
  .modal-backdrop { align-items: center; }
  .modal { max-height: calc(100dvh - 16px); padding: 12px 16px; }
  .sig-pad-wrap canvas { height: max(120px, 36vh); }
  .modal .tabs { margin: 6px 0; }
}

/* ---- home banner: the logo is never cropped ----
   cover only while the box is narrower than the banner's 3:1 (sides trimmed); wider: contain */
@media (min-width: 510px) and (max-width: 719px) {
  .home-hero .banner-wrap .banner { width: auto; height: auto; max-width: 100%; max-height: 220px !important; object-fit: contain !important; }
}

/* ---- home: folders + contracts (2 columns from 680px, table rows from 1100px) ---- */
@media (min-width: 680px) {
  .home-grid { display: grid; grid-template-columns: minmax(200px, 250px) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 20px; }
  .home-folders { position: sticky; top: calc(var(--topbar-h) + 16px); }
  .home-grid .folders { grid-template-columns: 1fr; margin: 0; }
  .home-list .section-title { margin-top: 0; }
}
@media (min-width: 1000px) {
  .home-grid { grid-template-columns: 280px minmax(0, 1fr); gap: 28px; }
  .home-hero .banner-wrap .banner { max-height: 210px !important; }
  .home-hero .hero-copy { padding: 16px 20px 20px; }
}
.list-head { display: none; }
@media (min-width: 1100px) {
  .home-list .list-head, .cr-main .list-head { display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); gap: 18px; padding: 0 60px 6px 16px; color: rgba(255,255,255,.85); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
  .home-list .contract-row, .cr-main .contract-row { display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); gap: 4px 18px; align-items: center; padding: 12px 60px 12px 16px; }
  .home-list .contract-row .row-head, .cr-main .contract-row .row-head { flex-direction: column; align-items: flex-start; gap: 2px; margin: 0; }
  .cr-main .contract-row .row-mail { grid-column: 1 / -1; margin-top: 2px; }
  .home-list .row-trash { top: 50%; bottom: auto; margin-top: -18px; }
  .home-list .status-list, .cr-main .status-list { gap: 8px; }
}

/* ---- Sign Contracts: more columns on wider screens ---- */
@media (min-width: 600px) { .forms-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; } .form-tile { min-height: 130px; } }
@media (min-width: 1000px) { .forms-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; } .form-tile { min-height: 150px; padding: 20px 14px; } .form-tile span { font-size: 14px; } }

/* ---- contract: list + detail from 760px (the list can be hidden with ☰) ---- */
.contract-side, .side-toggle { display: none; }
@media (min-width: 760px) {
  .contract-layout.has-side { display: grid; grid-template-columns: clamp(220px, 26vw, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
  .contract-layout.has-side.side-collapsed { grid-template-columns: minmax(0, 1fr); }
  .contract-layout.has-side .contract-side {
    display: flex; flex-direction: column; position: sticky; top: calc(var(--topbar-h) + 12px);
    max-height: calc(100vh - var(--topbar-h) - 24px); max-height: calc(100dvh - var(--topbar-h) - 24px);
    background: rgba(255,255,255,.97); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
  }
  .contract-layout.side-collapsed .contract-side { display: none; }
  .has-side .side-toggle { display: inline-flex; font-size: 18px; padding: 6px 12px; }
  .side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #e3e8ef; color: var(--navy); }
  .side-list { overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
  .side-item { display: flex; flex-direction: column; gap: 5px; width: 100%; text-align: left; border: 1px solid transparent; background: none; border-radius: 10px; padding: 9px 10px; cursor: pointer; font: inherit; min-height: 44px; color: var(--text); }
  .side-item:hover { background: #f1f5fb; }
  .side-item.active { background: #e7f0ff; border-color: #b9cff0; }
  .side-item, .side-title, .side-sub { flex: 0 0 auto; }
  .side-title { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1.25em; }
  .side-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .side-sub small { color: var(--muted); font-size: 12px; }
  .contract-main { min-width: 0; }
}
@media (min-width: 1000px) {
  .contract-toolbar { padding: 8px 10px; border: 1px solid rgba(197,208,222,.7); box-shadow: 0 4px 14px rgba(0,40,90,.08); }
}
@media (min-width: 1400px) {
  .contract-main .page-stage, .contract-main .addendum-block { max-width: 940px; }
}

/* ---- Process Contracts: controls beside the pages on desktop; bottom bar on phones / tablets ---- */
.mark-resize { display: none; position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 4px; background: #fff; border: 2px solid var(--navy); cursor: nwse-resize; touch-action: none; z-index: 6; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.cr-mark.sel .mark-resize { display: block; }
@media (pointer: coarse) { .mark-resize { width: 30px; height: 30px; right: -15px; bottom: -15px; border-radius: 50%; } }
@media (hover: hover) and (pointer: fine) { .cr-mark:hover { outline: 1px dashed rgba(0,70,139,.5); outline-offset: 2px; } }
@media (max-width: 999px) {
  .proc-bottom { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 45; border-radius: 14px 14px 0 0;
    padding: 10px max(12px, var(--sar)) calc(10px + var(--sab)) max(12px, var(--sal)); }
  .proc-pages { padding-bottom: 24px; }
}
@media (min-width: 1000px) {
  .proc-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; align-items: start; }
  .proc-side { position: sticky; top: calc(var(--topbar-h) + 76px); max-height: calc(100vh - var(--topbar-h) - 90px); overflow-y: auto; overscroll-behavior: contain; }
  .proc-side .proc-panel, .proc-side .cr-mail, .proc-side .approved-banner { margin-top: 0; margin-bottom: 12px; }
  .proc-side .proc-row { flex-wrap: wrap; }
  .proc-side .proc-bottom { position: static; margin: 0; border-radius: 14px; box-shadow: var(--shadow); flex-wrap: wrap; }
  .proc-side .proc-bottom .btn { flex: 1 1 100%; }
  .proc-pages .page-stage { margin-top: 0; margin-bottom: 16px; max-width: 900px; }
  .proc-page.placing { cursor: crosshair; }
}

/* ---- Process list (CR home): lists + side column ---- */
.cr-aside .folders.single { margin: 24px auto 0; }
/* B1.60-al (Jeff t434u/t436u): small 🏒 Team Preview under folders; View contracts no longer on home */
.cr-aside-actions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.cr-aside-actions .home-team-preview {
  width: auto;
  align-self: center;
  padding: 8px 14px;
  font-size: 14px;
  min-height: 40px;
  white-space: nowrap;
}
.cr-aside-actions .btn.small { width: auto; }
@media (min-width: 1000px) {
  .cr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
  .cr-aside { position: sticky; top: calc(var(--topbar-h) + 16px); padding-top: 28px; }
  .cr-aside .folders.single { margin: 0; grid-template-columns: 1fr; }
  .cr-aside-actions { max-width: none; align-items: flex-start; margin-left: 0; margin-right: 0; }
  .cr-aside-actions .btn { width: auto; }
  .cr-aside-actions .home-team-preview { align-self: flex-start; }
}

/* ---- League Documents ---- */
@media (min-width: 680px) { .doc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1000px) { .doc-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } .doc-card { padding: 18px; } }
.doc-pager { left: calc(12px + var(--sal)); }
@media (min-width: 740px) {
  .doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(250px, 30vw, 380px); gap: 16px; align-items: start; }
  .doc-layout .doc-pages { grid-column: 1; grid-row: 1; padding-bottom: 96px; min-width: 0; }
  .doc-layout .doc-search, .doc-layout .doc-search.hidden { display: flex; grid-column: 2; grid-row: 1; margin: 0; box-shadow: var(--shadow); }
  .doc-layout .doc-results { flex: 1 1 auto; min-height: 0; }
  .doc-result.cur { background: #fff4d6; box-shadow: inset 3px 0 0 #ff7a00; }
  .doc-page { max-width: calc(900px * var(--zoom, 1)); margin-left: auto; margin-right: auto; }
}
@media (min-width: 1000px) { .doc-toolbar { padding: 8px 10px; } .doc-title strong { font-size: 15px; } }

/* ---- approved copy viewer: readable page width on big screens ---- */
@media (min-width: 760px) { .approved-pages, .approved-viewer-head, .approved-progress { max-width: 900px; margin-left: auto; margin-right: auto; } }

/* ---- Galaxy Z Fold cover screen and other very narrow phones (<= 359px) ---- */
@media (max-width: 359px) {
  :root { --gutter: 10px; }
  .topbar-inner { gap: 4px; }
  .topbar .brand { font-size: 12px; }
  .topbar .btn.ghost.small { padding: 8px 8px; font-size: 12.5px; }
  .home-hero h1 { font-size: 22px; }
  .folders { gap: 8px; }
  .folder { padding: 14px 8px; }
  .folder-icon { width: 70px; height: 54px; }
  .folder strong { font-size: 15px; }
  .folder .folder-sub { font-size: 12px; }
  .contract-toolbar { gap: 6px; }
  .contract-toolbar .btn.small { padding: 7px 9px; font-size: 12.5px; }
  .progress .step { font-size: 11.5px; padding: 4px 7px; }
  .doc-matchbar { gap: 4px; padding: 5px 6px; }
  .doc-matchbar #mPos { min-width: 64px; font-size: 12px; }
  .modal { padding: 14px 12px; }
  .proc-row { flex-wrap: wrap; }
}

/* compact contract toolbar on phones: one row (short labels; full names stay as aria-labels) */
.lbl-short { display: none; }
@media (max-width: 479px) {
  .contract-toolbar .lbl-long, .doc-toolbar .lbl-long { display: none; }
  .contract-toolbar .lbl-short { display: inline; }
  .contract-toolbar { gap: 6px; }
}
/* 44px minimum width for icon / short buttons on touch screens */
.btn { min-width: 44px; }
@media (hover: hover) and (pointer: fine) { .btn { min-width: 0; } }
/* short landscape phones: the app bar scrolls away, only the contract / document toolbar stays pinned */
@media (max-height: 520px) and (orientation: landscape) {
  .topbar { position: relative; }
  .topbar-inner { min-height: 50px; padding-top: 3px; padding-bottom: 3px; }
  .home-hero .banner-wrap .banner { max-height: 150px !important; }
  .proc-bottom { padding-top: 6px; padding-bottom: calc(6px + var(--sab)); }
}

/* ---- Top bar: logo + AHL CR | who is signed in (centre) | actions ---- */
.topbar .home-link { flex: 0 0 auto; }
.topbar .tb-id {
  flex: 1 1 0; min-width: 0; text-align: center; color: #fff; font-weight: 700; font-size: 13px; line-height: 1.2;
  letter-spacing: .01em; padding: 0 4px; text-shadow: 0 1px 2px rgba(0,0,0,.3);
  /* up to two lines on phones, then an ellipsis */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere;
}
.topbar .tb-id.squeezed { visibility: hidden; }
.topbar .tb-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; min-width: 0; }
.topbar .user.hide-phone { display: none; }
@media (min-width: 600px) {
  .topbar .tb-id { font-size: 15px; display: block; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal; }
}
@media (min-width: 760px) {
  /* equal side groups keep the name truly centred whenever there's room */
  .topbar-inner { display: grid; grid-template-columns: 1fr minmax(0, max-content) 1fr; column-gap: 12px; }
  .topbar .home-link { justify-self: start; }
  .topbar .tb-actions { justify-self: end; }
  .topbar .tb-id { font-size: 16px; padding: 0 8px; }
}
@media (min-width: 1100px) {
  .topbar .user.hide-phone { display: block; font-size: 13px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
  .topbar .tb-id { font-size: 17px; }
}

/* ---- Club home: three folders (My Contracts · Sign Contracts · League Documents) ---- */
.folders.three { grid-template-columns: 1fr; max-width: 560px; gap: 10px; margin: 18px auto 8px; }
.folders.three .folder:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 599px) {
  .folders.three .folder {
    display: grid; grid-template-columns: 62px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; row-gap: 2px;
    text-align: left; align-items: center; padding: 14px 16px; min-height: 84px;
  }
  .folders.three .folder-icon { grid-row: 1 / span 2; width: 60px; height: 46px; margin: 8px 0 0; }
  .folders.three .folder-icon:before { left: 7px; top: -9px; width: 24px; height: 12px; }
  .folders.three .folder strong { align-self: end; }
  .folders.three .folder .folder-sub { align-self: start; }
}
@media (min-width: 600px) {
  .folders.three { grid-template-columns: repeat(3, minmax(0, 260px)); max-width: none; gap: 16px; margin: 26px auto 12px; }
  .folders.three .folder { display: flex; flex-direction: column; align-items: center; gap: 4px; }
}
@media (min-width: 1000px) {
  .folders.three { grid-template-columns: repeat(3, minmax(0, 310px)); gap: 26px; margin-top: 34px; }
  .folders.three .folder { padding: 30px 20px 26px; }
  .folders.three .folder-icon { width: 104px; height: 80px; margin-bottom: 14px; }
  .folders.three .folder strong { font-size: 18px; }
  .folders.three .folder .folder-sub { font-size: 14px; }
}
@media (min-width: 1000px) and (min-height: 760px) { .home-hero .banner { max-height: 240px; } }

/* ---- My Contracts screen ---- */
.list-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 10px; }
.list-title-row .screen-title { margin: 0; }
.list-title-row .btn { flex: 0 0 auto; }

/* ---- Approved by CR (clubs): faded row, every step green ---- */
.contract-row.is-approved { background: rgba(240, 248, 243, .82); border-color: rgba(185, 226, 201, .9); box-shadow: none; }
.contract-row.is-approved .row-head strong { color: #5f7368; font-weight: 600; }
.contract-row.is-approved .row-head small { color: #8a9a91; }
.contract-row.is-approved:hover, .contract-row.is-approved:focus-visible { background: rgba(244, 251, 247, .96); }
.contract-row.is-approved .progress .step,
.contract-row.is-approved .progress .step.done { background: #e3f4ea; color: #16733f; border: 1px solid #b9e2c9; font-weight: 600; }
.contract-row.is-approved .progress .step .tick { color: #16733f; }
.contract-row.is-approved .progress .sep { color: #7cc59b; }
.side-item.is-approved:not(.active) { opacity: .62; }

.topbar .tb-id.tight { font-size: 11.5px; }
@media (min-width: 600px) { .topbar .tb-id.tight { font-size: 14px; } }

/* ---- Installable app: App & notifications ---- */
.app-links { display: flex; justify-content: center; align-items: center; gap: 4px 8px; flex-wrap: wrap; margin: 18px auto 4px; color: rgba(255,255,255,.7); font-size: 13.5px; }
.linkish { background: none; border: 0; color: rgba(255,255,255,.92); font: inherit; font-weight: 600; cursor: pointer; padding: 0 8px; min-height: 44px; border-radius: 10px; }
.linkish:hover { color: #fff; text-decoration: underline; }
.linkish:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.cr-aside .app-links { justify-content: flex-start; margin-top: 10px; }
.app-settings { max-width: 520px; }
.app-settings h2 { margin-bottom: 6px; }
.set-sec { border-top: 1px solid var(--border); padding: 14px 0 6px; }
.set-sec:first-of-type { border-top: 0; padding-top: 4px; }
.set-h { display: block; color: var(--navy); font-size: 15.5px; margin-bottom: 2px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.set-row label { margin: 0; cursor: pointer; font-weight: 400; }
.set-row label strong { display: block; color: var(--navy); font-size: 15.5px; }
.set-row label small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.35; }
.switch { position: relative; flex: 0 0 auto; width: 56px; height: 44px; display: inline-flex; align-items: center; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch .knob { width: 52px; height: 32px; border-radius: 999px; background: #c9d2de; position: relative; transition: background .2s ease; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s ease; }
.switch input:checked + .knob { background: #1b8a4c; }
.switch input:checked + .knob::after { transform: translateX(20px); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .knob { opacity: .5; }
.switch input:focus-visible + .knob { outline: 3px solid var(--navy); outline-offset: 2px; }
#pushState.warn { color: #8a5a00; background: #fff6e0; border: 1px solid #f1d9a0; border-radius: 10px; padding: 8px 10px; }
.set-sub { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 12px 0 6px; }
.set-device { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--border); }
.set-device strong { font-size: 14px; }
.set-device small { display: block; color: var(--muted); font-size: 12.5px; }
.this-dev { font-style: normal; font-size: 11.5px; font-weight: 700; color: #1b8a4c; background: #e3f4ea; border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.set-ok { color: #16733f; font-weight: 600; }
#installNowWrap .btn { width: 100%; margin: 8px 0 4px; min-height: 46px; }
.install-tabs { margin: 10px 0 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.install-tabs .seg-btn { flex: 1 1 0; white-space: nowrap; }
.install-steps { margin: 8px 0 4px; padding-left: 22px; font-size: 14px; line-height: 1.5; color: #273444; }
.install-steps li { margin: 4px 0; }
.ios-share { display: inline-block; width: 14px; height: 16px; vertical-align: -2px; margin: 0 2px; border: 2px solid var(--navy); border-top: 0; border-radius: 0 0 3px 3px; position: relative; }
.ios-share::before { content: ""; position: absolute; left: 50%; top: -8px; width: 2px; height: 12px; margin-left: -1px; background: var(--navy); }
.ios-share::after { content: ""; position: absolute; left: 50%; top: -9px; width: 6px; height: 6px; margin-left: -4px; border-left: 2px solid var(--navy); border-top: 2px solid var(--navy); transform: rotate(45deg); }
.install-tabs .seg-btn { border: 1px solid var(--border); border-radius: 10px; }

/* ---- My Contracts: Drafts / In Process / Approved sections ---- */
.home-list .contract-group-title { display: flex; align-items: baseline; gap: 6px; margin: 22px 0 8px; }
.home-list #contractList > .contract-group-title:first-child { margin-top: 6px; }
.contract-group-title .group-count { font-weight: 600; opacity: .85; }
.home-list .contract-group-title { text-shadow: 0 0 2px rgba(0, 28, 66, .9), 0 0 10px rgba(0, 28, 66, .75), 0 1px 3px rgba(0, 20, 50, .6); }
.home-list #contractList > .status-list + .contract-group-title { margin-top: 26px; }
.contract-side .side-list { padding-top: 0; }
.side-group { position: sticky; top: 0; z-index: 2; margin: 0 -6px; padding: 9px 16px 7px; background: #fff; color: var(--muted); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; box-shadow: 0 1px 0 #e6ebf2; flex: 0 0 auto; }
.side-group:not(:first-child) { margin-top: 6px; }
.side-group .side-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #eef2f7; color: var(--navy); text-align: center; letter-spacing: 0; }

/* ===================== r9: account menu, team preview, demo, Admin ===================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }
/* account button in the top bar: icon on phones, icon + login on wider screens */
.topbar .acct-btn { gap: 6px; max-width: 220px; }
.topbar .acct-btn .acct-ico { flex: 0 0 auto; }
.topbar .acct-btn .acct-name { display: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-weight: 500; opacity: .92; }
@media (min-width: 900px) { .topbar .acct-btn .acct-name { display: inline; } }
.acct-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #f7f9fc; }
.acct-card strong { display: block; color: var(--navy); word-break: break-all; }
.acct-card small { color: var(--muted); }
.acct-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.acct-avatar .acct-ico { width: 22px; height: 22px; }
.acct-menu { display: grid; gap: 8px; margin-top: 14px; }
.acct-menu .btn { justify-content: flex-start; }
/* password forms */
.pw-form label, .acct-form label, .start-grid label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-top: 10px; }
.pw-form input, .acct-form input, .start-grid input, .setpw-modal input[type=text], .picker-search, #ovPw {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-top: 4px; background: #fff; color: var(--text); min-height: 44px; }
.pw-field { position: relative; }
.pw-field .pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-38%); border: 0; background: transparent; color: var(--navy); font-weight: 600; font-size: 13px; padding: 8px; min-height: 36px; cursor: pointer; }
.pw-field input { padding-right: 64px; }
.pw-rules { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); }
.pw-rules li.ok { color: var(--ok); font-weight: 600; }
.pw-rules li span { display: inline-block; width: 14px; }
.pw-mode { border: 0; padding: 0; margin: 10px 0 4px; display: grid; gap: 6px; }
.pw-mode legend { font-size: 13px; font-weight: 600; margin-bottom: 4px; padding: 0; }
.radio, .chk { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.35; margin: 8px 0; cursor: pointer; }
.radio input, .chk input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--navy); }
.warn-line { margin: 8px 0 0; font-size: 13px; color: var(--warn); font-weight: 600; }
.pw-reveal { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pw-reveal code { font-size: 16px; padding: 8px 12px; border-radius: 10px; background: #f1f5fa; border: 1px dashed #9fb3cc; color: var(--navy); letter-spacing: .02em; word-break: break-all; }
.pw-reveal.big code { font-size: 22px; padding: 12px 16px; flex: 1 1 auto; text-align: center; }
.src-tag { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
/* team preview */
.preview-bar { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 6px max(12px, var(--sar, 0px)) 7px max(12px, var(--sal, 0px));
  background: #ffd76a; color: #3d2b00; font-size: 13px; line-height: 1.3; border-top: 1px solid rgba(0,0,0,.08); text-align: center; }
.preview-bar strong { color: #241a00; }
.preview-bar .pv-tag { white-space: nowrap; opacity: .85; }
.preview-bar .pv-exit { background: var(--navy-dark); min-height: 36px; padding: 6px 12px; font-size: 13px; }
@media (pointer: coarse) { .preview-bar .pv-exit { min-height: 44px; } }
.pv-disabled { opacity: .5 !important; cursor: not-allowed !important; filter: grayscale(.35); }
.field-overlay.pv-disabled { opacity: .75 !important; }
.team-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 10px; max-height: min(52vh, 460px); overflow: auto; padding: 2px; }
.team-opt { text-align: left; border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 10px 12px; cursor: pointer; min-height: 52px; font: inherit; color: var(--text); }
.team-opt:hover, .team-opt:focus-visible { border-color: var(--navy); background: #f3f7fc; }
.team-opt strong { color: var(--navy); font-size: 14px; }
.team-opt small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
/* demo */
.demo-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: #fde8e8; color: #b42318; border: 1px solid #f5b5b5; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; vertical-align: 1px; line-height: 1.5; }
.side-item .demo-badge { margin: 2px 0 0; align-self: flex-start; }
.demo-wm { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 1; color: rgba(214, 31, 38, .12); font: 900 clamp(48px, 22vw, 200px)/1 Helvetica, Arial, sans-serif; transform: rotate(-30deg); letter-spacing: .05em; }
.demo-area { margin-top: 26px; }
.demo-area summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.demo-area summary::-webkit-details-marker { display: none; }
.demo-area .demo-title { margin: 0; display: flex; align-items: center; gap: 6px; }
.demo-area .demo-title::before { content: '▸'; display: inline-block; transition: transform .15s; }
.demo-area[open] .demo-title::before { transform: rotate(90deg); }
.demo-area .demo-sub { color: rgba(255,255,255,.85); font-size: 12.5px; margin: 0 0 8px 18px; }
.demo-area .status-list { margin-top: 6px; }
.proc-panel.view-only { border-left: 4px solid var(--navy); }
/* Admin */
.admin-tabs { display: flex; gap: 6px; margin: 4px 0 12px; overflow-x: auto; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs button { flex: 0 0 auto; border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.12); color: #fff; font: inherit; font-weight: 600; font-size: 14px; padding: 9px 14px; border-radius: 999px; min-height: 44px; cursor: pointer; }
.admin-tabs button.active { background: #fff; color: var(--navy); border-color: #fff; }
.admin-panel { padding: 14px; }
.acct-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acct-toolbar .acct-q { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; min-height: 44px; }
.acct-toolbar select { flex: 0 1 190px; font: inherit; font-size: 15px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; min-height: 44px; background: #fff; color: var(--text); }
/* Manage Accounts: summary chips */
.acct-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; font-size: 12.5px; color: var(--muted); }
.acct-summary > span { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 10px; border: 1px solid #e3e9f1; border-radius: 999px; background: #f7f9fc; white-space: nowrap; }
.acct-summary b { color: var(--text); font-weight: 800; }
.acct-summary .s-notsetup b { color: #8a5a00; } .acct-summary .s-active b { color: var(--ok); } .acct-summary .s-locked b { color: var(--red-dark); }
.acct-bulk { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 10px 0 2px; padding: 10px 12px; border-radius: 10px; background: #fff8e6; border: 1px solid #f3d48a; font-size: 13.5px; color: #4a3500; }
.acct-bulk code, .help-card code, .start-preview code, .modal code { background: #eef2f7; padding: 1px 5px; border-radius: 5px; font-size: .95em; }
/* Manage Accounts: account list. Scoped under .acct-table so the account menu's .acct-row (flex) rules never apply here. */
.acct-table { margin-top: 12px; border: 1px solid #e3e9f1; border-radius: 12px; background: #fff; overflow: clip; }
.acct-table .acct-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "team status" "login role" "last go"; gap: 4px 12px; align-items: center; justify-content: stretch;
  padding: 12px 14px; margin: 0; border: 0; border-bottom: 1px solid #edf1f6; border-radius: 0; background: #fff; cursor: pointer; font-size: 13.5px; }
.acct-table .acct-row:hover, .acct-table .acct-row:focus-visible { background: #f5f8fd; outline: none; box-shadow: inset 3px 0 0 var(--navy); }
.acct-table .acct-row:last-child { border-bottom: 0; }
.acct-table .acct-row > span { min-width: 0; }
.acct-table .acct-row.head { display: none; }
.acct-table .c-team { grid-area: team; }
.acct-table .c-team strong { display: inline; color: var(--navy); font-size: 14.5px; font-weight: 700; margin-right: 6px; }
.acct-table .c-team small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.acct-table .c-login { grid-area: login; color: var(--text); overflow-wrap: anywhere; }
.acct-table .c-role { grid-area: role; justify-self: end; }
.acct-table .c-status { grid-area: status; justify-self: end; text-align: right; }
.acct-table .c-last { grid-area: last; color: var(--muted); font-size: 12.5px; }
.acct-table .c-go { grid-area: go; justify-self: end; }
.acct-table .c-none { color: var(--muted); }
.acct-table .lbl-m { color: var(--muted); }
.acct-manage { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--navy); font-weight: 700; font-size: 12.5px; line-height: 1.2; white-space: nowrap; }
.acct-table .acct-row:hover .acct-manage, .acct-table .acct-row:focus-visible .acct-manage { border-color: var(--navy); background: var(--navy); color: #fff; }
.acct-group { padding: 8px 14px; background: #eef3f9; border-bottom: 1px solid #e3e9f1; color: var(--navy); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.acct-group b { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #fff; color: var(--muted); font-size: 11px; letter-spacing: 0; }
.acct-team { padding: 5px 14px 3px; background: #f8fafc; border-bottom: 1px solid #eef2f7; color: var(--muted); font-size: 12px; font-weight: 700; }
.acct-team b { margin-left: 4px; color: #9aa6b5; font-weight: 600; font-size: 11px; }
.st-note { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.st-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.st-notsetup { background: #fff4d6; color: #7a4f00; border-color: #f0d38a; }
.st-never { background: #eef2f7; color: #3b4a5c; border-color: #d7dfe9; }
.st-active { background: #e3f5e9; color: #146c3c; border-color: #9fd5b3; }
.st-locked { background: #fde8e8; color: #b42318; border-color: #f5b5b5; }
.st-disabled { background: #e9ecef; color: #495057; border-color: #ced4da; text-decoration: line-through; }
.role-badge { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
.role-badge.r-admin, .role-badge.r-crdemo { color: var(--navy); font-weight: 800; } .role-badge.r-cr { color: var(--navy); }
.acct-empty { padding: 22px; text-align: center; color: var(--muted); }
@media (min-width: 900px) {
  .acct-table .acct-row { grid-template-columns: minmax(200px, 1.6fr) minmax(160px, 1.2fr) 140px 150px 160px 92px; grid-template-areas: none; gap: 0 16px; padding: 11px 16px; min-height: 52px; }
  .acct-table .acct-row > span { grid-area: auto; justify-self: start; text-align: left; }
  .acct-table .acct-row > .c-go { justify-self: end; text-align: right; }
  .acct-table .acct-row.head { display: grid; min-height: 0; padding-top: 9px; padding-bottom: 9px; cursor: default; background: #f5f8fc; border-bottom: 1px solid #e3e9f1; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); position: sticky; top: var(--topbar-h); z-index: 2; }
  .acct-table .acct-row.head:hover { background: #f5f8fc; box-shadow: none; }
  .acct-table .c-last { color: var(--text); font-size: 13px; }
  .acct-table .lbl-m { display: none; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .acct-table .acct-row { grid-template-columns: minmax(170px, 1.5fr) minmax(140px, 1.1fr) 120px 132px 136px 84px; gap: 0 12px; padding-left: 12px; padding-right: 12px; }
}
.acct-modal .acct-sub { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; word-break: break-all; }
.acct-modal h2 { margin-bottom: 4px; }
.acct-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 12px 0 4px; padding: 10px 12px; background: #f7f9fc; border-radius: 10px; }
.acct-facts dt { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.acct-facts dd { margin: 2px 0 0; font-size: 14px; }
.acct-sec { margin-top: 16px; }
.acct-sec h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.acct-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.acct-actions .btn { flex: 1 1 calc(50% - 8px); }
@media (min-width: 720px) { .acct-actions .btn { flex: 0 1 auto; } .acct-modal, .setpw-modal, .picker-modal { width: min(680px, 100%); } }
.btn.secondary.danger-text { color: var(--red-dark); border-color: #f0b4b4; }
.acct-form .actions { margin-top: 10px; }
.start-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; }
.start-preview { display: grid; gap: 4px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.perm { margin-top: 12px; padding: 10px 12px; background: #f7f9fc; border-radius: 10px; }
.audit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.audit-list li { padding: 9px 12px; border: 1px solid #e3e9f1; border-radius: 10px; }
.audit-list li strong { text-transform: capitalize; color: var(--navy); }
.audit-list li small { color: var(--muted); }
.audit-list .audit-detail { font-size: 12.5px; color: var(--text); margin-top: 3px; }
.audit-list.compact li { padding: 6px 10px; font-size: 13px; }
.help-grid { display: grid; gap: 12px; }
@media (min-width: 760px) { .help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.help-card { border: 1px solid #e3e9f1; border-radius: 12px; padding: 12px 14px; }
.help-card h3 { margin: 0 0 8px; color: var(--navy); font-size: 15px; }
.help-card ol, .help-card ul { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.help-card p { margin: 0; font-size: 14px; }
.help-card.tools { display: grid; gap: 8px; align-content: start; }
.help-card.tools .btn { justify-content: flex-start; }
.help-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0; font-size: 13.5px; }
.help-dl dd { margin: 0; }
.bulk-list { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); max-height: 140px; overflow: auto; }
.cr-aside .folders.single .folder + .folder { margin-top: 12px; }
@media (min-width: 1000px) { .cr-aside .folders.single { gap: 12px; } }

/* ===================== r10: team logos, alert emphasis, season archive ===================== */
/* account button: the team's logo in a white disc (CR staff keep the silhouette) */
.topbar .acct-btn.has-logo { padding-left: 4px; }
.acct-logo { width: 30px; height: 30px; border-radius: 50%; background: #fff; object-fit: contain; padding: 2px; flex: 0 0 auto; box-shadow: 0 0 0 1.5px rgba(255,255,255,.55), 0 1px 3px rgba(0,0,0,.25); }
.acct-avatar.has-logo { background: #fff; border: 1px solid var(--border); }
.acct-avatar .acct-logo { width: 38px; height: 38px; box-shadow: none; padding: 3px; }
.home-hero .hero-team { display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; font-weight: 600; font-size: 16px; }
.home-hero .hero-logo { width: 44px; height: 44px; border-radius: 50%; background: #fff; object-fit: contain; padding: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
@media (max-width: 420px) { .home-hero .hero-logo { width: 36px; height: 36px; } }

/* alerts: new / not yet handled = bold on a light blue tint with a navy left border */
.alert-item { font-weight: 400; border-left: 4px solid transparent; padding-left: 10px; padding-right: 8px; border-radius: 6px; }
.alert-item.unread { font-weight: 400; }
.alert-item.fresh { font-weight: 700; background: #e8f0fb; border-left-color: var(--navy-dark); }
.alert-item.fresh + .alert-item.fresh { margin-top: 2px; }
.alert-item.fresh small { font-weight: 600; }
.modal .alert-item:not(.fresh) { color: #2b3846; }

/* season archive */
.season-head { margin-top: 26px; }
.season-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 12px; }
.season-folder { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,40,90,.06); font: inherit; color: inherit; min-height: 56px; }
.season-folder:hover { border-color: var(--navy); }
.season-folder .folder-icon.sm { width: 40px; height: 30px; margin: 4px 0 0; flex: 0 0 auto; }
.season-folder .folder-icon.sm:before { left: 5px; top: -6px; width: 16px; height: 8px; border-radius: 4px 4px 0 0; }
.season-folder .sf-text { flex: 1 1 auto; min-width: 0; }
.season-folder strong { display: block; color: var(--navy); }
.season-folder small { color: var(--muted); }
.season-folder .sf-go { color: var(--navy); font-size: 22px; font-weight: 700; }
.cr-main .season-head { color: inherit; }
.season-q { width: 100%; max-width: 520px; margin: 4px 0 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 16px; }
.season-count { color: rgba(255,255,255,.85); font-size: 13px; margin: 6px 0; }

.season-list { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.season-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 11px 14px; border: 0; border-bottom: 1px solid #e6ebf2; background: #fff; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 48px; }
.season-row:last-child { border-bottom: 0; }
.season-row:hover { background: #f5f8fc; }
.season-row .sr-player { font-weight: 600; color: var(--navy-dark); min-width: 0; overflow-wrap: anywhere; }
.season-row .sr-club { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.season-row .sr-form { font-size: 12px; font-weight: 700; color: #fff; background: var(--navy); border-radius: 999px; padding: 3px 9px; letter-spacing: .03em; }
.season-row .sr-date { color: var(--muted); font-size: 13px; white-space: nowrap; min-width: 92px; text-align: right; }
@media (max-width: 480px) { .season-row { grid-template-columns: 1fr auto; } .season-row .sr-date { grid-column: 1 / -1; text-align: left; min-width: 0; margin-top: -6px; } }

/* ===================== r12: team logo watermark (light page background only) ===================== */
/* Fixed, horizontally centred, anchored to the lower part of the viewport, behind .app (z-index 1).
   JS (placeWatermark) clips it so it never shows above the top bar or the AHL banner card. */
.team-watermark {
  position: fixed; left: 50%; bottom: calc(2vh + env(safe-area-inset-bottom, 0px)); z-index: 0; pointer-events: none; user-select: none;
  width: min(92vw, 78vh, 760px); height: min(92vw, 78vh, 760px); transform: translateX(-50%);
  background: center / contain no-repeat;
  opacity: 0.12;
  filter: brightness(0.55) saturate(0.8); /* a touch darker so it reads on the mid-blue as well as the light-blue part */
}
@media print { .team-watermark { display: none !important; } }

/* ===================== r13: league branding footer (static, below all content) ===================== */
/* DOM: <footer> then <div.app>; column-reverse lays the footer out below the app. Every other body child is position: fixed. */
body { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
body > .app { width: 100%; }
.app { min-height: calc(100vh - var(--footer-h, 0px)); min-height: calc(100dvh - var(--footer-h, 0px)); }
.login-wrap { min-height: calc(100vh - var(--footer-h, 0px)); min-height: calc(100dvh - var(--footer-h, 0px)); }
.site-footer {
  /* z-index 1, like .app, but earlier in the DOM: above the fixed page background / team watermark (z 0) and
     BELOW the app layer, so fixed bars, modals and the signature pad always paint over the footer */
  position: relative; z-index: 1; flex-shrink: 0;
  will-change: transform; /* own compositor layer: keeps the rasterisation of the app layer (AHL banner) exactly as before */
  background: #002a5c; color: #fff; border-top: 3px solid #c8102e;
  padding: 16px max(16px, var(--sar)) calc(14px + var(--sab) + var(--sf-clear, 0px)) max(16px, var(--sal));
  font-size: 13px; line-height: 1.35;
}
.site-footer:empty { display: none; }
.sf-inner { max-width: var(--maxw, 1200px); margin: 0 auto; display: grid; gap: 10px 20px; justify-items: center; text-align: center;
  grid-template-areas: "brand" "links" "socials" "copy"; }
.sf-brand { grid-area: brand; display: flex; align-items: center; gap: 10px; }
.sf-logo { width: 40px; height: 40px; object-fit: contain; display: block; }
.sf-name { font-weight: 700; letter-spacing: .02em; font-size: 14px; }
.sf-links { grid-area: links; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.sf-link { color: #fff; text-decoration: none; font-weight: 600; padding: 8px 8px; border-radius: 6px; min-height: 36px; display: inline-flex; align-items: center; }
.sf-link:hover { color: #cfe0ff; text-decoration: underline; text-underline-offset: 3px; }
.sf-dot { opacity: .5; }
.sf-socials { grid-area: socials; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.sf-social { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); transition: background .15s, color .15s, transform .15s, border-color .15s; }
.sf-social svg { width: 18px; height: 18px; display: block; }
.sf-social:hover { background: #fff; color: #002a5c; border-color: #fff; transform: translateY(-1px); }
.sf-social.is-placeholder { cursor: default; }
.sf-link:focus-visible, .sf-social:focus-visible { outline: 2px solid #9cc3ff; outline-offset: 2px; }
.sf-copy { grid-area: copy; font-size: 11.5px; color: rgba(255,255,255,.72); width: 100%; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.14); }
@media (min-width: 760px) {
  .site-footer { padding-top: 14px; }
  .sf-inner { grid-template-columns: auto 1fr auto; grid-template-areas: "brand links socials" "copy copy copy"; justify-items: stretch; text-align: left; align-items: center; }
  .sf-links { justify-content: center; }
  .sf-copy { text-align: center; padding-top: 8px; }
}
@media print { .site-footer { display: none !important; } }

/* ===================== r14: page background (royal blue -> periwinkle, fine grain, embossed edge stars) =====================
   Colours sampled from Jeff's reference image; assets generated by scripts/make-bg-r14.py (no text/logos from the ad).
   The AHL star banner card is opaque and untouched. */
html, body {
  background:
    linear-gradient(180deg, #0b0880 0%, #0d0a83 5%, #100d86 10%, #202493 30%, #4253a9 60%, #5062b0 70%, #697bbd 90%, #7083c1 95%, #7688c3 100%);
  background-color: #0b0880;
  background-attachment: fixed;
}
/* r32: every page uses the splash's whole stars (uniform look); the home AHL star banner card is untouched */
body { --sp-star-h: 250px; --sp-star-w: calc(var(--sp-star-h) * 500 / 630); --sp-star-x: max(16px, 4vw); }
@media (max-width: 699px) { body { --sp-star-h: 64px; --sp-star-x: 6px; } } /* B1.60-ai (Jeff t424u): smaller phone stars so they do not overlap the faded team/AHL logo */
body::before {
  opacity: 1;
  background-image: url('/img/bg/splash-star-full.png?v=B1.38'), url('/img/bg/splash-star-full.png?v=B1.38'), url('/img/bg/noise.png?v=r14');
  background-repeat: no-repeat space, no-repeat space, repeat;
  background-size: var(--sp-star-w) var(--sp-star-h), var(--sp-star-w) var(--sp-star-h), 128px 128px;
  background-position: left var(--sp-star-x) top 0, right var(--sp-star-x) top 0, 0 0;
}
.login-wrap { background: transparent; }
/* text that sits straight on the background stays readable on the lighter lower part */
.screen > h2, .screen-title, .section-title, .hint.light, .screen > p, .app-links, .linkish, .demo-area .demo-sub, .demo-area summary {
  text-shadow: 0 1px 2px rgba(5, 10, 70, 0.55), 0 0 10px rgba(5, 10, 70, 0.25);
}
.linkish { color: #fff; }
/* r14: team watermark retuned for the bluer background (lighter tint instead of darkening) */
.team-watermark { opacity: 0.12; filter: grayscale(0.2) brightness(1.35) saturate(0.7); }

/* ===================== r14: date blanks + calendar picker ===================== */
.field-overlay.fit.date-field:not(.locked) { cursor: pointer; }
.field-overlay.fit.date-field input { cursor: pointer; caret-color: transparent; }
.field-overlay.fit.date-field:not(.locked):not(.has-value)::after {
  content: ""; position: absolute; right: 1px; top: 50%; width: 12px; height: 12px; transform: translateY(-50%); pointer-events: none; opacity: .7;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300468b' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat;
}
html.dp-open, html.dp-open body { overflow: hidden; }
.dp-backdrop { position: fixed; inset: 0; z-index: 95; background: rgba(5, 12, 40, .5); display: flex; align-items: flex-end; justify-content: center;
  padding: 12px max(12px, var(--sar, 0px)) calc(12px + var(--sab, 0px)) max(12px, var(--sal, 0px)); }
.dp-sheet { width: min(380px, 100%); background: #fff; border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 20, 60, .35); padding: 14px 14px 12px; color: #0a1a33; }
@media (min-width: 600px), (min-height: 700px) and (min-width: 380px) { .dp-backdrop { align-items: center; } }
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dp-title { font-weight: 700; color: var(--navy, #00468b); font-size: 16px; }
.dp-x { width: 40px; height: 40px; border: 0; background: #f1f4f9; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; color: #334; }
.dp-nav { display: grid; grid-template-columns: 44px 1fr 92px 44px; gap: 6px; align-items: center; margin-bottom: 6px; }
.dp-arrow { height: 44px; border: 1px solid #d6dbe4; background: #fff; border-radius: 10px; font-size: 24px; line-height: 1; cursor: pointer; color: var(--navy, #00468b); }
.dp-arrow:disabled { opacity: .35; cursor: default; }
.dp-nav select { height: 44px; border: 1px solid #c7cdd8; border-radius: 10px; background: #fff; font-size: 16px; font-weight: 600; padding: 0 8px; color: #0a1a33; min-width: 0; }
.dp-dow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; font-weight: 700; color: #6b7686; padding: 4px 0; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.dp-day { height: 44px; border: 0; border-radius: 10px; background: #f4f6fa; font-size: 16px; font-weight: 600; color: #0a1a33; cursor: pointer; }
.dp-day:hover:not(:disabled) { background: #e3ecf8; }
.dp-day.today { box-shadow: inset 0 0 0 2px #8fb0dc; }
.dp-day.sel { background: var(--navy, #00468b); color: #fff; }
.dp-day:disabled { opacity: .3; cursor: default; }
.dp-day:focus-visible, .dp-arrow:focus-visible, .dp-x:focus-visible { outline: 3px solid #5b9bff; outline-offset: 1px; }
.dp-preview { font-size: 13px; color: #556; text-align: center; min-height: 18px; margin: 8px 0 4px; }
.dp-foot { display: flex; gap: 8px; }
.dp-foot .btn { flex: 1; min-height: 44px; }
.dp-clear { color: #b42318 !important; }
@media print { .dp-backdrop { display: none !important; } }

/* r15: contract integrity notes */
.lock-note{margin:6px 0 10px;padding:8px 12px;border-radius:8px;background:#fff8e1;border:1px solid #f0d58a;color:#5a4500;font-size:14px;line-height:1.35}
.lock-note.locked{background:#e8f0fb;border-color:#9db5dc;color:#0b2a5c}

/* r16: signing-link expiry, return to club, club contacts */
.lock-note.expired{background:#fdecea;border-color:#f0a8a0;color:#7a1c12}
.lock-note .linklike{font-weight:600}
.link-problem{max-width:520px;margin:48px auto;text-align:center;padding:28px 22px}
.link-problem .lp-icon{font-size:40px;line-height:1}
.link-problem h2{margin:10px 0 6px;color:var(--navy,#002a5c)}
.link-problem p{font-size:16px;line-height:1.45;margin:0}
.return-modal{max-width:560px}
.rt-facts{margin:10px 0;display:grid;gap:6px}
.rt-facts>div{display:grid;grid-template-columns:70px 1fr;gap:8px;align-items:start}
.rt-facts dt{font-weight:700;color:#4a5568}.rt-facts dd{margin:0;overflow-wrap:anywhere}
.rt-cc{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.rt-mail{color:#1d4ed8;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:13px}
.rt-body pre{white-space:pre-wrap;font:13px/1.45 inherit;background:#f6f8fb;border:1px solid #e2e8f0;border-radius:8px;padding:10px;margin:6px 0 0;max-height:220px;overflow:auto}
.rt-nocontacts{background:#fff8e1;border:1px solid #f0d58a;color:#5a4500;border-radius:8px;padding:8px 12px;margin:8px 0}
.rt-actions{flex-wrap:wrap}
.cc-to{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.cc-head{display:flex;justify-content:space-between;margin:12px 0 6px;font-weight:700}
.cc-list{display:grid;gap:8px}
.cc-row{display:grid;grid-template-columns:1fr 1.3fr 1fr auto;gap:6px;align-items:center}
.cc-row input{min-width:0}
.cc-del{border:0;background:#f1f5f9;border-radius:8px;width:36px;height:36px;cursor:pointer;font-size:15px}
@media (max-width:640px){.cc-to{grid-template-columns:1fr}.cc-row{grid-template-columns:1fr auto;padding:8px;border:1px solid #e2e8f0;border-radius:10px}.cc-row .cc-name{grid-column:1}.cc-row .cc-email,.cc-row .cc-title{grid-column:1}.cc-row .cc-del{grid-column:2;grid-row:1}}

/* ---------- r17: signer contact, Activity (club) / Audit trail (CR) ---------- */
.modal .opt { font-weight: 400; color: #6b7280; }
.modal .contact-hint { margin: 4px 0 10px; font-size: 12px; }
.activity-modal { max-width: 760px; }
.act-body { max-height: min(64vh, 640px); overflow: auto; -webkit-overflow-scrolling: touch; margin: 8px 0; }
.act-list { list-style: none; margin: 0; padding: 0; }
.act-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 2px; border-bottom: 1px solid #e5e9f0; }
.act-list li span { grid-column: 1; color: #4b5563; font-size: 13px; }
.act-list li time { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--navy); font-size: 12.5px; white-space: nowrap; }
.ae-head { background: #f3f6fa; border: 1px solid #dfe5ee; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.ae-head .ae-kv b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; word-break: break-all; }
.ae { border-top: 1px solid #e5e9f0; padding: 10px 2px; }
.ae-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ae-top time { color: var(--navy); font-weight: 600; font-size: 12.5px; }
.ae-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 14px; margin-top: 6px; }
.ae-kv { display: flex; flex-direction: column; min-width: 0; }
.ae-kv span { font-size: 11px; color: #6b7280; }
.ae-kv b { font-weight: 500; font-size: 13px; overflow-wrap: anywhere; }
.ae-detail { margin: 6px 0 0; font-size: 12.5px; color: #4b5563; }
@media (max-width: 600px) { .ae-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .act-list li { grid-template-columns: 1fr; } .act-list li time { grid-column: 1; grid-row: auto; } }

/* ---------- r20: CR Approved Contracts folder ---------- */
.folder-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; max-width: 760px; margin: 4px 0 6px; }
.folder-tools .season-q { flex: 1 1 280px; margin: 0; }
.folder-team { flex: 0 1 240px; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 16px; background: #fff; color: var(--navy-dark); }
.folder-season { margin: 14px 0 0; max-width: 760px; }
.folder-season-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.folder-season-title .folder-icon.sm { flex: none; }
/* B1.60-an (Jeff t447u): AHL logo only beside the season title AFTER clicking into a season (not All Seasons tiles / other folders) */
.folder-season-title .folder-season-ahl { width: 28px; height: 28px; object-fit: contain; flex: none; display: block; }
#folderRows .season-count { max-width: 760px; }
@media (max-width: 480px) { .folder-team { flex: 1 1 100%; } }
.folder-season-title .folder-icon.sm { width: 28px; height: 21px; margin: 4px 0 0; position: relative; }
.folder-season-title .folder-icon.sm:before { left: 3px; top: -5px; width: 12px; height: 6px; border-radius: 3px 3px 0 0; }

/* ---------- r20: sign-in title "AHL E-Contract Portal" (exact capitalization: never text-transformed) ---------- */
.login-card .login-title {
  text-transform: none; font-variant: normal; font-variant-caps: normal;
  text-align: center; color: var(--navy-dark, #002a5c);
  font-size: clamp(24px, 6.4vw, 30px); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em;
  margin: 2px 0 6px; text-wrap: balance;
}
.login-card .login-sub {
  text-transform: none; text-align: center; color: var(--muted);
  font-size: 13.5px; font-weight: 600; letter-spacing: 0.04em; margin: 0 0 20px;
}
.login-card .login-sub::before, .login-card .login-sub::after { content: ""; display: inline-block; width: 22px; height: 1px; background: #c9d3e2; vertical-align: middle; margin: 0 10px; }
/* r23 (preview): CR Reject… (secondary, set apart from Approve & finalize) */
.pill.ret { background: #fdecec; color: var(--red-dark); border: 1px solid #f2b1b1; }
.proc-reject { display: flex; align-items: center; gap: 10px; margin: 22px 0 8px; padding: 10px 12px; background: rgba(255,255,255,0.94); border: 1px solid #f2d0d0; border-radius: 12px; }
.proc-reject-text { flex: 1 1 auto; font-size: 12.5px; line-height: 1.35; color: #5b6475; }
.proc-reject .btn { flex: 0 0 auto; }
.btn.reject-outline { background: #fff; color: var(--red-dark); border: 1.5px solid var(--red); box-shadow: none; font-weight: 700; }
.btn.reject-outline:hover, .btn.reject-outline:focus-visible { background: #fff5f5; }
.btn.reject-solid { background: var(--red-dark); }
.reject-modal .rj-label { display: block; font-weight: 700; margin: 6px 0 4px; }
.reject-modal .rj-label .req { font-weight: 400; color: var(--muted); font-size: 12px; }
.reject-modal .rj-reason { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid #c9d2e3; border-radius: 10px; resize: vertical; min-height: 84px; }
.reject-modal .rj-reason.invalid { border-color: var(--red); box-shadow: 0 0 0 2px #fdecec; }
.returned-banner { background: #fff4f4; border: 1px solid #f2b1b1; color: #7a1c1c; border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.returned-banner .rb-when { font-size: 12.5px; color: #8a4b4b; }
.rb-reason { margin-top: 8px; background: #fff; border: 1px solid #f2d0d0; border-radius: 8px; padding: 6px 9px; white-space: pre-wrap; overflow-wrap: anywhere; color: #3b1414; }
.rb-reason > span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #a14a4a; margin-bottom: 2px; }
.returned-banner .rb-next { margin-top: 6px; font-size: 13px; }
.proc-side .returned-banner { margin-top: 0; margin-bottom: 12px; }

/* r23 (preview): club emails the executed contract to AHL CR (AHL By-Laws and AHL Procedures) */
.cre-modal{max-width:560px;text-align:left}
.cre-modal.submit-done h2,.cre-modal .cre-sub{text-align:center}
.cre-notice{background:#fff4e0;border:1px solid #f0c674;color:#5a3d00;border-radius:10px;padding:10px 12px;font-size:14.5px;line-height:1.45;margin:8px 0 12px}
/* r27 (Jeff): the requirement is the first thing on the pop-up: larger, centred, more prominent */
.cre-modal .cre-notice{margin:2px 0 16px;padding:16px 18px;font-size:17.5px;line-height:1.45;text-align:center;font-weight:500;background:#fff1cc;border:2px solid #e0a82e;color:#4a3200;box-shadow:0 2px 8px rgba(160,110,0,.15)}
.cre-modal .cre-notice strong{font-weight:800}
@media (min-width:720px){.cre-modal .cre-notice{font-size:19px;padding:18px 22px}}
.cre-notice .cre-to{white-space:nowrap}
.cre-steps{list-style:none;margin:0 0 10px;padding:0;display:grid;gap:10px}
.cre-steps>li{display:grid;grid-template-columns:30px 1fr;gap:10px;align-items:start;border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px;background:#fff}
.cre-n{width:28px;height:28px;border-radius:999px;background:var(--navy);color:#fff;font-weight:800;display:grid;place-items:center;font-size:15px}
.cre-steps>li.done .cre-n{background:#1b8a4c;font-size:0}.cre-steps>li.done .cre-n::after{content:'✓';font-size:16px}
.cre-b>strong{display:block;color:var(--navy);margin:3px 0 6px}
.cre-b .btn{margin:0 6px 4px 0}
.cre-file{font:12.5px ui-monospace,Menlo,Consolas,monospace;color:#4a5568;overflow-wrap:anywhere}
.cre-facts{margin:6px 0 0}.cre-facts>div{grid-template-columns:60px 1fr}
.cre-foot{margin-top:8px}
.cre-modal .actions{justify-content:flex-end}

/* r24: Add CR staff: access choice */
.ns-role .radio{display:flex;gap:8px;align-items:flex-start;line-height:1.35}
.ns-role .radio input{margin-top:3px}
.ns-role small{color:#5a6577}

/* r25: Notification history */
.notif-history-modal{max-width:560px}
.notif-history{display:grid;gap:8px;max-height:60vh;overflow:auto;margin:8px 0}
.alert-item.hist{cursor:pointer;opacity:.92}
.alert-item.hist.gone{cursor:default;opacity:.7}
.alerts-rule{font-size:12.5px;margin:10px 0 0}

/* ---- r26: signature boxes on an uploaded addendum attachment ---- */
.docbox-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; padding: 9px 12px; border-radius: 10px; background: #eef4fb; color: #1f3556; font-size: 13.5px; }
.docbox-note.pending { background: #fff7e6; border: 1px solid #f3c969; color: #5b3d00; }
.docbox-note .btn { flex: 0 0 auto; }
.docbox-backdrop { align-items: stretch; padding: 0; }
.docbox-modal { width: min(980px, 100%); max-height: none; height: 100%; border-radius: 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 720px) { .docbox-backdrop { padding: 18px; align-items: center; } .docbox-modal { height: min(100%, 980px); border-radius: 16px; } }
.docbox-head { padding: 14px 16px 8px; border-bottom: 1px solid var(--border); background: #fff; }
.docbox-head h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.docbox-file { font-size: 12.5px; font-weight: 500; color: #64748b; word-break: break-all; }
.docbox-head .hint { margin: 2px 0 8px; font-size: 13.5px; line-height: 1.4; }
.docbox-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12px; color: #475569; margin-bottom: 6px; }
.docbox-zoom { margin-left: auto; }
.docbox-zoom .seg-btn { min-height: 30px; padding: 4px 10px; }
.docbox-legend .lg::before { content: ''; display: inline-block; width: 14px; height: 10px; margin-right: 5px; border-radius: 3px; vertical-align: -1px; border: 2px solid currentColor; }
.docbox-legend .r-player { color: #1d6fd8; } .docbox-legend .r-gm { color: #b4232a; } .docbox-legend .r-witness { color: #13834f; } .docbox-legend .k-date { color: #6b7280; }
.docbox-legend .k-date::before { border-style: dashed; }
.docbox-tools { min-height: 36px; display: flex; align-items: center; }
.docbox-count { font-size: 13px; color: #334155; font-weight: 600; }
.docbox-count .warn { color: var(--red-dark); }
.docbox-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.docbox-which { font-weight: 800; color: var(--navy); font-size: 13px; }
.docbox-pages { flex: 1 1 auto; overflow: auto; padding: 12px; background: #e9edf3; -webkit-overflow-scrolling: touch; }
.docbox-page { max-width: 820px; margin: 0 auto 16px; }
.docbox-page-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 700; color: #334155; margin-bottom: 6px; }
.docbox-page-label em { font-weight: 500; color: #8a5a00; }
.docbox-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding: 14px 14px 14px 0; margin: -14px -12px 0 0; }
.docbox-stage { position: relative; width: 100%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.12); user-select: none; -webkit-user-select: none; }
.docbox-stage img { width: 100%; height: 100%; display: block; pointer-events: none; }
.docbox-frame { position: absolute; }
.docbox { position: absolute; box-sizing: border-box; border: 2px solid #1d6fd8; background: rgba(29,111,216,0.12); border-radius: 4px; cursor: move; touch-action: none; }
.docbox.r-gm { border-color: #b4232a; background: rgba(180,35,42,0.10); }
.docbox.r-witness { border-color: #13834f; background: rgba(19,131,79,0.10); }
.docbox.r-unknown { border-color: #f59e0b; background: rgba(245,158,11,0.18); border-style: dotted; }
.docbox.k-date { border-style: dashed; }
.docbox.sel { box-shadow: 0 0 0 3px rgba(0,70,139,0.35); z-index: 3; }
.docbox:focus-visible { outline: 3px solid #0b2a5b; outline-offset: 2px; }
.docbox-tag { position: absolute; left: -2px; bottom: 100%; transform: translateY(-1px); white-space: nowrap; font-size: 10.5px; font-weight: 700; line-height: 1; padding: 3px 5px; border-radius: 4px 4px 4px 0; color: #fff; background: #1d6fd8; pointer-events: none; }
.docbox.r-gm .docbox-tag { background: #b4232a; } .docbox.r-witness .docbox-tag { background: #13834f; } .docbox.r-unknown .docbox-tag { background: #b45309; }
.docbox.k-date .docbox-tag { opacity: 0.85; }
.docbox-grip { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid currentColor; color: #0b2a5b; cursor: nwse-resize; touch-action: none; }
@media (pointer: coarse) { .docbox-grip { width: 26px; height: 26px; right: -13px; bottom: -13px; } }
.docbox-actions { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); margin: 0 !important; border-top: 1px solid var(--border); background: #fff; }
.docbox-modal .error { margin: 0; padding: 8px 16px 0; }
@media (max-width: 600px) { .docbox-legend .lg { display: none; } .docbox-head .hint { font-size: 13px; margin-bottom: 4px; } .docbox-head { padding: 10px 14px 6px; } .docbox-head h2 { font-size: 17px; } }
.field-overlay.sig.add-sig.doc .sig-hint { font-size: max(8px, 1.6cqw); text-overflow: ellipsis; }

/* ===================== r29 (preview): Contracts library, player profiles, PHPA, referee side ===================== */
.folders.one { grid-template-columns: minmax(0, 340px); margin: 24px auto 8px; }
.lib-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid var(--navy); border-radius: 14px; padding: 14px; cursor: pointer; margin: 4px 0 14px; }
.lib-card:active { transform: scale(.99); }
.lib-folder-icon { width: 54px; height: 42px; border: 0; background: linear-gradient(180deg, #ffd879, #f2b631); border-radius: 4px 8px 8px 8px; position: relative; }
.lib-folder-icon:before { content: ""; position: absolute; left: 0; top: -7px; width: 22px; height: 9px; background: #f2b631; border-radius: 5px 5px 0 0; right: auto; }
.lib-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lib-head .hint, .lib-team-head .kicker { color: #e6edf7; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
/* player search + live dropdown */
.player-search { position: relative; margin: 14px 0 6px; max-width: 620px; }
.player-search .ps-label { display: block; font-weight: 700; margin-bottom: 6px; color: #fff; text-shadow: 0 1px 3px rgba(0,30,70,.45); }
.modal .player-search .ps-label { color: #111; text-shadow: none; }
.cr-aside .player-search { margin-top: 0; }
.ps-box { position: relative; }
.ps-box .ps-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; opacity: .6; pointer-events: none; }
.ps-input { width: 100%; box-sizing: border-box; font-size: 17px; padding: 13px 14px 13px 40px; border: 2px solid #c9d3e1; border-radius: 12px; background: #fff; color: #111; }
.ps-input.solo { padding-left: 14px; max-width: 520px; margin: 6px 0 14px; }
.ps-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0,70,139,.18); }
.ps-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid #c9d3e1; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,26,61,.28); max-height: min(360px, 55vh); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.ps-list.hidden { display: none; }
.ps-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; min-height: 48px; border-radius: 8px; cursor: pointer; color: #111; }
.ps-opt.active, .ps-opt:hover { background: #e9f1fb; }
.ps-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ps-main strong { color: var(--navy); font-size: 15px; }
.ps-main small { color: #4b5563; font-size: 12.5px; display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-main small img { width: 18px; height: 18px; object-fit: contain; }
.ps-n { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ps-empty { padding: 12px; color: var(--muted); }
.ps-shot, .rc-shot, .pp-shot, .headshot { overflow: hidden; background: #dfe5ee; flex: 0 0 auto; }
.ps-shot { width: 38px; height: 38px; border-radius: 50%; }
.ps-shot img, .rc-shot img, .pp-shot img, .headshot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.silhouette { width: 100%; height: 100%; display: block; }
/* 32 team folders */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; margin: 8px 0 24px; } /* r30: tighter tiles (logo + name unchanged) */
.team-folder { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 8px; background: #fff; border: 1px solid var(--border); border-radius: 4px 12px 12px 12px;
  cursor: pointer; text-align: center; font: inherit; color: inherit; box-shadow: 0 2px 6px rgba(0,26,61,.12); }
.team-folder:hover, .team-folder:focus-visible { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.7), 0 6px 16px rgba(0,26,61,.25); }
.team-folder .tf-tab { position: absolute; left: -1px; top: -9px; width: 52px; height: 10px; background: #fff; border: 1px solid var(--border); border-bottom: 0; border-radius: 6px 6px 0 0; }
.team-folder .tf-logo { width: 64px; height: 64px; display: grid; place-items: center; }
.team-folder .tf-logo img { max-width: 64px; max-height: 64px; object-fit: contain; }
.team-folder .tf-name { font-weight: 700; color: var(--navy); font-size: 14px; line-height: 1.2; }
.team-folder .tf-count { font-size: 12px; color: var(--muted); }
.lib-team-head { display: flex; align-items: center; gap: 14px; margin: 14px 0 4px; }
.lib-team-head img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 12px; padding: 6px; }
.lib-team-head .screen-title { color: #fff; }
.cur-tag { font-style: normal; font-size: 11px; font-weight: 700; background: #e7f7ee; color: var(--ok); border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: 2px; }
/* record rows */
.lib-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 20px; }
.lib-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.lr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lr-player { font-weight: 700; font-size: 15.5px; text-align: left; }
.lr-meta { font-size: 13px; color: #4b5563; }
.lib-rec-bar .lr-meta { color: #4b5563; }
.up-badge, .ok-badge { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; vertical-align: 1px; white-space: nowrap; }
.up-badge { background: #fff4e5; color: #8a4b00; border: 1px solid #f3cf98; }
.ok-badge { background: #e7f7ee; color: #146c3c; border: 1px solid #9fd5b3; }
.lib-page { margin-bottom: 14px; }
/* profile */
.pp-card { position: relative; background: #fff; border-radius: 16px; overflow: hidden; margin: 14px 0 8px; box-shadow: 0 6px 22px rgba(0,26,61,.25); }
.pp-band { height: 92px; background: linear-gradient(120deg, var(--navy-deep), var(--navy) 60%, #2c6db5); position: relative; overflow: hidden; }
.pp-band-logo { position: absolute; right: -10px; top: -26px; width: 170px; height: 170px; object-fit: contain; opacity: .18; filter: grayscale(1) brightness(3); }
.ref-band { background: linear-gradient(120deg, #1c1c1c, #3b3b3b 55%, #6b6b6b); }
.pp-top { display: flex; gap: 18px; align-items: flex-end; padding: 0 20px; margin-top: -56px; position: relative; }
.pp-shot { width: 128px; height: 128px; border-radius: 14px; border: 4px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.pp-id { padding: 64px 0 4px; min-width: 0; }
.pp-id .kicker { color: var(--muted); margin-bottom: 2px; }
.pp-name { margin: 0 0 6px; font-size: 28px; line-height: 1.1; color: var(--navy-dark); }
.pp-team { display: flex; align-items: center; gap: 8px; }
.pp-team img, .pp-team .ref-ico { width: 34px; height: 34px; object-fit: contain; }
.pp-team strong { display: block; color: #111; }
.pp-team small { color: var(--muted); font-size: 12.5px; }
.pp-facts { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 14px 20px 0; padding: 12px 0 0; border-top: 1px solid var(--border); }
.pp-facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.pp-facts dd { margin: 2px 0 0; font-weight: 600; color: #111; }
.pp-admin { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 16px; }
.pp-card > :last-child:not(.pp-admin) { margin-bottom: 18px; }
.hist-row .hr-line { font-size: 15px; color: #111; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.hr-logo { width: 22px; height: 22px; object-fit: contain; }
.hist-row small { color: var(--muted); }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.lib-modal .player-search .ps-label, .upload-modal .player-search .ps-label { color: #111; }
.lib-modal .ps-list { max-height: 240px; }
/* referee side */
.hero-team .ref-ico { width: 44px; height: 44px; }
.placeholder-label { position: absolute; top: 0.6%; left: 0; right: 0; text-align: center; pointer-events: none; z-index: 2; color: #bf1a1a; font: 800 clamp(10px, 2.1vw, 17px)/1 system-ui, sans-serif; letter-spacing: .04em; }
.roster-add { display: flex; gap: 8px; margin: 10px 0 12px; max-width: 560px; }
.roster-add input { flex: 1; font-size: 16px; padding: 10px 12px; border: 2px solid #c9d3e1; border-radius: 10px; }
.ref-row .ps-shot { width: 44px; height: 44px; }
.roster-removed { background: #fff; border-radius: 12px; padding: 8px 12px; margin-bottom: 20px; }
.roster-removed summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.roster-removed .lib-row { border: 0; padding: 8px 0; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.ref-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; background: #fff; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; font: inherit; text-align: center; }
.ref-card:hover, .ref-card:focus-visible { border-color: var(--navy); outline: none; }
.rc-shot { width: 92px; height: 92px; border-radius: 50%; }
.ref-card strong { color: var(--navy); }
.ref-card small { color: var(--muted); font-size: 12px; }
.share-url { display: flex; gap: 8px; margin: 10px 0; }
.share-url input { flex: 1; min-width: 0; font-size: 13px; padding: 9px 10px; border: 1px solid #c9d3e1; border-radius: 8px; }
@media (max-width: 600px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .team-folder { padding: 9px 6px 7px; }
  .team-folder .tf-logo, .team-folder .tf-logo img { width: 52px; height: 52px; max-width: 52px; max-height: 52px; }
  .lib-row { flex-wrap: wrap; }
  .lib-row > .btn { margin-left: auto; }
  .pp-top { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: -60px; }
  .pp-id { padding-top: 0; }
  .pp-shot { width: 112px; height: 112px; }
  .pp-name { font-size: 24px; }
  .form-2col { grid-template-columns: 1fr; }
  .rc-shot { width: 76px; height: 76px; }
  .ref-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.lib-modal input[type=date], .lib-modal input[type=file], .sheet-backdrop .modal input[type=date] { display: block; width: 100%; box-sizing: border-box; font-size: 16px; padding: 10px 12px; margin-top: 4px; border: 1px solid #c9d3e1; border-radius: 10px; background: #fff; }
.lib-modal label { display: block; margin-bottom: 10px; font-weight: 600; }
/* r29: officials (referees + linespeople) */
.off-name { display: inline-flex; align-items: center; gap: 10px; text-align: left; }
.off-av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: #dfe5ee; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.25); }
.off-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-row .lr-main { gap: 4px; }
.ref-row .lr-meta:empty { display: none; }
.roster-add .num { flex: 0 0 64px; width: 64px; }
.roster-add .btn { white-space: nowrap; }
.roster-add select { font-size: 15px; padding: 8px; border: 2px solid #c9d3e1; border-radius: 10px; background: #fff; }
.test-badge { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: #fde8e8; color: #9b1c1c; border: 1px dashed #e29a9a; border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.chip-row { display: flex; gap: 8px; margin: 6px 0 4px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid #c9d3e1; background: #fff; color: var(--navy); cursor: pointer; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.ref-pp .pp-shot img { object-position: center top; }
.group-count { font-weight: 600; opacity: .8; font-size: .85em; }
@media (max-width: 600px) {
  .roster-add { flex-wrap: wrap; }
  .roster-add #rosterName { flex: 1 1 100%; }
  .off-av { width: 36px; height: 36px; }
}
.ref-pp .pp-shot { width: 128px; height: 160px; }

/* r30: League Documents > Officials Roster (team / CR limited view) */
.off-min { background: #fff; border-radius: 16px; padding: 22px 18px; margin: 14px auto; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 14px; box-shadow: 0 4px 14px rgba(0,26,61,.18); }
.off-photo { width: 240px; height: 300px; border-radius: 14px; overflow: hidden; background: #dfe5ee; }
.off-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.off-min-id { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; justify-content: center; text-align: center; }
.off-num { font-size: 28px; font-weight: 800; color: var(--red, #c8102e); }
.off-min-name { font-size: 26px; font-weight: 800; color: var(--navy); }
.off-min-role { font-size: 15px; font-weight: 600; color: #4a5d7a; letter-spacing: .02em; }
@media (max-width: 520px) { .off-photo { width: 200px; height: 250px; } .off-num, .off-min-name { font-size: 22px; } }

/* r30: player profile Contract history as a stats-style table (stacks into cards on phones) */
.hist-wrap { background: #fff; border-radius: 12px; overflow: hidden; margin: 8px 0 22px; box-shadow: 0 2px 6px rgba(0,26,61,.12); }
.hist-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hist-table thead th { background: var(--navy); color: #fff; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; font-weight: 700; }
.hist-table td { padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: middle; color: #14213d; }
.hist-table tbody tr:nth-child(even) td { background: #f5f7fb; }
.ht-season strong { display: block; white-space: nowrap; }
.ht-season small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.ht-team-in { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.ht-team .hr-logo { width: 28px; height: 28px; object-fit: contain; }
.ht-amount { font-variant-numeric: tabular-nums; }
.ht-none { color: var(--muted); }
.ht-view { text-align: right; white-space: nowrap; }
.ht-view .btn + .btn { margin-left: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 680px) {
  .hist-wrap { background: transparent; box-shadow: none; }
  .hist-table thead { display: none; }
  .hist-table, .hist-table tbody, .hist-table tr, .hist-table td { display: block; width: 100%; }
  .hist-table tr { background: #fff; border-radius: 12px; margin-bottom: 10px; padding: 6px 0; box-shadow: 0 2px 6px rgba(0,26,61,.12); }
  .hist-table tbody tr:nth-child(even) td { background: transparent; }
  .hist-table td { border-top: 0; padding: 5px 14px; display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: baseline; }
  .hist-table td[data-label]::before { content: attr(data-label); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
  .hist-table td.ht-view { display: flex; justify-content: flex-end; gap: 6px; padding-top: 8px; }
}

/* r31: profiles-only pending contract rows */
.up-badge.pending { background: #fff3cd; color: #7a5b00; border: 1px solid #e6d08a; }
button.btn.small.secondary[disabled][title="Contract not yet uploaded"],
button.btn.small.secondary[aria-disabled="true"][title="Contract not yet uploaded"] {
  opacity: 0.55; cursor: not-allowed; pointer-events: none;
}

/* r32: League Documents > Directives / Memos */
.dm-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 4px; }
.dm-admin .hint { margin: 0; color: rgba(255,255,255,.82); }
.dm-group { font-size: 15px; margin: 20px 0 0; color: #fff; letter-spacing: .01em; }
.dm-group small { font-weight: 600; color: rgba(255,255,255,.7); margin-left: 4px; }
.doc-card .dm-rm { flex-shrink: 0; }

/* r32: player Review & Finalize */
.review-banner { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; background: #fff7e0; border: 1px solid #f0c75e; border-radius: 14px; padding: 14px 16px; margin: 0 0 14px; color: #3a2a00; }
.review-banner strong { display: block; font-size: 15px; margin-bottom: 2px; }
.review-banner span { font-size: 13px; }
.player-review .review-lead { color: #fff; opacity: .92; margin: 0 0 12px; font-size: 14px; }
.review-pages { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.review-page { margin: 0; width: 100%; max-width: 820px; background: #fff; border-radius: 6px; box-shadow: 0 4px 18px rgba(0,0,0,.25); overflow: hidden; }
.review-page img { display: block; width: 100%; height: auto; }
.review-page figcaption { font-size: 12px; color: #5b6878; text-align: center; padding: 6px; border-top: 1px solid #e6e9ef; }
.review-pdf { text-align: center; margin: 12px 0; } .review-pdf a { color: #fff; text-decoration: underline; }
.review-final { position: sticky; bottom: 0; background: #fff; border-radius: 14px 14px 0 0; padding: 14px 16px 16px; margin-top: 16px; box-shadow: 0 -6px 18px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 10px; max-width: 820px; margin-left: auto; margin-right: auto; }
.review-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #13233a; }
.review-check input { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.review-final .btn { width: 100%; }
.review-final .hint { margin: 0; }

/* r32: CR Approved Contracts: season → team → contracts */
.folder-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0 8px; font-size: 13px; }
.folder-crumbs .fcrumb { background: none; border: 0; padding: 2px 0; color: #cfe0ff; text-decoration: underline; cursor: pointer; font: inherit; }
.folder-crumbs .fcrumb.cur { color: #fff; text-decoration: none; font-weight: 700; cursor: default; }
.folder-crumbs .fsep { color: rgba(255,255,255,.6); }
.af-team-head { margin: 6px 0 10px; }

/* ===================== r33: ESIGN (US) / Canada consent ===================== */
.esign-consent { max-width: 760px; margin: 8px auto 24px; }
.esign-card { background: #fff; color: var(--text, #1b2240); border-radius: 16px; padding: 20px 22px; box-shadow: 0 8px 28px rgba(5, 10, 70, 0.25); }
.esign-card .kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5a6385; }
.esign-card .screen-title { color: var(--navy, #0b2a5b); text-shadow: none; margin: 6px 0 10px; font-size: 22px; line-height: 1.25; }
.esign-body { max-height: min(52vh, 520px); overflow: auto; border: 1px solid #dfe4f0; border-radius: 12px; padding: 4px 14px; background: #f8f9fd; }
.esign-sec h3 { font-size: 14.5px; margin: 12px 0 4px; color: var(--navy, #0b2a5b); }
.esign-sec p { font-size: 14px; line-height: 1.5; margin: 0 0 8px; }
.esign-check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 12px; font-size: 14.5px; line-height: 1.45; font-weight: 600; cursor: pointer; }
.esign-check input { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 1px; accent-color: var(--navy, #0b2a5b); }
.esign-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.esign-actions .btn { flex: 1 1 200px; }
.esign-ver { margin: 10px 0 0; font-size: 11.5px; color: #6b7290; text-shadow: none; }
.esign-declined p { font-size: 15px; line-height: 1.5; }
.esign-inperson { border: 1px solid #f0c75e; background: #fff7e0; border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; color: #3a2a00; }
.esign-inperson .esign-check { margin: 10px 0 2px; font-size: 13.5px; }
.esign-inperson .esign-body { max-height: 36vh; margin-top: 8px; background: #fff; }
.esign-details summary { cursor: pointer; font-weight: 700; font-size: 13.5px; }
@media (max-width: 699px) { .esign-card { padding: 16px 14px; } .esign-card .screen-title { font-size: 19px; } .esign-body { max-height: 46vh; } }
.esign-consent .esign-card h2.screen-title { color: #0b2a5b !important; text-shadow: none !important; }

/* ===================== r34: evidence package ===================== */
.evidence-box { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; background: #eaf6ee; border: 1px solid #8fcca2; border-radius: 14px; padding: 14px 16px; margin: 0 0 14px; color: #12361f; }
.copy-box { background: #eef3fb; border-color: #9db4dc; color: #10264a; }
.copy-box .btn { text-decoration: none; }
.evidence-box > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.4; }
.evidence-modal .ev-hash { display: block; word-break: break-all; font: 600 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; background: #f3f5fb; border: 1px solid #dfe4f0; border-radius: 8px; padding: 8px 10px; margin: 4px 0 6px; user-select: all; }
.evidence-modal .actions { flex-wrap: wrap; }

/* ===================== r35 ===================== */
/* League Documents: website terms tiles (DRAFT) */
.docs-subhead { color: #fff; font-size: 15px; margin: 22px 0 0; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.legal-tile { text-decoration: none; color: inherit; }
.legal-icon { background: #eef2fa !important; color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; }
.legal-draft-tag { color: #8a5a00 !important; font-weight: 700; }
.legal-list { margin-top: 8px; }
@media (min-width: 680px) { .legal-list { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
/* Demo / Team Admin notes on the home screen */
.demo-note { background: #fff7e0; border: 1px solid #e6c36a; color: #4d3a00; border-radius: 12px; padding: 10px 14px; margin: 12px 0 0; font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.demo-note.ro-note { background: #eef4ff; border-color: #9cb8e6; color: #12305e; }
/* r35 (Jeff): desktop footer: theahl.com / AHLauthentic.com links on the same line as the copyright */
@media (min-width: 760px) {
  .sf-inner { grid-template-columns: auto 1fr auto; grid-template-areas: "brand . socials" "copy copy links"; column-gap: 0; }
  .sf-copy, .sf-links { padding-top: 8px; border-top: 1px solid rgba(255,255,255,.14); align-self: stretch; display: flex; align-items: center; }
  .sf-copy { text-align: left; justify-content: flex-start; padding-left: 4px; }
  .sf-links { justify-content: flex-end; gap: 2px; }
  .sf-link { min-height: 28px; padding: 4px 8px; font-size: 12.5px; }
}
.esign-legal-note { font-size: 13px; color: #3d4a60; background: #f3f6fc; border-radius: 10px; padding: 8px 12px; margin: 12px 0 0; line-height: 1.45; }
.esign-legal-note a { color: var(--navy); font-weight: 600; }

/* B1.36: release label in the footer */
.sf-version { opacity: .75; white-space: nowrap; }
/* B1.36: 2-step login */
.otp-input { font-size: 1.6rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; padding: 10px; width: 100%; box-sizing: border-box; }
.mfa-steps { padding-left: 1.2em; line-height: 1.5; }
.mfa-steps li { margin: 6px 0; }
.mfa-qr { background: #fff; padding: 10px; border-radius: 10px; display: inline-block; margin: 8px 0; border: 1px solid #dfe3ea; }
.mfa-qr img { display: block; }
.mfa-secret { display: block; font-size: 1rem; letter-spacing: .08em; margin: 6px 0 2px; word-break: break-all; user-select: all; }
.mfa-codes { columns: 2; list-style: none; padding: 0; margin: 10px 0; font-size: 1.05rem; }
.mfa-codes li { padding: 4px 0; }
/* B1.36 passkeys */
.pk-btn{width:100%;font-size:1.05rem;padding:12px}.pk-ico{margin-right:6px}
.mfa-or{text-align:center;margin:10px 0}.mfa-alt.sep{border-top:1px solid var(--line,#ddd);margin-top:14px;padding-top:4px}
.mfa-choice{display:grid;gap:10px;margin:12px 0}
.mfa-opt{display:block;text-align:left;border:1px solid var(--line,#ccc);border-radius:12px;padding:12px 14px;background:var(--card,#fff);cursor:pointer;font:inherit;color:inherit}
.mfa-opt.recommended{border:2px solid var(--accent,#0a5bd8)}.mfa-opt:disabled{opacity:.55;cursor:not-allowed}
.mfa-opt-h{display:block;font-weight:600}.mfa-opt-h em{font-style:normal;font-size:.75rem;margin-left:6px;padding:2px 6px;border-radius:8px;background:#eef3ff;color:#0a5bd8}
.mfa-opt-s{display:block;font-size:.88rem;opacity:.8;margin-top:3px}
.mfa-h{margin:16px 0 6px;font-size:1rem}
.pk-list{list-style:none;padding:0;margin:0 0 8px}.pk-list li{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--line,#eee)}
.pk-list small{display:block;opacity:.7}.btn.small{padding:4px 10px;font-size:.85rem}
/* B1.36 send back */
.sentback-banner{border:1px solid #e0b252;background:#fff8e6;border-radius:12px;padding:10px 12px;margin:10px 0}
.sb-scope{border:0;padding:0;margin:10px 0}.sb-scope label{display:block;margin:6px 0;font-size:.92rem}
/* B1.36 CR dashboard */
.cr-dash{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:6px 0 14px}
.cr-dash-card{border:1px solid var(--line,#ddd);border-radius:12px;background:var(--card,#fff);padding:10px 8px;text-align:center;cursor:pointer;font:inherit;color:inherit}
.cr-dash-card .cd-n{display:block;font-size:1.6rem;font-weight:700}.cr-dash-card .cd-l{display:block;font-size:.8rem;opacity:.8}
.cd-row{display:grid;grid-template-columns:1fr auto;gap:2px 8px;width:100%;text-align:left;border:0;border-bottom:1px solid var(--line,#eee);background:none;padding:8px 2px;font:inherit;color:inherit;cursor:pointer}
.cd-row span{grid-column:1;opacity:.8;font-size:.88rem}.cd-row small{grid-row:1;grid-column:2;opacity:.7}
.dup-banner{border:1px solid #e5a000;background:#fff6e0;border-radius:12px;padding:10px 12px;margin:10px 0}.dup-banner .linkish{background:none;border:0;padding:2px 0;color:#0a5bd8;text-decoration:underline;cursor:pointer;font:inherit}
.pv-card{max-width:520px;margin:18px auto}

/* ===== B1.37: plain status pills, My Contracts season table, Admin area, account area ===== */
.pill.draft { background: #eef1f5; color: #3d4a5c; }
.pill.back { background: #fff4dc; color: #8a5a00; border: 1px solid #f0cf8a; }
.contract-row .row-head strong .pill { margin-left: 6px; vertical-align: 1px; font-size: .72rem; }
.my-season { margin-top: 22px; }
.ms-total { background: #fff; border: 1px solid #d7dce5; border-radius: 14px; padding: 14px 16px; margin: 6px 0 18px; box-shadow: 0 1px 3px rgba(11,31,58,.06); }
.ms-total-title { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.ms-total-title strong { font-size: 1.15rem; color: var(--navy, #0b1f3a); }
.ms-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; } /* B1.60-an: Contracts · SPC · PTO · ATO · Bonus */
@media (max-width: 720px) { .ms-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .ms-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ms-kpis > div { background: #f5f7fa; border-radius: 10px; padding: 8px 10px; }
.ms-kpis small { display: block; color: #5a6578; font-size: .78rem; }
.ms-kpis b { font-size: 1.15rem; color: var(--navy, #0b1f3a); font-variant-numeric: tabular-nums; }
.ms-note { display: block; margin-top: 8px; color: #5a6578; }
.ms-group { margin-bottom: 18px; }
.ms-table { background: #fff; border: 1px solid #d7dce5; border-radius: 12px; overflow: hidden; }
.ms-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 92px; gap: 8px; align-items: center; padding: 9px 12px; border-top: 1px solid #edf0f4; font-size: .93rem; }
.ms-row:first-child { border-top: 0; }
.ms-head { background: #f0f3f7; font-weight: 700; font-size: .8rem; color: #3d4a5c; text-transform: uppercase; letter-spacing: .03em; }
.ms-row .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-row .ms-v { text-align: right; }
.ms-player { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ms-row.pending { color: #6b7587; }
.ms-sub { background: #f7f9fb; font-weight: 700; }
@media (max-width: 640px) {
  .ms-head { display: none; }
  .ms-row { grid-template-columns: 1fr 1fr 1fr; gap: 4px 10px; padding: 10px 12px; }
  .ms-row .ms-player { grid-column: 1 / 3; font-size: 1rem; }
  .ms-row .ms-v { grid-column: 3; grid-row: 1; }
  .ms-row > [data-l]::before { content: attr(data-l); display: block; font-size: .7rem; font-weight: 600; color: #6b7587; text-transform: uppercase; letter-spacing: .03em; }
  .ms-row .num { text-align: left; }
  .ms-sub > span:first-child { grid-column: 1 / -1; }
  .ms-sub > span:empty { display: none; }
  .ms-kpis b { font-size: 1rem; }
}
.admin-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.admin-tool { text-align: left; background: #fff; border: 1px solid #d7dce5; border-radius: 14px; padding: 16px; cursor: pointer; font: inherit; color: inherit; box-shadow: 0 1px 3px rgba(11,31,58,.06); }
.admin-tool:hover, .admin-tool:focus-visible { border-color: #c8102e; outline: none; }
.admin-tool strong { display: block; font-size: 1.05rem; color: var(--navy, #0b1f3a); }
.admin-tool span { display: block; color: #5a6578; font-size: .88rem; margin-top: 3px; }
.acct-sec { margin: 14px 0 6px; font-size: .78rem; font-weight: 700; color: #5a6578; text-transform: uppercase; letter-spacing: .04em; }
.acct-rows { display: grid; gap: 8px; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #e1e5ec; border-radius: 12px; background: #fff; }
.acct-row strong { display: block; font-size: .95rem; }
.acct-row small { color: #5a6578; }
.acct-row .btn { flex: none; }
.acct-row.off { opacity: .75; }

/* B1.38: officials forms tiles: pay line under the title */
.form-tile .off-pay { display: block; margin-top: 4px; font-size: 12px; opacity: .8; }

/* B1.40: no Help / Legal on the sign-in screen (shown once signed in or on a signing link) */
body:not(.show-legal) .sf-legal, body:not(.show-legal) .sf-legal-dot { display: none !important; }

/* B1.42 CR Admin > Review */
.rv-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 12px}.rv-tabs button{border:1px solid #c9d3e0;background:#fff;border-radius:16px;padding:6px 12px;cursor:pointer}.rv-tabs button.active{background:var(--navy,#0b2545);color:#fff}
.rv-item{padding:12px;margin:0 0 10px}.rv-head{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.rv-reason{font-size:.9em;color:#3c4a5c;margin:6px 0}.rv-reason.warn{color:#8a4b00}
.rv-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}@media(max-width:700px){.rv-pair{grid-template-columns:1fr}}.rv-prof{border:1px solid #e1e7ef;border-radius:8px;padding:8px}.rv-prof h4{margin:0 0 4px}
.rv-facts{display:flex;flex-wrap:wrap;gap:4px 14px;margin:0 0 4px}.rv-facts dt{font-size:.75em;color:#667}.rv-facts dd{margin:0}.rv-seasons{margin:0;padding-left:18px;font-size:.9em;max-height:160px;overflow:auto}
.rv-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end;margin-top:8px}.rv-actions label{display:flex;flex-direction:column;font-size:.8em}.rv-note{min-width:180px;flex:1}
.rv-status{font-size:.8em;border-radius:10px;padding:2px 8px}.rv-status.open{background:#fff3d6}.rv-status.done{background:#dff3e3}.rv-simple{max-height:420px;overflow:auto;font-size:.9em}
.rv-actions select,.rv-actions input{min-height:34px;height:34px;padding:4px 8px;font-size:14px}
/* B1.42: the officials' signing-line year is printed by the season template; its blank stays invisible */
.field-overlay.tmpl-text{opacity:0;pointer-events:none}
.rv-group{margin:0 0 10px}.rv-group>summary{cursor:pointer;padding:8px 10px;background:#eef3fa;border-radius:8px;margin-bottom:8px}
.rv-cands{display:flex;flex-direction:column;gap:8px}.rv-cand{display:flex;gap:10px;border:1px solid #e1e7ef;border-radius:8px;padding:8px}
.rv-photo{width:120px;height:120px;object-fit:cover;border-radius:8px;flex:0 0 120px;background:#f2f4f8}.rv-photo.none{display:flex;align-items:center;justify-content:center;text-align:center;font-size:.8em;color:#667;padding:6px}

/* B1.45: Review open-by-default + held merges + Show completed toggle */
.rv-status.held{background:#fde8d0;color:#7a3e00}
.rv-held{border-left:3px solid #e09a3e}
.rv-held-note{margin:6px 0;padding:8px 10px;background:#fff6e8;border:1px solid #f0c78a;border-radius:8px;color:#5a3200;font-size:.92em}
.rv-toggle{display:inline-flex;align-items:center;gap:6px;margin:0 0 10px;font-size:.9em;color:#3c4a5c;cursor:pointer}
.rv-toggle input{width:16px;height:16px}

.rv-league{margin:8px 0;padding:10px}.rv-league .rv-cand{display:flex;gap:12px;align-items:flex-start;flex-wrap:wrap}
.rv-prof .rv-photo{float:right;margin:0 0 8px 8px;border-radius:8px;object-fit:cover}
.rv-photo-clash{border-left:3px solid #4a7ab5}


/* B1.49: Officials Roster — desktop two columns; mobile sticky role toggle
   (scoped to .roster-layout / .roster-seg / .roster-cols; safe beside Manage Accounts CSS) */
.roster-layout { margin: 8px 0 20px; }
.roster-seg {
  display: none;
  gap: 0;
  margin: 0 0 12px;
  padding: 4px;
  background: #e8eef6;
  border-radius: 12px;
  border: 1px solid #c9d3e1;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 8px rgba(0,26,61,.08);
}
.roster-seg-btn {
  flex: 1 1 0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--navy, #0b2545);
  cursor: pointer;
  min-height: 44px;
}
.roster-seg-btn.on {
  background: var(--navy, #0b2545);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.roster-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
  align-items: start;
}
.roster-col-title { margin-top: 0; }
.roster-col .roster-list { margin-bottom: 0; }
@media (max-width: 759px) {
  .roster-seg { display: flex; }
  .roster-cols { display: block; }
  .roster-col { display: none; }
  .roster-layout[data-show="referee"] .roster-col[data-roster-col="referee"],
  .roster-layout[data-show="linesperson"] .roster-col[data-roster-col="linesperson"] { display: block; }
  /* toggle already names the role + count — keep the column header for clarity */
}
@media (min-width: 760px) {
  .roster-seg { display: none !important; }
  .roster-cols { display: grid; }
  .roster-col { display: block !important; }
}
/* B1.52: Website Logs (recent + season / month folders) */
.wl-filters select { width: auto; flex: 0 0 auto; }
.wl-filters input[type=search] { min-height: 40px; padding: 8px 12px; border: 1px solid #c9d2e3; border-radius: 10px; }
.wl-wrap .section-title { color: #0b2a5b; text-shadow: none; margin: 16px 0 8px; }
.audit-list.weblogs strong { text-transform: none; }
/* B1.52: player names in My Contracts open the player profile */
.ms-pl { background: none; border: 0; padding: 0; font: inherit; color: #0b4fa8; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; }
.ms-pl:hover, .ms-pl:focus-visible { color: #062f66; }
/* B1.52 (Jeff, Oct 20 3:27 PM ET): desktop / wide home banner. The starry art now runs the full banner width at the SAME
   scale (height = the old image height, logo centred). v2 (Jeff, 3:36 PM ET): NO mirroring. The old uneven stars were removed
   and ONE identical star is redrawn on an exact 240px lattice (master px), 10 per side, symmetric about the logo, whole stars
   only; logo/glow/gradient are the original pixels. Rebuild: /workspace/banner-v2/build.py + export.py. Phones untouched. */
@media (min-width: 720px) {
  .home-hero .banner-wrap::after {
    content: ""; position: absolute; left: 0; right: 0; pointer-events: none;
    top: clamp(10px, 3vw, 18px); bottom: clamp(12px, 3vw, 20px);
    background: url('/img/ahl-header-banner-wide.jpg?v=B1.52-s2') center / auto 100% no-repeat;
    background-image: -webkit-image-set(url('/img/ahl-header-banner-wide.webp?v=B1.52-s2') 1x, url('/img/ahl-header-banner-wide@2x.webp?v=B1.52-s2') 2x);
    background-image: image-set(url('/img/ahl-header-banner-wide.webp?v=B1.52-s2') 1x, url('/img/ahl-header-banner-wide@2x.webp?v=B1.52-s2') 2x);
    --c: var(--star-cut, 0px); /* ::after shows only the whole-star middle; .banner-edge shows the rest (complementary masks) */
    -webkit-mask-image: linear-gradient(to right, transparent var(--c), #000 var(--c), #000 calc(100% - var(--c)), transparent calc(100% - var(--c))), linear-gradient(to bottom, transparent 0, #000 8%, #000 90%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent var(--c), #000 var(--c), #000 calc(100% - var(--c)), transparent calc(100% - var(--c))), linear-gradient(to bottom, transparent 0, #000 8%, #000 90%, transparent 100%);
    mask-composite: intersect;
  }
  .home-hero .banner-wrap .banner { opacity: 0; } /* keeps its size + alt text; the wide art above draws it */
  /* whole stars only: the same art WITHOUT stars covers everything beyond --star-cut (set by bannerStarFit in app.js,
     always the middle of a gap). Same box + same centring as ::after, so the two layers line up pixel for pixel. */
  .home-hero .banner-wrap .banner-edge {
    display: block; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none;
    top: clamp(10px, 3vw, 18px); bottom: clamp(12px, 3vw, 20px);
    background: url('/img/ahl-header-banner-wide-bg.jpg?v=B1.52-s2') center / auto 100% no-repeat;
    background-image: -webkit-image-set(url('/img/ahl-header-banner-wide-bg.webp?v=B1.52-s2') 1x, url('/img/ahl-header-banner-wide-bg@2x.webp?v=B1.52-s2') 2x);
    background-image: image-set(url('/img/ahl-header-banner-wide-bg.webp?v=B1.52-s2') 1x, url('/img/ahl-header-banner-wide-bg@2x.webp?v=B1.52-s2') 2x);
    --c: var(--star-cut, 0px);
    -webkit-mask-image: linear-gradient(to right, #000 var(--c), transparent var(--c), transparent calc(100% - var(--c)), #000 calc(100% - var(--c))), linear-gradient(to bottom, transparent 0, #000 8%, #000 90%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, #000 var(--c), transparent var(--c), transparent calc(100% - var(--c)), #000 calc(100% - var(--c))), linear-gradient(to bottom, transparent 0, #000 8%, #000 90%, transparent 100%);
    mask-composite: intersect;
  }
}
.banner-edge { display: none; }
/* B1.52 (Jeff, Oct 20 3:28 PM ET): the visible "Beta B1.NN" badge only for real CR admin accounts (not in team preview);
   everyone else gets the hidden <meta name="ahl-build"> marker only. */
.sf-version { display: none; }
body.ahl-show-build .sf-version { display: inline; }

/* B1.52 (Jeff, Oct 20 3:35 PM ET): player profile edits */
.pp-blank { background: none; border: 0; padding: 0; font: inherit; font-style: italic; font-weight: 500; color: #8a94a6; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.pp-blank:hover, .pp-blank:focus-visible { color: #0b4fa8; }
.pp-edit-row { margin-top: 12px; }
.pp-edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 14px; }
.pp-hist { margin: 12px 20px 0; font-size: 13px; color: #334; }
.pp-hist summary { cursor: pointer; font-weight: 600; color: #0b4fa8; }
.pp-hist ul { list-style: none; padding: 0; margin: 8px 0 0; }
.pp-hist li { padding: 6px 0; border-top: 1px solid var(--border); }
.pp-hist-when { color: var(--muted); }
.lib-modal .pp-edit-grid input, .lib-modal .pp-edit-grid select { display: block; width: 100%; box-sizing: border-box; font-size: 16px; height: 44px; padding: 8px 12px; margin-top: 4px; border: 1px solid #c9d3e1; border-radius: 10px; background: #fff; }
/* B1.53: profile — ECHL column, signed/received lines, team chain, no-PDF badge, playing history, jersey blank/edit */
.pp-jersey dd { display: flex; align-items: center; gap: 8px; }
.pp-jersey-edit { padding: 2px 8px; font-size: 12px; }
.ht-dates { display: flex; flex-direction: column; gap: 1px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.ht-dates b { display: inline-block; min-width: 62px; font-weight: 700; color: #4a5568; }
.ht-then { color: var(--muted); font-style: italic; }
.up-badge.nopdf { background: #e8eef8; color: #29446f; border-color: #c9d6ea; }
.ph-note { margin: -4px 0 6px; }
.hist-table .num { text-align: right; }
.ph-table td, .ph-table th { white-space: nowrap; }
@media (max-width: 720px) {
  .hist-table td.num { text-align: left; }
  .ph-table tr { display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 0; }
  .ph-table td[data-label="Season"], .ph-table td[data-label="Team"] { grid-column: 1 / -1; }
  .ph-table td.num { display: block; padding: 2px 14px; }
  .ph-table td.num::before { display: block; }
}
/* B1.53: team season folder = the profile contract table with #, Player, Pos in front + season picker */
.season-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 6px; }
.season-pick label { font-weight: 700; color: #fff; }
.season-pick select { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 14px; min-width: 240px; }
.season-pick .hint { color: rgba(255,255,255,.85); }
.team-table .ht-num { width: 54px; font-weight: 700; }
.team-table .ht-player .lr-player { font-weight: 700; text-align: left; }
.team-table .ht-pos { width: 44px; }
.tf-count small { opacity: .7; font-size: 11px; }
@media (min-width: 721px) { .team-table { font-size: 13px; } .team-table td { padding: 8px 9px; } }
@media (max-width: 720px) { .team-table .ht-num, .team-table .ht-pos { width: 100%; } .team-table td.ht-player { font-size: 16px; } }
/* B1.54 Review: amount crops, plain-English birth dates, one-at-a-time mode */
.rv-intro{margin:4px 0 10px;color:#2b3a4f}
.rv-q{margin:0;font-weight:400;font-size:1.05em}.rv-qline{margin:4px 0 6px}
.rv-dobcheck{margin:6px 0 10px;padding:8px 10px;border:1px solid #d9e2ec;border-radius:8px;background:#f7f9fc;font-size:.93em}
.rv-dc-why{margin:0 0 6px;line-height:1.4}.rv-dc-table{border-collapse:collapse;width:auto;min-width:0}
.rv-dc-table th,.rv-dc-table td{padding:3px 14px 3px 0;text-align:left;vertical-align:baseline;border:0}.rv-dc-table thead th{font-weight:600;color:#5b6b7f;font-size:.85em}
.rv-dc-table tbody th{font-weight:500}.rv-dc-none{color:#7a8797;font-style:italic}.rv-dc-checked{margin:6px 0 0;color:#5b6b7f;font-size:.85em}
.rv-dc-tag{display:inline-block;margin-left:6px;padding:0 6px;border-radius:9px;font-size:.8em;font-weight:500}.rv-dc-same{background:#e6f0fa;color:#1f4e79}.rv-dc-cand{background:#fff4e0;color:#7a4300}
.rv-typo{margin:4px 0;padding:6px 8px;border-radius:6px;background:#fff4e0;color:#7a4300;font-size:.92em}
.rv-dob-ctx{display:flex;gap:12px;align-items:flex-start}.rv-dob-ctx .rv-photo{flex:0 0 auto;width:96px;height:96px;border-radius:8px;object-fit:cover;background:#eef2f7}
.rv-photo.none{display:flex;align-items:center;justify-content:center;font-size:.8em;color:#667;text-align:center}
.rv-teams{margin:0 0 4px}.rv-links{margin:6px 0 0;font-size:.92em}
.rv-dob-enter{display:inline-flex;gap:6px;align-items:center}.rv-dob-enter[hidden]{display:none}
.rv-filters{display:flex;flex-wrap:wrap;gap:8px 14px;margin:6px 0 10px}.rv-filters label{display:flex;flex-direction:column;font-size:.8em}
.rv-amt-grid{display:grid;grid-template-columns:minmax(0,3fr) minmax(220px,2fr);gap:12px}@media(max-width:800px){.rv-amt-grid{grid-template-columns:1fr}}
.rv-crop{display:block;border:1px solid #d5dde8;border-radius:6px;padding:0;background:#fff;cursor:zoom-in;width:100%;overflow:hidden}
.rv-crop img{display:block;width:100%;height:auto}.rv-crop.none{padding:16px;color:#667;cursor:default;text-align:center}
.rv-amt-form{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;margin-top:6px}.rv-amt-form label{display:flex;flex-direction:column;font-size:.8em}
.rv-amt{font-size:1.4em;width:9em;padding:4px 8px}.rv-amt-facts dd b{font-size:1.1em}
kbd{display:inline-block;border:1px solid #b8c3d1;border-bottom-width:2px;border-radius:4px;padding:0 4px;font-size:.78em;background:#f6f8fb;color:#223;margin-left:4px;font-family:inherit}
.btn kbd{background:rgba(255,255,255,.85)}
body.rv-noscroll{overflow:hidden}
.rv-triage{position:fixed;inset:0;z-index:1000;background:#eef2f7;overflow:auto;padding:10px 14px 30px}
.rv-tri-bar{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;margin-bottom:10px}.rv-tri-bar .rv-filters{margin:0}
.rv-tri-count{font-weight:600;color:#0b2545}.rv-tri-nav{margin-left:auto;display:flex;gap:6px}
.rv-tri-card{max-width:1400px;margin:0 auto;padding:14px}
.rv-tri-amt{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start}@media(max-width:900px){.rv-tri-amt{grid-template-columns:1fr}}
.rv-tri-card .rv-crop.big{margin:8px 0}.rv-tri-card .rv-crop.big img{max-height:78vh;object-fit:contain;object-position:left top}
.rv-tri-side{position:sticky;top:8px}.rv-tri-side .rv-amt{width:100%;box-sizing:border-box}.rv-tri-side .rv-actions .btn{flex:1 1 auto}
.rv-tri-keys{max-width:1400px;margin:10px auto 0;color:#445;font-size:.9em}
.rv-lightbox{position:fixed;inset:0;z-index:1100;background:rgba(10,20,35,.85);display:flex;flex-direction:column}
.rv-lb-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:8px 12px;background:#fff}.rv-lb-bar [data-close]{margin-left:auto}
.rv-lb-body{flex:1;overflow:auto;text-align:center;padding:10px}.rv-lb-body img{max-width:100%;height:auto;background:#fff;cursor:zoom-in}
.rv-lb-body img.zoom{max-width:none;width:180%;cursor:zoom-out}

/* B1.54: guarantee clause shown apart from the AHL amount */
.rv-guar { margin: 6px 0; padding: 6px 10px; border-left: 3px solid #1f6feb; background: #eef4ff; border-radius: 4px; font-size: 0.92rem; }
.bonus-guar { white-space: nowrap; padding: 0 4px; border-radius: 3px; background: #eef4ff; color: #1f4fa0; }
/* B1.56: Approved Contracts team folders use the profile / team-folder table; keep the Signed / Received dates and "At launch" on one line */
.hist-table .ht-dates > span { white-space: nowrap; }
.hist-table .ht-amount > .ht-none, .hist-table .ht-echl > .ht-none { white-space: nowrap; }
/* B1.56: search / team-filter results hold the full contract table now (was a 760px list) */
.folder-season { max-width: none; }
/* B1.56 Review plain-English cards */
.rv-more{margin:4px 0 6px}.rv-more>summary{cursor:pointer;color:var(--muted,#667);font-size:.9em}
.rv-prof .btn.small.secondary,.rv-cand .btn.small.secondary{margin-top:6px}
.hist-table .ht-traded{white-space:nowrap;color:var(--muted,#667)}
/* B1.56 My Contracts: profile table + subtotal line */
.ms-group .hist-wrap{margin-bottom:6px}
.ms-subline{display:flex;flex-wrap:wrap;gap:6px 18px;justify-content:flex-end;padding:6px 10px;font-size:.92em;color:var(--ink,#1b2440);background:rgba(255,255,255,.85);border-radius:8px;margin-bottom:14px}
.ms-subline>span:first-child{margin-right:auto;font-weight:600}
.up-badge.released { background: #fde8e8; color: #8a1f1f; border: 1px solid #efc2c2; } /* B1.56 released contract */
/* B1.58: security status card (Admin > Website Logs) */
.sec-status { margin: 0 0 14px; }
.sec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sec-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #e3e9f1; border-radius: 10px; background: #fff; }
.sec-row.ok { border-color: #cfe8d6; background: #f5fbf7; }
.sec-row.warn { border-color: #f1d3a6; background: #fff8ee; }
.sec-row strong { display: block; color: var(--navy); }
.sec-row small { display: block; color: #4a5a70; overflow-wrap: anywhere; margin-top: 2px; }
.sec-dot { flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: #2e8b57; }
.sec-row.warn .sec-dot { background: #c77700; }
/* B1.59 (Jeff, Oct 22): League Documents > Contracts > team: past / upcoming season folders under the season table */
.lib-other-seasons { margin-top: 8px; }
.lib-season-title { margin-top: 18px; }
.lib-cur-back { margin: 10px 0 0; }
.season-folders.lib-seasons { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.season-folder.is-open { border: 2px solid var(--navy); background: #f2f6fc; }
.cur-tag.past { background: #eef1f6; color: #44546a; }
.cur-tag.up, .cur-tag.open { background: #e8effa; color: var(--navy); }
@media (max-width: 520px) { .season-folders.lib-seasons { grid-template-columns: 1fr 1fr; gap: 8px; } .season-folders.lib-seasons .season-folder { padding: 10px; gap: 8px; } .season-folders.lib-seasons .folder-icon.sm { width: 30px; height: 23px; } }
.lib-total .ms-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } /* B1.60-an: same 5 KPIs as My Contracts */
@media (max-width: 720px) { .lib-total .ms-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .lib-total .ms-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* B1.59: clickable links over document page images */
.doc-link-layer { position: absolute; inset: 0; pointer-events: none; }
.doc-link { position: absolute; pointer-events: auto; cursor: pointer; border-radius: 2px; border-bottom: 2px solid rgba(0, 82, 204, .55); }
.doc-link:hover, .doc-link:focus-visible { background: rgba(0, 102, 255, .14); outline: 2px solid #0a5ad6; outline-offset: 1px; }

/* ---------- B1.60: Add new user, starting-password field, login "Forgot password?", printable starting passwords ---------- */
.login-forgot { margin-top: 14px; text-align: center; line-height: 1.45; }
.adduser-form select, .setpw-modal select { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-top: 4px; background: #fff; color: var(--text); min-height: 44px; }
.adduser-form .hint { margin: 4px 0 0; }
.adduser-form .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .adduser-form .two-col { grid-template-columns: 1fr; } }
.login-row { display: flex; align-items: center; gap: 6px; }
.login-row input { flex: 1 1 auto; }
.login-at { font-weight: 600; color: var(--navy); margin-top: 4px; white-space: nowrap; }
.startpw-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.startpw-row input { flex: 1 1 220px; width: auto !important; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.setpw-modal .startpw-row input, .adduser-form .startpw-row input { width: 100%; font-size: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-top: 4px; background: #fff; color: var(--text); min-height: 44px; }
.startpw-row .btn { margin-top: 4px; }
.startpw-note { margin: 6px 0 4px; }
.printstart-modal input { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin: 4px 0 6px; min-height: 44px; }
.printstart-modal label { display: block; font-size: 13px; font-weight: 600; margin-top: 10px; }
.pwprint-wrap { position: fixed; inset: 0; z-index: 3000; background: var(--bg); overflow: auto; }
.pwprint { max-width: 860px; margin: 0 auto; padding: 18px 20px 40px; background: #fff; min-height: 100%; box-shadow: 0 0 0 1px var(--border); }
.pwprint-bar { position: sticky; top: 0; display: flex; gap: 8px; align-items: center; justify-content: flex-end; background: #fff; padding: 8px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.pwprint-bar span { margin-right: auto; color: var(--muted); font-size: 14px; }
.pwprint-head { display: flex; align-items: center; gap: 14px; }
.pwprint-head img { height: 56px; }
.pwprint-head h1 { margin: 0; color: var(--navy); font-size: 22px; }
.pwprint-meta { color: var(--muted); font-size: 13px; }
.pwprint-note { font-size: 13px; color: var(--text); background: #fff7e6; border: 1px solid #f0d9a8; border-radius: 8px; padding: 8px 10px; }
.pwprint-team { break-inside: avoid; page-break-inside: avoid; margin-top: 16px; }
.pwprint-team h2 { font-size: 16px; color: var(--navy); margin: 0 0 6px; border-bottom: 2px solid var(--navy); padding-bottom: 3px; }
.pwprint table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pwprint th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 6px; }
.pwprint td { padding: 7px 6px; border-top: 1px solid #e2e8f0; }
.pwprint td code { font-size: 15px; font-weight: 600; letter-spacing: .02em; }
@media print {
  body.pwprint-open > *:not(.pwprint-wrap) { display: none !important; }
  .pwprint-wrap { position: static; background: #fff; overflow: visible; }
  .pwprint { box-shadow: none; padding: 0; max-width: none; }
  .pwprint .no-print { display: none !important; }
}
/* B1.60: "an AHL CR admin activates / resets" note for CR staff in the account panel reads as normal text, not a label */
.acct-sec .acct-actions p.acct-adminonly, p.acct-adminonly { flex-basis: 100%; margin: 2px 0 6px; font-size: 13.5px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }

/* B1.60-m (Jeff t376u/t377u, Oct 23 ET): wide contract tables (Approved team folders, My Contracts, League Documents team
   folders, player profile history, playing history) scroll sideways with a finger, trackpad or mouse instead of being cut off.
   .hist-wrap keeps the rounded card; .hist-scroll inside it scrolls. Full desktop width (1200px and up) looks the same as before. */
.hist-wrap { position: relative; }
.hist-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x pan-y pinch-zoom; scrollbar-width: thin; scrollbar-color: #b9c6d8 transparent; }
.hist-scroll::-webkit-scrollbar { height: 8px; }
.hist-scroll::-webkit-scrollbar-thumb { background: #b9c6d8; border-radius: 8px; }
.hist-scroll::-webkit-scrollbar-track { background: transparent; }
.tscroll-hint { display: none; padding: 6px 12px; font-size: 12px; font-weight: 600; line-height: 1.3; color: #3d5170; background: #eef3f9; border-bottom: 1px solid #dfe7f1; }
.tscroll-hint .th-mouse { display: none; }
.tscroll-hint .th-arrow { display: inline-block; animation: tscroll-nudge 1.6s ease-in-out 2; }
@keyframes tscroll-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .tscroll-hint .th-arrow { animation: none; } }
@media (hover: hover) and (pointer: fine) { .tscroll-hint .th-touch { display: none; } .tscroll-hint .th-mouse { display: inline; } }
.hist-wrap.is-scroll > .tscroll-hint { display: block; }
/* right-edge shade = more columns that way (pointer-events none, so it never blocks a tap on View Contract) */
.hist-wrap::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 24px; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 4;
  background: linear-gradient(to left, rgba(0,26,61,.20), rgba(0,26,61,0)); }
.hist-wrap.can-right::after { opacity: 1; }
.hist-wrap::before { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 18px; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 4;
  background: linear-gradient(to right, rgba(0,26,61,.16), rgba(0,26,61,0)); }
.hist-wrap.can-left:not(:has(.team-table))::before { opacity: 1; }
@media (max-width: 680px) { .hist-wrap.is-scroll > .tscroll-hint { border-radius: 10px; margin-bottom: 8px; border: 0; } }
/* team tables: the Player column stays pinned on the left while the other columns slide under it */
@media (min-width: 681px) {
  .hist-wrap.is-scroll .team-table td.ht-player, .hist-wrap.is-scroll .team-table thead th:nth-child(2) { position: sticky; left: 0; z-index: 2; }
  .hist-wrap.is-scroll .team-table td.ht-player { background: #fff; }
  .hist-wrap.is-scroll .team-table tbody tr:nth-child(even) td.ht-player { background: #f5f7fb; }
  .hist-wrap.is-scroll .team-table thead th:nth-child(2) { background: var(--navy); }
  .hist-wrap.can-left .team-table td.ht-player, .hist-wrap.can-left .team-table thead th:nth-child(2) { box-shadow: 7px 0 7px -5px rgba(0,26,61,.28); }
}
/* tablets, folded/unfolded phones in table mode, small laptops: slightly smaller text and tighter (still separated) columns */
@media (min-width: 681px) and (max-width: 1199px) {
  .hist-table { font-size: 13px; }
  .hist-table thead th { padding: 8px 8px; font-size: 11px; letter-spacing: .03em; }
  .hist-table td { padding: 8px 8px; }
  .team-table { font-size: 12.5px; }
  .team-table td { padding: 7px 7px; }
  .team-table thead th { padding: 8px 7px; }
  .team-table .ht-num { width: 40px; }
  .team-table .ht-pos { width: 36px; }
  .hist-table .ht-team .hr-logo { width: 22px; height: 22px; }
  .hist-table .ht-team-in { gap: 6px; }
  .hist-table .ht-season small, .hist-table .ht-dates { font-size: 11.5px; }
  .hist-table .ht-dates b { min-width: 56px; }
  .hist-table .ht-view .btn.small { padding: 6px 10px; font-size: 12.5px; }
}
/* Manage Accounts list: columns may shrink instead of being cut off when the browser text size is turned up
   (same widths as before whenever they fit, so desktop is unchanged) */
@media (min-width: 900px) {
  .acct-table .acct-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) minmax(0, 140px) minmax(0, 150px) minmax(0, 160px) minmax(76px, 92px); }
  .acct-table .acct-row > span { overflow-wrap: anywhere; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .acct-table .acct-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 120px) minmax(0, 132px) minmax(0, 136px) minmax(76px, 84px); }
}

/* B1.60-x (Jeff t399u): AHL playing history stays one table row per season/team on every screen.
   Overrides the shared .hist-table phone "cards" (<=680px) and the old .ph-table 4-column grid (<=720px) for this table only. */
@media (max-width: 720px) {
  .hist-wrap:has(.ph-table) { background: #fff; box-shadow: 0 2px 6px rgba(0,26,61,.12); border-radius: 12px; overflow: hidden; }
  .ph-table { display: table; width: 100%; table-layout: auto; border-collapse: collapse; font-size: 14px; }
  .ph-table thead { display: table-header-group; }
  .ph-table tbody { display: table-row-group; }
  .ph-table tr { display: table-row; width: auto; padding: 0; margin: 0; background: none; border-radius: 0; box-shadow: none; }
  .ph-table th, .ph-table td, .ph-table td.num { display: table-cell; width: auto; padding: 9px 7px; vertical-align: middle; }
  .ph-table td { border-top: 1px solid var(--border); }
  .ph-table td[data-label]::before, .ph-table td.num::before { content: none; display: none; }
  .ph-table tbody tr:nth-child(even) td { background: #f5f7fb; }
  .ph-table th { font-size: 11px; letter-spacing: .03em; }
  .ph-table th:first-child, .ph-table td:first-child { padding-left: 12px; white-space: nowrap; }
  .ph-table th:last-child, .ph-table td:last-child { padding-right: 12px; }
  .ph-table td[data-label="Team"] { white-space: normal; overflow-wrap: break-word; hyphens: manual; line-height: 1.3; }
  .ph-table th.num, .ph-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
}
@media (max-width: 420px) {
  .ph-table { font-size: 13px; }
  .ph-table th, .ph-table td, .ph-table td.num { padding: 8px 5px; }
  .ph-table th { font-size: 10.5px; letter-spacing: .02em; }
  .ph-table th:first-child, .ph-table td:first-child { padding-left: 10px; }
  .ph-table th:last-child, .ph-table td:last-child { padding-right: 10px; }
  /* goalie record has 5 stat columns (GP W L GAA SV%): a little tighter so it still fits a 360px screen */
  .ph-table:has(th:nth-child(7)) { font-size: 12.5px; }
  .ph-table:has(th:nth-child(7)) th, .ph-table:has(th:nth-child(7)) td, .ph-table:has(th:nth-child(7)) td.num { padding-left: 4px; padding-right: 4px; }
  .ph-table:has(th:nth-child(7)) th:first-child, .ph-table:has(th:nth-child(7)) td:first-child { padding-left: 8px; }
  .ph-table:has(th:nth-child(7)) th:last-child, .ph-table:has(th:nth-child(7)) td:last-child { padding-right: 8px; }
}
/* B1.60-af (Jeff t402u, Oct 23 2026): empty AHL salary / ECHL salary / Bonuses cell on the player profile, CR admin only:
   a quiet gray italic "enter now" that opens the amounts editor. Everyone else keeps the plain "—". */
.hist-table .ht-enter { background: none; border: 0; padding: 2px 0; margin: 0; font: inherit; font-size: .92em; font-style: italic; font-weight: 400; color: #8a94a6; text-decoration: underline dotted rgba(138,148,166,.6); text-underline-offset: 3px; cursor: pointer; white-space: nowrap; text-transform: none; letter-spacing: 0; }
.hist-table .ht-enter:hover, .hist-table .ht-enter:focus-visible { color: #0b4fa8; text-decoration-color: currentColor; }
@media (max-width: 680px) { .hist-table .ht-enter { font-size: .88em; padding: 4px 0; min-height: 24px; } }
.tm-modal label { display: block; margin-bottom: 10px; font-weight: 600; }
.tm-modal input { display: block; width: 100%; box-sizing: border-box; font-size: 16px; padding: 10px 12px; margin-top: 4px; border: 1px solid #c9d3e1; border-radius: 10px; background: #fff; font-weight: 400; }
.tm-modal input:focus { outline: 2px solid #0b4fa8; outline-offset: 1px; border-color: #0b4fa8; }
.tm-modal .tm-note { margin: 2px 0 8px; font-size: 12.5px; }
.rv-profile-entry dd small { display: block; }

/* B1.60-aj (Jeff t427u): reduce left-edge browser/PWA close-app swipe; table pans keep their own touch-action */
html, body { overscroll-behavior-x: none; }
@media (max-width: 699px) {
  .app { overscroll-behavior-x: none; }
}

/* B1.60-ar: branded folders — Jeff t456u–t488u (Contracts red, Legal soft plum, home 🔍 visible) */
/* Soft top→bottom blend helper stops (shared language) */
/* --*-top / --*-bot drive a multi-stop linear-gradient; head/body strips stay transparent */

/* ========== Team folders ========== */
.team-folder.branded {
  --tf-raw: #00468B;
  --tf-c: color-mix(in srgb, var(--tf-raw) 68%, #ffffff);
  --tf-soft: color-mix(in srgb, var(--tf-raw) 8%, #ffffff);
  --tf-edge: color-mix(in srgb, var(--tf-raw) 40%, #7a8799);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 10px 14px;
  background: linear-gradient(180deg, var(--tf-c) 0%, color-mix(in srgb, var(--tf-c) 70%, var(--tf-soft)) 38%, color-mix(in srgb, var(--tf-c) 28%, var(--tf-soft)) 62%, var(--tf-soft) 82%, var(--tf-soft) 100%);
  border: 1px solid var(--tf-edge);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: inherit;
  box-shadow: 0 3px 12px rgba(0, 26, 61, 0.2), inset 0 1px 0 rgba(255,255,255,0.28);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.team-folder.branded:hover, .team-folder.branded:focus-visible {
  border-color: color-mix(in srgb, var(--tf-raw) 30%, #fff);
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px rgba(255,255,255,.55), 0 10px 22px rgba(0,26,61,.3), inset 0 1px 0 rgba(255,255,255,.32);
}
.team-folder.branded .tf-tab { display: none !important; }
.team-folder.branded .tf-mark { display: none !important; }

.team-folder.branded .tf-logo {
  width: 86px; height: 86px;
  display: grid; place-items: center;
  margin-top: 2px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 40%, #ffffff 0%, #ffffff 70%, rgba(255,255,255,.88) 86%, rgba(255,255,255,.55) 100%);
  box-shadow:
    0 0 0 2.5px rgba(255,255,255,.95),
    0 2px 4px rgba(0,0,0,.18),
    0 6px 14px rgba(0,0,0,.32),
    0 10px 20px rgba(0,0,0,.18);
  position: relative; z-index: 1;
  overflow: hidden;
}
.team-folder.branded .tf-logo img {
  max-width: 68px; max-height: 68px; width: auto; height: auto; object-fit: contain;
  display: block;
  margin: 0 auto;
  filter:
    drop-shadow(0 1px 0 rgba(255,255,255,.35))
    drop-shadow(0 3px 2px rgba(0,0,0,.28))
    drop-shadow(0 8px 10px rgba(0,0,0,.32));
  transform: translateY(-1px) scale(1.02);
}
/* Optical center logos in white disc (Jeff t471u) — visual COM, not file bbox */
.team-folder.branded[data-team="abbotsford"] .tf-logo img, .af-team-head.branded[data-team="abbotsford"] .tf-logo img { transform: translate(-1.4px, 0.6px) scale(1.02); }
.team-folder.branded[data-team="bakersfield"] .tf-logo img, .af-team-head.branded[data-team="bakersfield"] .tf-logo img { transform: translate(2.7px, -2.0px) scale(1.02); }
.team-folder.branded[data-team="belleville"] .tf-logo img, .af-team-head.branded[data-team="belleville"] .tf-logo img { transform: translate(0.7px, -1.1px) scale(1.02); }
.team-folder.branded[data-team="calgary"] .tf-logo img, .af-team-head.branded[data-team="calgary"] .tf-logo img { transform: translate(4.6px, 1.4px) scale(1.02); }
.team-folder.branded[data-team="charlotte"] .tf-logo img, .af-team-head.branded[data-team="charlotte"] .tf-logo img { transform: translate(1.0px, 0.3px) scale(1.02); }
.team-folder.branded[data-team="chicago"] .tf-logo img, .af-team-head.branded[data-team="chicago"] .tf-logo img { transform: translate(-5.2px, -3.9px) scale(1.02); }
.team-folder.branded[data-team="coachella"] .tf-logo img, .af-team-head.branded[data-team="coachella"] .tf-logo img { transform: translate(0.0px, -3.5px) scale(1.02); }
.team-folder.branded[data-team="colorado"] .tf-logo img, .af-team-head.branded[data-team="colorado"] .tf-logo img { transform: translate(2.2px, -4.9px) scale(1.02); }
.team-folder.branded[data-team="grandrapids"] .tf-logo img, .af-team-head.branded[data-team="grandrapids"] .tf-logo img { transform: translate(-2.8px, -5.5px) scale(1.02); }
.team-folder.branded[data-team="hamilton"] .tf-logo img, .af-team-head.branded[data-team="hamilton"] .tf-logo img { transform: translate(0.2px, -2.5px) scale(1.02); }
.team-folder.branded[data-team="hartford"] .tf-logo img, .af-team-head.branded[data-team="hartford"] .tf-logo img { transform: translate(-0.8px, -5.6px) scale(1.02); }
.team-folder.branded[data-team="hershey"] .tf-logo img, .af-team-head.branded[data-team="hershey"] .tf-logo img { transform: translate(0.8px, -0.3px) scale(1.02); }
.team-folder.branded[data-team="iowa"] .tf-logo img, .af-team-head.branded[data-team="iowa"] .tf-logo img { transform: translate(1.1px, -1.8px) scale(1.02); }
.team-folder.branded[data-team="laval"] .tf-logo img, .af-team-head.branded[data-team="laval"] .tf-logo img { transform: translate(1.7px, -0.2px) scale(1.02); }
.team-folder.branded[data-team="lehighvalley"] .tf-logo img, .af-team-head.branded[data-team="lehighvalley"] .tf-logo img { transform: translate(0.7px, 1.0px) scale(1.02); }
.team-folder.branded[data-team="manitoba"] .tf-logo img, .af-team-head.branded[data-team="manitoba"] .tf-logo img { transform: translate(-0.9px, -4.8px) scale(1.02); }
.team-folder.branded[data-team="milwaukee"] .tf-logo img, .af-team-head.branded[data-team="milwaukee"] .tf-logo img { transform: translate(0.1px, -2.4px) scale(1.02); }
.team-folder.branded[data-team="ontario"] .tf-logo img, .af-team-head.branded[data-team="ontario"] .tf-logo img { transform: translate(0.1px, -3.5px) scale(1.02); }
.team-folder.branded[data-team="rochester"] .tf-logo img, .af-team-head.branded[data-team="rochester"] .tf-logo img { transform: translate(-0.4px, -2.6px) scale(1.02); }
.team-folder.branded[data-team="sandiego"] .tf-logo img, .af-team-head.branded[data-team="sandiego"] .tf-logo img { transform: translate(-1.5px, -4.8px) scale(1.02); }
.team-folder.branded[data-team="sanjose"] .tf-logo img, .af-team-head.branded[data-team="sanjose"] .tf-logo img { transform: translate(4.7px, 0.1px) scale(1.02); }
.team-folder.branded[data-team="springfield"] .tf-logo img, .af-team-head.branded[data-team="springfield"] .tf-logo img { transform: translate(-0.3px, -0.2px) scale(1.02); }
.team-folder.branded[data-team="syracuse"] .tf-logo img, .af-team-head.branded[data-team="syracuse"] .tf-logo img { transform: translate(-1.6px, -1.1px) scale(1.02); }
.team-folder.branded[data-team="texas"] .tf-logo img, .af-team-head.branded[data-team="texas"] .tf-logo img { transform: translate(0.4px, -3.6px) scale(1.02); }
.team-folder.branded[data-team="toronto"] .tf-logo img, .af-team-head.branded[data-team="toronto"] .tf-logo img { transform: translate(0.1px, -2.7px) scale(1.02); }
.team-folder.branded[data-team="tucson"] .tf-logo img, .af-team-head.branded[data-team="tucson"] .tf-logo img { transform: translate(-1.3px, -5.1px) scale(1.02); }
.team-folder.branded[data-team="utica"] .tf-logo img, .af-team-head.branded[data-team="utica"] .tf-logo img { transform: translate(0.6px, 0.9px) scale(1.02); }
.team-folder.branded[data-team="wilkesbarre"] .tf-logo img, .af-team-head.branded[data-team="wilkesbarre"] .tf-logo img { transform: translate(0.0px, 2.8px) scale(1.02); }
.team-folder.branded .tf-name {
  font-weight: 800; font-size: 13.5px; line-height: 1.2;
  color: #0b1220;
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
  padding: 0 2px;
  position: relative; z-index: 1;
}
.team-folder.branded .tf-count,
.team-folder .tf-count {
  font-size: 12px; font-weight: 500; line-height: 1.25;
  color: #243044;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;
  border-radius: 0 !important;
  display: block;
  position: relative; z-index: 1;
}
.team-folder.branded .tf-count small { color: #5a6578; font-weight: 500; }
@media (max-width: 600px) {
  .team-folder.branded { padding: 14px 6px 12px; }
  .team-folder.branded .tf-logo { width: 72px; height: 72px; }
  .team-folder.branded .tf-logo img { max-width: 56px; max-height: 56px; }
  .team-folder.branded .tf-name { font-size: 12.5px; }
}

.team-folder.branded[data-team="abbotsford"], .af-team-head.branded[data-team="abbotsford"], .af-team-total[data-team="abbotsford"] { --tf-raw: #00205B; }
.team-folder.branded[data-team="bakersfield"], .af-team-head.branded[data-team="bakersfield"], .af-team-total[data-team="bakersfield"] { --tf-raw: #041E42; }
.team-folder.branded[data-team="belleville"], .af-team-head.branded[data-team="belleville"], .af-team-total[data-team="belleville"] { --tf-raw: #E31837; }
.team-folder.branded[data-team="calgary"], .af-team-head.branded[data-team="calgary"], .af-team-total[data-team="calgary"] { --tf-raw: #D2001C; }
.team-folder.branded[data-team="charlotte"], .af-team-head.branded[data-team="charlotte"], .af-team-total[data-team="charlotte"] { --tf-raw: #E31837; }
.team-folder.branded[data-team="chicago"], .af-team-head.branded[data-team="chicago"], .af-team-total[data-team="chicago"] { --tf-raw: #8B2332; }
.team-folder.branded[data-team="cleveland"], .af-team-head.branded[data-team="cleveland"], .af-team-total[data-team="cleveland"] { --tf-raw: #6F263D; }
.team-folder.branded[data-team="coachella"], .af-team-head.branded[data-team="coachella"], .af-team-total[data-team="coachella"] { --tf-raw: #E87722; }
.team-folder.branded[data-team="colorado"], .af-team-head.branded[data-team="colorado"], .af-team-total[data-team="colorado"] { --tf-raw: #8C2633; }
.team-folder.branded[data-team="grandrapids"], .af-team-head.branded[data-team="grandrapids"], .af-team-total[data-team="grandrapids"] { --tf-raw: #C8102E; }
.team-folder.branded[data-team="hamilton"], .af-team-head.branded[data-team="hamilton"], .af-team-total[data-team="hamilton"] { --tf-raw: #003087; }
.team-folder.branded[data-team="hartford"], .af-team-head.branded[data-team="hartford"], .af-team-total[data-team="hartford"] { --tf-raw: #0057B8; }
.team-folder.branded[data-team="henderson"], .af-team-head.branded[data-team="henderson"], .af-team-total[data-team="henderson"] { --tf-raw: #2a2a2a; }
.team-folder.branded[data-team="hershey"], .af-team-head.branded[data-team="hershey"], .af-team-total[data-team="hershey"] { --tf-raw: #5C3317; }
.team-folder.branded[data-team="iowa"], .af-team-head.branded[data-team="iowa"], .af-team-total[data-team="iowa"] { --tf-raw: #015239; }
.team-folder.branded[data-team="laval"], .af-team-head.branded[data-team="laval"], .af-team-total[data-team="laval"] { --tf-raw: #001E62; }
.team-folder.branded[data-team="lehighvalley"], .af-team-head.branded[data-team="lehighvalley"], .af-team-total[data-team="lehighvalley"] { --tf-raw: #F74902; }
.team-folder.branded[data-team="manitoba"], .af-team-head.branded[data-team="manitoba"], .af-team-total[data-team="manitoba"] { --tf-raw: #002B5C; }
.team-folder.branded[data-team="milwaukee"], .af-team-head.branded[data-team="milwaukee"], .af-team-total[data-team="milwaukee"] { --tf-raw: #00205B; }
.team-folder.branded[data-team="ontario"], .af-team-head.branded[data-team="ontario"], .af-team-total[data-team="ontario"] { --tf-raw: #4A2582; }
.team-folder.branded[data-team="providence"], .af-team-head.branded[data-team="providence"], .af-team-total[data-team="providence"] { --tf-raw: #E0A010; }
.team-folder.branded[data-team="rochester"], .af-team-head.branded[data-team="rochester"], .af-team-total[data-team="rochester"] { --tf-raw: #002D62; }
.team-folder.branded[data-team="rockford"], .af-team-head.branded[data-team="rockford"], .af-team-total[data-team="rockford"] { --tf-raw: #C8102E; }
.team-folder.branded[data-team="sandiego"], .af-team-head.branded[data-team="sandiego"], .af-team-total[data-team="sandiego"] { --tf-raw: #F47A38; }
.team-folder.branded[data-team="sanjose"], .af-team-head.branded[data-team="sanjose"], .af-team-total[data-team="sanjose"] { --tf-raw: #006666; }
.team-folder.branded[data-team="springfield"], .af-team-head.branded[data-team="springfield"], .af-team-total[data-team="springfield"] { --tf-raw: #041E42; }
.team-folder.branded[data-team="syracuse"], .af-team-head.branded[data-team="syracuse"], .af-team-total[data-team="syracuse"] { --tf-raw: #0033A0; }
.team-folder.branded[data-team="texas"], .af-team-head.branded[data-team="texas"], .af-team-total[data-team="texas"] { --tf-raw: #006341; }
.team-folder.branded[data-team="toronto"], .af-team-head.branded[data-team="toronto"], .af-team-total[data-team="toronto"] { --tf-raw: #00205B; }
.team-folder.branded[data-team="tucson"], .af-team-head.branded[data-team="tucson"], .af-team-total[data-team="tucson"] { --tf-raw: #AF1E2D; }
.team-folder.branded[data-team="utica"], .af-team-head.branded[data-team="utica"], .af-team-total[data-team="utica"] { --tf-raw: #00843D; }
.team-folder.branded[data-team="wilkesbarre"], .af-team-head.branded[data-team="wilkesbarre"], .af-team-total[data-team="wilkesbarre"] { --tf-raw: #C5A572; }
.team-folder.branded[data-team="demo"], .af-team-head.branded[data-team="demo"], .af-team-total[data-team="demo"] { --tf-raw: #00468B; }

.team-folder.branded[data-team="providence"],
.team-folder.branded[data-team="wilkesbarre"] { --tf-soft: #fff8e8; }
.team-folder.branded[data-team="lehighvalley"] { --tf-soft: #fff1e8; }
.team-folder.branded[data-team="sandiego"] { --tf-soft: #fff3eb; }
.team-folder.branded[data-team="coachella"] { --tf-soft: #fff2e8; }

/* ========== Season cards (soft blend + contained AHL) ========== */
.season-folders:has(.af-season.branded) {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.season-folder.af-season.branded {
  --sf-top: #7a8796;
  --sf-bot: #e4eaef;
  --sf-ink: #122033;
  --sf-meta: #243044;
  --sf-icon: #5a6b7c;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  min-height: 148px;
  overflow: visible; /* Jeff t475u: icon pop not clipped; marks inset */
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg,
    var(--sf-top) 0%,
    color-mix(in srgb, var(--sf-top) 70%, var(--sf-bot)) 28%,
    color-mix(in srgb, var(--sf-top) 32%, var(--sf-bot)) 55%,
    color-mix(in srgb, var(--sf-top) 10%, var(--sf-bot)) 78%,
    var(--sf-bot) 100%);
  box-shadow:
    0 8px 22px rgba(0, 30, 70, .18),
    0 2px 6px rgba(0, 20, 50, .12);
  color: var(--sf-ink);
  text-align: center;
  position: relative;
  z-index: 1;
  transition: transform .12s ease, box-shadow .12s ease;
}
.season-folder.af-season.branded:hover,
.season-folder.af-season.branded:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 30, 70, .26), 0 4px 10px rgba(0, 20, 50, .16);
  outline: none;
}
.season-folder.af-season.branded.sf-kind-past,
.season-folder.af-season.branded[data-sf-kind="past"] {
  --sf-top: #7a8796;
  --sf-bot: #e4eaef;
  --sf-ink: #122033;
  --sf-meta: #2a3648;
  --sf-icon: #5a6b7c;
}
.season-folder.af-season.branded.sf-kind-current,
.season-folder.af-season.branded[data-sf-kind="current"] {
  --sf-top: #E83840;
  --sf-bot: #f7d8cc;
  --sf-ink: #2a0c12;
  --sf-meta: #3a141c;
  --sf-icon: #E83840;
}
.season-folder.af-season.branded.sf-kind-upcoming,
.season-folder.af-season.branded[data-sf-kind="upcoming"] {
  --sf-top: #00468B;
  --sf-bot: #d4e6f4;
  --sf-ink: #0a1628;
  --sf-meta: #1a2a3e;
  --sf-icon: #00468B;
}
.season-folder.af-season.branded .sf-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  background: transparent;
  color: #fff;
  padding: 12px 14px 20px 14px;
  min-height: 56px;
  box-sizing: border-box;
  border-radius: 14px 14px 0 0;
  text-align: left;
  position: relative;
  overflow: visible;
  z-index: 2;
}
.season-folder.af-season.branded .sf-head strong {
  display: block;
  color: #fff !important;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.2;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  flex: 1 1 auto;
  min-width: 0;
}
.season-folder.af-season.branded .sf-body {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  padding: 18px 14px 14px;
  background: transparent;
  min-height: 96px;
  overflow: hidden;
  border-radius: 0 0 14px 14px;
  text-align: left;
}
.season-folder.af-season.branded .sf-mark {
  position: absolute;
  right: 6px; bottom: 4px;
  width: 48px; height: 48px;
  object-fit: contain;
  opacity: .08; /* Jeff t476u: smaller subtle add-on */
  pointer-events: none;
  user-select: none;
  filter: grayscale(.15);
  z-index: 0;
}
.season-folder.af-season.branded .sf-icon {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: 48px; height: 48px;
  margin: 0 0 -26px 0;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  z-index: 3;
  flex: 0 0 48px;
  align-self: flex-end;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px color-mix(in srgb, var(--sf-icon) 35%, #fff),
    0 6px 14px rgba(0,0,0,.28),
    0 2px 4px rgba(0,0,0,.18);
  color: var(--sf-icon);
}
.season-folder.af-season.branded .sf-icon svg { width: 32px; height: 32px; display: block; } /* t483u: fill white circle */
.season-folder.af-season.branded .sf-meta {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 2px; padding: 0; margin-top: 4px; text-align: left;
}
.season-folder.af-season.branded .sf-line,
.season-folder.af-season.branded .sf-meta small,
.season-folder.af-season.branded .sf-text small {
  display: block;
  font-size: 12.5px; font-weight: 600; line-height: 1.3;
  color: var(--sf-meta);
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  padding: 0 !important; margin: 0; border-radius: 0 !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.45);
  text-align: left;
}
.season-folder.af-season.branded .sf-pending {
  display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px;
  background: #f97316; color: #fff; font-size: 11px; font-weight: 700; line-height: 1.35;
  text-shadow: 0 1px 1px rgba(0,0,0,.25); box-shadow: 0 1px 3px rgba(180,70,0,.35);
}
.season-folder.af-season.branded .sf-go {
  position: absolute; right: 10px; bottom: 8px; z-index: 1;
  color: var(--sf-ink); font-size: 22px; font-weight: 700; opacity: .65;
}
.season-folder.af-season.branded > .folder-icon,
.season-folder.af-season.branded .folder-icon.sm { display: none !important; }
@media (max-width: 520px) {
  .season-folders:has(.af-season.branded) { grid-template-columns: 1fr 1fr; gap: 10px; }
  .season-folder.af-season.branded { min-height: 132px; }
  .season-folder.af-season.branded .sf-head strong { font-size: 13.5px; }
  .season-folder.af-season.branded .sf-icon { width: 42px; height: 42px; margin-bottom: -22px; flex-basis: 42px; }
  .season-folder.af-season.branded .sf-icon svg { width: 28px; height: 28px; }
}

/* ========== Admin hub tiles (soft blend + contained AHL) ========== */
.admin-hub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 14px;
  padding-top: 8px;
}
.admin-tool.branded {
  --ah-top: #3a516e;
  --ah-bot: #dce4ee;
  --ah-ink: #122033;
  --ah-icon: #4a7ec4;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  min-height: 140px;
  overflow: visible; /* Jeff t475u: icon pop not clipped; marks inset */
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg,
    var(--ah-top) 0%,
    color-mix(in srgb, var(--ah-top) 70%, var(--ah-bot)) 28%,
    color-mix(in srgb, var(--ah-top) 32%, var(--ah-bot)) 55%,
    color-mix(in srgb, var(--ah-top) 10%, var(--ah-bot)) 78%,
    var(--ah-bot) 100%);
  box-shadow:
    0 8px 22px rgba(0, 30, 70, .18),
    0 2px 6px rgba(0, 20, 50, .12);
  color: var(--ah-ink);
  text-align: left;
  position: relative;
  z-index: 1;
  cursor: pointer;
  font: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}
.admin-tool.branded:hover,
.admin-tool.branded:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 30, 70, .26), 0 4px 10px rgba(0, 20, 50, .16);
  outline: none;
}
/* Jeff t477u: Contracts stays AHL red; OTHER tiles each a distinct soft creative color */
.admin-tool.branded[data-tool="approved"] {
  --ah-top: #E83840; --ah-bot: #f7d8cc;
  --ah-ink: #2a0c12; --ah-icon: #E83840;
}
.admin-tool.branded[data-tool="accounts"] {
  /* slate-navy — people / accounts */
  --ah-top: #3d5a80; --ah-bot: #dce6f2;
  --ah-ink: #122033; --ah-icon: #3d5a80;
}
.admin-tool.branded[data-tool="activity"] {
  /* t486u: soft maroon (was gold/amber) */
  --ah-top: #8e3a4a; --ah-bot: #f0d8de;
  --ah-ink: #2a0e14; --ah-icon: #8e3a4a;
}
.admin-tool.branded[data-tool="weblogs"] {
  /* t486u: soft light green (was purple) */
  --ah-top: #5a9a6a; --ah-bot: #dff0e4;
  --ah-ink: #0e2014; --ah-icon: #5a9a6a;
}
.admin-tool.branded[data-tool="legal"] {
  /* t487u: soft plum — clearly distinct from Website Logs green */
  --ah-top: #8a5a7e; --ah-bot: #eddce8;
  --ah-ink: #241018; --ah-icon: #8a5a7e;
}
.admin-tool.branded[data-tool="help"] {
  /* soft sky — help */
  --ah-top: #3a8ec4; --ah-bot: #d6ebf7;
  --ah-ink: #0a1a28; --ah-icon: #3a8ec4;
}
.admin-tool.branded .ah-head {
  /* t482u: fixed icon slot so long titles (Legal) cannot shift the circle */
  display: block;
  background: transparent;
  color: #fff;
  padding: 12px 14px 28px 70px;
  min-height: 72px;
  box-sizing: border-box;
  border-radius: 14px 14px 0 0;
  text-align: left;
  position: relative;
  overflow: visible;
  z-index: 2;
}
.admin-tool.branded .ah-head strong {
  display: block;
  color: #fff !important;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.2;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  flex: 1 1 auto;
  min-width: 0;
}
.admin-tool.branded .ah-body {
  position: relative;
  flex: 1 1 auto;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  padding: 18px 14px 14px;
  background: transparent;
  min-height: 88px;
  overflow: hidden;
  border-radius: 0 0 14px 14px;
  text-align: left;
}
.admin-tool.branded .ah-mark {
  /* t485u: Admin hub only — faint AHL mark centered in the tile (not bottom-right / behind title) */
  position: absolute;
  left: 50%; top: 50%;
  right: auto; bottom: auto;
  transform: translate(-50%, -50%);
  width: 88px; height: 88px;
  object-fit: contain;
  opacity: .10;
  pointer-events: none;
  user-select: none;
  filter: grayscale(.15);
  z-index: 0;
}
.admin-tool.branded .ah-icon {
  /* t482u: absolute left so every Admin tile shares the same circle position */
  position: absolute !important;
  left: 14px;
  top: 12px;
  transform: none;
  width: 48px; height: 48px;
  margin: 0;
  border-radius: 50%;
  background: #fff;
  display: grid !important;
  place-items: center;
  z-index: 3;
  flex: none;
  align-self: auto;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px color-mix(in srgb, var(--ah-icon) 35%, #fff),
    0 6px 14px rgba(0,0,0,.28),
    0 2px 4px rgba(0,0,0,.18);
  color: var(--ah-icon) !important;
}
.admin-tool.branded .ah-icon svg { width: 32px; height: 32px; display: block; } /* t483u: fill white circle */
.admin-tool.branded .ah-body > span:not(.ah-icon):not(.ah-mark) {
  position: relative; z-index: 1;
  display: block;
  font-size: 12.5px; font-weight: 600; line-height: 1.35;
  color: var(--ah-ink);
  text-shadow: 0 1px 0 rgba(255,255,255,.45);
}
@media (max-width: 520px) {
  .admin-hub { grid-template-columns: 1fr 1fr; gap: 10px; }
  .admin-tool.branded { min-height: 124px; }
  .admin-tool.branded .ah-head strong { font-size: 13.5px; }
  .admin-tool.branded .ah-head { padding: 10px 12px 24px 60px; min-height: 64px; }
  .admin-tool.branded .ah-icon { width: 42px; height: 42px; left: 10px; top: 10px; margin: 0; flex-basis: auto; }
  .admin-tool.branded .ah-icon svg { width: 28px; height: 28px; }
}

/* ========== Home / club folders (soft blend, AHL red/blue, contained marks) ========== */
.folders.single:has(.home-folder.branded) {
  grid-template-columns: minmax(0, 320px);
  gap: 18px;
  margin-top: 18px;
  padding-top: 10px;
}
.cr-aside .folders.single:has(.home-folder.branded) { max-width: 340px; }
.folders.three:has(.home-folder.branded),
.folders.two:has(.home-folder.branded) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 24px auto;
  max-width: 960px;
  padding-top: 10px;
}
.folder.home-folder.branded {
  --hf-top: #3a516e;
  --hf-bot: #e8ecf1;
  --hf-ink: #122033;
  --hf-icon-bg: #4a7ec4;
  --hf-glow: rgba(74, 126, 196, .4);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  min-height: 168px;
  /* Jeff t475u: visible so circular icon can sit fully on top; marks are inset so they stay inside */
  overflow: visible;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg,
    var(--hf-top) 0%,
    color-mix(in srgb, var(--hf-top) 68%, var(--hf-bot)) 26%,
    color-mix(in srgb, var(--hf-top) 30%, var(--hf-bot)) 52%,
    color-mix(in srgb, var(--hf-top) 8%, var(--hf-bot)) 76%,
    var(--hf-bot) 100%);
  box-shadow:
    0 0 0 1px rgba(160, 190, 230, .28),
    0 10px 28px rgba(0, 20, 50, .22),
    0 2px 6px rgba(0, 20, 50, .12);
  cursor: pointer;
  text-align: center;
  color: var(--hf-ink);
  margin: 0;
  max-width: none;
  z-index: 1;
  transition: transform .12s ease, box-shadow .12s ease;
}
.folder.home-folder.branded:hover,
.folder.home-folder.branded:focus-visible {
  transform: translateY(-2px);
  outline: none;
  box-shadow:
    0 0 0 1px rgba(180, 210, 255, .5),
    0 14px 34px rgba(0, 20, 50, .28),
    0 4px 10px rgba(0, 20, 50, .14);
}
.folder.home-folder.branded.hf-admin {
  --hf-top: #3a516e;
  --hf-bot: #e5eaf1;
  --hf-icon-bg: #4a7ec4;
  --hf-glow: rgba(74, 126, 196, .45);
}
/* League Documents = AHL logo blue #00468B (Jeff t473u) */
.folder.home-folder.branded.hf-docs {
  --hf-top: #00468B;
  --hf-bot: #d5e4f4;
  --hf-icon-bg: #00468B;
  --hf-glow: rgba(0, 70, 139, .42);
}
/* My Contracts = AHL logo red #E83840 (Jeff t474u) */
.folder.home-folder.branded.hf-contracts {
  --hf-top: #E83840;
  --hf-bot: #f7d8cc;
  --hf-icon-bg: #E83840;
  --hf-glow: rgba(232, 56, 64, .4);
}
/* Sign = light eggshell so page bg shows through; card stands above (Jeff t470u) */
.folder.home-folder.branded.hf-sign {
  --hf-top: #c8c2b4;
  --hf-bot: rgba(251, 249, 244, 0.52);
  --hf-icon-bg: #8a8478;
  --hf-glow: rgba(120, 110, 95, .35);
  background: linear-gradient(180deg,
    rgba(200, 194, 180, 0.90) 0%,
    rgba(232, 226, 214, 0.72) 36%,
    rgba(244, 240, 232, 0.55) 68%,
    rgba(251, 249, 244, 0.42) 100%);
}
/* t487u: League Documents / PHPA / NHL CR "Contracts" tile = AHL red (Officials Profiles keeps hf-library teal) */
.folder.home-folder.branded.hf-library#openLibrary,
.lib-only .folder.home-folder.branded.hf-library {
  --hf-top: #E83840;
  --hf-bot: #f7d8cc;
  --hf-icon-bg: #E83840;
  --hf-glow: rgba(232, 56, 64, .4);
}
.folder.home-folder.branded.hf-library {
  --hf-top: #3a8a7a;
  --hf-bot: #d8ebe6;
  --hf-icon-bg: #0d5c4d;
  --hf-glow: rgba(13, 92, 77, .4);
}
.folder.home-folder.branded.hf-new {
  --hf-top: #6b5a9e;
  --hf-bot: #e4dcf2;
  --hf-icon-bg: #6b5a9e;
  --hf-glow: rgba(107, 90, 158, .4);
}
.folder.home-folder.branded.hf-staff {
  --hf-top: #2f5f8a;
  --hf-bot: #d9e6f2;
  --hf-icon-bg: #2f5f8a;
  --hf-glow: rgba(47, 95, 138, .4);
}

.folder.home-folder.branded .hf-head {
  display: block;
  height: 52px;
  background: transparent;
  flex: 0 0 auto;
  border-radius: 16px 16px 0 0;
  position: relative;
  z-index: 0;
  pointer-events: none; /* colors are background only; icon is the center piece */
}
.folder.home-folder.branded .hf-body {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 38px 16px 16px;
  background: transparent;
  min-height: 116px;
  /* Jeff t475u: visible so .hf-icon (top:-28px) is not clipped; card overflow:hidden still contains .hf-mark */
  overflow: visible;
  border-radius: 0 0 16px 16px;
  text-align: center;
}
/* Faint AHL mark fully inside folder (Jeff t470u) */
.folder.home-folder.branded .hf-mark {
  position: absolute;
  right: 8px; bottom: 6px;
  width: 56px; height: 56px;
  object-fit: contain;
  opacity: .08; /* Jeff t476u: smaller subtle add-on */
  pointer-events: none;
  user-select: none;
  filter: grayscale(.15);
  z-index: 0;
}
.folder.home-folder.branded .hf-icon {
  position: absolute;
  left: 50%;
  top: -28px;
  transform: translateX(-50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--hf-icon-bg);
  display: grid; place-items: center;
  z-index: 5; /* Jeff t475u: center piece above soft-blend background */
  box-shadow:
    0 0 0 4px #fff,
    0 0 0 6px color-mix(in srgb, var(--hf-icon-bg) 30%, #fff),
    0 0 18px var(--hf-glow),
    0 6px 14px rgba(0,0,0,.28);
}
.folder.home-folder.branded .hf-icon svg { width: 34px; height: 34px; display: block; } /* t483u: fill circle */
.folder.home-folder.branded .folder-icon { display: none !important; }
.folder.home-folder.branded strong {
  position: relative; z-index: 1;
  display: block;
  color: #0b1220 !important;
  font-size: 18px; font-weight: 800; line-height: 1.2;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
  margin-top: 2px;
}
.folder.home-folder.branded .folder-sub {
  position: relative; z-index: 1;
  display: block;
  color: #2a3648 !important;
  font-size: 12.5px; font-weight: 600; line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
  max-width: 28em;
}

/* PHPA Contracts lib-card — same language */
.lib-card.home-folder.branded,
.lib-only .lib-card.branded {
  /* reuse home-folder rules via class combo */
}

/* Home / CR-aside search — glass + magnifying glass emoji (Jeff t464u) */
.cr-aside .player-search,
.home-grid .player-search {
  max-width: 100%;
  margin: 8px 0 10px;
}
.cr-aside .player-search .ps-label,
.home-grid .player-search .ps-label {
  font-size: 15px; font-weight: 700; letter-spacing: .01em;
  color: #fff; text-shadow: 0 1px 3px rgba(0,20,50,.55);
  margin-bottom: 8px;
}
.cr-aside .ps-box .ps-ico,
.home-grid .ps-box .ps-ico {
  /* t488u: sit above glass input so 🔍 is visible again */
  left: 14px;
  z-index: 2;
  opacity: 1;
  font-size: 20px;
  line-height: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(20, 40, 80, .45);
  border-radius: 50%;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
  filter: none;
}
.cr-aside .ps-box input,
.home-grid .ps-box input {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.32);
  color: #fff;
  padding-left: 50px; /* t488u: room for 🔍 badge */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.cr-aside .ps-box input::placeholder,
.home-grid .ps-box input::placeholder { color: rgba(255,255,255,.72); }
.cr-aside .ps-box input:focus,
.home-grid .ps-box input:focus {
  outline: 2px solid rgba(255,255,255,.7);
  outline-offset: 1px;
  border-color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.22);
}
.cr-aside .ps-list,
.home-grid .ps-list { border-radius: 14px; }

/* ========== B1.60-at / t489u: Approved Contracts team page brand ========== */
/* Top-left: soft team-color folder-tile + white disc (team logo only, no AHL mark) */
.af-team-head.branded {
  --tf-raw: #00468B;
  --tf-c: color-mix(in srgb, var(--tf-raw) 68%, #ffffff);
  --tf-soft: color-mix(in srgb, var(--tf-raw) 8%, #ffffff);
  --tf-edge: color-mix(in srgb, var(--tf-raw) 40%, #7a8799);
  align-items: center;
  gap: 16px;
}
.af-team-head.branded > img { display: none !important; } /* legacy plain white tile */
.af-team-head.branded .af-logo {
  flex: 0 0 auto;
  width: 92px; height: 92px;
  display: grid; place-items: center;
  padding: 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--tf-c) 0%, color-mix(in srgb, var(--tf-c) 70%, var(--tf-soft)) 38%, color-mix(in srgb, var(--tf-c) 28%, var(--tf-soft)) 62%, var(--tf-soft) 82%, var(--tf-soft) 100%);
  border: 1px solid var(--tf-edge);
  box-shadow: 0 3px 12px rgba(0, 26, 61, 0.2), inset 0 1px 0 rgba(255,255,255,0.28);
}
.af-team-head.branded .af-logo .tf-logo {
  width: 72px; height: 72px;
  display: grid; place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 40%, #ffffff 0%, #ffffff 70%, rgba(255,255,255,.88) 86%, rgba(255,255,255,.55) 100%);
  box-shadow:
    0 0 0 2px rgba(255,255,255,.95),
    0 2px 4px rgba(0,0,0,.18),
    0 6px 14px rgba(0,0,0,.28);
  overflow: hidden;
}
.af-team-head.branded .af-logo .tf-logo img {
  max-width: 56px; max-height: 56px; width: auto; height: auto; object-fit: contain;
  display: block; margin: 0 auto;
  filter:
    drop-shadow(0 1px 0 rgba(255,255,255,.35))
    drop-shadow(0 3px 2px rgba(0,0,0,.28))
    drop-shadow(0 6px 8px rgba(0,0,0,.28));
  transform: translateY(-1px) scale(1.02);
  background: transparent; border-radius: 0; padding: 0;
}
@media (max-width: 520px) {
  .af-team-head.branded .af-logo { width: 76px; height: 76px; padding: 6px; border-radius: 14px; }
  .af-team-head.branded .af-logo .tf-logo { width: 60px; height: 60px; }
  .af-team-head.branded .af-logo .tf-logo img { max-width: 46px; max-height: 46px; }
}

/* Top search: home glass + 🔍 (same language as .home-grid / .cr-aside) */
.folder-tools .af-search.ps-box {
  position: relative;
  flex: 1 1 280px;
  min-width: 0;
}
.folder-tools .af-search .ps-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  opacity: 1;
  font-size: 20px;
  line-height: 1;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  color: #fff;
  background: rgba(20, 40, 80, .45);
  border-radius: 50%;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
  pointer-events: none;
}
.folder-tools .af-search .season-q {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px 12px 10px 50px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.32);
  color: #fff;
  border-radius: 10px;
  font-size: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.folder-tools .af-search .season-q::placeholder { color: rgba(255,255,255,.72); }
.folder-tools .af-search .season-q:focus {
  outline: none;
  border-color: rgba(255,255,255,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 0 0 3px rgba(255,255,255,.18);
}
.folder-tools .folder-team {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.folder-tools .folder-team option { color: #0b1f3a; background: #fff; }

/* Team total: subtle faint team-color wash (legible text/numbers/$) */
.af-team-total {
  --tf-raw: #00468B;
}
.af-team-total .ms-total.lib-total,
.af-team-total > .ms-total {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--tf-raw) 12%, #ffffff) 0%,
      color-mix(in srgb, var(--tf-raw) 5%, #ffffff) 45%,
      #ffffff 100%);
  border-color: color-mix(in srgb, var(--tf-raw) 22%, #d7dce5);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--tf-raw) 12%, rgba(11,31,58,.06));
}
