
body {
	font-family: 'Roboto', sans-serif;
	margin: 0;
	font-size: 13px;
	background-color: #f5f5f5;
}

h2 {
	font-family: 'Roboto Condensed', sans-serif;
}

/* ── Header ── */
.headersection {
	font-family: 'Roboto Condensed', sans-serif;
	width: 100%;
	height: 60px;
	background-image: url("header.png");
	background-position: center;
	background-repeat: repeat;
	background-size: stretch;
	font-size: 22px;
	font-weight: bold;
	line-height: 60px;
	padding-left: 20px;
	color: #ffffff;
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.gamename {
	flex: 1;
}

.feedback a {
	display: flex;
	align-items: center;
	padding-right: 20px;
}

.header-logo {
	height: 70px;
	width: auto;
}

/* ── Page wrapper ── */
.page-content {
	padding: 12px 20px;
}

/* ── Control bar ── */
.control-bar {
	display: flex;
	align-items: center;
	gap: 0;
	margin-bottom: 14px;
	background: #f4f7fa;
	border: 1px solid #c8d8e8;
	border-radius: 12px;
	padding: 10px 16px;
	flex-wrap: wrap;
}

.control-section {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.control-section-label {
	font-size: 9px;
	font-weight: bold;
	font-family: 'Roboto Condensed', sans-serif;
	letter-spacing: 0.8px;
	color: #8aaac8;
	text-transform: uppercase;
}

.control-divider {
	width: 1px;
	align-self: stretch;
	background: #c8d8e8;
	margin: 0 16px;
}

/* ── Team settings ── */
.teamsettings {
	display: flex;
	gap: 8px;
}

.player-control {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 6px 10px;
	border: 1px solid #c8d8e8;
	border-radius: 8px;
	background-color: #fff;
}

.player-label {
	font-size: 11px;
	font-weight: bold;
	color: #555;
}

.player-stepper {
	display: flex;
	align-items: center;
	gap: 4px;
}

.teamsize {
	border-radius: 50%;
	background-color: #5a7fa8;
	color: #fff;
	font-size: 18px;
	line-height: 36px;
	width: 36px;
	height: 36px;
	text-align: center;
	display: inline-block;
}

.player-btn {
	width: 26px;
	height: 26px;
	border: none;
	border-radius: 50%;
	background-color: #5a7fa8;
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.15s;
}

.player-btn:hover {
	background-color: #3d5f82;
}

/* ── Sim controls ── */
.simcontrols {
	display: flex;
	gap: 6px;
	align-items: center;
	flex-wrap: wrap;
}

/* ── Toggle switches ── */
.toggle-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.toggle-pill {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	margin: 0;
	user-select: none;
}

.toggle-pill input[type="checkbox"] {
	display: none;
}

.toggle-pill-track {
	position: relative;
	width: 32px;
	height: 18px;
	border-radius: 9px;
	background: #c0c8d0;
	transition: background 0.2s;
	flex-shrink: 0;
}

.toggle-pill-thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #fff;
	transition: left 0.2s;
}

.toggle-pill input:checked + .toggle-pill-track {
	background: #5a7fa8;
}

.toggle-pill input:checked + .toggle-pill-track .toggle-pill-thumb {
	left: 17px;
}

.toggle-pill-label {
	font-size: 12px;
	font-weight: bold;
	color: #444;
}

/* ── Cost / dice display ── */
.costrow {
	display: flex;
	gap: 24px;
	margin-bottom: 8px;
	font-size: 13px;
	color: #444;
}

.costlabel {
	font-weight: bold;
}

.effortrolled {
	font-size: 12px;
	color: #555;
	margin-bottom: 12px;
}

/* ── Board title row ── */
.board-title-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
}

.board-title-row .board-heading {
	margin-bottom: 0;
}

.board-title-row .day-badge {
	margin-bottom: 0;
}

/* ── Day badge ── */
.day-badge {
	display: inline-block;
	background: #5a7fa8;
	color: #fff;
	font-weight: bold;
	font-size: 14px;
	padding: 2px 12px;
	border-radius: 12px;
	margin-bottom: 6px;
}

/* ── Board section headings ── */
.board-heading {
	font-family: 'Roboto Condensed', sans-serif;
	font-size: 14px;
	font-weight: bold;
	color: #333;
	margin-bottom: 4px;
	letter-spacing: 0.5px;
}

/* ── Boards ── */
.boardPUSH,
.boardPULL {
	margin-top: 8px;
	margin-bottom: 20px;
	overflow-x: auto;
}

.headerrowPUSH,
.headerrowPULL,
.boardrowPUSH,
.boardrowPULL {
	display: flex;
}

.boardcolumnheader {
	flex: 1;
	min-width: 64px;
	border: 1px solid #a0a0a0;
	background-color: #e8edf2;
	height: 52px;
	text-align: center;
	font-size: 10px;
	font-weight: bold;
	color: #333;
	padding: 4px 2px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	line-height: 1.3;
}

