/* Match views use theme tokens throughout, including focus and SVG surfaces. */
.nb-match-views{color:var(--txt);background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:16px;min-width:0;font-size:var(--bt-tekst,1.125rem);line-height:1.5;container-type:inline-size}
.nb-match-views button{font:inherit;color:inherit;cursor:pointer;min-height:44px;min-width:44px;max-width:100%;overflow-wrap:anywhere}
.nb-match-views button:focus-visible,.nb-match-chart [tabindex]:focus-visible,.nb-match-table-wrap:focus-visible,.nb-match-chart-wrap:focus-visible{outline:3px solid var(--brand);outline-offset:3px}
.nb-match-tabs,.nb-match-filters{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 16px}
.nb-match-tabs button,.nb-match-filters button{border:1px solid var(--line);border-radius:10px;background:var(--panel2);padding:8px 14px}
.nb-match-tabs [aria-selected=true],.nb-match-filters [aria-pressed=true]{background:var(--subtab-on);color:var(--subtab-on-txt);border-color:var(--subtab-on)}
.nb-match-note,.nb-match-muted,.nb-match-empty{color:var(--muted);font-size:var(--bt-klein,.875rem);line-height:1.5}
.nb-match-empty{font-size:1rem;padding:12px 0}
.nb-match-table-wrap{overflow-x:auto;max-width:100%;padding-bottom:4px}
.nb-match-table{border-collapse:collapse;width:100%;min-width:560px;font-size:var(--bt-bediening,1rem);font-variant-numeric:tabular-nums}
.nb-match-table caption{text-align:left;font-size:var(--bt-klein,.875rem);color:var(--muted);padding:0 0 12px}
.nb-match-table th,.nb-match-table td{padding:10px 8px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
.nb-match-table thead th{font-size:var(--bt-klein,.875rem);color:var(--muted);font-weight:600;vertical-align:top}
.nb-match-table thead th[colspan]{text-align:center;border-bottom:0}
.nb-match-pair-name{display:block;font-weight:650;color:var(--txt);font-size:1rem;margin:4px 0;white-space:normal;overflow-wrap:anywhere}
.nb-match-table .nb-match-number{text-align:right;white-space:nowrap}
.nb-match-contract{display:block;white-space:nowrap;font-size:1rem;line-height:1.6}
.nb-match-table tbody th button,.nb-match-board-choice button{border:1px solid var(--line);border-radius:8px;background:var(--panel);min-width:44px;padding:6px;color:var(--brand);font-weight:700}
.nb-match-table tfoot{background:var(--panel2)}
.nb-match-table tfoot th,.nb-match-table tfoot td{font-weight:700}
.nb-match-best-row{box-shadow:inset 3px 0 0 var(--good)}
.nb-match-worst-row{box-shadow:inset 3px 0 0 var(--bad)}
.nb-match-badge{display:block;font-size:var(--bt-klein,.875rem);font-weight:600;margin-top:4px;line-height:1.4;white-space:normal}
.nb-match-best{color:var(--good)}
.nb-match-worst{color:var(--bad)}
.nb-match-flat{color:var(--muted)}
.nb-match-derived{border-inline-start:3px solid var(--brand);padding-inline-start:10px}
.nb-match-chart-wrap{max-width:100%;overflow-x:auto;padding:4px 0 12px}
.nb-match-chart{display:block;width:100%;min-width:560px;height:auto;overflow:visible;color:var(--txt);background:var(--panel);font-family:system-ui,sans-serif;font-size:var(--bt-klein,.875rem)}
.nb-match-chart text{fill:var(--muted)}
.nb-match-grid{stroke:var(--line);stroke-width:1}
.nb-match-even{stroke:var(--muted);stroke-dasharray:5 4}
.nb-match-line{fill:none;stroke:var(--brand);stroke-width:2.5}
.nb-match-point{fill:var(--brand);stroke:var(--panel);stroke-width:1.5;pointer-events:none}
.nb-match-hit{fill:transparent;stroke:none;cursor:pointer}
.nb-match-chart g:focus-visible .nb-match-point{stroke:var(--txt);stroke-width:3}
.nb-match-board-choice{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 14px}
.nb-match-board-choice [aria-current=true]{background:var(--brand-soft);border-color:var(--brand)}
.nb-match-board-nav{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px;margin-bottom:12px}
.nb-match-board-nav button{border:0;background:none;padding:4px 0;text-align:left;color:var(--brand)}
.nb-match-board-nav button:last-child{text-align:right}
.nb-match-board-nav h2{font-size:1.125rem;margin:0}
.nb-match-board-summary{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:10px 0 16px}
.nb-match-board-summary .nb-match-badge{display:inline-block;font-size:var(--bt-klein,.875rem);margin:0}
.nb-match-pair-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.nb-match-pair-card{border:1px solid var(--line);border-radius:12px;background:var(--panel2);padding:14px;min-width:0}
.nb-match-pair-card h3{font-size:1rem;margin:0 0 8px;overflow-wrap:anywhere}
.nb-match-pair-card p{font-size:var(--bt-klein,.875rem);margin:6px 0;overflow-wrap:anywhere}
.nb-match-result{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;align-items:center;margin:12px 0;font-variant-numeric:tabular-nums}
.nb-match-facts{color:var(--muted)}
.nb-match-views .nb-handen{background:var(--panel);color:var(--txt)}
.nb-match-views .nb-hand{background:var(--panel2);border-color:var(--line);color:var(--txt);font-size:1rem}
.nb-match-views .nb-hand-z{color:var(--muted);font-size:var(--bt-klein,.875rem);overflow-wrap:anywhere}
.nb-match-views .nb-hand-k{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.nb-match-views .nb-hand-eigen{border-color:var(--brand)}
.nb-match-views .nb-hand-midden{background:var(--kop);color:var(--kop-txt)}
/* Small or enlarged views keep complete holdings, rather than cutting off cards. */
@container(max-width:22rem){
  .nb-match-views .nb-handen{display:flex;flex-direction:column;max-width:none}
  .nb-match-views .nb-handen>div:empty{display:none}
  .nb-match-views .nb-hand-midden{order:0;min-height:0;font-size:var(--bt-klein,.875rem)}
  .nb-match-views .nb-hand-N{order:1}
  .nb-match-views .nb-hand-O{order:2}
  .nb-match-views .nb-hand-Z{order:3}
  .nb-match-views .nb-hand-W{order:4}
}
@media(max-width:540px){.nb-match-views{padding:12px}.nb-match-pair-grid{grid-template-columns:1fr}.nb-match-tabs button{flex:1 1 max-content;padding:8px;overflow-wrap:normal}.nb-match-table th,.nb-match-table td{padding:9px 6px}}

/* A brief deal-in and a growing score curve; every animation settles once.
   Only paint/transform changes: the table, hands and hit targets keep their size. */
.nb-match-tabs button,.nb-match-filters button,.nb-match-board-choice button,.nb-match-board-nav button,.nb-match-table tbody th button{transition:background-color .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease}
.nb-match-table tbody tr:focus-within{background:color-mix(in srgb,var(--brand) 6%,transparent)}
.nb-match-chart g:is(:hover,:focus-visible) .nb-match-point{stroke:var(--txt);stroke-width:2.5}
@media(hover:hover) and (pointer:fine){
  .nb-match-tabs button:hover,.nb-match-filters button:hover,.nb-match-board-choice button:hover,.nb-match-table tbody th button:hover{border-color:var(--brand);box-shadow:0 2px 7px color-mix(in srgb,var(--brand) 13%,transparent)}
  .nb-match-table tbody tr:hover{background:color-mix(in srgb,var(--brand) 4%,transparent)}
}
@media(prefers-reduced-motion:no-preference){
  .nb-match-views [role=tabpanel]{animation:nb-match-reveal .22s ease-out}
  .nb-match-tabs button,.nb-match-filters button,.nb-match-board-choice button,.nb-match-table tbody th button{transition:background-color .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease}
  .nb-match-tabs button:active,.nb-match-filters button:active,.nb-match-board-choice button:active,.nb-match-table tbody th button:active{transform:scale(.96)}
  .nb-match-board-choice [aria-current=true]{animation:nb-match-selected .44s ease-out}
  .nb-match-best,.nb-match-worst{animation:nb-match-badge .32s ease-out}
  .nb-match-line{stroke-dasharray:1;animation:nb-match-draw .7s cubic-bezier(.22,.7,.3,1)}
  .nb-match-point{transform-box:fill-box;transform-origin:center;animation:nb-match-dot .24s cubic-bezier(.2,.8,.3,1.25) backwards;animation-delay:calc(.08s + var(--nb-point-order,0)*.045s);transition:transform .18s ease}
  .nb-match-chart g:is(:hover,:focus-visible) .nb-match-point{transform:scale(1.5)}
  .nb-match-views .nb-hand,.nb-match-pair-card{animation:nb-match-deal .3s ease-out backwards}
  .nb-match-views .nb-hand:nth-child(2),.nb-match-pair-card:nth-child(2){animation-delay:.035s}
  .nb-match-views .nb-hand:nth-child(4){animation-delay:.07s}
  .nb-match-views .nb-hand:nth-child(5){animation-delay:.105s}
}
@media(prefers-reduced-motion:no-preference) and (hover:hover) and (pointer:fine){
  .nb-match-tabs button:hover,.nb-match-filters button:hover{transform:translateY(-1px)}
  .nb-match-board-choice button:hover,.nb-match-table tbody th button:hover{transform:translateY(-2px) rotate(-2deg)}
}
@keyframes nb-match-reveal{from{opacity:.68}to{opacity:1}}
@keyframes nb-match-draw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes nb-match-dot{from{opacity:0;transform:scale(.45)}to{opacity:1;transform:scale(1)}}
@keyframes nb-match-deal{from{opacity:.55;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@keyframes nb-match-badge{from{opacity:.55;transform:translateX(-3px)}to{opacity:1;transform:translateX(0)}}
@keyframes nb-match-selected{from{box-shadow:0 0 0 0 color-mix(in srgb,var(--brand) 28%,transparent)}to{box-shadow:0 0 0 7px transparent}}
@media(prefers-reduced-motion:reduce){
  .nb-match-views *,.nb-match-views *::before,.nb-match-views *::after{animation:none!important;transition:none!important}
}
