/* Opt-in pilot: shared site rules remain unchanged on other pages. */
.profile-pilot {
  --profile-gap:24px;
  --profile-button:#285e99;
  --profile-button-hover:#316faa;
}
.profile-pilot .page-shell { padding:24px var(--site-gutter) 48px; }
.profile-pilot [hidden] { display:none !important; }
.profile-pilot .profile-mobile-nav { display:none; }
.profile-pilot .profile-desktop-nav { min-width:0; }
.profile-pilot .profile-identity { margin-bottom:24px; }
.profile-pilot .profile-breadcrumb { display:inline-flex; padding:6px 0; margin-bottom:8px; }
.profile-pilot .profile-name-row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px 24px; }
.profile-pilot h1 { font-size:clamp(26px, 3vw, 34px); line-height:1.2; margin:4px 0 12px; overflow-wrap:anywhere; }
.profile-pilot .profile-identity-facts { display:flex; flex-wrap:wrap; gap:10px; margin:8px 0 0; }
.profile-pilot .profile-identity-facts div { min-width:0; padding:10px 16px; border:1px solid #2b3d57; border-radius:8px; background:var(--surface); }
.profile-pilot dt { color:var(--text-secondary); font-size:13px; }
.profile-pilot dd { margin:4px 0 0; font-variant-numeric:tabular-nums; }
.profile-pilot .profile-identity-facts dt { font-size:14px; }
.profile-pilot .profile-identity-facts dd { font-size:18px; white-space:nowrap; }
.profile-pilot .profile-tabs { padding:0; margin:0 0 24px; border:0; border-bottom:1px solid var(--border-soft); border-radius:0; background:transparent; box-shadow:none; }
.profile-pilot .profile-tabs .tb-current-tab-list { display:flex; gap:4px; overflow-x:auto; padding:0 0 4px; }
.profile-pilot .profile-tabs a { flex:0 0 auto; min-width:0; min-height:44px; display:flex; align-items:center; padding:10px 14px; border:0; border-radius:6px; background:transparent; color:var(--text-secondary); white-space:nowrap; }
.profile-pilot .profile-tabs a[aria-selected="true"] { color:var(--text); background:var(--surface-alt); box-shadow:inset 0 -2px var(--accent); }
.profile-pilot .profile-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.profile-pilot .profile-summary { display:flex; flex-direction:column; gap:8px; padding:18px 20px; border:1px solid #2b3d57; border-top-color:#4e5052; border-radius:8px; background:var(--surface); min-width:0; }
.profile-pilot h2 { font-size:20px; line-height:1.35; margin:0; }
.profile-pilot h3 { font-size:17px; line-height:1.4; }
.profile-pilot .profile-summary dl { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr)); gap:16px; margin:8px 0; }
.profile-pilot .profile-summary dd { font-size:26px; font-weight:650; white-space:nowrap; }
.profile-pilot .profile-summary p { margin:0; font-size:13px; line-height:1.55; }
.profile-pilot .profile-summary-links { display:flex; flex-wrap:wrap; gap:8px 20px; margin-top:auto; padding-top:8px; font-size:14px; }
.profile-pilot .profile-summary-links a { padding:6px 0; }
.profile-pilot .profile-section-note { color:var(--text-secondary); margin:0 0 20px; font-size:14px; }
.profile-pilot .profile-membership-panel { margin-top:24px; border-top:1px solid var(--border-soft); padding-top:12px; }
.profile-pilot summary { cursor:pointer; padding:10px 0; }
.profile-pilot .profile-membership-history { margin:12px 0; }
.profile-pilot .panel-heading { padding:0; margin:0 0 16px; display:flex; flex-wrap:wrap; align-items:center; gap:12px 24px; }
.profile-pilot .panel-heading .eyebrow { display:none; }
.profile-pilot .panel-heading h2 { padding-left:12px; border-left:3px solid var(--accent); }
.profile-pilot .panel, .profile-pilot .table-panel { padding:20px; border-color:var(--border-soft); border-radius:8px; box-shadow:none; min-width:0; }
.profile-pilot .table-panel > h3 { margin-top:0; }
.profile-pilot .table-panel > .table-wrap { margin:0; }
.profile-pilot .table-wrap { max-width:100%; overflow-x:auto; }
.profile-pilot table { width:100%; min-width:0; table-layout:auto; }
.profile-pilot th, .profile-pilot td { padding:10px 12px; font-size:14px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.profile-pilot th { color:var(--text-secondary); }
.profile-pilot th button { white-space:nowrap; min-height:28px; }
.profile-pilot .stats-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0 0 20px; }
.profile-pilot .compact-stats { padding:0; }
.profile-pilot .profile-tw-history .stats-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.profile-pilot .stat-card { padding:16px; box-shadow:none; border-color:var(--border-soft); min-width:0; }
.profile-pilot .stat-card::before { display:none; }
.profile-pilot .stat-card strong { font-size:24px; white-space:nowrap; overflow-wrap:normal; font-variant-numeric:tabular-nums; }
.profile-pilot .stat-card span { min-height:0; padding-top:0; }
.profile-pilot .stat-card small { line-height:1.5; margin-top:6px; }
.profile-pilot .button { background:var(--profile-button); border-color:var(--profile-button); color:#fff; min-height:40px; }
.profile-pilot .button:hover { background:var(--profile-button-hover); border-color:var(--profile-button-hover); }
.profile-pilot .button.secondary { background:var(--surface-alt); border-color:var(--border); color:var(--text); }
.profile-pilot .button.secondary:hover { background:var(--surface-raised); border-color:var(--text-muted); }
.profile-pilot input, .profile-pilot select { min-height:40px; max-width:100%; border-color:#647896; }
.profile-pilot :focus-visible { outline:2px solid var(--text); outline-offset:3px; }
.profile-pilot .player-history-limit-form, .profile-pilot .official-filter-form, .profile-pilot .analytics-history-filters { display:flex; flex-wrap:wrap; align-items:end; gap:12px; }
.profile-pilot .player-history-limit-form input[type=number] { width:90px; }
.profile-pilot .official-filter-form label, .profile-pilot .analytics-history-filters label { min-width:0; }
.profile-pilot .profile-table-toolbar { position:relative; display:flex; justify-content:flex-end; margin-bottom:12px; }
.profile-pilot .profile-column-menu { position:absolute; right:0; top:calc(100% + 6px); z-index:20; width:min(340px,calc(100vw - 72px)); max-height:420px; overflow-y:auto; padding:16px; border:1px solid var(--border); border-radius:8px; background:var(--surface-raised); box-shadow:var(--shadow-soft); }
.profile-pilot .profile-column-menu.opens-above { top:auto; bottom:calc(100% + 6px); }
.profile-pilot .profile-column-menu fieldset { border:0; padding:0; margin:0; }
.profile-pilot .profile-column-menu legend { font-weight:600; margin-bottom:8px; }
.profile-pilot .profile-column-menu label { display:flex; align-items:center; gap:10px; padding:6px 0; font-size:14px; }
.profile-pilot .profile-column-menu input { min-height:20px; width:18px; height:18px; }
.profile-pilot .profile-column-menu .button-row { gap:8px; margin-top:12px; }
.profile-pilot .table-panel:has(.profile-table-toolbar) { overflow:visible; }
.profile-pilot .analytics-summary-grid, .profile-pilot .history-summary-grid { grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); }
/* Keep the compact calendar and its explanation together within the section. */
.profile-pilot .profile-daily-tickets > .table-panel { padding:0; border:0; background:transparent; }
.profile-pilot .ticket-matrix-panel { min-width:0; margin-top:24px; padding-top:24px; border-top:1px solid var(--border-soft); gap:12px; }
.profile-pilot .ticket-matrix-heading { display:block; }
.profile-pilot .ticket-matrix-heading h3 { font-size:17px; }
.profile-pilot .ticket-matrix-count { font-size:14px; color:var(--text-secondary); margin-top:6px; }
.profile-pilot .ticket-matrix { min-width:0; max-width:100%; min-height:0; gap:4px; padding:2px 0 8px; }
.profile-pilot .ticket-week { gap:4px; }
.profile-pilot .ticket-day { flex:0 0 16px; width:16px; min-width:16px; height:16px; min-height:16px; border-radius:3px; }
.profile-pilot .ticket-day-no-data { background:transparent; border:1px dashed var(--text-muted); }
.profile-pilot .ticket-day-full-600 { background:var(--success); border:1px solid var(--success); }
.profile-pilot .ticket-day-under-600 { background:repeating-linear-gradient(135deg,var(--warning) 0 4px,#795610 4px 6px); border:1px solid var(--warning); }
.profile-pilot .ticket-matrix-legend { font-size:14px; gap:12px 20px; }
.profile-pilot .ticket-matrix-legend span { gap:8px; }
@media (max-width: 1000px) {
  .profile-pilot .stats-grid, .profile-pilot .profile-tw-history .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .profile-pilot .stats-grid, .profile-pilot .profile-tw-history .stats-grid { grid-template-columns:1fr; }
}
@media (max-width: 760px) {
  .profile-pilot .profile-desktop-nav { display:none; }
  .profile-pilot .profile-mobile-nav { display:block; position:relative; }
  .profile-pilot .site-header .header-inner { display:flex; flex-direction:row; align-items:center; flex-wrap:nowrap; gap:12px; padding:10px var(--site-gutter); }
  .profile-pilot .site-header .guild-name { font-size:15px; min-width:0; }
  .profile-pilot .brand-mark { width:32px; height:32px; flex-shrink:0; }
  .profile-pilot .profile-mobile-nav summary { min-height:44px; padding:10px 8px; white-space:nowrap; }
  .profile-pilot .profile-mobile-nav nav { position:absolute; right:0; top:100%; width:240px; display:flex; flex-direction:column; align-items:stretch; padding:12px; border:1px solid var(--border); border-radius:8px; background:var(--surface); box-shadow:var(--shadow-soft); }
  .profile-pilot .profile-mobile-nav nav a { min-height:44px; }
  .profile-pilot .profile-summary-grid { grid-template-columns:1fr; }
  .profile-pilot .profile-summary { padding:16px; }
  .profile-pilot .page-shell { padding-top:16px; }
  .profile-pilot .panel, .profile-pilot .table-panel { padding:16px; }
  .profile-pilot .analytics-history-heading { flex-direction:column; align-items:stretch; }
  .profile-pilot .button { min-height:44px; }
}
@media (max-width: 360px) {
  .profile-pilot .profile-summary dl { grid-template-columns:1fr; gap:12px; }
  .profile-pilot .profile-summary dd { font-size:24px; }
}

/* Approved direction: clear section boundaries with compact data within. */
.profile-pilot .profile-grouped-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; margin-bottom:16px; border:1px solid #2b3d57; border-radius:8px; background:var(--surface); }
.profile-pilot .profile-grouped-toolbar form { margin:0; align-items:center; }
.profile-pilot .profile-grouped-toolbar .profile-table-toolbar { margin:0 0 0 auto; }
.profile-pilot .profile-tb-history .stats-grid { grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr)); }
.profile-pilot .profile-membership-panel { border:0; padding:0; }
.profile-pilot .tb-current-tab-panel details > summary { display:inline-flex; width:fit-content; max-width:100%; align-items:center; gap:12px; min-height:44px; padding:10px 16px; border:1px solid #647896; border-radius:8px; background:var(--surface-alt); list-style:none; }
.profile-pilot .tb-current-tab-panel details > summary::-webkit-details-marker { display:none; }
.profile-pilot .tb-current-tab-panel details > summary::after { content:'+'; }
.profile-pilot .tb-current-tab-panel details[open] > summary::after { content:'\2212'; }
.profile-pilot .profile-membership-panel[open] { border:1px solid #2b3d57; border-radius:8px; padding:16px; background:var(--surface); }
.profile-pilot .ticket-months { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr)); gap:16px; width:100%; max-width:1600px; }
.profile-pilot .ticket-month { padding:16px; border:1px solid #2b3d57; border-radius:8px; background:var(--surface); min-width:0; }
.profile-pilot .ticket-month h4 { margin:0 0 12px; font-size:15px; font-weight:600; }
.profile-pilot .ticket-month-grid { display:grid; grid-template-columns:repeat(7,20px); gap:4px; }
.profile-pilot .ticket-weekday { font-size:11px; color:var(--text-secondary); text-align:center; }
.profile-pilot .ticket-month-grid .ticket-day { display:flex; align-items:center; justify-content:center; width:20px; min-width:20px; height:20px; min-height:20px; font-size:10px; font-weight:650; color:var(--background); cursor:pointer; }
.profile-pilot .ticket-month-grid .ticket-day-no-data { color:var(--text-secondary); }
.profile-pilot .ticket-day-under-600 { background:repeating-linear-gradient(135deg,var(--warning) 0 4px,#e9bf70 4px 6px); }
.profile-pilot .ticket-day-description { margin:0; font-size:14px; color:var(--text-secondary); }
@media (max-width:760px) {
  .profile-pilot .profile-summary dd { font-size:24px; }
}
@media (min-width:361px) and (max-width:420px) {
  .profile-pilot .ticket-month { display:grid; grid-template-columns:minmax(0,1fr) 164px; align-items:start; gap:12px; }
}
