/* Central Standard Time — "Oddball" public theme.
   Layered on top of Bulma 1.x by remapping its HSL CSS variables, plus a thin
   layer of bespoke motifs from the print pamphlet. Scoped to html.cst-theme so
   the staff site is untouched. */

html.cst-theme {
  /* Tokens */
  --cst-cream: #faf6e9;
  --cst-ink: #151615;
  --cst-brick: #bc262c;
  /* Extended brand palette (no standard Bulma semantic slot) */
  --cst-water: #8ad8f8;
  --cst-purple: #ad92da;
  --cst-brown: #7b5543;
  --cst-steam: #bbd0bd;
  --cst-sky: #75d0e9;
  /* Display role uses the existing sans (Bulma's default stack) for now;
     a licensed display face can drop in here later. */
  --cst-display: Inter, "SF Pro", "Segoe UI", Roboto, Oxygen, Ubuntu,
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --cst-body: "Times New Roman", Times, serif;

  /* Bulma palette, driven by its HSL component variables */
  --bulma-scheme-h: 46deg;
  --bulma-scheme-s: 63%;
  --bulma-scheme-main-l: 95%;     /* cream #FAF6E9 */
  --bulma-scheme-main-bis-l: 92%; /* card surface, slightly deeper cream */
  --bulma-scheme-main-ter-l: 89%;
  --bulma-background-l: 90%;
  --bulma-border-l: 82%;

  --bulma-text-h: 120deg;
  --bulma-text-s: 3%;
  --bulma-text-l: 9%;             /* ink #151615 */
  --bulma-text-strong-l: 6%;
  --bulma-text-weak-l: 36%;

  --bulma-primary-h: 358deg;
  --bulma-primary-s: 66%;
  --bulma-primary-l: 44%;         /* brick #BC262C */
  --bulma-primary-invert-l: 97%;  /* light cream label on brick buttons */

  --bulma-link-h: 358deg;
  --bulma-link-s: 66%;
  --bulma-link-l: 44%;

  --bulma-info-h: 182deg;
  --bulma-info-s: 53%;
  --bulma-info-l: 40%;            /* hand teal #30989C */

  --bulma-success-h: 124deg;
  --bulma-success-s: 40%;
  --bulma-success-l: 57%;         /* stem green #64BD6A */

  --bulma-warning-h: 67deg;
  --bulma-warning-s: 71%;
  --bulma-warning-l: 68%;         /* flower green #DAE774 */

  /* Typography: body in Times New Roman, headings in the default sans */
  --bulma-family-primary: var(--cst-body);
  --bulma-family-secondary: var(--cst-display);

  /* Near-square corners echo the pamphlet's framed plate */
  --bulma-radius-small: 1px;
  --bulma-radius: 2px;
  --bulma-radius-medium: 2px;
  --bulma-radius-large: 3px;
}

html.cst-theme,
html.cst-theme body {
  font-family: var(--cst-body);
}

/* === Display type: existing sans, uppercase === */
html.cst-theme .title,
html.cst-theme .cst-display,
html.cst-theme .cst-wordmark,
html.cst-theme .button,
html.cst-theme .navbar-item.has-text-weight-bold {
  font-family: var(--cst-display);
  font-weight: 700;
}

html.cst-theme .title,
html.cst-theme .cst-display {
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
}

html.cst-theme .button {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* === Wordmark (home hero) === */
html.cst-theme .cst-wordmark {
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: 0.01em;
  font-size: clamp(1.75rem, 5.5vw, 3.25rem);
  color: var(--cst-ink);
  margin: 0.5rem 0 0;
}

/* Home hero illustration: capped to the viewport so it never breaks no-scroll */
html.cst-theme .cst-hero-img {
  display: block;
  margin: 0 auto;
  max-height: 25vh;
  max-width: 100%;
  width: auto;
}

/* === Home: fill the viewport when it fits, scroll when it doesn't ===
   Override Bulma's is-fullheight (min-height: 100vh) with dvh so it tracks the
   visible viewport rather than the larger static one. On short viewports
   (mobile, zoomed-in), content extends past the fold and the page scrolls. */
html.cst-theme .cst-home.hero.is-fullheight {
  min-height: 100dvh;
}

html.cst-theme .cst-home .container {
  padding-left: .75rem;
  padding-right: .75rem;
  gap: 1rem;
}

/* === Footer taglines: brick flash, slow fade back === */
html.cst-theme .cst-home .hero-foot {
  padding: 0 1em 1em;
}

html.cst-theme .hero-foot .cst-display,
html.cst-theme .cst-word {
  transition: color 4s ease;
  cursor: default;
}

html.cst-theme .hero-foot .cst-display:hover,
html.cst-theme .cst-word:hover {
  color: var(--cst-brick);
  transition: color 0.5s ease;
}

/* === Lyrical statement blocks === */
html.cst-theme .cst-statement {
  font-family: var(--cst-body);
  color: var(--cst-brick);
  text-align: center;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.3;
  max-width: 34rem;
  margin: 2.5rem auto;
}

html.cst-theme .cst-statement.is-display {
  font-family: var(--cst-display);
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.05;
}

/* === Stacked big text links === */
html.cst-theme .cst-link-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

html.cst-theme .cst-link {
  font-family: var(--cst-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(1.35rem, 4vw, 2.25rem);
  line-height: 1.05;
  color: var(--cst-ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.12em;
  transition: color 0.1s;
}

html.cst-theme .cst-link:hover {
  color: var(--cst-brick);
}

/* === Framed plate: thick brick border + thin ink keyline === */
html.cst-theme .cst-frame {
  position: relative;
  border: 10px solid var(--cst-brick);
  background: var(--cst-cream);
}

html.cst-theme .cst-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--cst-ink);
  pointer-events: none;
}

/* === Form controls: crisp ink keylines === */
html.cst-theme .input,
html.cst-theme .textarea,
html.cst-theme .select select {
  border-color: var(--cst-ink);
}

/* === Helpers === */
html.cst-theme .has-text-brick { color: var(--cst-brick) !important; }
html.cst-theme .has-text-water { color: var(--cst-water) !important; }
html.cst-theme .has-text-purple { color: var(--cst-purple) !important; }
html.cst-theme .has-text-brown { color: var(--cst-brown) !important; }
html.cst-theme .has-text-steam { color: var(--cst-steam) !important; }
html.cst-theme .has-text-sky { color: var(--cst-sky) !important; }
html.cst-theme .cst-italic { font-style: italic; }

/* ===========================================================================
   Ported structural utilities (from _shared._CUSTOM_CSS), recolored to theme.
   Public pages depend on these; keep them here so the public site is
   self-contained and the staff inline copy can diverge.
   =========================================================================== */

/* Layout */
.cst-theme .sidebar { flex-basis: 17rem; flex-shrink: 0; width: 100%; }
@media (min-width: 1024px) { .cst-theme .sidebar { width: 17rem; } }
.cst-theme .two-panel { display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 1024px) {
  .cst-theme .two-panel { flex-direction: row; align-items: flex-start; }
}
.cst-theme .public-shell {
  min-height: 100dvh;
  background: var(--cst-cream);
  color: var(--cst-ink);
  padding: 1.5rem;
  max-width: 28rem;
  margin: 0 auto;
}
@media (min-width: 768px) { .cst-theme .public-shell { padding: 3rem; } }

/* Locker cell */
.cst-theme .locker-cell {
  cursor: pointer; transition: transform .1s; min-width: 9.1rem; padding: 0.8rem;
  text-align: center; border: 1px solid; border-radius: 2px; font-size: 1.125rem;
}
.cst-theme .locker-cell-inner {
  display: flex; flex-direction: column; min-height: 4.5rem; text-align: left;
}
.cst-theme .locker-cell-inner .locker-data { margin-top: auto; }
.cst-theme .locker-cell:hover { transform: scale(1.05); }
.cst-theme .locker-cell:active { transform: scale(0.95); }

@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .6 } }
.cst-theme .pulsing { animation: pulse 1.5s ease-in-out infinite; }

