/* Owner: national-ranking. Base and state rules retain order; conditional blocks own responsiveness. */
.ap-sport-widget.ap-national { container-type: inline-size; overflow: visible; color: #04233a; }
.ap-national .ap-national__heading { padding: 0; margin: 0 0 18px; }
.ap-national .ap-national__heading h2 { font-size: var(--ap-ui-title-size); line-height: var(--ap-ui-title-line); margin: 0; overflow-wrap: anywhere; color: inherit; }
.ap-national__heading p { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; font-size: 14px; color: #425a6a; }
.ap-national .ap-sport-widget__country { padding: 0; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 20px; }
.ap-national .ap-sport-widget__country-group { border: 1px solid #bdccd6; border-radius: var(--ap-ui-radius,0px); background: #fff; overflow: hidden; }
.ap-national .ap-sport-widget__player { padding: 18px; background: #f3f7fa; border-bottom: 1px solid #d7e0e6; }
.ap-national .ap-sport-widget__player h3 { font-size: 22px; line-height: 1.3; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: inherit; }
.ap-national .ap-sport-widget__player p { font-size: 13px; margin: 8px 0 0; }
.ap-national .ap-sport-widget__player dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 18px 0 0; }
.ap-national .ap-sport-widget__player dt { font-size: 12px; line-height: 1.4; color: #425a6a; overflow-wrap: anywhere; }
.ap-national .ap-sport-widget__player dd { font-size: 26px; line-height: 1.2; margin: 5px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.ap-national .ap-sport-widget__scope { padding: 0; margin: 14px 0; color: #425a6a; font-size: 13px; }
.ap-national .ap-sport-widget__country-group>.ap-sport-widget__scope { padding: 0 18px; }
.ap-national .ap-sport-widget__search { padding: 0; margin: 18px 0; font-size: 13px; max-width: 520px; }
.ap-national__players { padding: 0 18px; }
.ap-national-player { padding: 18px 0; border-bottom: 1px solid #d7e0e6; }
.ap-national-player:last-child { border-bottom: 0; }
.ap-national-player dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 14px 0 0; }
.ap-national-player dt { font-size: 12px; color: #425a6a; overflow-wrap: anywhere; }
.ap-national-player dd { font-size: 20px; font-weight: 700; margin: 4px 0 0; line-height: 1.2; overflow-wrap: anywhere; }
/* Movement cards retain their typography with less vertical spacing. */
.ap-national.ap-ranking-movers .ap-national__heading { margin-bottom: 14px; }
.ap-national.ap-ranking-movers .ap-sport-widget__player { padding-block: 12px; }
.ap-ranking-movers .ap-national-player { padding-block: 12px; }
.ap-ranking-movers .ap-national-player dl { margin-top: 8px; }
.ap-ranking-movers .ap-national-player dd { margin-top: 2px; }
.ap-national__gain { color: #145337; }
.ap-national__loss { color: #8c2e22; }
.ap-national .ap-ranking-identity { font-size: 15px; line-height: 1.4; }
.ap-national .ap-ranking-identity small { display: block; margin-top: 4px; font-size: 12px; }
.ap-national .ap-ranking-country { display: inline-flex; align-items: center; gap: 6px; }
.ap-national .ap-country-flag { width: 24px; height: 18px; object-fit: contain; vertical-align: middle; flex: none; }
.ap-national .ap-sport-widget__table { max-width: 100%; padding: 0; }
.ap-national table.ap-national__table { width: 100%; min-width: 330px; table-layout: auto; }
.ap-national .ap-national__table :is(th,td) { padding: 12px 8px; font-size: 13px; }
.ap-national .ap-national__table thead th { font-size: 11px; line-height: 1.3; background: #f3f7fa; color: #04233a; }
.ap-national .ap-national__table tbody th { background: #fff; text-align: left; font-weight: 400; min-width: 130px; }
.ap-national .ap-national__table td { white-space: nowrap; min-width: 0; font-variant-numeric: tabular-nums; }
.ap-national .ap-national__table tbody tr:last-child :is(th,td) { border-bottom: 0; }
.ap-national .ap-national__references { display: block; margin-top: 20px; padding: 12px 16px; border: 1px solid #d7e0e6; border-radius: var(--ap-ui-radius,0px); background: #f3f7fa; color: #425a6a; font-size: 12px; }
.ap-national__references summary { cursor: pointer; font-weight: 600; color: #04233a; }
.ap-national .ap-fip-references { margin: 10px 0 0; line-height: 1.7; }
.ap-national [hidden] { display: none!important; }
.ap-national :focus-visible { outline: 3px solid #245c82; outline-offset: 3px; }
/* Country focus follows the native Top10 navy/yellow design, independently of saved layouts. */
.ap-national.ap-country-ranking { padding: 20px; border: 1px solid #d6e1e8; border-radius: var(--ap-ui-radius,4px); background: #fff; }
.ap-national.ap-country-ranking .ap-sport-widget__country { grid-template-columns: minmax(0,1fr); gap: 24px; }
.ap-national.ap-country-ranking .ap-sport-widget__country-group { border: 0; border-radius: 0; background: transparent; overflow: visible; }
.ap-country-ranking .ap-country-ranking__controls { padding: 0; margin: 0 0 16px; border: 0; background: transparent; }
.ap-country-ranking .ap-country-ranking__title,.ap-country-ranking .ap-country-ranking__heading { margin: 0 0 16px; padding: 0; color: inherit; font-size: var(--ap-ui-title-size,24px); line-height: var(--ap-ui-title-line,1.3); font-weight: var(--ap-ui-title-weight,700); overflow-wrap: anywhere; }
.ap-country-ranking .ap-country-ranking__switch { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; min-inline-size: 0; margin: 0; padding: 4px; border: 0; border-radius: var(--ap-ui-radius,4px); background: #edf2f6; }
.ap-country-ranking .ap-country-ranking__switch label { position: relative; display: block; min-width: 0; margin: 0; padding: 0; color: #405969; cursor: pointer; }
.ap-country-ranking .ap-country-ranking__switch label>span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 4px; border-radius: var(--ap-ui-radius,4px); font-size: 14px; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; text-align: center; }
.ap-country-ranking .ap-country-ranking__switch input:checked+span { background: #f4c430; color: #04233a; }
.ap-country-ranking .ap-country-ranking__switch :is(label,input,span) { outline: 0; box-shadow: none; }
.ap-country-ranking .ap-country-ranking__switch:not([data-ap-country-input=pointer]) input:focus-visible+span { outline: 3px solid #245c82; outline-offset: 2px; }
.ap-country-ranking .ap-country-ranking__sr,.ap-country-ranking .ap-country-ranking__switch input[type=radio] { position: absolute; width: 1px; min-width: 0; height: 1px; min-height: 0; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Keep the hidden legend at 1px when the theme gives legends intrinsic table width. */
.ap-country-ranking .ap-country-ranking__sr { display: block; }
.ap-national.ap-country-ranking .ap-sport-widget__country-group>.ap-sport-widget__scope { padding: 0; margin: 0 0 14px; font-size: 12px; }
.ap-national.ap-country-ranking .ap-sport-widget__country-group>.ap-sport-widget__message { margin: 0; }
/* Four-column FIP table, matching the ranking directory without flags. */
.ap-country-ranking .ap-country-ranking__table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; border: 0; margin: 0; background: #fff; }
.ap-country-ranking table.ap-country-ranking__table :is(th,td) { min-width: 0; border: 0; border-bottom: 1px solid #e5ebf0; padding: 12px 10px; vertical-align: middle; background: transparent; color: inherit; line-height: 1.4; }
.ap-country-ranking .ap-country-ranking__table thead th { font-size: 12px; font-weight: 700; text-transform: none; background: #edf2f5; color: #405969; overflow-wrap: anywhere; }
.ap-country-ranking .ap-country-ranking__table tbody tr:last-child :is(th,td) { border-bottom: 0; }
.ap-country-ranking .ap-country-ranking__table tbody tr:nth-child(odd) { background: #f7f7f7; }
.ap-country-ranking .ap-country-ranking__rank { width: 76px; text-align: center; font-variant-numeric: tabular-nums; }
.ap-country-ranking .ap-country-ranking__rank strong { font-size: 17px; font-weight: 700; }
.ap-country-ranking .ap-country-ranking__rank small { display: block; font-size: 11px; color: #486174; line-height: 1.3; margin-top: 3px; }
.ap-country-ranking .ap-country-ranking__identity { text-align: left; overflow-wrap: anywhere; font-weight: 700; }
.ap-country-ranking .ap-ranking-identity { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 1.4; }
.ap-country-ranking .ap-ranking-identity>div { min-width: 0; }
.ap-country-ranking .ap-ranking-identity strong { font-weight: 700; color: inherit; }
.ap-country-ranking .ap-ranking-identity small { display: block; margin-top: 4px; font-size: 11px; font-weight: 400; color: #486174; }
.ap-country-ranking .ap-ranking-identity a { color: inherit; text-decoration: none; }
.ap-country-ranking .ap-ranking-identity a:hover { text-decoration: underline; }
.ap-country-ranking .ap-ranking-portrait { width: 36px; height: 44px; object-fit: cover; object-position: center 20%; flex: none; border-radius: var(--ap-ui-radius,4px); }
.ap-country-ranking .ap-country-ranking__points { width: 112px; text-align: right; font-variant-numeric: tabular-nums; }
.ap-country-ranking .ap-country-ranking__table td.ap-country-ranking__points { font-size: 17px; font-weight: 700; white-space: nowrap; }
.ap-country-ranking .ap-country-ranking__table .ap-country-ranking__movement { width: 136px; padding-inline: 20px 32px; text-align: right; font-variant-numeric: tabular-nums; }
.ap-country-ranking .ap-country-ranking__table td.ap-country-ranking__movement { font-size: 20px; font-weight: 700; white-space: nowrap; }
.ap-country-ranking .ap-country-ranking__movement strong { font: inherit; }
.ap-country-ranking .ap-country-ranking__neutral { color: #425a6a; }
@media(max-width:360px) {
  .ap-national.ap-country-ranking { padding: 14px; }
}
@container(max-width:540px) {
  .ap-country-ranking table.ap-country-ranking__table :is(th,td) { padding: 11px 3px; }
  .ap-country-ranking .ap-country-ranking__table thead th { font-size: 10px; }
  .ap-country-ranking .ap-country-ranking__rank { width: 42px; }
  .ap-country-ranking .ap-country-ranking__rank strong { font-size: 14px; }
  .ap-country-ranking .ap-ranking-identity { font-size: 14px; gap: 6px; flex-wrap: wrap; }
  .ap-country-ranking .ap-ranking-portrait { width: 28px; height: 36px; }
  .ap-country-ranking .ap-country-ranking__points { width: 56px; }
  .ap-country-ranking .ap-country-ranking__table td.ap-country-ranking__points { font-size: 14px; }
  .ap-country-ranking .ap-country-ranking__table .ap-country-ranking__movement { width: 78px; padding-inline: 6px; }
  .ap-country-ranking .ap-country-ranking__table td.ap-country-ranking__movement { font-size: 16px; }
}
@container(max-width:720px) {
  .ap-national .ap-sport-widget__country { grid-template-columns: minmax(0,1fr); }
}
@media(prefers-reduced-motion:reduce) {
  .ap-national * { scroll-behavior: auto; }
}
