﻿/* ==========================================================================
   Transum Online Logo - stylesheet
   Keeps the familiar Transum red and the layout everyone is used to, with
   sharper type, flatter buttons and a little more breathing space.
   ========================================================================== */

:root {
  --tm-red: #d81f26;
  --tm-red-dark: #a3151b;
  --tm-red-light: #f04a50;
  --tm-yellow: #ffd84d;
  --tm-blue: #1f5fbf;
  --tm-blue-dark: #17458c;
  --tm-green: #1f8a4c;
  --tm-ink: #1e2430;
  --tm-muted: #5c6675;
  --tm-line: #dfe3ea;
  --tm-soft: #f5f7fb;
  --tm-radius: 8px;
  --tm-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tm-mono: "Cascadia Mono", "Consolas", "Courier New", monospace;
}

body.tmLogo {
  background-color: var(--tm-red);
  padding-top: 4px;
  font-family: var(--tm-font);
  color: var(--tm-ink);
}

body.tmLogo h1 {
  color: var(--tm-yellow);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.28), 0 6px 14px rgba(0, 0, 0, 0.30);
  font-family: "Arial Black", "Segoe UI Black", Impact, sans-serif;
  font-weight: 900;
  font-size: 68px;
  margin: 2px 0 6px;
  letter-spacing: 18px;
  text-indent: 18px;
}

body.tmLogo div.Container {
  box-sizing:border-box;
  width: 1010px;
  border: none;
  border-radius: 14px;
  margin-bottom: 6px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

#MainLogoContainer {
  margin-top: 30px;
  background-image: none;
  background-color: #ffffff;
  padding: 0 0 10px;
  box-sizing: border-box;
  border:1px black solid;

}

/* ---- level tabs --------------------------------------------------------- */

.LevelTabsBig {
  margin: -23px 0 32px;
  width: 1010px;
  border:0px green solid;
}
.LevelTabsBig a { font-size: 18px; }
.LevelTabsBig a.ThisOne {
  background-color: #fff;
  font-size: 18px;
  background-image: none;
  border-bottom: 4px #fff solid;
}

/* ---- the three columns --------------------------------------------------- */

#tmGrid {
  display: grid;
  grid-template-columns: 244px 506px 1fr;
  gap: 12px;
  padding: 0 12px;
  align-items: start;
}

/* ---- left hand panel ----------------------------------------------------- */

#tmLeft {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#tmPages {
  position: relative;
  height: 424px;
  overflow: hidden;
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius);
  background: #fff;
}

#tmPages .tmPage {
  position: absolute;
  top: 0;
  left: 100%;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 10px 12px 12px;
  background: #fff;
  overflow-y: auto;
  transition: left 420ms cubic-bezier(0.33, 0.9, 0.3, 1);
}
#tmPages .tmPage.tmHere { left: 0; }
#tmPages .tmPage.tmGone { left: -100%; }

#tmPages h2 {
  text-align: center;
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--tm-ink);
  letter-spacing: 0.2px;
}
#tmPages h3 {
  font-size: 13.5px;
  margin: 10px 0 2px;
  color: var(--tm-red-dark);
  font-family: var(--tm-mono);
  letter-spacing: 0;
}
#tmPages h4 {
  font-size: 13px;
  color: var(--tm-ink);
  font-weight: 400;
  margin: 8px 0;
  line-height: 1.42;
}
#tmPages p {
  font-size: 11.5px;
  margin: 0 0 4px;
  color: var(--tm-muted);
  line-height: 1.45;
}
#tmPages ul { font-size: 12px; margin: 6px 0 6px 16px; padding: 0; }

img.ChallengeDiagram {
  display: block;
  margin: 8px auto;
  max-width: 190px;
  height: auto;
  border: 1px solid var(--tm-line);
  border-radius: 6px;
  padding: 3px;
  background: #fff;
}

.tmPageHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-bottom: 2px solid var(--tm-soft);
  padding-bottom: 6px;
  margin-bottom: 6px;
}
.tmPageHead .tmTitle {
  font-size: 15px;
  font-weight: 700;
  color: var(--tm-ink);
  white-space: nowrap;
}
.tmPageFoot {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.courrier, code.tmCode {
  font-family: var(--tm-mono);
  font-weight: 700;
  font-size: 13px;
  background: var(--tm-soft);
  border-radius: 4px;
  padding: 0 3px;
  color: var(--tm-red-dark);
}

p.tmCodeBlock {
  display: block;
  background: var(--tm-soft);
  border: 1px solid var(--tm-line);
  padding: 6px 8px;
  border-radius: 5px;
  color: var(--tm-red-dark);
  font-family: var(--tm-mono);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.45;
  margin: 6px 0;
  word-break: break-word;
}
p.tmCodeBlock.tmPre {
  white-space: pre;
  overflow-x: auto;
  word-break: normal;
}

/* ---- buttons ------------------------------------------------------------- */

.tmBtn {
  display: inline-block;
  font-family: var(--tm-font);
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 7px 12px;
  cursor: pointer;
  background: var(--tm-blue);
  color: #fff;
  transition: background 140ms ease, transform 80ms ease;
  line-height: 1.2;
}
.tmBtn:hover { background: var(--tm-blue-dark); }
.tmBtn:active { transform: translateY(1px); }
.tmBtn:focus-visible { outline: 3px solid var(--tm-yellow); outline-offset: 1px; }
.tmBtn[disabled] { opacity: 0.45; cursor: default; }

.tmBtn.tmWide { display: block; width: 100%; }
.tmBtn.tmGhost {
  background: #fff;
  color: var(--tm-blue);
  border: 1.5px solid var(--tm-blue);
}
.tmBtn.tmGhost:hover { background: #eef3fc; }
.tmBtn.tmCheck { background: var(--tm-green); }
.tmBtn.tmCheck:hover { background: #17693a; }
.tmBtn.tmNav {
  padding: 4px 9px;
  font-size: 13px;
  background: var(--tm-soft);
  color: var(--tm-blue-dark);
  font-weight: 700;
}
.tmBtn.tmNav:hover { background: #e4eaf5; }
.tmBtn.tmNav[disabled] { color: #b6bdc9; }

/* ---- stars and trophy ---------------------------------------------------- */

#tmStars {
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius);
  background: var(--tm-soft);
  padding: 7px 8px 6px;
}
#tmStars .tmStarRow {
  display: flex;
  justify-content: space-between;
  gap: 1px;
  margin-bottom: 4px;
}
#tmStars .tmStar {
  width: 20px;
  height: 20px;
  display: block;
  color: #c9ced8;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
#tmStars .tmStar.tmWon { color: #f2b705; }
#tmStars .tmStar svg { width: 20px; height: 20px; display: block; }
#tmStars .tmStarText {
  font-size: 11px;
  color: var(--tm-muted);
  text-align: center;
}
#tmStars .tmStarText b { color: var(--tm-ink); }

#Trophybutton {
  display:none;
  background: linear-gradient(to bottom, var(--tm-red-light), var(--tm-red-dark));
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  font-family: var(--tm-font);
  padding: 11px 22px;
  border: 2px solid #fff;
  border-radius: 40px;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.18), 0 8px 16px rgba(0, 0, 0, 0.25);
  animation: tmPulse 2.4s infinite ease-in-out;
}
#Trophybutton:hover { filter: brightness(1.06); }
#Trophybutton:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}
@keyframes tmPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* ---- middle column ------------------------------------------------------- */

#tmCentre { display: flex; flex-direction: column; gap: 8px; }

#tmCanvasWrap {
  position: relative;
  width: 500px;
  height: 400px;
  border: 3px solid var(--tm-red);
  border-radius: var(--tm-radius);
  background: #fff;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
#tmCanvasWrap canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 500px;
  height: 400px;
}

#tmMessage {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  font-size: 12.5px;
  font-family: var(--tm-mono);
  background: rgba(30, 36, 48, 0.86);
  color: #fff;
  padding: 5px 9px;
  border-radius: 6px;
  display: none;
  white-space: pre-wrap;
  max-height: 96px;
  overflow-y: auto;
}
#tmMessage.tmShow { display: block; }
#tmMessage.tmBad { background: rgba(163, 21, 27, 0.94); }
#tmMessage.tmGood { background: rgba(31, 138, 76, 0.94); }

/* ---- the command input --------------------------------------------------- */

#tmInputRow {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
#tmInputBox {
  position: relative;
  flex: 1;
}
#tmInput {
  width: 100%;
  box-sizing: border-box;
  background: #fffdf0;
  border: 2px solid var(--tm-red);
  border-radius: 6px;
  font-family: var(--tm-mono);
  font-weight: 700;
  font-size: 19px;
  color: var(--tm-ink);
  padding: 7px 34px 7px 10px;
  resize: none;
  line-height: 1.35;
  overflow: hidden;
}
#tmInput:focus { outline: none; border-color: var(--tm-red-dark); }
#tmInput::placeholder { color: #b9a98f; font-weight: 400; font-size: 15px; }

