/* .==class #==ID noprefix==actualtag h1~p all siblings */

/* 1fr==largestpossible auto 10px==fixed auto-fit minmax fit-content */

@font-face {
  font-family: 'tx-ff-regular';
  src: url('/wa/rsrc/IBMPlexMono-Regular.ttf') format("truetype");
}

@font-face {
  font-family: 'tx-ff-italic';
  src: url('/wa/rsrc/IBMPlexMono-Italic.ttf') format("truetype");
}

@font-face {
  font-family: 'tx-ff-text';
  src: url('/wa/rsrc/IBMPlexMono-Text.ttf') format("truetype");
}

@font-face {
  font-family: 'tx-ff-bold';
  src: url('/wa/rsrc/IBMPlexMono-Bold.ttf') format("truetype");
}

@font-face {
  font-family: 'tx-ff-logo';
  src: url('/wa/rsrc/KaushanScript-Regular.otf') format("opentype");
}

@font-face {
  font-family: 'tx-ff-sym';
  src: url('/wa/rsrc/Symbola_hint.ttf') format("truetype");
}

:root{
    --tx-color   : #3a9f9a; /* fg */
    --tx-color0  : #0a0f14; /* bg */
    --tx-color8  : #10151b;
    --tx-color1  : #c33027;
    --tx-color9  : #d26939;
    --tx-color2  : #26a98b;
    --tx-color10 : #081f2d;
    --tx-color3  : #edb54b;
    --tx-color11 : #245361;
    --tx-color4  : #195465;
    --tx-color12 : #093748;
    --tx-color5  : #4e5165;
    --tx-color13 : #888ba5;
    --tx-color6  : #33859d;
    --tx-color14 : #599caa;
    --tx-color7  : #98d1ce;
    --tx-color15 : #d3ebe9;
    --tx-clr-bg: var(--tx-color0);
    --tx-clr-bg-alt: var(--tx-color10);
    --tx-clr-bg-code: black;
    --tx-clr-fg: var(--tx-color);
    --tx-clr-fg-alt: var(--tx-color6);
    --tx-clr-logo: var(--tx-clr-fg);
    --tx-clr-logo-bg: var(--tx-color15);
    --tx-clr-head: var(--tx-clr-fg);
    --tx-clr-sub:  var(--tx-clr-fg);
    --tx-clr-art:  var(--tx-clr-fg);
    --tx-clr-txt:  var(--tx-clr-fg);
    --tx-clr-bull: var(--tx-clr-fg-alt);
    --tx-clr-code: var(--tx-clr-fg-alt);
    --tx-clr-TEXT: var(--tx-clr-fg);
    --tx-clr-lnk-active: var(--tx-color3);
    --tx-clr-lnk: var(--tx-color15);
    --tx-clr-lnk-focus: var(--tx-clr-fg);
    --tx-clr-art-iii-bg: var(--tx-clr-bg);
    --tx-clr-art-iii-fg: var(--tx-clr-fg);
    --tx-clr-art-iii-brd: var(--tx-clr-bg);
    --tx-clr-art-ggg-bg: var(--tx-clr-bg-alt);
    --tx-clr-art-ggg-fg: var(--tx-clr-fg);
    --tx-clr-art-ggg-brd: lime;
    --tx-clr-art-sss-bg: var(--tx-clr-bg);
    --tx-clr-art-sss-fg: var(--tx-clr-fg);
    --tx-clr-art-sss-brd: var(--tx-clr-bg);
    --tx-clr-art-aaa-bg: var(--tx-clr-bg);
    --tx-clr-art-aaa-fg: var(--tx-clr-fg);
    --tx-clr-art-aaa-brd: var(--tx-clr-bg-alt);
    --tx-clr-art-ttt-bg: var(--tx-clr-bg);
    --tx-clr-art-ttt-fg: var(--tx-clr-fg);
    --tx-clr-art-ttt-brd: var(--tx-clr-bg-alt);
    --tx-sz-grid-left: 90px;
    --tx-sz-grid-right: 90px;
    --tx-sz-grid-screen: "default";
    --tx-sz-grid-article: 800px; /* total width: 90+800+90 == max(980) */
}

