/* =========================
   Variables
   ========================= */
:root{
  --obs-footer-h: 60px;       /* visual size target; no logic depends on it now */
  --nb-line-left: 7%;          /* notebook margin line position */
  --nb-gutter: 12px;           /* space between red line and text */
  --page-gutter: 5vw;          /* outer page gutter for content */
  --toolbar-h: 0px;           /* fixed toolbar height (if used) */
}

/* =========================
   Base
   ========================= */
* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  height: auto;
  margin: 0;
  overflow-x: hidden;
}

body {
  /* Make footer stick to bottom on short pages */
  min-height: 100vh;
  display: flex;
  flex-direction: column;


  font-family: "Courier New", Courier, monospace;
  font-size: 24px;

  /* Safe area insets */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);

  /* Hard-override any page-level body margins so footer can be full-bleed */
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* =========================
   Content Wrapper
   ========================= */
.main-container{
  /* space under your absolute header box */
  margin-top: 0px;

  /* gutters and alignment */
  max-width: 90%;
  margin-left: var(--page-gutter);
  margin-right: var(--page-gutter);
  padding: 0 10px;

  /* align text visually to the right of the red line */
  padding-left: max(0px, calc(var(--nb-line-left) - var(--page-gutter) + var(--nb-gutter)));

  text-align: left;
}

/* Optional spacer when you want push-down equal to toolbar height */
.toolbar-spacer { height: var(--toolbar-h); }

/* =========================
   Header White Box & Red Line
   ========================= */
.white-box {
  width: 100%;
  height: 85px;
  background-color: #fff;
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex; justify-content: center; align-items: center;
  z-index: 200; /* above red line */
}
.white-box h2 {
  margin: 0;
  font-size: clamp(1.2rem, 6vw, 2rem);
  color: #000; text-align: center;
}
.white-box h4 {
  margin: 0;
  font-size: clamp(0.9rem, 3vw, 1.2rem);
  color: #000; text-align: center;
}

/* Red notebook line: let it run to the very bottom,
   and simply draw the footer above it so it never shows inside the footer. */
.red-line {
  position: fixed;
  top: 0;
  left: var(--nb-line-left);
  bottom: 0;                 /* <- simplified: no JS/var dependency */
  width: 2px;
  background: red;
  z-index: 300;              /* below footer */
  pointer-events: none;
}

/* =========================
   Lists & Typography
   ========================= */
ul {
  margin: 0 100px;
  padding-left: clamp(1rem, 4vw, 1.25rem);
  padding-bottom: clamp(1rem, 4vw, 1.875rem);
  padding-top: 7px;
}
ol ul {
  margin: 0;
  padding-left: clamp(1rem, 4vw, 1.25rem);
  padding-bottom: clamp(1rem, 4vw, 1.875rem);
  margin-top: -12px; margin-bottom: 8px;
}
li {
  margin: 0; padding: 0;
  line-height: 1.33;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
}
li.indented-square {
  margin-left: clamp(0.75rem, 6vw, 2.5rem);
  list-style-type: circle;
}
ol {
  margin: 0;
  padding-left: clamp(1rem, 9vw, 2.5rem);
  padding-bottom: clamp(1rem, 4vw, 1.875rem);
  padding-top: 7px;
}
.highlight { background: yellow; }
strong { text-decoration: underline; }

/* =========================
   Buttons (base)
   ========================= */
button {
  font-size: 1rem;
  padding: 4px 10px;
  border: 2px solid #000; border-radius: 6px;
  background-color: rgb(230,230,230);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.6);
  transition: 0.1s transform, 0.1s box-shadow, 0.15s background-color, 0.15s color;
}
button:active { transform: translateY(2px); box-shadow: 0 2px 4px rgba(0,0,0,0.4); }
button:hover {
  background-color: rgb(0,255,0);
}
/* =========================
   Video Modal
   ========================= */
.video-thumbnail {
  width: 80vw; max-width: 360px; aspect-ratio: 16 / 9;
  cursor: pointer; position: relative; margin: 0 auto 20px;
  border: 0 solid #000; border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.6);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.video-thumbnail img { width: 100%; height: auto; display: block; border-radius: 10px; }

.modal { display: none; }
.modal.show {
  display: flex; position: fixed; z-index: 1000;
  left: 0; top: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center; align-items: center;
}
.modal-content {
  aspect-ratio: 16 / 9; width: 90vw; max-width: 1000px; background: none; padding: 0; position: relative;
}
.modal-content iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: none; display: block; }
.close { position: absolute; top: 10px; right: 10px; color: red; font-size: 10vw; font-weight: bold; cursor: pointer; z-index: 2; }

/* =========================
   Inputs
   ========================= */
