/* Confine wide tables to their own region. The page and fixed menu stay in the viewport. */
.analytics-main,#app-content,.panel,.contribution-grid>*,.notes-filter-row>*{min-width:0;max-width:100%}
.table-scroll{width:100%;min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.notes-mobile-list{display:none}
.ref-intro{padding:26px;display:grid;grid-template-columns:minmax(0,1fr) 68px;gap:14px;margin-bottom:20px}
.ref-intro h2{font-size:38px;margin:5px 0 10px}.ref-intro p{font-size:13px;line-height:1.7;max-width:650px}
.ref-intro-icon{align-self:center;color:var(--a-gold)}.ref-intro-icon svg{height:62px;width:62px}
.ref-intro .ref-context{grid-column:1/-1;border-top:1px solid var(--a-line);padding-top:14px;font-size:11px;color:var(--a-muted);max-width:none}
.referee-controls{display:flex;align-items:end;flex-wrap:wrap;gap:18px;padding:20px;margin-bottom:22px}
.referee-controls label{display:flex;flex-direction:column;gap:7px;font-size:11px;flex:1;min-width:180px}
.referee-controls select{height:42px;width:100%;max-width:100%;background:var(--a-paper);border:1px solid var(--a-line);border-radius:7px;padding:8px 10px;font:inherit}
.referee-controls .outline-button{height:42px;font-size:11px}
.referee-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;align-items:start}
.referee-card{min-width:0}.referee-card>header{display:flex;align-items:center;gap:12px;padding:22px 22px 15px}
.referee-card h2{font-size:27px;line-height:1.15;overflow-wrap:anywhere;margin:3px 0 0}
.referee-card header>.round-badge{margin-left:auto}.ref-whistle{width:37px;height:42px;display:grid;place-items:center;flex-shrink:0;background:var(--a-sage);border-radius:8px;color:var(--a-green)}
.ref-whistle svg{height:24px;width:24px}.ref-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:0 22px 18px;margin:0}
.ref-metrics dt{font-size:9px;color:var(--a-muted);line-height:1.5;min-height:28px}.ref-metrics dd{font-size:21px;margin:5px 0 0;display:flex;align-items:center;gap:5px}
.ref-yellow,.ref-red{height:15px;width:10px;display:inline-block;border-radius:2px;background:#c3a353}.ref-red{background:#aa5a4b}
.ref-affinities{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0 22px 20px}
.ref-affinity{border-radius:8px;padding:14px;background:#e9eee3;min-width:0;display:flex;flex-direction:column;gap:10px}
.ref-affinity.is-spicy{background:#f2e9df}.ref-affinity-label{font-size:10px;text-transform:uppercase;letter-spacing:.1em;font-weight:600;color:#4f6849}.is-spicy .ref-affinity-label{color:#896344}
.ref-affinity-club{display:flex;align-items:center;gap:8px;min-height:37px}.ref-affinity-club img{height:32px;width:30px;object-fit:contain}.ref-affinity-club strong{font-size:14px;line-height:1.25;overflow-wrap:anywhere}
.ref-affinity p{font-size:10px}.ref-affinity p strong{font-size:20px}.ref-affinity small{font-size:9px;line-height:1.6;color:var(--a-muted)}.ref-no-signal{font-size:12px;line-height:1.5}
.ref-breakdown{border-top:1px solid var(--a-line)}.ref-breakdown>summary,.referee-method>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:14px;cursor:pointer;padding:16px 22px;font-size:11px;font-weight:550}
.ref-breakdown>summary::-webkit-details-marker,.referee-method>summary::-webkit-details-marker{display:none}.ref-breakdown summary svg,.referee-method summary svg{width:16px;height:16px;flex-shrink:0}.ref-breakdown[open] summary svg{transform:rotate(180deg)}
.ref-team-table{min-width:560px;font-size:10px}.ref-team-table .roster-club{font-size:10px;white-space:nowrap}.ref-team-table .roster-club img{width:21px;height:23px}
.ref-match-list{padding:0 17px 12px}.ref-match-list button{display:flex;align-items:center;gap:9px;width:100%;padding:11px 0;border-top:1px solid var(--a-line);font-size:10px;text-align:left}.ref-match-list button>span:first-child{color:var(--a-gold)}.ref-match-list button>span:nth-child(2){flex:1;line-height:1.6}.ref-match-list button svg{width:13px;height:13px;flex-shrink:0}
.referee-method{margin-top:24px}.referee-method>div{padding:0 22px 22px}.referee-method p{font-size:11px;line-height:1.8;margin:0 0 10px}
@media(max-width:1100px){.referee-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:780px){
  .analytics-workspace,.analytics-main,#app-content{width:100%;min-width:0;max-width:100%}
  .notes-filter-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .notes-filter-row label{min-width:0}.notes-controls select{min-width:0;max-width:100%}
  .notes-table-panel>.table-scroll{display:none}
  .notes-mobile-list{display:grid;padding:0 14px;gap:0}
  .notes-mobile-card{padding:16px 0;border-top:1px solid var(--a-line);min-width:0}
  .notes-mobile-top{display:flex;align-items:center;gap:9px;min-width:0}
  .notes-mobile-top .table-person{flex:1;min-width:0;gap:9px}
  .notes-mobile-top .table-person>span:not(.avatar-fallback){min-width:0}
  .notes-mobile-top .table-person strong{white-space:normal;overflow-wrap:anywhere;font-size:13px;line-height:1.35}
  .notes-mobile-top .table-person small{font-size:10px;line-height:1.5;white-space:normal}
  .notes-mobile-grade{display:flex;flex-direction:column;align-items:end;color:var(--a-green);flex-shrink:0}
  .notes-mobile-grade strong{font-size:25px;line-height:1.1}.notes-mobile-grade small{font-size:9px;color:var(--a-muted)}
  .notes-mobile-club{display:flex;align-items:center;gap:7px;color:var(--a-muted);font-size:10px;margin:10px 0 12px}
  .notes-mobile-club img{height:22px;width:22px;object-fit:contain}
  .notes-mobile-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0}
  .notes-mobile-stats div{min-width:0}.notes-mobile-stats dt{font-size:9px;color:var(--a-muted);line-height:1.5}
  .notes-mobile-stats dd{margin:3px 0 0;font-size:17px;line-height:1.25}
  .notes-mobile-footer{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-top:12px}
  .notes-mobile-footer .text-button{font-size:10px;display:inline-flex;align-items:center;gap:5px;min-height:32px}
  .notes-mobile-footer .text-button svg{height:14px;width:14px}
  .notes-mobile-sort{display:flex;gap:6px;flex-wrap:wrap;padding:0 14px 14px;align-items:center;font-size:10px}
  .notes-mobile-sort button{background:var(--a-sage);border-radius:5px;padding:7px;font-size:10px}
  .notes-table-panel .pagination{flex-wrap:wrap;max-width:100%;gap:10px}.notes-table-panel .pagination>div{flex-wrap:wrap}
  .ref-intro{padding:20px;grid-template-columns:minmax(0,1fr) 40px;gap:10px}.ref-intro h2{font-size:29px}.ref-intro p{font-size:11px}.ref-intro-icon svg{width:38px;height:38px}
  .referee-controls{gap:12px;padding:16px}.referee-controls label{min-width:0;flex-basis:100%}.referee-controls .outline-button{width:100%}
  .referee-card>header{padding:18px 16px 15px;gap:9px}.referee-card h2{font-size:24px}.referee-card>header>div{min-width:0}.referee-card header>.round-badge{font-size:9px;padding:4px 7px;flex-shrink:0}
  .ref-metrics{padding:0 16px 16px;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 10px}.ref-metrics dt{min-height:0;font-size:10px}.ref-metrics dd{font-size:23px}
  .ref-affinities{padding:0 16px 17px;gap:8px}.ref-affinity{padding:12px;gap:9px}.ref-affinity-club{flex-wrap:wrap;align-content:start}.ref-affinity-club strong{font-size:13px}
  .ref-breakdown>summary,.referee-method>summary{padding:15px 16px}.referee-method>div{padding:0 16px 16px}
}
@media(min-width:781px){.notes-mobile-sort{display:none}}
