/* Sox Wire — rail widgets.
   Scoreboard chrome: cream painted frame, dark green face, hand-hung
   number plates. Scoped under .sw-widget so a theme change can't leak in. */

.sw-rail {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.sw-widget {
	--sw-board: #0a2a1f;
	--sw-board-lo: #061c15;
	--sw-cream: #efe9d8;
	--sw-gold: #f2c14e;
	--sw-red: #bd3039;
	--sw-rule: #2a5a48;
	--sw-dim: #7fae97;

	background: linear-gradient( 180deg, var( --sw-board ), var( --sw-board-lo ) );
	border: 3px solid var( --sw-cream );
	box-shadow: 0 4px 14px rgba( 0, 0, 0, 0.28 ), inset 0 2px 12px rgba( 0, 0, 0, 0.45 );
	color: var( --sw-cream );
	font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	margin: 0 0 18px;
}

.sw-widget:last-child {
	margin-bottom: 0;
}

/* ---------- title bar ---------- */

.sw-widget h2.sw-title {
	background: #061c15;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var( --sw-cream );
	padding: 9px 12px;
	margin: 0;
	border-bottom: 1px solid var( --sw-rule );
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	line-height: 1.3;
}

.sw-tag {
	font-size: 8.5px;
	letter-spacing: 0.14em;
	padding: 2px 6px;
	border-radius: 2px;
	font-weight: 800;
	white-space: nowrap;
}

.sw-tag-final { background: var( --sw-rule ); color: #bfe0d0; }
.sw-tag-live  { background: var( --sw-red ); color: #fff; }
.sw-tag-off   { background: #33403a; color: #9dbdb0; }

.sw-body {
	padding: 12px 13px;
}

.sw-empty,
.sw-nogame {
	font-size: 12.5px;
	color: var( --sw-dim );
	text-align: center;
	padding: 10px 0;
	margin: 0;
}

/* ---------- standings ---------- */

.sw-tabs {
	display: flex;
	border-bottom: 1px solid var( --sw-rule );
}

.sw-tab {
	flex: 1;
	background: none;
	border: 0;
	border-bottom: 2px solid transparent;
	cursor: pointer;
	font-family: inherit;
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #5f8f78;
	padding: 9px 4px;
}

.sw-tab.is-on {
	color: var( --sw-gold );
	border-bottom-color: var( --sw-gold );
}

.sw-tab:hover:not( .is-on ) { color: #a9cdbb; }
.sw-tab:focus-visible { outline: 2px solid var( --sw-gold ); outline-offset: -2px; }

table.sw-standings {
	width: 100%;
	border-collapse: collapse;
	font-family: "Arial Narrow", Arial, sans-serif;
	margin: 0;
}

table.sw-standings th {
	font-size: 9px;
	letter-spacing: 0.14em;
	color: var( --sw-dim );
	text-transform: uppercase;
	text-align: right;
	padding: 1px 4px 6px;
	border-bottom: 1px solid var( --sw-rule );
	font-weight: 600;
}

table.sw-standings th:first-child { text-align: left; }

table.sw-standings td {
	padding: 6px 4px;
	text-align: right;
	font-size: 14.5px;
	font-weight: 700;
	border-bottom: 1px dotted #1c4436;
}

table.sw-standings tbody tr:last-child td { border-bottom: none; }

table.sw-standings td.sw-team {
	text-align: left;
	font-size: 12.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.sw-standings tr.sw-us td { color: var( --sw-gold ); }
.sw-standings tr.sw-us td.sw-team::before { content: "\25B8 "; color: var( --sw-red ); }
.sw-standings tr.sw-cut td { border-bottom: 2px solid var( --sw-red ); }

.sw-cutnote {
	font-size: 8.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var( --sw-red );
	text-align: right;
	padding-top: 5px;
	font-weight: 800;
}

/* ---------- score rows ---------- */

.sw-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 5px 0;
	gap: 10px;
}

.sw-tm {
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	font-family: "Arial Narrow", Arial, sans-serif;
}

.sw-row-us .sw-tm { color: var( --sw-gold ); }

.sw-cell {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 30px;
	padding: 0 4px;
	background: linear-gradient( 180deg, #123f30, #08251c );
	border: 1px solid #2f5a49;
	color: var( --sw-cream );
	font-size: 17px;
	font-weight: 700;
	font-family: "Arial Narrow", Arial, sans-serif;
}

.sw-cell-tot {
	background: linear-gradient( 180deg, #1a4d3b, #0b2c21 );
	border-color: #4e7263;
	color: var( --sw-gold );
}

.sw-wl {
	font-size: 9.5px;
	font-weight: 800;
	padding: 1px 6px;
	border-radius: 2px;
	letter-spacing: 0.06em;
	margin-left: 6px;
	color: #fff;
}

.sw-wl-w { background: #1d7a44; }
.sw-wl-l { background: var( --sw-red ); }

/* ---------- next game ---------- */

.sw-next {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 4px 0 2px;
}

.sw-next-team {
	text-align: center;
	font-family: "Arial Narrow", Arial, sans-serif;
}

.sw-abbr {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1.1;
}

.sw-abbr-us { color: var( --sw-gold ); }

.sw-next-name {
	font-size: 9px;
	letter-spacing: 0.16em;
	color: var( --sw-dim );
	text-transform: uppercase;
	margin-top: 1px;
}

.sw-at {
	color: #5f8f78;
	font-size: 11px;
	letter-spacing: 0.1em;
}

.sw-next-when {
	text-align: center;
	font-size: 15px;
	font-weight: 800;
	color: var( --sw-gold );
	padding: 8px 0 2px;
}

.sw-next-sub {
	text-align: center;
	font-size: 11px;
	color: #bfe0d0;
	line-height: 1.4;
}

/* ---------- notes ---------- */

.sw-note {
	font-size: 9.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var( --sw-dim );
	margin-top: 10px;
	border-top: 1px solid var( --sw-rule );
	padding-top: 9px;
	line-height: 1.5;
}

.sw-note a { color: #a9cdbb; text-decoration: underline; }
.sw-stale { opacity: 0.75; font-style: italic; letter-spacing: 0.08em; }

/* ---------- rival widget ---------- */

.sw-widget.sw-enemy {
	--sw-board: #1a2138;
	--sw-board-lo: #10152a;
	--sw-cream: #dfe3ee;
	--sw-rule: #39415f;
	--sw-dim: #8b95b4;
	border-color: #c8ccd6;
}

.sw-enemy h2.sw-title { background: #0b0f20; }
.sw-enemy .sw-cell {
	background: linear-gradient( 180deg, #1b2340, #0d1226 );
	border-color: #454f75;
	color: #dfe3ee;
}
.sw-enemy .sw-cell-tot {
	background: linear-gradient( 180deg, #242e52, #131a33 );
	border-color: #5b6690;
	color: #dfe3ee;
}

.sw-verdict {
	font-size: 14px;
	font-style: italic;
	color: #c3cbe2;
	text-align: center;
	padding: 11px 4px 3px;
	font-family: Georgia, "Times New Roman", serif;
	line-height: 1.4;
}

.sw-verdict.sw-good { color: #7fdca6; }

/* ---------- narrow screens ---------- */

@media ( max-width: 480px ) {
	.sw-abbr { font-size: 22px; }
	table.sw-standings td { font-size: 13.5px; }
}

@media ( prefers-reduced-motion: reduce ) {
	.sw-widget * { transition: none !important; }
}
