/* catppuccin mocha theme
	https://github.com/catppuccin/catppuccin */
:root {
	--rosewater: #f5e0dc;
	--flamingo: #f2cdcd;
	--pink: #f5c2e7;
	--mauve: #cba6f7;
	--red: #f38ba8;
	--maroon: #eba0ac;
	--peach: #fab387;
	--yellow: #f9e2af;
	--green: #a6e3a1;
	--teal: #94e2d5;
	--sky: #89dceb;
	--sapphire: #74c7ec;
	--blue: #89b4fa;
	--lavender: #b4befe;
	--text: #cdd6f4;
	--subtext1: #bac2de;
	--subtext0: #a6adc8;
	--overlay2: #9399b2;
	--overlay1: #7f849c;
	--overlay0: #6c7086;
	--surface2: #585b70;
	--surface1: #45475a;
	--surface0: #313244;
	--base: #1e1e2e;
	--mantle: #181825;
	--crust: #11111b;
}

/* Reset and base styles */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

@font-face {
    font-family: 'Unifont';
    src: url(/fonts/unifont.woff) format('woff');
}

body {
    font-family: 'Unifont', 'Fira Mono', 'JetBrains Mono', 'IBM Plex Mono', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', 'Liberation Mono', monospace;
	background-color: var(--base);
	color: var(--text);
	line-height: 1.2;
	font-size: 0.9rem;
}

pre {
    display: inline-block;
    line-height: 1.0;
    max-width: 100%;
    overflow: visible;
    margin: 0;
    padding: 0;
}

.contentcontainer, .header, .twocolumnlayout, .leftcolumn, .rightcolumn {
    position: relative;
    z-index: 1;
}

.skeletonbox {
    margin: 0 !important;
    padding: 0 !important;
}

/* Text size decorator classes (relative to 0.9rem base) */
.text-xs    { font-size: 0.7rem !important; }
.text-sm    { font-size: 0.8rem !important; }
.text-md    { font-size: 0.9rem !important; }   /* default */
.text-lg    { font-size: 1.1rem !important; }
.text-xl    { font-size: 1.3rem !important; }
.text-2xl   { font-size: 1.6rem !important; }
.text-3xl   { font-size: 2.0rem !important; }

/* Text decorator classes */
.text-bold {
    font-weight: bold !important;
}

.text-italic {
    font-style: italic !important;
}

.text-underline {
    text-decoration: underline !important;
}

.text-strike {
    text-decoration: line-through !important;
}

.text-uppercase {
    text-transform: uppercase !important;
}

.text-lowercase {
    text-transform: lowercase !important;
}

.text-smallcaps {
    font-variant: small-caps !important;
}

.text-shadow {
    text-shadow: 1px 1px 2px var(--surface2), 0 0 1em var(--mauve);
}

.text-outline {
    -webkit-text-stroke: 1px var(--surface2);
    color: transparent;
}

.text-glow {
    text-shadow: 0 0 8px var(--sky), 0 0 16px var(--blue);
}