/* Action links */
.cst-theme .action-link {
  text-decoration: underline; cursor: pointer; display: inline-block;
  padding: .5rem .25rem; transition: opacity .1s;
}
.cst-theme .action-link:hover { opacity: .6; }
.cst-theme .action-link:active { opacity: .4; }
.cst-theme .action-link.is-small { font-size: .75rem; padding: .375rem .25rem; }

.cst-theme .cancel-overlay {
  position: absolute; top: 0; right: 0; font-size: .75rem;
  color: var(--cst-brick); cursor: pointer; padding: .5rem; line-height: 1;
}
.cst-theme .cancel-overlay:hover { color: #9b171c; }

/* Utilities (no Bulma equivalent) */
.cst-theme .flex-1 { flex: 1; min-width: 0; overflow-x: auto; }
.cst-theme .gap-1 { gap: .25rem } .cst-theme .gap-2 { gap: .5rem }
.cst-theme .gap-3 { gap: .75rem } .cst-theme .gap-4 { gap: 1rem }
.cst-theme .gap-6 { gap: 1.5rem }
.cst-theme .space-y > * + * { margin-top: .75rem; }
.cst-theme .opacity-40 { opacity: .4 } .cst-theme .opacity-50 { opacity: .5 }
.cst-theme .opacity-60 { opacity: .6 } .cst-theme .opacity-70 { opacity: .7 }
.cst-theme .extra-bold { font-weight: 900 } .cst-theme .nowrap { white-space: nowrap }
.cst-theme .text-sm { font-size: .875rem } .cst-theme .underline { text-decoration: underline }

/* Info buttons */
.cst-theme .info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.4rem; height: 1.4rem; border-radius: 50%; background: none; border: none;
  cursor: pointer; font-size: 1rem; color: var(--cst-brick); padding: 0; line-height: 1;
  vertical-align: middle; margin-left: .35rem; opacity: .65; transition: opacity .15s;
  position: relative; top: -1px;
}
.cst-theme .info-btn:hover,
.cst-theme .info-anchor:hover .info-btn,
.cst-theme .info-anchor.is-open .info-btn { opacity: 1 }
.cst-theme .info-anchor { position: relative; display: inline-block }
.cst-theme .info-popup {
  display: none; position: absolute; left: calc(100% + .5rem); top: 50%;
  transform: translateY(-50%); width: 240px; background: var(--cst-ink); color: var(--cst-cream);
  border-radius: 3px; padding: .65rem .8rem; font-size: .78rem; line-height: 1.5;
  z-index: 100; box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}
.cst-theme .info-popup::before {
  content: ''; position: absolute; right: 100%; top: 50%;
  transform: translateY(-50%); border: 5px solid transparent; border-right-color: var(--cst-ink);
}
.cst-theme .info-anchor:hover .info-popup,
.cst-theme .info-anchor.is-open .info-popup { display: block }
@media (max-width: 1024px) {
  .cst-theme section.box { position: relative }
  .cst-theme .info-anchor { position: static }
  .cst-theme .info-popup {
    position: absolute; left: .75rem; right: .75rem; top: 2.75rem;
    transform: none; width: auto;
  }
  .cst-theme .info-popup::before {
    right: auto; left: 1rem; top: -10px; transform: none;
    border: 5px solid transparent; border-bottom-color: var(--cst-ink);
  }
}