.wip-stepper {
	display: flex;
	align-items: center;
	gap: 3px;
	margin-top: 2px;
}

.wip-value {
	min-width: 14px;
	text-align: center;
}

.wip-btn {
	width: 16px;
	height: 16px;
	border: none;
	border-radius: 50%;
	background-color: #5a7fa8;
	color: #fff;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.15s;
}

.wip-btn:hover {
	background-color: #3d5f82;
}

.boardcolumn {
	flex: 1;
	min-width: 64px;
	border: 1px solid #c8c8c8;
	border-top: none;
	background-color: #fafafa;
	min-height: 200px;
	max-height: 600px;
	overflow-y: auto;
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	padding: 3px;
}

/* ── Cards ── */
.icard {
	border: 1px solid #999;
	border-radius: 3px;
	width: 56px;
	height: 26px;
	margin: 2px 2px 2px 0;
	background-color: #ffffd0;
	font-size: 9px;
	font-weight: bold;
	line-height: 26px;
	text-align: center;
	cursor: default;
	overflow: hidden;
	color: #333;
}

.defect {
	background-color: #c0392b !important;
	color: #fff !important;
	border-color: #8e1a10 !important;
}

.BAblocker,
.DEVblocker,
.QAblocker,
.DEVOPSblocker {
	background-color: #d93adc !important;
	color: #fff !important;
	border-color: #9a1a9d !important;
}

/* ── Stats tables ── */
.stats-row {
	display: flex;
	gap: 20px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.stats-panel {
	flex: 1;
	min-width: 280px;
}

.stats-label {
	font-family: 'Roboto Condensed', sans-serif;
	font-size: 12px;
	font-weight: bold;
	color: #555;
	margin-bottom: 4px;
}

/* ── Charts ── */
.chart-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #ddd;
}

.chart-wrapper {
	position: relative;
	width: calc(50% - 6px);
	min-width: 400px;
	height: 420px;
}

.cfd {
	width: 100%;
	height: 100%;
}

/* ── Chart info icon & tooltip ── */
.chart-info-btn {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 10;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1px solid #8aaac8;
	background: #e8f0f8;
	color: #3d5f82;
	font-size: 11px;
	font-weight: bold;
	font-family: serif;
	line-height: 1;
	cursor: default;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.chart-info-btn::before {
	content: 'i';
}

.chart-info-btn::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: 26px;
	right: 0;
	width: 300px;
	background: #1e2d3d;
	color: #f0f4f8;
	font-size: 12px;
	font-family: 'Roboto', sans-serif;
	font-weight: normal;
	line-height: 1.5;
	padding: 10px 12px;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
	white-space: normal;
	text-align: left;
	display: none;
	pointer-events: none;
}

.chart-info-btn:hover::after {
	display: block;
}

.section {
	width: 100%;
	padding: 4px 0;
	color: #555;
	font-size: 12px;
}

/* ── Advanced Settings panel ── */
#advsettings-toggle {
	position: fixed;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	background-color: #5a7fa8;
	color: #fff;
	border: none;
	padding: 7px 24px;
	font-size: 11px;
	font-weight: bold;
	font-family: 'Roboto Condensed', sans-serif;
	letter-spacing: 0.05em;
	cursor: pointer;
	border-radius: 6px 6px 0 0;
	z-index: 1001;
	transition: background-color 0.15s;
}

#advsettings-toggle:hover {
	background-color: #3d5f82;
}

#advsettings-panel {
	position: fixed;
	left: 0;
	bottom: -50vh;
	width: 100%;
	height: 50vh;
	background: #fff;
	border-top: 2px solid #c8d8e8;
	box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
	z-index: 1000;
	transition: bottom 0.3s ease;
	display: flex;
	flex-direction: column;
}

#advsettings-panel.open {
	bottom: 0;
}

.advsettings-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 20px;
	background-color: #e8edf2;
	border-bottom: 1px solid #c8d8e8;
	font-weight: bold;
	font-size: 13px;
	font-family: 'Roboto Condensed', sans-serif;
	color: #333;
	flex-shrink: 0;
}

.advsettings-header-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.advsettings-note {
	color: #888;
	font-size: 11px;
	font-weight: normal;
	font-family: 'Roboto', sans-serif;
}

.advsettings-help {
	color: #aaa;
	font-size: 11px;
	font-family: 'Roboto', sans-serif;
	margin: 4px 0 10px 0;
	line-height: 1.5;
}

.advsettings-body {
	overflow-y: auto;
	padding: 14px 24px;
	flex: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-content: flex-start;
}

.advsettings-group {
	min-width: 220px;
	flex: 1;
	border: 1px solid #dde5ee;
	border-radius: 8px;
	padding: 10px 14px;
	background: #f9fbfd;
}

