.portal-panel,.portal-next { margin:24px 0 32px; padding:24px; border:1px solid var(--line); border-radius:10px; background: var(--card); }
.portal-next { background:var(--brand-50); border-left:5px solid var(--accent); }
.portal-next h2,.portal-panel h2 { margin:0 0 18px; font-size:24px; letter-spacing:-.025em; }
.portal-event { display:flex; justify-content:space-between; gap:24px; align-items:center; padding:18px 0; border-bottom:1px solid var(--line); }
.portal-event h3,.portal-document h3 { margin:8px 0; font-size:20px; line-height:1.3; }
.portal-event p,.portal-document p { color:var(--muted); margin:8px 0; }
.portal-status { color: var(--link); font-weight:800; }
.portal-actions,.portal-links { display:flex; flex-wrap:wrap; gap:10px; padding-block:16px; }
.portal-actions button,.portal-actions a,.portal-reset { padding:10px 14px; min-height:44px; border:1px solid var(--line); background: var(--card); border-radius:6px; color: var(--link); font-weight:700; }
.portal-actions a:hover,.portal-actions button:hover { border-color:var(--brand); background:var(--brand-50); }
.portal-filters { display:flex; flex-wrap:wrap; gap:16px; margin:16px 0; }
.portal-filters label { display:flex; flex:1 1 160px; flex-direction:column; gap:6px; font-size:14px; font-weight:700; }
.portal-filters input,.portal-filters select { width:100%; min-height:44px; padding:10px; border:1px solid var(--line); border-radius:6px; background: var(--card); color:var(--ink); }
.portal-month { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
.portal-month>div { min-height:90px; border:1px solid var(--line); padding:8px; min-width:0; }
.portal-month a { display:block; margin-top:6px; background:var(--brand-50); color: var(--link); padding:6px; border-radius:3px; font-size:12px; overflow-wrap:anywhere; }
.portal-table { overflow-x:auto; margin:20px 0; }
.portal-table table { width:100%; border-collapse:collapse; text-align:left; }
.portal-table td,.portal-table th { padding:12px; border-bottom:1px solid var(--line); }
.portal-table thead { background:var(--brand-50); }
.portal-event-details,.portal-guide { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:24px; margin:28px 0; }
.portal-event-details h2,.portal-guide h2 { font-size:23px; line-height:1.3; }
.portal-pre { white-space:pre-line; }
.portal-empty { padding:22px; background:var(--brand-50); border-radius:6px; }
.portal-document { padding:20px 0; border-bottom:1px solid var(--line); }
.portal-pdf { width:min(950px,95vw); border:1px solid var(--line); border-radius:8px; }
.portal-pdf::backdrop { background:#14234bb0; }
.portal-pdf iframe { width:100%; height:70vh; border:0; }
.portal-pdf button { padding:12px; min-height:44px; }
.portal-links a { color: var(--link); padding:12px 0; margin-right:18px; text-decoration:underline; }
@media(max-width:700px) { .portal-panel,.portal-next{padding:16px}.portal-event{display:block}.portal-month{min-width:650px}.portal-output{overflow-x:auto}.portal-filters{gap:10px}.portal-event h3{font-size:19px} }

/* Readable competition dates and hosting countries. */
.event-flag { display:inline-block; object-fit:cover; flex-shrink:0; border:1px solid rgba(128,128,128,.3); vertical-align:middle; }
.event-location, .efeed__place { display:flex; align-items:center; gap:9px; }
.event-state { display:inline-flex; align-items:center; gap:6px; width:fit-content; padding:4px 9px; margin:4px 0; border-radius:4px; font-size:11px; line-height:1.4; font-weight:800; }
.event-state::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.event-state--completed { color:#40506b; background:#e9edf3; }
.event-state--upcoming { color:#243e8b; background:#e7edff; }
.event-state--live { color:#126039; background:#ddf5e7; }
.portal-event .portal-event__body { flex:1; min-width:0; }
.portal-event .event-date-badge { flex:0 0 155px; padding:16px 12px; border-top:4px solid #d12936; background:#273d8d; color:white; font-weight:800; font-size:21px; line-height:1.3; font-variant-numeric:tabular-nums; }
.event-date-badge span { display:block; margin-top:6px; font-size:15px; }
[data-portal="calendar"] .portal-event { margin:12px 0; padding:20px; border:1px solid var(--line); border-left:4px solid #273d8d; background:var(--card); }
[data-portal="calendar"] .portal-event--live { border-left-color:#198754; }
[data-portal="calendar"] .portal-event--completed { border-left-color:#8793a8; }
[data-portal="calendar"] .portal-event h3 { font-size:21px; }
.efeed__item .efeed__date { height:auto; min-height:44px; padding:10px; border-radius:3px; background:#273d8d; color:#fff; font-size:17px; border-top:3px solid #d12936; }
@media(max-width:700px) { .portal-event .event-date-badge { display:inline-block; margin-bottom:12px; } .portal-event .portal-actions { margin-top:12px; } .efeed__item { grid-template-columns:1fr; gap:8px; } .efeed__date { justify-self:start; } }
.event-date-badge small { display:block; margin-top:7px; font-size:12px; font-weight:500; opacity:.9; }

.portal-event .event-date-badge { background:transparent; color:var(--heading); border:0; padding:0; font-family:inherit; font-size:20px; font-weight:700; }
.event-date-badge span { font-size:inherit; font-weight:inherit; }
.portal-event__aside { display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.efeed__item .efeed__date { background:transparent; color:var(--heading); border:0; padding:0; font-family:inherit; font-size:17px; font-weight:700; }
.efeed__main .event-state { display:flex; margin-left:auto; }
@media(max-width:700px) { .portal-event__aside { align-items:flex-end; } }

.event-title-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.event-title-row h3 { flex:0 1 auto; min-width:0; }
.event-title-row .event-state { flex-shrink:0; margin:0; padding:6px 11px; font-size:13px; line-height:1.4; }
.efeed__main .event-title-row .event-state { margin-left:0; }
.efeed__main .event-title-row { gap:8px 12px; }
@media(min-width:701px) {
 .event-title-row { flex-wrap:nowrap; }
 .event-title-row .efeed__link { flex:1; min-width:0; }
}

/* Venue occupies its own column, separate from the tournament title. */
.event-location--column { flex:0 0 150px; align-items:center; gap:10px; margin:0; color:var(--ink); }
.event-location--column strong { display:block; font-size:14px; font-weight:700; }
.event-location--column small { display:block; margin-top:4px; font-size:12px; color:var(--muted); }
.portal-event { flex-wrap:wrap; }
.portal-event .portal-event__aside { flex-basis:100%; }
.portal-event .portal-event__body { flex-basis:250px; }
.efeed__item--location { grid-template-columns:minmax(0,1fr) 120px; }
.efeed__item--location .efeed__date { grid-column:1 / -1; min-height:0; }
.efeed__item--location .efeed__location { grid-column:2; grid-row:2; }
.efeed__item--location .efeed__main { grid-column:1; grid-row:2; }
@media(max-width:700px) {
 .portal-event .event-location--column { margin:16px 0; }
 .efeed__item--location { grid-template-columns:minmax(0,1fr) 100px; }
 .efeed__item--location .event-title-row { flex-wrap:wrap; }
 .event-location--column strong { font-size:13px; }
}

.efeed__place { display:flex; align-items:center; gap:8px; margin-bottom:7px; }
.efeed__place strong { font-size:12px; }
.efeed__place small { margin-left:6px; font-size:12px; font-weight:400; color:var(--muted); }
.portal-event .event-location { display:flex; align-items:center; gap:9px; margin:8px 0 0; font-size:14px; }
.portal-event .event-location small { margin-left:7px; color:var(--muted); }
[data-portal="calendar"] .portal-event { padding:20px 0; margin:0; border:0; border-bottom:1px solid var(--line); border-radius:0; }
[data-portal="calendar"] .portal-event h3 { font-size:17px; line-height:1.45; }
[data-portal="calendar"] .portal-event .event-date-badge { font-size:17px; flex-basis:135px; }
.portal-event .portal-event__aside { flex-basis:auto; }

.event-tags { display:flex; flex-wrap:wrap; gap:6px 10px; margin:12px 0 4px; }
.event-tags a { display:inline-block; padding:5px 9px; border:1px solid var(--line); border-radius:4px; font-size:12px; font-weight:600; line-height:1.5; color:var(--link); background:var(--card); text-decoration:none; }
.event-tags a:hover { color:#fff; background:#273d8d; border-color:#273d8d; }
.event-tags a:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