body.tmExpanded #tmInput {
  overflow: auto;
  font-size: 15px;
  height: 148px;
  padding-right: 30px;
}
body.tmExpanded #tmInputRow { align-items: stretch; }
body.tmExpanded .tmSquareBtn.tmRecall { height: 42px; align-self: flex-start; }

#tmToggle {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--tm-red);
  font-size: 15px;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
}
#tmToggle:hover { background: #ffe9e9; }

.tmSquareBtn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 6px;
  background: var(--tm-red);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  flex: none;
  transition: background 140ms ease;
}
.tmSquareBtn:hover { background: var(--tm-red-dark); }
.tmSquareBtn:active { transform: translateY(1px); }
.tmSquareBtn.tmRecall { font-size: 18px; background: #6b7280; }
body.tmRunning #tmGoBtn { background: #6b7280; font-size: 12px; }
body.tmRunning #tmGoBtn:hover { background: #4b5563; }
.tmSquareBtn.tmRecall:hover { background: #4b5563; }

#tmRunRow {
  display: none;
  gap: 6px;
  align-items: center;
}
body.tmExpanded #tmRunRow { display: flex; }
body.tmExpanded #tmGoBtn { display: none; }



#tmFootLinks { display: flex; justify-content: space-between; gap: 8px; }
#tmFootLinks a.tmBtn { flex: 1; text-align: center; text-decoration: none; }
#tmFootLinks a.tmBtn:hover { text-decoration: none; color: var(--tm-blue); }

/* ---- right hand column --------------------------------------------------- */

#right_container {
  text-align: center;
  min-height: 500px;
}
#right_container p { font-size: 12px; }

/* ---- lightbox ------------------------------------------------------------ */

#tmModalBg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 24, 0.62);
  z-index: 900;
}
#tmModalBg.tmShow { display: block; }

.tmModal {
  display: none;
  position: fixed;
  z-index: 901;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(860px, 92vw);
  max-height: 84vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  padding: 20px 24px 26px;
  text-align: left;
}
.tmModal.tmShow { display: block; }
.tmModal h2 {
  margin: 0 0 4px;
  font-size: 22px;
  color: var(--tm-red-dark);
}
.tmModal .tmSub {
  margin: 0 0 14px;
  color: var(--tm-muted);
  font-size: 13px;
}
.tmModalClose {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: var(--tm-soft);
  color: var(--tm-ink);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 17px;
  cursor: pointer;
  line-height: 1;
}
.tmModalClose:hover { background: #e4e8f0; }

.tmCmdGrid {
  columns: 2;
  column-gap: 26px;
}
.tmCmdGroup {
  break-inside: avoid;
  margin-bottom: 16px;
}
.tmCmdGroup h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--tm-red);
  margin: 0 0 6px;
  border-bottom: 2px solid var(--tm-soft);
  padding-bottom: 3px;
}
.tmCmdGroup dl { margin: 0; }
.tmCmdGroup dt {
  font-family: var(--tm-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--tm-ink);
  margin-top: 7px;
}
.tmCmdGroup dd {
  margin: 1px 0 0;
  font-size: 12.5px;
  color: var(--tm-muted);
  line-height: 1.4;
}
.tmLevelTag {
  display: inline-block;
  font-family: var(--tm-font);
  font-size: 10px;
  font-weight: 700;
  background: var(--tm-soft);
  color: var(--tm-blue-dark);
  border-radius: 10px;
  padding: 1px 7px;
  margin-left: 5px;
  vertical-align: 1px;
}

#tmHistoryList {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--tm-line);
  border-radius: 6px;
  padding: 6px;
  background: var(--tm-soft);
}
#tmHistoryList button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: #fff;
  border-radius: 4px;
  font-family: var(--tm-mono);
  font-size: 12.5px;
  padding: 4px 7px;
  margin-bottom: 4px;
  cursor: pointer;
  white-space: pre-wrap;
}
#tmHistoryList button:hover { background: #eef3fc; }

/* ---- footer -------------------------------------------------------------- */

div#LogoFooter {
  width: 1000px;
  background-color: #fff;
  border: none;
  border-radius: 14px;
  margin: 26px auto 0;
  padding: 18px 22px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
}
div#LogoFooter p { text-align: left; line-height: 1.55; }
img#Logo_Pattern {
  height: 251px;
  width: 279px;
  float: right;
  margin: 0 0 10px 16px;
  border-radius: 8px;
}

/* ---- printing ------------------------------------------------------------ */

@media print {
  body.tmLogo { background: #fff; }
  #right_container, #tmInputRow, #tmStars, .LevelTabs { display: none; }
}