.tx-logo{
    font-family: "tx-ff-logo", monospace;
    color: var(--tx-clr-logo) !important;
    font-size: 4.5rem;
    text-shadow: 2px 2px var(--tx-clr-logo-bg) !important;
    text-decoration: none;
}

.tx-logo-text{
    font-family: "tx-ff-logo", monospace;
    color: var(--tx-clr-logo) !important;
    font-size: 1.2rem;
    text-decoration: none;
}

body {
    display: grid;
    grid: "h h h"
	  "l m r"
	  "f f f";
    grid-template-columns: var(--tx-sz-grid-left) 1fr var(--tx-sz-grid-right);
    grid-template-rows: 120px auto 120px; /* header/footer auto, main flexible */
    gap: 2px; /* Spacing between grid items */
    min-height: 90vh; /* Ensure container takes full viewport height */
    place-items: start stretch;
}

header {
    grid-area: h;
    background-color: var(--tx-clr-bg);
    padding: 1px;
}

nav {
    grid-area: l;
    background-color: var(--tx-clr-bg);
    padding: 1px;
}

main {
    grid-area: m;
    background-color: var(--tx-clr-bg);
    padding: 1px;
}

aside {
    font-family: "tx-ff-logo", monospace;
    font-size: 1.2rem;
    grid-area: r;
    background-color: var(--tx-clr-bg);
    padding: 1px;
}

footer {
    grid-area: f;
    background-color: var(--tx-clr-bg-alt);
    padding: 1px;
}

.article-container {
  max-width: var(tx-sz-grid-article);
  margin: auto;
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 1em;
  padding: 1em;
  background-color: var(--tx-clr-bg);
}

.outline-2 {
    display: inline-grid; /* inline-grid */
    grid: "ggg iii"
	  "sss iii"
	  "aaa iii"
	  "ttt ttt";
    grid-template-columns: 1.2fr auto;
    grid-template-rows: auto auto auto auto 1fr;
    gap: 4px;
    border: 1px dashed var(--tx-clr-bg-alt);
    padding: 4px;
    place-items: start start;
}

.outline-2 > h2 {
    font-family: "tx-ff-text", monospace;
    font-size: 1.5rem;
    grid-area: ggg;
    grid-column: 1 / span 1;
    grid-row: 1 / span 1;
    justify-self: stretch; /* Fills horizontal space */
    align-self: start;
    padding: 4px;
    background-color: var(--tx-clr-art-ggg-bg);
    color: var(--tx-clr-art-ggg-fg);
    border: 1px dash var(--tx-clr-art-ggg-brd);
}

.outline-3:nth-of-type(2):not(:has(img)){
    font-family: "tx-ff-sym", monospace;
    font-size: 3.8rem;
    line-height: 1px;
    grid-area: iii;
    grid-column: 2 / span 1;
    grid-row: 1 / span 3;
    padding: 4px;
    justify-self: start; /* horizontal space */
    align-self: stretch;
    background-color: var(--tx-clr-art-iii-bg);
    color: var(--tx-clr-art-iii-fg);
    /* border-left: 1px solid var(--tx-clr-art-iii-brd); */
}

.outline-3:nth-of-type(2):has(img){
    font-family: "tx-ff-text", monospace;
    font-size: 0.9rem;
    line-height: 0.1rem;
    grid-area: iii;
    grid-column: 2 / span 1;
    grid-row: 1 / span 3;
    padding: 4px;
    justify-self: start; /* horizontal space */
    align-self: stretch;
    background-color: var(--tx-clr-art-iii-bg);
    color: var(--tx-clr-art-iii-fg);
    /* border-left: 1px solid var(--tx-clr-art-iii-brd); */
}

.outline-3:nth-of-type(3){
    font-family: "tx-ff-italic", monospace;
    font-size: 1.0rem;
    grid-area: sss;
    grid-column: 1 / span 1;
    grid-row: 2 / span 1;
    align-self: stretch;   /* Fills vertical space */
    justify-self: stretch; /* Fills horizontal space */
    padding: 4px;
    background-color: var(--tx-clr-art-sss-bg);
    color: var(--tx-clr-art-sss-fg);
    /* border: 1px solid var(--tx-clr-art-sss-brd); */
}

