/*
	compat.css — keeps the old HTML Kickstart class names working on top of Pico CSS.
	Load order: pico.min.css → kickstart-icons.css → tiptip.css → compat.css → style.css
*/

/* ---------- Theme ---------- */
:root {
	--pico-font-size: 95% !important;
	--pico-font-family-sans-serif: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--pico-primary: #1f4e79;
	--pico-primary-background: #1f4e79;
	--pico-primary-border: #1f4e79;
	--pico-primary-hover: #163a5b;
	--pico-primary-hover-background: #163a5b;
	--pico-primary-hover-border: #163a5b;
	--pico-primary-underline: rgba(31, 78, 121, 0.5);
	--pico-primary-focus: rgba(31, 78, 121, 0.25);
	--pico-spacing: 0.9rem;
	--pico-form-element-spacing-vertical: 0.5rem;
	--pico-form-element-spacing-horizontal: 0.75rem;
	--fest-green: #2e7d32;
	--fest-red: #c62828;
	--fest-blue: #1f6fb2;
}

/* ---------- Page frame ---------- */
#wrap {
	max-width: 1100px;
	margin: 1.5rem auto;
	padding: 0.5rem 1rem 1.5rem;
	background: #fff;
	border: 1px solid #e3e7ec;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(16, 38, 64, 0.06);
}
img { max-width: 100%; height: auto; }
p { margin: 0.6rem 0; }
h1, h2, h3, h4, h5, h6 { margin: 0.6rem 0; --pico-font-weight: 700; }
hr { clear: both; margin: 1.5rem 0; }

/* ---------- Grid (12 columns, stacks on phones) ---------- */
[class^="col_"], [class*=" col_"] {
	float: left;
	box-sizing: border-box;
	margin: 8px 0.8333%;
}
.col_1  { width: 6.6667%; }  .col_2  { width: 15%; }       .col_3  { width: 23.3333%; }
.col_4  { width: 31.6667%; } .col_5  { width: 40%; }       .col_6  { width: 48.3333%; }
.col_7  { width: 56.6667%; } .col_8  { width: 65%; }       .col_9  { width: 73.3333%; }
.col_10 { width: 81.6667%; } .col_11 { width: 90%; }       .col_12 { width: 98.3333%; }
@media (max-width: 767px) {
	[class^="col_"], [class*=" col_"] { width: 98.3333% !important; float: none; display: block; }
}
.clear { clear: both; display: block; overflow: hidden; visibility: hidden; width: 0; height: 0; }
.clearfix::after { content: ""; display: table; clear: both; }

/* ---------- Helpers ---------- */
.hide { display: none; }
.center { text-align: center; }
.left { text-align: left; }
.right { text-align: right; }
img.left, .logo.left { float: left; margin-right: 1rem; }
img.right { float: right; margin-left: 1rem; }