.idTextBox {
  position: fixed; top: 10px; right: 140px; z-index: 995;
  font-size: clamp(0.9rem, 3vw, 1rem);
  width: 100%; max-width: clamp(100px, 30vw, 105px);
  padding: clamp(3px, 1vw, 1px) clamp(2px, 2vw, 6px);
  border: 2px solid #000; border-radius: 6px;
}

input[type="text"],
input[type="text2"] {
  font-size: clamp(0.9rem, 3vw, 1rem);
  width: 90%; max-width: clamp(100px, 30vw, 105px);
  padding: clamp(2px, 1vw, 1px);
  border: 2px solid #000; border-radius: 6px;
}
input[type="text3"] {
  width: 90%; max-width: 60px; font-size: 16px;
  background: rgb(230,230,230);
  height: 26px; padding: 2px;
  border: 2px solid #000; border-radius: 6px; vertical-align: top;
}
input[type="text"]:hover,
input[type="text2"]:hover { background: #00ff00; }
input[type="versionBox"] { width: 90%; max-width: 30px; }

select {
  color: #000; font-size: 16px; height: 26px;
  border: 2px solid #000; background: #fff; padding: 2px; cursor: pointer; border-radius: 6px; vertical-align: top;
}
select:hover { background: #0f0; }
select:active, select:focus { outline: none; }
#calculator {
  width: 85vw;              
  max-width: none;          
  height: 90vh;            
  margin: 0 auto 40px;
  box-sizing: border-box;
}
@media only screen and (max-width: 600px) {
  body {
	margin: 10px;
	padding-top: 0px;
	padding-left: 10px;
	font-size: 16px;
  }
  #calculator {
	width: 85vw;              
	max-width: none;          
	height: 90vh;            
	margin: 0 auto 10px;
	box-sizing: border-box;
  }
}
/* =========================
   Footer (full-bleed, fixed bottom behavior)
   ========================= */
.obs-footer {
  width: 100%;               /* full page width */
  background: #e0e0e0;       /* opaque: hides red line behind it */
  z-index: 400;              /* above the red line */
  flex: 0 0 auto;            /* don't shrink */
  margin-top: auto;          /* stick to the bottom when content is short */
}
.obs-footer__wrap {
  /* grid so text is centered while logo hugs left edge */
  display: grid;
  grid-template-columns: 1fr auto 1fr;  /* [logo] [text] [spacer] */
  align-items: center;
  justify-items: center;

  max-width: 3000px;
  margin: 0 auto;
  min-height: var(--obs-footer-h);
  padding: 5px 20px;
}
.obs-footer__logo {
  grid-column: 1;             /* places the logo in the 1st column of the footer grid */
  justify-self: start;        /* left-aligns it within that grid cell */
  padding-left: 0px;          /* space from the left edge (increase to push it in) */

  width: auto;                /* keep natural aspect ratio (width follows height) */

  /* The main size control: logo HEIGHT is clamped between a min and a max,
     with a “preferred” value in the middle. */
  height: clamp(40px, 18vh, calc(var(--obs-footer-h) - 12px));

  /* Prevents the logo from getting too wide on very large screens */
  max-width: min(32vw, 320px);

  object-fit: contain;        /* safe if both height & width are constrained */
}

.obs-footer__text {
  grid-column: 3;
  color: #111;
  font-size: clamp(18px, 1.0vw, 24px);
  text-align: left;
  display: grid;
  gap: 6px;
  justify-items: left;
}
.obs-footer__contact a {
  color: #0000ff; border-bottom-color: transparent; text-decoration: none;
}
.obs-footer__contact a:hover,
.obs-footer__contact a:focus {
  color: #002a52; border-bottom-color: currentColor;
}

/* Small screens: stack logo and text */
@media (max-width: 520px) {
  .obs-footer__wrap {
    grid-template-columns: 1fr;
    row-gap: 10px;
    text-align: center;
  }
  .obs-footer__logo {
    grid-column: 1;
    justify-self: center;
    padding-left: 0;
    height: clamp(48px, 14vw, 90px);
    max-width: 60vw;
  }
}

/* =========================
   CONTROL & STATUS TOOLBAR (optional)
   ========================= */
.toolbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 2000;
  background: rgb(250, 250, 250);
  border-bottom: 1px solid #000;
  white-space: nowrap;
  overflow-x: auto;
  min-height: var(--toolbar-h);
  display: flex; align-items: center;
}
.toolbar__wrap {
  width: 100%;
  max-width: 2000px;
  margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
}
.toolbar__wrap input[type="text"] {
  width: clamp(120px, 16vw, 200px);
  padding: 4px 8px;
  font-size: 16px;
  border: 2px solid #000;
  border-radius: 6px;
}
.toolbar__wrap button#connectButton,
.toolbar__wrap button#toggleDirections {
  min-height: 30px;
}
#status { margin: 0; }
#toggleDirections { margin-left: auto; }
#toggleDirections:focus-visible { outline: 3px solid #000; outline-offset: 2px; }
#directionsBlock { scroll-margin-top: calc(var(--toolbar-h) + 16px); }
.hidden-seo {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ===== Top Nav ===== */
:root{
  --nav-h: 56px;
  --nav-bg: #0b4f6c;
  --nav-fg: #ffffff;
  --nav-hover: #0e6c8e;   /* hover bg for items */
  --nav-sub-bg: #ffffff;  /* submenu panel */
  --nav-sub-fg: #0b4f6c;
  --nav-sub-hover: #f0f6f9;
}

/* Reserve space under fixed bar so content isn't hidden */
body { padding-top: var(--nav-h); }

.topnav{
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--nav-bg); color: var(--nav-fg);
  border-bottom: 1px solid rgba(0,0,0,.1);
  height: var(--nav-h);
}
.topnav__wrap{
  max-width: 1200px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 16px; padding: 0 16px;
}
.topnav__brand{
  color: var(--nav-fg); text-decoration: none; font-weight: 700; letter-spacing:.3px;
}

/* Menu for front page */
.topnav__menu{
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: stretch; gap: 4px; height: 100%;
}
.topnav__menu > li { position: relative; }
.topnav__menu > li > a{
  display: flex; align-items: center;
  padding: 0 14px; height: var(--nav-h);
  color: var(--nav-fg); text-decoration: none; font-weight: 600;
  transition: background-color .15s ease, color .15s ease;
}
.topnav__menu > li:hover > a{ background: var(--nav-hover); }

/* Submenus */
.topnav__submenu{
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--nav-sub-bg); color: var(--nav-sub-fg);
  border: 1px solid rgba(0,0,0,.08); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  list-style: none; margin: 6px 0 0 0; padding: 6px;
  opacity: 0; pointer-events: none; transform: translateY(6px);
  transition: opacity .12s ease, transform .12s ease;
}
.topnav__submenu li a{
  display: block; padding: 10px 12px; border-radius: 6px;
  color: var(--nav-sub-fg); text-decoration: none; font-weight: 600;
}
.topnav__submenu li a:hover{ background: var(--nav-sub-hover); }
.has-sub:hover > .topnav__submenu{ opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Mobile */
.topnav__burger{
  margin-left: auto; display: none; width: 40px; height: 32px;
  background: transparent; border: 0; cursor: pointer;
}
.topnav__burger span{ display:block; height:3px; margin:5px 0; background: var(--nav-fg); }

@media (max-width: 900px){
  .topnav__burger{ display: block; }
  .topnav__menu{
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--nav-bg); flex-direction: column; gap: 0;
    max-height: 0; overflow: hidden; transition: max-height .2s ease;
  }
  .topnav__menu > li > a{ height: 48px; }
  .topnav__menu.open{ max-height: 80vh; overflow: auto; }

  /* Mobile submenus open on tap (no hover) */
  .has-sub > .topnav__submenu{
    position: static; box-shadow: none; border: 0; border-radius: 0; margin: 0;
    opacity: 1; pointer-events: auto; transform: none; background: transparent;
  }
  .topnav__submenu li a{ color: #e7f6ff; }
  .topnav__submenu li a:hover{ background: rgba(255,255,255,.08); }
}
/* Footer: consistent typography everywhere (matches index.html feel) */
.obs-footer,
.obs-footer__text,
.obs-footer__contact,
.obs-footer__legal {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.25;
  letter-spacing: 0.2px;
}

/* Keep the right block pushed right and right-aligned (you already added this) */
.obs-footer__text{
  justify-self: end;
  text-align: right;
}

/* Optional: make the email link match the text color instead of bright blue */
.obs-footer__contact a {
  color: inherit;
  text-decoration: underline;
}
.obs-footer__contact a:hover { text-decoration: none; }
/* Footer email link styling (distinct color + good accessibility) */
:root{
  --footer-link: #0b5fff;         /* blue */
  --footer-link-hover: #0842cc;   /* darker on hover/focus */
  --footer-link-visited: #6941c6; /* purple for visited */
}

.obs-footer__contact a{
  color: var(--footer-link);
  text-decoration: underline;
  font-weight: 600;
}

.obs-footer__contact a:hover,
.obs-footer__contact a:focus-visible{
  color: var(--footer-link-hover);
  text-decoration: none;          /* subtle change on hover */
  outline: 2px solid transparent; /* keep layout stable */
  outline-offset: 2px;
}

.obs-footer__contact a:visited{
  color: var(--footer-link-visited);
}

.obs-footer__contact a:active{
  color: var(--footer-link-hover);
}