.outline-3:nth-of-type(4){
    font-family: "tx-ff-italic", monospace;
    font-size: 0.7rem;
    grid-area: aaa;
    grid-column: 1 / span 1;
    grid-row: 3 / span 1;
    justify-self: stretch; /* Fills horizontal space */
    align-self: end;
    padding: 4px;
    background-color: var(--tx-clr-art-aaa-bg);
    color: var(--tx-clr-art-aaa-fg);
    border-top: 1px dashed var(--tx-clr-art-aaa-brd);
}

.outline-3:nth-of-type(5){
    font-family: "tx-ff-text", monospace;
    font-size: 0.8rem;
    grid-area: ttt;
    grid-column: 1 / span 2;
    grid-row: 4 / span 1;
    object-fit: cover;
    padding: 4px;
    background-color: var(--tx-clr-art-ttt-bg);
    color: var(--tx-clr-art-ttt-fg);
    border-top: 1px dashed var(--tx-clr-art-ttt-brd);
}

hr {
  color: var(--tx-clr-fg-alt);
}

a:active {
  color: var(--tx-clr-lnk-active); /* selected link */
}

a:not(.tx-logo):hover {
    text-decoration: underline; /* no hover on logo */
}

a:link {
  color: var(--tx-clr-lnk); /* unvisited link */
}

a:not(.tx-logo):focus {
  outline: 2px solid var(--tx-clr-lnk-focus);
}

a:visited {
  color: var(--tx-clr-txt); /* visited link */
}

img {
    opacity: 0.6; /* Makes the image 50% transparent */
}

div.inline-div { /* prevent newline before div */
    display: inline;
}

/* prefers-color-scheme: dark */
@media screen and (max-width: 320px){ /* 320 extra small: mobile devices */
    body {
	background-color: var(--tx-clr-bg) !important;
	color: var(--tx-clr-fg) !important;
    }
    :root {
	--tx-sz-grid-screen: "xxs";
	--tx-sz-grid-article: 140px; /* total width: 90+800+90 == max(320) */
    }
}

@media screen and (min-width: 320px) and (max-width: 575px){ /* 320 extra small: mobile devices */
    body {
	background-color: var(--tx-clr-bg) !important;
	color: var(--tx-clr-fg) !important;
    }

    :root {
	--tx-sz-grid-screen: "xs";
	--tx-sz-grid-article: 140px; /* total width: 90+800+90 == max(320) */
    }
}

@media screen and (min-width: 576px) and (max-width: 767px){ /* small: tablets, large mobiles */
    body {
	background-color: var(--tx-clr-bg) !important;
	color: var(--tx-clr-fg) !important;
    }

    :root {
	--tx-sz-grid-screen: "s";
	--tx-sz-grid-article: 800px; /* total width: 90+396+90 == max(576) */
    }
}

@media screen and (min-width: 768px) and (max-width: 991px){ /* medium: tablets, small laptops */
    body {
	background-color: var(--tx-clr-bg) !important;
	color: var(--tx-clr-fg) !important;
    }

    :root {
	--tx-sz-grid-screen: "m";
	--tx-sz-grid-article: 800px; /* total width: 90+800+90 == max(980) */
    }
}

@media screen and (min-width: 992px) and (max-width: 1199px){ /* large: laptops, desktops */
    body {
	background-color: var(--tx-clr-bg) !important;
	color: var(--tx-clr-fg) !important;
    }

    :root {
	--tx-sz-grid-screen: "l";
	--tx-sz-grid-article: 800px; /* total width: 90+800+90 == max(980) */
    }
}

@media screen and (min-width: 1200px) { /* xlarge: large desktops and TVs */
    body {
	background-color: var(--tx-clr-bg) !important;
	color: var(--tx-clr-fg) !important;
    }

    :root {
	--tx-sz-grid-screen: "xl";
	--tx-sz-grid-article: 800px; /* total width: 90+800+90 == max(980) */
    }
}

/* __      ____ _ ___ _ __ ___   */
/* \ \ /\ / / _` / __| '_ ` _ \  */
/*  \ V  V / (_| \__ \ | | | | | */
/*   \_/\_/ \__,_|___/_| |_| |_| */

.txclock {
    top: 0;
    left: 0;
    margin: 0;
    border: none;
    width: 300px;
    height: 110px;
    overflow: hidden;
    display: inline;
    image-rendering: optimizeSpeed;
    image-rendering: -moz-crisp-edges;
    image-rendering: -o-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor
}