/* ---------- Buttons ---------- */
a.button, a.btn {
	display: inline-block;
	padding: var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal);
	border-radius: var(--pico-border-radius);
	background: var(--pico-primary-background);
	border: 1px solid var(--pico-primary-border);
	color: #fff;
	text-decoration: none;
	line-height: 1.3;
	margin: 0.15rem 0.1rem;
}
a.button:hover, a.btn:hover { filter: brightness(0.9); color: #fff; }
button.green, a.button.green, input[type="submit"].green { --pico-background-color: var(--fest-green); --pico-border-color: var(--fest-green); background: var(--fest-green); border-color: var(--fest-green); color: #fff; }
button.blue,  a.button.blue,  input[type="submit"].blue  { --pico-background-color: var(--fest-blue);  --pico-border-color: var(--fest-blue);  background: var(--fest-blue);  border-color: var(--fest-blue);  color: #fff; }
button.red,   a.button.red,   input[type="submit"].red   { --pico-background-color: var(--fest-red);   --pico-border-color: var(--fest-red);   background: var(--fest-red);   border-color: var(--fest-red);   color: #fff; }
button.small, a.button.small, input[type="submit"].small { font-size: 0.82em; padding: 0.3rem 0.65rem; width: auto; }
button.large, a.button.large, input[type="submit"].large { font-size: 1.15em; padding: 0.6rem 1.2rem; }
button.x-large, a.button.x-large, input[type="submit"].x-large { font-size: 1.3em; padding: 0.75rem 1.5rem; }
.button-bar { display: inline-flex; gap: 0.25rem; flex-wrap: wrap; }

/* ---------- Notices ---------- */
.notice {
	position: relative;
	clear: both;
	padding: 0.65rem 2.25rem 0.65rem 0.9rem;
	margin: 0.75rem 0;
	border-radius: var(--pico-border-radius);
	border: 1px solid #e6c200;
	background: #fffbe6;
	color: #7a5d00;
}
.notice.error { border-color: #e0a0a0; background: #fdecec; color: #9b1c1c; }
.notice.success { border-color: #9fd3a5; background: #eaf7ec; color: #1e6b29; }
.notice.information { border-color: #a9c8e8; background: #eaf3fb; color: #1f4e79; }
.notice a.icon.close { position: absolute; top: 0.45rem; right: 0.6rem; color: inherit; text-decoration: none; font-size: 12px; }

/* ---------- Tables ---------- */
table { width: 100%; margin-bottom: 1rem; }
table.tight th, table.tight td { padding: 0.3rem 0.6rem; }
table.striped tbody tr:nth-child(odd) td, table.striped tr.alt td { background: #f6f8fa; }
table.sortable thead th { cursor: pointer; position: relative; padding-right: 1.4rem; }
table.sortable thead th:hover { background: #eef2f6; }
table.sortable span.arrow { position: absolute; top: 50%; right: 6px; width: 0; height: 0; border: 5px solid transparent; border-top-color: #9aa5b1; margin-top: -2px; }
table.sortable span.arrow.up { border-top-color: transparent; border-bottom-color: #9aa5b1; margin-top: -7px; }
tr[url] { cursor: pointer; }

/* ---------- Tabs (driven by kickstart.js) ---------- */
ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0.75rem 0 -1px;
	padding: 0;
	border-bottom: 1px solid #dfe3e8;
}
ul.tabs li { list-style: none; margin: 0; padding: 0; }
ul.tabs li a {
	display: inline-block;
	padding: 0.5rem 0.9rem;
	border: 1px solid #dfe3e8;
	border-bottom: 0;
	border-radius: 6px 6px 0 0;
	background: #f4f6f8;
	color: #445;
	text-decoration: none;
	font-size: 0.92em;
}
ul.tabs li.current a { background: #fff; color: #111; position: relative; top: 1px; }
.tab-content { display: flow-root; clear: both; border: 1px solid #dfe3e8; border-top: 0; padding: 1rem; border-radius: 0 0 6px 6px; }

/* ---------- Forms ---------- */
form.vertical label { display: block; }
form.vertical input[type="radio"], form.vertical input[type="checkbox"] { display: inline-block; margin: 0 0.25rem 0 0; vertical-align: middle; }
form.vertical label.inline { display: inline-block; width: auto; margin: 0 0.25rem 0 0; }
label.error { color: var(--fest-red); font-size: 0.85em; }
input.error, textarea.error, select.error { border-color: var(--fest-red); }
fieldset { border: 0; padding: 0; margin: 0; }

/* ---------- Breadcrumbs ---------- */
ul.breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.45rem 0.75rem; margin: 0.5rem 0 1rem; background: #f4f6f8; border-radius: 6px; clear: both; }
ul.breadcrumbs li { list-style: none; margin: 0; padding: 0; }
ul.breadcrumbs li + li::before { content: "›"; margin-right: 0.4rem; color: #889; }
ul.breadcrumbs a { text-decoration: none; }

/* ---------- Video embeds: responsive 16:9 ---------- */
.video-wrap { position: relative; width: 100%; max-width: 720px; aspect-ratio: 16 / 9; margin: 0 0 1rem; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }

/* Judge score choices: number and circle are one click target */
.score-choices { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0.25rem 0 0.5rem; }
form.vertical label.score-choice { margin: 0; cursor: pointer; white-space: nowrap; }