/* Content container */
.contentcontainer {
	display: block;
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

/* Header */
.header {
	display: block;
	width: 100%;
	text-align: center;
	margin-bottom: 2rem;
}

.slogan {
	font-size: 1.1rem;
	color: var(--overlay1);
}

.sm-logo {
    display: none;
    overflow: visible;
}

.lg-logo {
    overflow: visible;
}


/* Two column layout */
.twocolumnlayout {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 30px;
}

.leftcolumn, .rightcolumn {
	display: block;
	flex: 1;
	min-width: 300px;
}

/* Styled boxes */
.blankbox {
    display: block;
    padding: 0;
    margin-bottom: 1.25rem;
    width: 100%;
}

.blankbox.left-align {
    display: flex;
    justify-content: flex-start;
    text-align: left;
}

.blankbox.center-align {
    display: flex;
    justify-content: center;
    text-align: center;
}

.blankbox.right-align {
    display: flex;
    justify-content: flex-end;
    text-align: right;
}

.blankbox pre {
    text-align: left;
    margin: 0;
}

.styledbox {
    display: block;
    background-color: var(--crust);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.border-single {
    border: 2px solid var(--surface2);
    border-radius: 0;
    box-shadow: none;
}

.border-double {
    border: 4px double var(--surface2);
    border-radius: 0;
    box-shadow: none;
}

.styledbox h2 {
	color: var(--mauve);
	font-size: 1.25rem;
	margin-bottom: 0.8rem;
	border-bottom: 1px solid var(--surface2);
	padding-bottom: 8px;
}

.styledbox h3 {
    color: var(--lavender);
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px dashed var(--surface1);
    padding-bottom: 6px;
    font-weight: normal;
}

.styledbox p {
	color: var(--text);
	margin-bottom: 0.5rem;
}

.styledbox a {
	color: var(--blue);
	text-decoration: none;
}

.styledbox a:hover {
	color: var(--sky);
	text-decoration: underline;
}

.styledbox .keyvalue {
	display: grid;
	grid-template-columns: auto 1fr;
    gap: 0.25rem;
	align-items: center;
}

.styledbox .keyvalue .key {
	color: var(--subtext1);
	font-weight: bold;
    display: inline-flex;
    align-items: center;
    margin-right: 1.5rem;
}

.styledbox .keyvalue .value {
	color: var(--text);
    display: inline-flex;
    align-items: center;
}

.styledbox .right-align {
    text-align: right;
}

.styledbox .center-align {
    text-align: center;
}

/* List styling */
.styledbox ul {
	margin: 10px 0;
	padding-left: 20px;
}

.styledbox li {
	color: var(--text);
	margin-bottom: 5px;
}

.styledbox li::marker {
	color: var(--mauve);
}

/* Footer */
.footer {
    color: var(--surface2);
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	text-align: left;
	padding: 1em;
	z-index: 0;
    background: transparent;
}


/* Special elements */
/* Responsive font size for #funnybunny */
#funnybunny {
    font-size: clamp(0.6rem, 2.5vw, 1.2rem);
}

.asciiart {
    line-height: 1.0 !important;
}

.hamalert {
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
}

/* Responsive design for narrow displays */
@media (max-width: 768px) {
	.twocolumnlayout {
		flex-direction: column;
	}
	
	.leftcolumn, .rightcolumn {
		width: 100%;
	}
	
/*    
    .rightcolumn { 
        order: -1;
    }

    .leftcolumn {
        order: 1; 
    }
*/

    .header {
        margin-bottom: 1rem !important;
    }

    .slogan {
        font-size: 0.8rem !important;
    }

	.contentcontainer {
		padding: 10px;
	}
	
	.header {
		padding: 15px;
	}
	
    .sm-logo {
        font-size: 1rem !important;
        display: block;
    }

    .lg-logo {
        visibility: hidden;
        display: none;
    }

	.styledbox {
		padding: 15px;
	}
}

/* Print-friendly styles */
@media print {
    body, .contentcontainer, .styledbox, .blankbox, .header, .slogan {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
    }

    a, a:visited {
        color: #000 !important;
        text-decoration: underline !important;
    }

    a::after {
        content: " (" attr(href) ")";
        font-size: 0.9em;
    }

    .footer,
    .bannerlinks,
    .sm-logo,
    .lg-logo,
    nav,
    .hamalert {
        display: none !important;
    }

    .twocolumnlayout,
    .leftcolumn,
    .rightcolumn {
        display: block !important;
        width: 100% !important;
        float: none !important;
    }

    .styledbox,
    .blankbox {
        border: 1px solid #aaa !important;
        border-radius: 0 !important;
        padding: 10px !important;
        margin-bottom: 15px !important;
    }

    img, svg {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }

    pre, code {
        background: #f5f5f5 !important;
        color: #000 !important;
        border: 1px solid #ccc !important;
    }

    /* Remove text shadows and outlines for clarity */
    .text-shadow, .text-outline, .text-glow {
        text-shadow: none !important;
        -webkit-text-stroke: 0 !important;
        color: #000 !important;
    }

    /* Remove unnecessary decorations */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Avoid page breaks inside important blocks */
    .styledbox, .blankbox, pre, blockquote {
        page-break-inside: avoid;
    }
}

/* Accent colors for different elements */
.accent-subtext0 { color: var(--subtext0) !important; }
.accent-subtext1 { color: var(--subtext1) !important; }
.accent-lavender { color: var(--lavender) !important; }
.accent-sapphire { color: var(--sapphire) !important; }
.accent-sky { color: var(--sky) !important; }
.accent-mauve { color: var(--mauve) !important; }  
.accent-blue { color: var(--blue) !important; }
.accent-green { color: var(--green) !important; }
.accent-red { color: var(--red) !important; }
.accent-yellow { color: var(--yellow) !important; }
.accent-pink { color: var(--pink) !important; }
.accent-teal { color: var(--teal) !important; }