.advsettings-group-title {
	font-family: 'Roboto Condensed', sans-serif;
	font-size: 11px;
	font-weight: bold;
	color: #5a7fa8;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	margin-bottom: 8px;
}

.advsettings-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 6px;
}

.advsettings-row label {
	font-size: 12px;
	color: #444;
	margin: 0;
}

.advsettings-input {
	width: 64px;
	text-align: center;
	font-size: 12px;
	padding: 2px 4px;
	border: 1px solid #b0c4d8;
	border-radius: 4px;
}

/* ── Instructions panel ── */
#instructions-toggle {
	position: fixed;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	writing-mode: vertical-rl;
	text-orientation: mixed;
	rotate: 180deg;
	background-color: #5a7fa8;
	color: #fff;
	border: none;
	padding: 14px 7px;
	font-size: 11px;
	font-weight: bold;
	font-family: 'Roboto Condensed', sans-serif;
	letter-spacing: 0.05em;
	cursor: pointer;
	border-radius: 0 6px 6px 0;
	z-index: 1001;
	transition: background-color 0.15s;
}

#instructions-toggle:hover {
	background-color: #3d5f82;
}

#instructions-panel {
	position: fixed;
	left: -520px;
	top: 0;
	width: 520px;
	height: 100vh;
	background: #fff;
	border-right: 2px solid #c8d8e8;
	box-shadow: 4px 0 16px rgba(0,0,0,0.15);
	z-index: 1000;
	transition: left 0.3s ease;
	display: flex;
	flex-direction: column;
}

#instructions-panel.open {
	left: 0;
}

.instructions-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 20px;
	background-color: #e8edf2;
	border-bottom: 1px solid #c8d8e8;
	font-weight: bold;
	font-size: 13px;
	font-family: 'Roboto Condensed', sans-serif;
	color: #333;
	flex-shrink: 0;
}

.instructions-body {
	overflow-y: auto;
	padding: 16px 24px;
	flex: 1;
}

.instructions-body h2 {
	font-size: 14px;
	font-weight: bold;
	color: #333;
	margin-top: 18px;
	margin-bottom: 6px;
}

.instructions-body h2:first-child {
	margin-top: 0;
}

.instructions-body p,
.instructions-body ol,
.instructions-body li {
	font-size: 13px;
	color: #444;
	line-height: 1.6;
}

.instructions-body ol {
	padding-left: 20px;
}

.pipeline {
	font-family: monospace;
	background: #f0f4f8;
	border: 1px solid #c8d8e8;
	border-radius: 4px;
	padding: 6px 12px;
	font-size: 12px;
	color: #333;
}

.colour-key {
	display: grid;
	grid-template-columns: 24px 1fr;
	align-items: center;
	gap: 6px 10px;
	margin-bottom: 8px;
}

.colour-swatch {
	width: 24px;
	height: 16px;
	border-radius: 3px;
	border: 1px solid #999;
}

.colour-swatch.story  { background-color: #ffffd0; }
.colour-swatch.defect { background-color: #c0392b; }
.colour-swatch.blocker { background-color: #d93adc; }

/* ── Scoreboard panel ── */
#scoreboard-toggle {
	position: fixed;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	writing-mode: vertical-rl;
	text-orientation: mixed;
	background-color: #5a7fa8;
	color: #fff;
	border: none;
	padding: 14px 7px;
	font-size: 11px;
	font-weight: bold;
	font-family: 'Roboto Condensed', sans-serif;
	letter-spacing: 0.05em;
	cursor: pointer;
	border-radius: 6px 0 0 6px;
	z-index: 1001;
	transition: background-color 0.15s;
}

#scoreboard-toggle:hover {
	background-color: #3d5f82;
}

#scoreboard-panel {
	position: fixed;
	right: -480px;
	top: 0;
	width: 480px;
	height: 100vh;
	background: #fff;
	border-left: 2px solid #c8d8e8;
	box-shadow: -4px 0 16px rgba(0,0,0,0.15);
	z-index: 1000;
	transition: right 0.3s ease;
	display: flex;
	flex-direction: column;
}

#scoreboard-panel.open {
	right: 0;
}

.scoreboard-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	background-color: #e8edf2;
	border-bottom: 1px solid #c8d8e8;
	font-weight: bold;
	font-size: 13px;
	color: #333;
	flex-shrink: 0;
}

.scoreboard-body {
	overflow-y: auto;
	padding: 10px;
	flex: 1;
}

.scoreboard-empty {
	color: #999;
	font-size: 12px;
	text-align: center;
	margin-top: 20px;
}

#scoreboard-table td.winner-pull {
	color: #1a7a3a;
	font-weight: bold;
}

#scoreboard-table td.winner-push {
	color: #c0392b;
	font-weight: bold;
}

#scoreboard-table td.winner-tie {
	color: #888;
}
