/* Opt-in history layouts. Results pages and global table rules are unchanged. */
.event-history-pilot [hidden] { display:none!important; }
.event-history-pilot .page-shell { padding:24px var(--site-gutter) 48px; }
.event-history-pilot .page-heading { margin-bottom:20px; }
.event-history-pilot h1 { font-size:clamp(26px,3vw,34px); margin:8px 0; }
.event-history-pilot h2 { font-size:20px; border-left:3px solid var(--accent); padding-left:12px; margin:0 0 16px; }
.event-history-pilot .table-panel { background:transparent; border:0; box-shadow:none; padding:0; margin:0 0 24px; overflow:visible; min-width:0; }
.event-history-pilot .history-current { margin:0 0 24px; padding:18px 20px; border:1px solid #2b3d57; border-radius:8px; background:var(--surface); }
.event-history-pilot .history-facts { display:flex; flex-wrap:wrap; gap:12px 32px; margin:0 0 12px; }
.event-history-pilot .history-facts > div { min-width:0; max-width:100%; }
.event-history-pilot .history-facts dt { font-size:13px; color:var(--text-secondary); }
.event-history-pilot .history-facts dd { margin:4px 0 0; font-size:16px; overflow-wrap:anywhere; }
.event-history-pilot .history-note,.event-history-pilot .empty-state { font:13px/1.6 var(--font-label); color:var(--text-secondary); margin:8px 0; }
.event-history-pilot .history-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px 20px; }
.event-history-pilot .history-actions a { display:inline-flex; align-items:center; min-height:40px; }
.event-history-pilot .button { min-height:40px; width:auto; padding:9px 12px; background:#285e99; border-color:#285e99; color:white; }
.event-history-pilot .button:hover { background:#316faa; border-color:#316faa; }
.event-history-pilot .button.secondary { background:var(--surface-alt); border-color:#647896; color:var(--text); }
.event-history-pilot :focus-visible { outline:2px solid var(--text); outline-offset:3px; }
.event-history-pilot .profile-table-toolbar { position:relative; margin-bottom:12px; z-index:5; }
.event-history-pilot .profile-column-menu { position:absolute; z-index:20; top:auto; left:0; width:min(440px,100%); max-width:100%; overflow:auto; padding:16px; border:1px solid #647896; border-radius:8px; background:var(--surface); box-shadow:var(--shadow-soft); }
.event-history-pilot .profile-column-menu.opens-above { transform:translateY(calc(-100% - 44px)); }
.event-history-pilot .profile-column-menu fieldset { border:0; margin:0; padding:0; }
.event-history-pilot .profile-column-menu legend { margin-bottom:8px; }
.event-history-pilot [data-column-options] { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 12px; margin-bottom:12px; }
.event-history-pilot [data-column-options] label { display:flex; align-items:center; gap:8px; font-size:13px; min-height:32px; overflow-wrap:anywhere; }
.event-history-pilot [data-column-options] input { width:auto; flex-shrink:0; }
.event-history-pilot .table-wrap { max-width:100%; overflow:auto; max-height:70vh; border-radius:8px; }
.event-history-pilot .history-table { width:max-content; min-width:100%; table-layout:auto; }
.event-history-pilot .history-table :is(th,td,th button) { font-family:var(--font-body); }
.event-history-pilot :is(th,td) { padding:10px 12px; font-size:14px; white-space:nowrap; overflow-wrap:normal; }
.event-history-pilot th { position:sticky; top:0; z-index:2; background:var(--surface-alt); }
.event-history-pilot th,.event-history-pilot th button { text-transform:none; letter-spacing:normal; font-weight:600; }
.event-history-pilot td { background:transparent; border-bottom:1px solid #23334a; }
.event-history-pilot .history-description { white-space:normal; overflow-wrap:anywhere; min-width:160px; max-width:280px; }
.event-history-pilot .history-source { white-space:normal; min-width:220px; max-width:280px; }
.event-history-pilot .profile-mobile-nav { display:none; }
.event-history-pilot summary { display:inline-flex; align-items:center; gap:12px; min-height:40px; padding:9px 12px; border:1px solid #647896; border-radius:6px; background:var(--surface-alt); cursor:pointer; list-style:none; font-size:14px; }
.event-history-pilot summary::-webkit-details-marker { display:none; }
.event-history-pilot summary::after { content:'+'; }
.event-history-pilot details[open] > summary::after { content:'−'; }
@media(max-width:760px) {
  .event-history-pilot .page-shell { padding-top:16px; }
  .event-history-pilot .profile-desktop-nav { display:none; }
  .event-history-pilot .profile-mobile-nav { display:block; position:relative; }
  .event-history-pilot .site-header .header-inner { display:flex; flex-direction:row; align-items:center; flex-wrap:nowrap; gap:12px; padding:10px var(--site-gutter); }
  .event-history-pilot .site-header .guild-name { font-size:15px; min-width:0; }
  .event-history-pilot .brand-mark { width:32px; height:32px; flex-shrink:0; }
  .event-history-pilot .profile-mobile-nav summary { min-height:44px; white-space:nowrap; }
  .event-history-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); z-index:30; }
  .event-history-pilot .profile-mobile-nav nav a,.event-history-pilot .button,.event-history-pilot .history-actions a { min-height:44px; }
  .event-history-pilot .history-current { padding:16px; }
}
@media(max-width:480px) { .event-history-pilot [data-column-options] { grid-template-columns:1fr; } }
