html, body{ height:100%; }
:root {
    --hill-left: url('../images/hill-left.png');
    --hill-right: url('../images/hill-right.png');
    --bs-red: #b20000;
    --bs-body-link: #b20000;
    --cream: hsl(41, 80%, 97%);
    --black: hsl(0,15%,15%);
    --dark-red: rgb(83, 2, 15);
    --off-white: hsl(0,30%,99%);
    --dark-cream: hsl(41, 80%, 93%);
    --bg-color: var(--cream);
    --text-color-body: #333;
    --title-color: var(--dark-red);
    --fonts: "museo-sans-1", system-ui, sans-serif;
}

@font-face {
	font-family: 'kassidythin';
	src: url('/wp-content/themes/btv3/fonts/kassidy-thin-webfont.woff2') format('woff2'),
		 url('/wp-content/themes/btv3/fonts/kassidy-thin-webfont.woff') format('woff');
	font-weight: normal;
	font-style: normal;
}

.f-hand-thin{
	font-family: 'kassidythin', var(--fonts) !important;
}

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    z-index: 10000;
    padding: 0.5rem 0.9rem;
    background: #fff;
    color: #1a1a1a;
    border-radius: 0.25rem;
    text-decoration: underline;
    transform: translateY(-12rem);
}
.skip-link:focus,
.skip-link:focus-visible {
    transform: none;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* worksheet in-description links  */
.ws-description a {
    color: var(--bs-red);
    text-decoration: underline;
    transition: all 180ms ease-out;
}
.ws-description a:hover,
.ws-description a:visited,
.ws-description a:active,
.ws-description a:focus {
    color: var(--dark-red);
}

.box-shadow-main {
    box-shadow: -5px 5px 0 var(--dark-cream);
}

.border-radius-default {
    border-radius: 10px;
}

.border-radius-top {
    border-radius: 10px 10px 0 0;
}

body{
    background-color: var(--bg-color);
    font-family: 'museo-1', sans-serif;
    position: relative;
    transition: background-color 180ms ease-out;
}

/* Background hill images */
body::before,
body::after {
    content: '';
    position: fixed;
    bottom: 0;
    width: 300px;
    height: 200px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom;
    z-index: -1;
    pointer-events: none;
}

body::before {
    left: 0;
    width: 432px;
    height: 206px;
    background-image: var(--hill-left);
}

body::after {
    right: 0;
    width: 322px;
    height: 160px;
    background-image: var(--hill-right);
}
/* On narrow screens the fixed hills sit behind lesson text; drop them. */
@media (max-width: 767px) {
    body::before,
    body::after {
        display: none;
    }
}

body[data-theme="october"] {
    --bs-red: #e25a28;
    --bs-body-link: #c2410c;
    --slider-color: #e25a28;
    --dark-cream: #e0e0e0;
    --dark-red: var(--bs-red);
    --bg-color: #333333;
    --text-color-body: #e0e0e0;
    --title-color: #d9e59e;
}

body[data-theme="october"]::before {
    background-image: url('../images/halloween/hill-left.png?v=2');
}

body[data-theme="october"]::after {
    background-image: url('../images/halloween/hill-right.png');    
    height: 315px;
    width: 299px;
}

body[data-theme="dark"] {
    --bs-red: #ECEFEF;
    --bs-body-link: #531714;
    --slider-color: #95655e;
    --dark-cream: #cecece;
    --dark-red: #95655e;
    --bg-color: #531714;
    --text-color-body: #e0e0e0;
    --title-color: #ffffff;
}

body[data-theme="dark"]::before {
    background-image: url('../images/dark/hill-dark-left.png');
}

body[data-theme="dark"]::after {
    background-image: url('../images/dark/hill-dark-right.png');    
    height: 315px;
    width: 299px;
}

/* Logo styling */
.btv-logo {
    background-image: url('../images/btv-logo-simple-sharing.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

body[data-theme="october"] .btv-logo {
    background-image: url('../images/halloween/btv-logo-simple-sharing.png');
}

body[data-theme="dark"] .btv-logo {
    background-image: url('../images/dark/logo.png');
}

.text-color-body {
    color: var(--text-color-body);
}

.hover-text-main-color:hover{
    color: var(--bs-red);
}

.resource-icon {
    width: 16px;
    margin-top: 5px;
}
.text-title{
    color: var(--title-color);
}
/* Dark themes lighten title/body text for the page background; white cards keep dark text. */
.bg-white .text-title {
    color: rgb(83, 2, 15);
}
.bg-white .text-color-body {
    color: #333;
}
/* Form field edges need 3:1 against white. */
.border-field {
    border-color: #6b7280;
}
.text-dark-red {
    color: var(--dark-red);
}

/* Sticky footer for "Shared by" credit */
footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    /* One line where it fits; without this, left:50% halves the width and it wrapped to four lines on phones. */
    width: max-content;
    max-width: calc(100% - 32px);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}
/* Reserves room at the page end so the last lines of text can scroll clear of the fixed credit when zoomed. */
.shared-footer-spacer {
    height: 110px;
}
footer .share-footer-text {
    color: #333333;
}

/* Tab styling */
label.tabs {
    display: inline-block;
    margin: 0 4px -8px 0;
    padding: 6px 14px;
    text-align: center;
    color: #5a4d43;
    background: linear-gradient(rgba(255,255,255,.8) 50%,var(--dark-cream) 100%);
    z-index: 1;
    position: relative;
}

.z-2{
    z-index: 2;
}

.hover-scale{
    transition: transform 180ms ease-out
}

.hover-scale:hover{
    transform: scale(1.02);    
}

label.tabs:hover {
    color: #666;
    cursor: pointer;
    background: var(--off-white);
}

input:checked + label.tabs {
    color: black;
    border-bottom: none;
    background: var(--off-white);
    margin-bottom: -4px;
}

input.tab_button {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.first_tab {
    margin-left: 8px !important;
}

/* Native R2 videos fill their cards and lesson panes. */
.video-wrapper video,
#video-zone video {
    display: block;
    width: 100%;
    height: auto;
}

/* Google Slides embed styling */
.google-slides-wrapper {
    position: relative;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.google-slides-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

#story-starter h3{
    font-size:1.5rem;
    font-weight:normal;
}
#story-starter table{
    width:100%;
max-width:960px;
}
#story-starter td{
    padding:5px 12px;
    font-size:1.3rem;
}
/* Let the twelve independent word choices wrap instead of forcing sideways scrolling on phones. */
@media (max-width: 640px) {
    #story-starter table, #story-starter tbody, #story-starter tr { display: block; }
    #story-starter td { display: inline-block; }
}
#story-starter .starter_instructions{
font-size:1.4rem;
}
#story-starter .starter_refresh{
margin-top:3.5em;
text-align:right;
color:#4b5563;
font-size:1rem;
}
body[data-theme="dark"] #story-starter:not(.bg-white) .starter_refresh,
body[data-theme="october"] #story-starter:not(.bg-white) .starter_refresh {
    color: var(--text-color-body);
}
main .text-gray-400 {
    color: #4b5563;
}					


.toggle-switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 24px;
}
.toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}
.slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #8c8374;
	transition: .4s;
	border-radius: 24px;
}
.slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: .4s;
	border-radius: 50%;
}
input:checked + .slider {
	background-color: var(--slider-color);
}
input:checked + .slider:before {
	transform: translateX(26px);
}
/* Focus-visible styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input.tab_button:focus-visible + label.tabs,
.toggle-switch input:focus-visible + .slider {
    outline: 2px solid var(--bs-body-link);
    outline-offset: 2px;
    /* White halo keeps the ring visible on both white cards and dark theme backgrounds. */
    box-shadow: 0 0 0 4px #fff;
}
/* End Theme Toggle */
